Here's the deal. I run the script on my shaman's PC. No problems. I send a command to /sit, /stand, no problem. I send a command to JBB - works just fine - the shaman will cast the JBB like a champ until the mob is dead. However, if WHILE he is casting the JBB I send the nocast command to him, he sends me the "No longer casting JBB on %t" message, but he continues to cast anyway. I cannot seem to figure out how to break out of the :JBBloop loop and just continue normally in the macro.
Would appreciate any suggestions :)
Thanks!
Here's the code...
Code: Select all
|Usage: /macro shamanbot "mastername"
#chat tell
#event MobDead "You must first select a target for this spell!"
#define JBBBUTTON F6
Sub Main
/declare Master global
/varset Master @Param0
:loop
/doevents
/goto :loop
/return
Sub Event_MobDead
/call nocast
/return
Sub Event_Chat
/if "@Param1"!="@Master" /return
/if "@Param2"~~"sit" /sit
/if "@Param2"~~"stand" /stand
/if "@Param2"~~"assist" /call Do-Assist
/if "@Param2"~~"JBB" /call JBB
/if "@Param2"~~"nocast" /call nocast
/return
Sub Do-Assist
/assist @Master
/delay 1s
/tell @Master Assisting you on %t
/return
Sub JBB
/assist @Master
/delay 1s
/tell @Master Casting JBB on %t
:JBBloop
/doevents
/if ($char(casting)==FALSE && $target(type)==NPC) {
/press JBBBUTTON
}
/delay 1s
/goto :JBBloop
/return
Sub nocast
/tell @Master No longer casting JBB on target
/return

