Move to a loc

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

beatnik007
decaying skeleton
decaying skeleton
Posts: 6
Joined: Sun Feb 22, 2004 6:46 am

Move to a loc

Post by beatnik007 » Wed Apr 07, 2004 8:42 am

Hiya

Does anyone know how to move to a specific loc? There would not be any targetable object at that loc.

Would you need to resort to $char(x) and $char(y) checking with trial-and-error turning, moving and rechecking?

Cheers
Beatnik

JGC84
a ghoul
a ghoul
Posts: 116
Joined: Sat Nov 29, 2003 2:51 am

Post by JGC84 » Wed Apr 07, 2004 8:45 am

check out the snippets forum
ACK! I think I blew it up....

I dont think your allowed to talk about this outside of a "free speech zone" anymore.

NotHere
a lesser mummy
a lesser mummy
Posts: 40
Joined: Fri Jan 09, 2004 5:59 am

Post by NotHere » Wed Apr 07, 2004 10:10 am

Presuming you have a clear line of sight to the loc:

Code: Select all

Sub MoveToLoc(Location)
  /keypress Forward Hold
  :AnchorLoop 
  /if n ${Math.Distance[${Me.Y},${Me.X}:@Location]}<=10 { 
    /keypress Forward
    /return
  } 
  /face fast loc @Location nolook
  /goto :AnchorLoop 
/return
This simply holds down the Forward key and keeps facing the location untill you're there. Just pass it a loc, like

/call MoveToLoc("-200,300")

If you want something with collision checking or even recorded paths, look in the snippets and macro section. :)
NotHere
/afk

beatnik007
decaying skeleton
decaying skeleton
Posts: 6
Joined: Sun Feb 22, 2004 6:46 am

Post by beatnik007 » Fri Apr 09, 2004 1:45 am

Thanks very much guys, very helpful!