#event help
Posted: Tue Aug 03, 2004 6:32 am
I am having trouble with a macro I am making for smithing. The #event command doesnt seem to be working. This is the first macro I ever tried to make, and I read the manual and searched the forums but can't seem to find an answer. Sub Event_CombineFail and CombineSucceed at bottom. Here is the code:
MacroQuest doesn't seem to detect the text in the weindow when the combine fails. I need the #event for fail to work so that it will call the docombine command to prevent not having the appropriate materials. Any help/suggestions would be appreciated, thank you.
Code: Select all
#turbo
#event CombineFail "You lacked the skills to fashion the items together."
#event CombineSuceed "You have fashioned the items together to create something new!"
sub main
/declare Bags int outer
/declare islot int outer
/declare x int outer
/declare v80 int outer 99
/declare times int outer
/declare times2 int outer
/cleanup
/call findcontainer
/call openbags
/call docombine
/return
sub findcontainer
/itemtarget Forge
/delay 1s
/click left item
/delay 1s
/notify TradeskillWnd ExperimentButton leftmousehold
/notify TradeskillWnd ExperimentButton leftmouseup
/return
sub openbags
/delay 1s
/keypress i
/delay 1s
/for x 0 to 7
/itemnotify ${Math.Calc[22+${x}]} rightmouseup
/delay 1
/next x
/return
sub docombine
:start
/delay 2s
/if (${times2}==3) /call docombine3
/if (${times}==3) /call docombine2
/varset islot ${FindItem[Small Piece].InvSlot}
/ctrl /itemnotify ${islot} leftmouseup
/itemn in Enviro 1 leftmouseup
/varset islot ${FindItem[Small Piece].InvSlot}
/ctrl /itemnotify ${islot} leftmouseup
/itemn in Enviro 2 leftmouseup
/varset islot ${FindItem[Small Piece].InvSlot}
/ctrl /itemnotify ${islot} leftmouseup
/itemn in Enviro 3 leftmouseup
/varset islot ${FindItem[Water].InvSlot}
/ctrl /itemnotify ${islot} leftmouseup
/itemn in Enviro 4 leftmouseup
/combine Enviro
/delay 1s
/autoinv
/varcalc times ${times}+1
/echo ${times}
/goto :start
:end
/return
ombine2
/echo In docombine2
/if (${times2}==3) /call docombine3
/varset islot ${FindItem[Small Brick].InvSlot}
/ctrl /itemnotify ${islot} leftmouseup
/itemn in Enviro 1 leftmouseup
/varset islot ${FindItem[Small Brick].InvSlot}
/ctrl /itemnotify ${islot} leftmouseup
/itemn in Enviro 2 leftmouseup
/varset islot ${FindItem[Small Brick].InvSlot}
/ctrl /itemnotify ${islot} leftmouseup
/itemn in Enviro 3 leftmouseup
/varset islot ${FindItem[Water].InvSlot}
/ctrl /itemnotify ${islot} leftmouseup
/itemn in Enviro 4 leftmouseup
/combine Enviro
/delay 1s
/autoinv
/varset times 0
/varcalc times2 ${times2}+1
/call docombine
/return
sub docombine3
/delay 2s
/echo docombine3
/varset islot ${FindItem[Large Brick].InvSlot}
/ctrl /itemnotify ${islot} leftmouseup
/itemn in Enviro 1 leftmouseup
/varset islot ${FindItem[Large Brick].InvSlot}
/ctrl /itemnotify ${islot} leftmouseup
/itemn in Enviro 2 leftmouseup
/varset islot ${FindItem[Large Brick].InvSlot}
/ctrl /itemnotify ${islot} leftmouseup
/itemn in Enviro 3 leftmouseup
/varset islot ${FindItem[Water].InvSlot}
/ctrl /itemnotify ${islot} leftmouseup
/itemn in Enviro 4 leftmouseup
/combine Enviro
/delay 1s
/autoinv
/varset times2 0
/call docombine4
/return
sub docombine4
/delay 2s
/echo docombine4
/varset islot ${FindItem[Smithy].InvSlot}
/ctrl /itemnotify ${islot} leftmouseup
/itemn in Enviro 1 leftmouseup
/varset islot ${FindItem[Block of Ore].InvSlot}
/ctrl /itemnotify ${islot} leftmouseup
/itemn in Enviro 2 leftmouseup
/varset islot ${FindItem[Water].InvSlot}
/ctrl /itemnotify ${islot} leftmouseup
/itemn in Enviro 4 leftmouseup
/combine Enviro
/delay 1s
/autoinv
/delay 1s
/autoinv
/call docombine
/return
Sub Event_CombineFail
/echo Combine Fail
/varcalc times ${times}-1
/call docombine
/return
Sub Event_CombineSuceed
/echo Success!
/return
sub doc