I've modified the ECMining.mac, removing the alerts (Since they weren't working.. I found it had worked better if I switched the /alerts to /alert add 0 <item> the 1 wasn't working.. And removed them, so that I can manually change the alerts as I go..
What I want to add to the script: Know when my spells fizzle (like my pet).. Also, want to know if there is a way to make it know when my packs are full, and then return it to manual so that I can process my inventory based on what I've collected.. This is based on me being a magician.. I also want to make a variant of this script that will stop me from a certain distance from the creature, send my pet in, after a delay cast my attack spell (so I do some damage) and then keep healing my pet w/ my pet heal spell. And add to the rest sequence to let me med and regain my spells..
Any suggestions would be greatly appreciated.
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)"=="NPC" /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 HeadRandom
/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
/varset v1 $rand(4000)
/varset v2 $rand(2000)
/varsub v1 500
/varsub v2 1000
/echo Heading towards $v1,$v2
/face loc $v1,$v2
/press q
/varset t0 20s
:RandLoop
/if "$target()"=="TRUE" /return
/if n $t0>0 /goto :RandLoop
/press q
/return
Sub Buff
/press esc
/target myself
/delay 3
| Cast 1 spells on self
/cast 8
/delay 12s
| Summon pet if not out
/if $char(pet)==0 /cast 3
/if $char(pet)==0 /delay 10s
/varset t1 15m
/return
| End of Hunter.macCode: Select all
[./code] brackets



