Mov to Loc

kombat

Spammer
Joined
Feb 25, 2007
Messages
66
Reaction score
0
Points
0
hi all...

im simply wanting to move to a loc.... but no idea where to enter it into this mess below...when i look at it my nose bleeds.

..but this is what im using in my current pull macro and works well to get me around..

im hoping its possible to rename the sub and call it to a loc i need, cheers :).

Sub MoveToLoc(MoveToY, MoveToX)

/doevents
/declare running int local
/declare distanceNow float local
/declare distanceBefore float local
/declare distanceModifier int local
/declare distanceTimer timer 15
/varset running 0
/varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
/varset distanceModifier 1
/echo Moving to Location: ${MoveToY}, ${MoveToX}.
/echo Distance: ${distanceBefore}

:moveToLocation

/doevents

/if (${Math.Distance[${Anchor[1]}, ${Anchor[2]}]}>1250) /call MoveToLoc ${RT_MyyLOC} ${RT_MyXLOC} {
/target clear
}

/face fast nolook loc ${MoveToY},${MoveToX}
/if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<50) {
/keypress forward
/return
}
/if (${distanceTimer}==0) {
/if (${Me.Sneaking}) {
/varset distanceModifier 2
} else {
/varset distanceModifier 1
}
/varset distanceNow ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
/if (${Math.Calc[${distanceBefore}-${distanceNow}]}<${Math.Calc[10/${distanceModifier}]}) {
/call HitObstacle
}
/varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
/varset distanceTimer 15
}
/if (${running}==0) {
/keypress forward
/if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}>10) {
/varset running 1
/keypress forward hold
}
} else {
/if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<11) {
/varset running 0
/keypress forward
}
}
/goto :moveToLocation

/keypress back

/return
 
You could use advpath record a path and use that. MoveTo is straight line.
 
ok :)

i could but, i have no idea how to use it or even get it into my mac to get it work..

..was just hoping to /call thatlocksub

and get to a spot :).

thanks tho!.
 
The movetoloc sub gets passed the Y and X coords you want to move to when you /call it. So say you want to move to 25 Y and -400 X.


/call MoveToLoc 25 -400

Sub MoveToLoc(MoveToY, MoveToX)

But you didnt post the entire macro. You have variables in there that are missing /varset and declarations so i cant tell what the ${Anchor} stuff is.