| Simple environment (forge, kiln, etc) experimental combine macro
| envcombine.mac
| 2012-02-13 by Sym
#Event LearnedRecipe "You have learned the recipe #*#"
Sub Main
| change IC value to how many items to combine
/declare IC int outer 2
/declare Item[${IC}] string outer
| /varset name of each item, must match # above
/varset Item[1] Water Flask
/varset Item[2] Gnomish Spirits
| nothing else to edit past here
/declare a int
:Start
/doevents
/for a 1 to ${IC}
/nomodkey /itemnotify enviro${a} leftmouseup
/delay 2
/if (${Cursor.ID}) {
/nomodkey /itemnotify enviro${a} leftmouseup
/delay 2
} else {
/if (${FindItem[=${Item[${a}]}].InvSlot} > 0) {
/nomodkey /ctrl /itemnotify ${FindItem[=${Item[${a}]}].InvSlot} leftmouseup
/delay 2 ${Cursor.ID}
/nomodkey /itemnotify enviro${a} leftmouseup
} else {
/beep
/e You are missing ${Item[${a}]}
/endm
}
}
/delay 2
/next a
/delay 5
/notify ContainerWindow Container_Combine leftmouseup
/delay 5
/delay 2s ${Cursor.ID}
:ClearCursor
/autoinv
/delay 5 !${Cursor.ID}
/if (${Cursor.ID}) /goto :ClearCursor
/delay 5
/goto :Start
/return
sub Event_LearnedRecipe
/beep
/echo You have learned how to make this, you can use combine.mac now instead
/end
/return