your help is much appriciated. any other general code clean up is welcome as well...
p.s. this is for a shaman who slows and then dots and sends in pet... then if it has mana goes and melees
Code: Select all
#include SpellSub.mac
#event AssistAF "Assist blah blah"
#event Follow "Follow blah blah"
#event Sit "Sit here blah blah"
Sub Main
/varset v30 $p0
/varset v31 $char(y)
/varset v41 $char(x)
/echo Assist macro running...
:Start
/doevents
/goto :Start
/return
sub CombatAF
/if "$target()"!="FALSE" /if "$target(type)"!="NPC" /return
/if "$target()"=="FALSE" /return
/g Assisting ... Fighting %t.
|/g %s is level $target(level).
/echo %s is level $target(level).
/varset v0 $target(name)
/varset v1 $target(id)
/stand
/pet attack
/if n $char(mana,pct)>50 /call Mana
/if n $char(mana,pct)<25 /goto :EndAF
:Run
/doevents
/face fast nopredict
/sendkey down up
/if n $target(distance)>15 /goto :Run
/sendkey up up
/attack on
/pet attack
/if n $target(distance)<15 /goto :CloserAF
:CloserAF
/doevents
/face fast nopredict
/if "$target()"!="FALSE" /if "$target(type)"!="NPC" /goto :EndAF
/if "$target()"=="FALSE" /goto :EndAF
| /if "$target(id)"!="$v1" /goto :EndAF
/if n $target(distance)<9 /press down
/if n $target(distance)>13 /press up
/doability kick
/doability "sense heading"
/if n $target(distance)>14 /goto :Run
/goto :CloserAF
:EndAF
/doevents
/attack off
/face loc $v31, $v41
/if $distance($v31,$v41)>5 /sendkey down up /goto :EndAF
/sendkey up up
/sendkey up down
/sit
/return
sub Mana
/call SpellSub 5 6
/g %t should be slowed... I hope!
/if "$target()"!="FALSE" /if "$target(type)"!="NPC" /return
/if "$target()"=="FALSE" /return
| /if "$target(id)"!="$v1" /return
/call SpellSub 6 6
/g %t shold be sick now too... I hope!
/return
sub Event_AssistAF
/assist $v30
/echo assisting $v30
/delay 2
/face fast nopredict
/call CombatAF
/return
sub Event_Follow
/target $v30
/pet follow me
/stand
:Loop
/if n $target(distance)>60 /sendkey down up
/if n $target(distance)<40 /sendkey up up
/face fast
/doevents
/goto :Loop
sub Event_Sit
/varset v31 $char(y)
/varset v41 $char(x)
/press esc
:Sit
/doevents
/face loc $v31, $v41
/if $distance($v31,$v41)>5 /sendkey down up /goto :Sit
/sendkey up up
/sit
/return
