Proper portal travelling

06/22/2020 20:52 wolf_of_the_north#1
Hey guys,
first of all thanks to all of you who have contributed so much over the years.
I have been botting for a while and recently got into actually writing (very primitive) bots.

A current problem I have right now is that one of my bots runs through the portal, the area loads and it still tries to reach the last coordinate (the one to run through the portal) instead of moving on to the next line.

Another bot does that too, but the coordinate there seems to be set in a lucky way, so it isnt a big problem there.

Code:
moveto(-4211, 4280) ; through gate
waitmaploading()
now, i am sure this is a very shitty way to travel through a portal, so i was wondering if someone could tell me how to do that better. Sorry if this is too basic a question, i couldnt find an answer witht he search function.
06/23/2020 04:42 list comprehension#2
Quote:
Originally Posted by wolf_of_the_north View Post
Hey guys,
first of all thanks to all of you who have contributed so much over the years.
I have been botting for a while and recently got into actually writing (very primitive) bots.

A current problem I have right now is that one of my bots runs through the portal, the area loads and it still tries to reach the last coordinate (the one to run through the portal) instead of moving on to the next line.

Another bot does that too, but the coordinate there seems to be set in a lucky way, so it isnt a big problem there.

Code:
moveto(-4211, 4280) ; through gate
waitmaploading()
now, i am sure this is a very shitty way to travel through a portal, so i was wondering if someone could tell me how to do that better. Sorry if this is too basic a question, i couldnt find an answer witht he search function.
Code:
MoveTo(x,y); in front of gate
Move(-4211, 4280) ; through gate
waitmaploading($mapid); waits until map is done rather than just the loading
The MoveTo function keeps repeating packets to move to the provided location. It can cause crashes or undefined behavior as your experience when going through a gate. Move function on the other hand is a one shot loading safe movement packet that doesn't repeat. So general idea is move to spot by gate, then call Move instead of MoveTo to actually enter the gate. Then you wait until the mapid changes rather than just a generic load state.
06/23/2020 20:16 wolf_of_the_north#3
Quote:
Originally Posted by list comprehension View Post
Code:
MoveTo(x,y); in front of gate
Move(-4211, 4280) ; through gate
waitmaploading($mapid); waits until map is done rather than just the loading
The MoveTo function keeps repeating packets to move to the provided location. It can cause crashes or undefined behavior as your experience when going through a gate. Move function on the other hand is a one shot loading safe movement packet that doesn't repeat. So general idea is move to spot by gate, then call Move instead of MoveTo to actually enter the gate. Then you wait until the mapid changes rather than just a generic load state.

So the Move function is amazing (lots of new functions that are hard to find when you don't knopw they exist) and pretty much solves my problem. what is very strange is that if i use waitloadmap() even with mapid, the problem comes back. so i will do some more testing, but for now it definitely works much better, thanks alot :)
06/24/2020 18:50 deroni93#4
I remember cocking that up on my first bot.

On a similar not I've recently built a separate function for maps which lack unique map ID's (DoA), I make use of the fact that the player's X&Y coordinates are temporarily zeroed when travelling between zones.