However, AFTER I have him do the "attack" command, the macro won't accept any more commands. The macro doesn't end, it just won't do anything else. After issuing the original attack command after starting the macro, the beastlord attacks as he should. Once the mob dies however, the macro does a /call Main and then tells me the error "Variable name already defined". It looks like it's obviously trying to RE-declare the variables. After it gives this variable error, the macro appears to keep running (I don't get the "macro has ended" message), but then I can't issue any more commands - he just ignores them - even the /sit, /stand, etc ones.
Would someone mind taking a look and telling me what you think might fix it? I've worked with it a while and can't figure it out.
Thanks!
Code: Select all
|usage /mac beastlord "mastername"
|
|This macro is for a simple Beastlord bot.
|It will follow simple commands as listed below.
#include Spellcast.inc
#chat tell
#Event enraged "has become enraged"
#Event toofar "Your target is too far away, get closer!"
Sub Main
/declare slowSpell local
/declare Master global
/varset Master @Param0
/varset slowSpell "Drowsy"
:mainloop
/doevents
/goto :mainloop
/return
Sub Event_Chat
/if "@Param1"!="@Master" /return
/if "@Param2"~~"sit" /sit
/if "@Param2"~~"stand" /stand
/if "@Param2"~~"follow" /call Do-Follow
/if "@Param2"~~"assist" /call Do-Assist
/if "@Param2"~~"slow" /call Do-Slow
/if "@Param2"~~"attack" /call Do-Attack
/if "@Param2"~~"petattack" /call PetAttack
/if "@Param2"~~"petback" /call PetBack
/return
Sub Do-Attack
/assist @Master
/delay 1s
/tell @Master Attacking %t
/pet attack
/call Combat
/return
Sub Combat
/attack on
:fight
/face fast
/doevents
/delay 0
/if "$target()"=="False" {
/sendkey up up
/call Main
}
/goto :fight
/return
Sub Do-Follow
/press esc
/press esc
/stand
/attack off
/target @Master
/t @Master Following you
:followLoop
/if n $target(distance)>20 /sendkey down up
/if n $target(distance)<20 /sendkey up up
/face fast
/doevents
/delay 0
/if "$target()"=="TRUE" /goto :followLoop
/return
Sub Event_toofar
/sendkey down up
:farLoop
/if n $target(distance)<30 /sendkey up up
/face fast
/doevents
/delay 0
/if "$target()"=="TRUE" {
/if n $target(distance)>40 /goto :farLoop
/call Combat
}
/return
Sub Event_enraged
/attack off
/pet back off
/press esc
/t @Master RAGE!!
/delay 0
/return
Sub Do-Slow
/sit off
/assist @Master
/delay 1
/call Cast "@slowSpell"
/return
Sub PetBack
/t @Master Pulling Pet Back
/pet back off
/return
Sub Do-Assist
/assist Kruggan
/return


