Moderator: MacroQuest Developers

Code: Select all
Sub main
/echo Fighting $target(name). It is level $target(level).
/varset v0 $target(name)
/varset v1 $target(id)
/face
/sendkey down up
/attack on
:CloserAF
/if "$target(id)"!="$v1" /goto :EndAF
/if n $target(distance)>20 /sendkey down up
/if n $target(distance)<11 /sendkey down down
/if n $target(distance)<21 /sendkey up up
/if n $target(distance)>10 /sendkey up down
/face
/goto :CloserAF
:EndAF
/echo $v0 is dead
/sendkey up up
/sendkey up down
/attack off
/varset v0 0
/return
Code: Select all
/if n $target(distance)>20 /sendkey down up
/if n $target(distance)<11 /sendkey down down
/if n $target(distance)<21 /sendkey up up
/if n $target(distance)>10 /sendkey up down
Code: Select all
/if n $target(distance)>20 /sendkey down FORWARD
/if n $target(distance)<21 /sendkey up FORWARD
/if n $target(distance)<11 /sendkey down BACKWARD
/if n $target(distance)>10 /sendkey up BACKWARD
