edit:Rizwank likes code brackets too
Code: Select all
| - Hunter.mac -
| Semi-intelligent hunting & autoloot macro
|
|
#include routines.mac
Sub Main
/varset v80 0
:Autokill
/if $t1==0 /call Buff
/call SelectTarget
/if "$target()"=="FALSE" /goto :WaitASec
/if "$target(type)"=="lislia" /call AttackAndFollow
/call AutoLoot
:WaitASec
/call Rest
/goto :AutoKill
/return
Sub SelectTarget
/press esc
/for v81 1 to 5
/if "$target()"=="TRUE" /return
/delay 5
/next v81
/target alert
/if "$target()"=="FALSE" /call Rest
/return
Sub AttackAndFollow
/varset v90 $target(id)
/echo Going after $target(name)...
/face
/attack on
/varset t0 4m
:CloserAF
/if "$target(id)"!="$v90" /goto :EndAF
/if n $target(distance)>14 /call AutoRun 1
/if n $target(distance)<15 /call AutoRun 0
/if n $target(distance)<5 /call BackPedal 0
/if n $target(distance)>4 /call BackPedal 1
/if n $t0==0 /press esc
/face
/goto :CloserAF
:EndAF
/call AutoRun 0
/attack off
/return
Sub AutoLoot
/press esc
/target mycorpse
/if "$target()"!="FALSE" /goto :TargetMyCorpse
/target s corpse
:TargetMyCorpse
/face
/if n $target(distance)<15 /goto :CloseEnough
/call AutoRun 1
/varset t0 3m
:CloserAL
/face
/if n $target(distance)>14 /if n $t0>0 /goto :CloserAL
:CloseEnough
/call AutoRun 0
/loot
/Delay 10
/for v1 0 to 9
/Delay 5
/click left corpse $v1
/Delay 5
/if "$cursor(name)"=="NULL" /goto :continue
/if "$cursor(name)"!="NULL" /click left auto
/next v1
:continue
/press esc
/return
Sub Rest
/if n $hp(pct)>50 /goto :DontMove
/call AutoRun 1
:CloserRest
/face loc -280,100
/if n $distance(-280,100)>20 /goto :CloserRest
/call AutoRun 0
:DontMove
/if n $hp(pct)>80 /return
/sit
:KeepResting
/if "$target()"!="FALSE" /return
/if n $hp(pct)<80 /goto :KeepResting
/stand
/return
Sub HeadRandom
/return
Sub Buff
/press esc
/target myself
/return
| End of Hunter.mac

