Im hopeing that somehow with the new $target(maxdistance) or the $xxxx(height) stuff can figure it out but havnt found a formula that works
$target(maxrange) seems to be how close target has to be to hit you
this is currently what I have come up with from before those additions, and it is too slow to use reliably.
reasons i want this...
1. agro is proximity as well
2. ae-rampage mobs, u can avoid rampage from max distance
3. why hump a mob if you dont have to
Code: Select all
#define MobINI "mobs.ini"
Sub Main
/define NewMob global
/define MeleeDistance global
:mainLoop
/doevents
/if $combat==TRUE /goto :FindMax
/goto :mainLoop
:FindMax
/call SetupMaxDistanceMelee
/end
Sub SetupMaxDistanceMelee
/varset MeleeDistance $ini("MobINI","$zone","$target(name,clean).DistanceMelee")
/if "@MeleeDistance"=="NOTFOUND" {
/varset NewMob NEW
/ini "MobINI" "$zone" "$target(name,clean).DistanceMelee" 17
/varset MeleeDistance $ini("MobINI","$zone","$target(name,clean).DistanceMelee")
}
/doevents flush TooFar
/varset NewMob CHECK
:checkLoop1
/echo Finding mob HITBOX, Checking: $target(distance)
/face fast
/press down
/delay 3s
/doevents TooFar
/if @NewMob==DONE {
/echo Max Distance is $target(distance)
/goto :foundMax
}
/goto :checkLoop1
:foundMax
/ini "MobINI" "$zone" "$target(name,clean).DistanceMelee" $target(distance)
/varset MeleeDistance $ini("MobINI","$zone","$target(name,clean).DistanceMelee")
/echo Max Distance for $target(name,clean) = @MeleeDistance
/return
Sub event_TooFar
/if "@NewMob"!="CHECK" /return
/press up
/delay 5
/varset NewMob DONE
/return
