Ranger Auto Pull
Posted: Tue May 04, 2004 6:25 pm
First Attempt at this.. thanks to all that chipped in..
When you run the macro it will set your current position as anchor.. it will then proceed to find a mob within a range of 150. It can be used for tanks also if you want to modify it.
/macro rangerautopull.mac
When you run the macro it will set your current position as anchor.. it will then proceed to find a mob within a range of 150. It can be used for tanks also if you want to modify it.
/macro rangerautopull.mac
Code: Select all
| Rangerautopull.mac v 0.1 alpha
| Writen by Omper
#chat tell
#include spellcast.inc
#event GotHIT "Hit You For"
/declare AnchorX float outer
/declare AnchorY float outer
/declare startpoint int outer
Sub Main
/echo Rangerautopull.mac
/varset AnchorX ${Me.X}
/varset AnchorY ${Me.Y}
/cleanup
/doevents
/call MoveToAnchor
/pause 10
/call Tarnpc
/return
Sub Tarnpc
/target npc radius 150
/call Cast "ensnare
/return
Sub Event_GOTHIT
/attack on
:Loop
/if (${Target.Distance}>20) {
/keypress forward
}
/if (${Target.Distance}<10) {
/keypress back hold
/timed 1 /keypress back
}
/face nolook fast
/delay 0
/if (!${Target.ID}) {
/goto :End
} else {
/goto :Loop
}
:End
/call MoveToAnchor
/return
Sub MoveToAnchor
/declare iCount int local
/varset fXLoc ${Me.X}
/varset fYLoc ${Me.Y}
/varset iCount 0
/echo Moving to Anchor at Loc: ${AnchorY}, ${AnchorX}.
:AnchorMoveLoop
/delay 1
/doevents
/face nolook loc ${AnchorY},${AnchorX}
/if (${Math.Distance[${AnchorY},${AnchorX}]}>12) {
/keypress forward hold
} else {
/keypress forward
/return
}
/if (${iCount}>2) {
/call Detectobst
/face nolook loc ${AnchorY},${AnchorX}
/varset iCount 0
}
/varcalc iCount ${iCount}+1
/goto :AnchorMoveLoop
/return
Sub Detectobst
/delay 2
/if (${fXLoc}==${Me.X}) /if (${fYLoc}==${Me.Y}) /call Hitobst
/varset fXLoc ${Me.X}
/varset fYLoc ${Me.Y}
/return
Sub Hitobst
/keypress forward
/keypress back hold
/if (${Math.Rand[2]}) {
/delay 2s
/keypress back
/keypress right hold
/delay 8
/keypress right
/delay 2s
/keypress back
/keypress left hold
/delay 8
/keypress left
}
/delay 10
/keypress forward hold
/return