Investigation on "Possibly stuck - going back a coordinate" bug

Hi everyone,
Recently I have been creating some scripts to go to the training area (dont ask why I dont use “get position” feature please), to go back to town if some conditions are satisfied or for some other things. This is not happening all the time but recently I have seen this “error” message a lot. For example, if you have a script to return back to town from Jangan Cave (first floor), it keeps saying “Possibly stuck - going back a coordinate”. I manage to fix this by just playing with coordinates but it was “trial and error” and it took like an hour to fix this. I am pretty sure this is happening to many people as well.
Let me give you an example before going further:

...
[13:54:50] Conditions: Executing script [C:/Users/test/AppData/Local/Programs/phBot Testing/test-script.txt]
[13:54:51] Script: Walking to -23043, -300
[13:55:02] Script: Walking to -23057, -292
[13:55:08] Script: Walking to -23075, -292
[13:55:12] Script: Possibly stuck - going back a coordinate
[13:55:15] Script: Walking to -23075, -292
[13:55:18] Script: Walking to -23091, -292
[13:55:22] Script: Possibly stuck - going back a coordinate
[13:55:24] Script: Walking to -23091, -292
[13:55:27] Script: Walking to -23118, -293
[13:55:33] Script: Possibly stuck - going back a coordinate
[13:55:36] Script: Walking to -23118, -293
[13:55:40] Script: Possibly stuck - going back a coordinate
[13:55:42] Script: Walking to -23118, -293
[13:55:50] Script: Possibly stuck - going back a coordinate
[13:55:52] Script: Walking to -23118, -293
[13:56:00] Script: Possibly stuck - going back a coordinate
[13:56:02] Script: Walking to -23118, -293
[13:56:11] Script: Possibly stuck - going back a coordinate
...

What I was wondering is how these “walk” command works? What is the real reason for this and how to resolve this once and for all (if there is one)? Is there a way to automatically generate a walk script like this from point A to B without walking all the way to point A to B?

I think the best answer would probably come from @Ryan himself. If you need any more information, I would gladly give you more details.

I just realized that if you cast “Merchant Pipe” which is a job skill that is required to do some job quests is actually causing this problem. After couple of commands, if you are not mounted your transport, it gives this “stuck” error. But still it doesn’t explain why? By the way Merchant Pipe is not far away.

I’ll add a check to make sure the character is wearing a job suit before casting job skills.

I am not sure if the character is trying to cast a job skill. Basically, if Merchant Pipe active and character is not mounted, “walk” command seems to act strangely. If you are mounted, everything works great.

i run into this error lately too at the end of the script on an open field in trsro. using get position always. I am not using any job skills btw nor are my chars in job mode.

That might be a different issue. I am not sure if I understand what you mean correctly but quick tip for you:
When you use “Get Position” in Training Area, it actually sets 4 params: “region, x, y, z”. You only see “x, y” in phBot but if you check your config file, you will see something like this:

"Script": {
    "New Training Area": {
        "Data": [],
        "Enabled": true,
        "Path": "",
        "Pick Radius": 50,
        "Radius": 50,
        "Region": 23029,
        "Type": 0,
        "X": 21301,
        "Y": -483,
        "Z": -84
    },
}

You can use these values like this: “23029, 21301, -483, 84” while setting your training area. It is the safest way.

1 Like