Cross portal between area

04/16/2022 17:30 Neka7350#1
Hello,

I need some tips about the best way to cross between area / town.

I tried :
- to record the pos (x / y) while traveling an area but when I use them, the bot sometimes cross the portal correctly and sometimes it just randomly lose itself and turn around (and stuck itself to the border of the first area)

- to record the pos (x / y) near the portal then use ToggleAutoRun() function but it depends on where the camera is watching (if the camera is not in front of the portal, that doesn't work because the bot run in the direction of the camera)

Do you have some advice to give me to cross a portal correctly without having those problems please ?

Thank you in advance for you help
05/11/2022 18:43 Greg76#2
Hey !
To go through a portal the simplest solution for you is:
-have a close coordinate
-use move in a loop

Example:
Code:
MoveTo(1200, -900) 
Do
     Move(1600, -1200, 200) ;The coords near your portal
     Sleep(100)
Until WaitMapLoading($YourNextMap)
to know that a portal can slightly change its location,
that's why sometimes your bot will succeed in crossing it and sometimes not.

You must use a Move to cross a portal and not MoveTo,
the 3rd coordinate of the move is a random distance addition,
so your bot will try distances between 1400 and 1800 for X coords and -1000 and -1400 for Y

it will move several times until it detects the loading. :)