free brewing macro need help
Posted: Sat Oct 23, 2004 1:55 pm
Converted the freesmith.mac and it seems to be working to the point of combind. Any help would be appreciated.
For some reason it is not getting to After it is in the brew barrel, it walks back to Yitimis to do the turn in. No combind or anything.
For some reason it is not getting to
Code: Select all
/combine enviroCode: Select all
| Brewing Freebie
| Freebrew.mac
| Version 1.0
| Date: 10-23-04
| By: bandrent
|
| You WILL need to in next to Yitimis Groglenog 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 Alexander.
|
| Yitimis loc = -150.13,173.32,113.94
| Brew Barrel Loc = -205.59,172.59,113.94
| Next to Brew Barrel = -220.36,181.19,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 "Wayfarer Spiced Wine"
/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 Brew Barrel
/call MovetoLoc -205.59,172.59,113.94
/echo At Brew Barrel
/call Docombine
| ** Move to Yitimis
/call MovetoLoc -150.13,173.32,113.94
/echo At Yitimis
/call GiveItems
/goto :Start
/return
Sub GetItems
/varset SetCount 3
:Loop
/target Yitimis
/face nolook Yitimis
/nomodkey /say lend a hand
/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 Yitimis
/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 "Brew Barrel"
/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 Brew Barrel.
|------------------------------------------------
/itemtarget Brew Barrel
/face item
/click left item
/delay 2s
/notify TradeSkillWnd ExperimentButton leftmouseup
|------------------------------------------------
| Clear Out Brew Barrel.
|------------------------------------------------
/echo Cleaning Out Brew Barrel...
/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
/itemnotify enviro${Counter} leftmouseup
/next Counter
/delay 2
/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