However, It didn't work.. I spent some time fixing all of the calls to subs that didn't exist and fixing the errors that popped up, Etc.. Anyway, I have tested this with two characters and it worked for the entire quest..
the only change you may have to make is if you are lagging, there are two lines that are commented out that you will need to uncomment.. They are marked in the code.
Make sure that you have move.inc. You can get it here.. http://www.macroquest2.com/phpBB2/viewtopic.php?t=7207
If someone wants to figure out how to get it to give 4 items at a time or end when Snokin says whatever it is he says at the end of the quest so that you don't have to say "silly work" again.. feel free, It late and I'm not feeling that industrious..
anyway.. Here's the code.. Hope you find it usefull..
Code: Select all
| Smithing Freebie
| Freesmith.mac
| Actually Works on Abysmal Free Smithing Quest
| Version 2.0
| Date: 10-02-04
| By: Alexander
|
| You WILL need to in front of Snokin Breaksteel in Abysmal Sea for it to work
| Also Make sure that you have the move.inc file in your macro directory
|
| Disclaimer:
| Code was used from a macro created by ScubaSki.
|
| Snokin loc = 96.50,260.36,113.94
| Forge Loc = 175.08,253.02,113.94
| Next to Forge = 165.53,257.12,113.94
#include move.inc
#event CombineError "#*#There was no place to put that#*#"
#event CombineError "#*#You cannot combine these items in this container type!#*#"
#event CombineError "#*#did not accept these items#*#"
#event ContUsed "#*#Someone else is using that. Try again later.#*#"
Sub Main
/declare Comp[3] string outer
/declare ItemTurnIn string outer
/declare VariItem string outer
/declare StopItem string outer
/declare Itemset int outer
/declare EndIt int outer
/declare SetCount int outer
/declare i int outer
/varset VariItem "Simple Chisel Mold"
/varset StopItem "NULL"
/varset SetCount 3
/varset Itemset 1
/varset EndIt 1
:Start
/call GMCheck
/call GetItems
/if (${EndIt}!=1) {
/Echo Quest Finished Ending Macro
/endmacro
}
| ** Move to Forge
/call MovetoLoc 165.53,257.12,113.94
/echo At Forge
/call Docombine
| ** Move to Snokin
/call MovetoLoc 96.50,260.36,113.94
/echo At Snokin
/call GiveItems
/goto :Start
/return
Sub GetItems
/varset SetCount 3
:Loop
/target Snokin
/face nolook Snokin
/nomodkey /say Silly Work
/delay 1s
/if (!${Window[InventoryWindow].Open}) /nomodkey /keypress inventory
/delay 2
| ** Placing components in inventory
/for i 1 to 3
/varset Comp[${i}] ${Cursor.Name}
/echo Item ${i} is ${Comp[${i}]}
/if (${Comp[1].Equal[${StopItem}]}) {
/varset EndIt 2
}
/autoinv
/delay 2s
/next i
/if (${Comp[2].Equal[${VariItem}]}) {
/varset SetCount 2
}
/return
Sub GiveItems
/varset Itemset 1
/delay 1s
/call OpenPacks
/target Snokin
/face nolook
:ItemLoop
/ctrl /itemnotify ${FindItem[${ItemTurnIn}].InvSlot} leftmouseup
/click left target
/delay 1s
/nomodkey /notify GiveWnd GVW_Give_Button leftmouseup
/delay 1s
| ** Check for more items
/if (${FindItem[${ItemTurnIn}].ID}!=NULL) {
/goto :ItemLoop
}
/call ClosePacks
/return
Sub GMCheck
:gmcheck
/if (${Spawn[gm].ID}>0) {
/echo "Waiting on GM to leave zone."
/delay 10
/goto :gmcheck
}
/return
Sub Event_CombineError
/beep
/return
Sub Event_ContUsed
/echo Container in use. Waiting 30 seconds and trying again.
/delay 30s
/itemtarget "Forge"
/delay 1s
/nomodkey /click left item
/delay 2s
/doevents
/return
|---------------------------------------------------
| SUB: Do the Comines
|---------------------------------------------------
Sub DoCombine
/declare iSlot int local
/declare Counter int local
/doevents
|------------------------------------------------
| Open Forge.
|------------------------------------------------
/itemtarget Forge
/face item
/click left item
/delay 2s
/notify TradeSkillWnd ExperimentButton leftmouseup
|------------------------------------------------
| Clear Out Brew Barrel.
|------------------------------------------------
/echo Cleaning Out Forge...
/for iSlot 1 to 10
/shiftkey /itemnotify enviro${iSlot} leftmouseup
/if (${Cursor.ID}) {
/destroy
}
/next iSlot
|------------------------------------------------
| Open Inventory Window.
|------------------------------------------------
/if (!${Window[InventoryWindow].Open}) /nomodkey /keypress inventory
/delay 2
|------------------------------------------------
| Open All 8 Packs.
|------------------------------------------------
/call OpenPacks
|------------------------------------------------
| Make Recipe.
|------------------------------------------------
/echo Making Recipe...
:MakeRecipe
/doevents
/call GMCheck
/for Counter 1 to ${SetCount}
/if (${FindItem[${Comp[${Counter}]}].InvSlot}==NULL) /goto :Done
/ctrl /itemnotify ${FindItem[${Comp[${Counter}]}].InvSlot} leftmouseup
| *** If you are lagging, uncomment the two delay lines.
| /delay 1s
/itemnotify enviro${Counter} leftmouseup
| /delay 1
/next Counter
/delay 1
/combine enviro
/delay 2s
/if (${Itemset}==1) {
/if (!${Cursor.ID}) {
/echo Didn't create recipe, Trying again...
/goto :ClearCursor
} else {
/varset ItemTurnIn ${Cursor.Name}
/echo setting Item Name to ${ItemTurnIn}
/varset Itemset 3
}
}
|------------------------------------------------
| Clearing the Cursor.
|------------------------------------------------
:ClearCursor
/autoinventory
/delay 2
/if (!${FindItem[${Comp[1]}].InvSlot}) {
/goto :Done
} else {
/goto :MakeRecipe
}
|------------------------------------------------
| Done with Making Recipe.
|------------------------------------------------
:Done
/call ClosePacks
/return
Sub OpenPacks
/declare bag int local 0
/declare check int local 0
/newif (!${Window[InventoryWindow].Open}) /nomodkey /keypress inventory
/delay 1s
/for bag 1 to 8 step 1
/newif (${Window[Pack${bag}].Open}==FALSE) /nomodkey /itemnotify pack${bag} rightmouseup
/next bag
/delay 1s
/for check 1 to 9 step 1
/if (${Window[TradeskillWnd].Open}) {
/nomodkey /notify TradeskillWnd ExperimentButton leftmousehold
/nomodkey /notify TradeskillWnd ExperimentButton leftmouseup
}
/next check
/delay 1s
/return
Sub ClosePacks
/declare bag int local 0
/newif (!${Window[InventoryWindow].Open}) /nomodkey /keypress inventory
/delay 1s
/for bag 1 to 8 step 1
/newif (${Window[Pack${bag}].Open}==TRUE) /nomodkey /itemnotify pack${bag} rightmouseup
/next bag
/delay 1s
/newif (${Window[InventoryWindow].Open}) /nomodkey /keypress inventory
/delay 1s
/return 

