Find max melee distance / Hit Box

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

LamahHerder
a hill giant
a hill giant
Posts: 299
Joined: Sat Jun 29, 2002 2:37 am

Find max melee distance / Hit Box

Post by LamahHerder » Fri Feb 13, 2004 7:15 pm

Looking for a faster method to find the max distance you can melee hit a mob from aka their hit box.

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
Last edited by LamahHerder on Fri Feb 13, 2004 8:10 pm, edited 1 time in total.