Page 1 of 1

player:moveTo()

Posted: Mon Dec 10, 2012 2:10 pm
by Junk
My noobishness for scripting is shining through again. I want to use player:moveTo() in an if statement (after all 10 dailies are done), but I can't figure out how to write it so it doesn't error out.

Also, do I need to use a bot waypoint cord, or an in-game cord? I can't find any examples of how to actually write it properly.

Re: player:moveTo()

Posted: Mon Dec 10, 2012 3:04 pm
by dr-nuker

Code: Select all

player:moveTo(CWaypoint(151, -149, 72),true)

should be what you need. This makes you move to the given coordinates. I think it is like creating a waypoint on the fly...

Re: player:moveTo()

Posted: Mon Dec 10, 2012 3:14 pm
by Junk
Perfect. Thank you so much.

Re: player:moveTo()

Posted: Mon Dec 10, 2012 10:29 pm
by rock5
In case you don't know, 'true' is telling it not to look for mobs while moving. Obviously if you want it to kill stuff while it's moving you would omit that.

You can get your coords by using

Code: Select all

bot/getpos
in the MM window or double click the "Get_Player_Position.bat" batch file in the 'rom' folder. The coordinates the bot uses are nothing like the in game coordinates.