Jump to content

Waypoint action


oualid64966

Recommended Posts

So I've used the code beneath in a waypoint action but when it gets to it it gets stuck on this action without any errors.

Does anyone have a clue why? I've also tried it with isinrange but the same happens when it gets to that action waypoints it just stops there without any errors.

 

Btw if I just use gotolabel it works without anything else.

 


local playerPos = g_game.getLocalPlayer():getPosition()
local templeX = 32727
local templeY = 31627

if playerPos.x >= templeX and playerPos.y => templeY then
    gotolabel("Temple", "Training")
else
    gotolabel("Start", "Training")
end

 

Edited by oualid64966
Link to comment
Share on other sites

For example:

 

local playerPos = g_game.getLocalPlayer():getPosition()
local templeX = 32727
local templeY = 31627

setOption("Cavebot/Enabled", "false")

if playerPos.x >= templeX and playerPos.y => templeY then
    gotolabel("Temple", "Training")
else
    gotolabel("Start", "Training")
end

 

And then have an action script after your other labels that enables it again.

 

setOption("Cavebot/Enabled", "true")

 

Let me know if it works or not.

Link to comment
Share on other sites

1 hour ago, Tokumei said:

For example:

 


local playerPos = g_game.getLocalPlayer():getPosition()
local templeX = 32727
local templeY = 31627

setOption("Cavebot/Enabled", "false")

if playerPos.x >= templeX and playerPos.y => templeY then
    gotolabel("Temple", "Training")
else
    gotolabel("Start", "Training")
end

 

And then have an action script after your other labels that enables it again.

 


setOption("Cavebot/Enabled", "true")

 

Let me know if it works or not.

Do you mean after the labels at the cavebot part? Because that would never reach it right if you disabled the cavebot.

Link to comment
Share on other sites

7 hours ago, oualid64966 said:

Do you mean after the labels at the cavebot part? Because that would never reach it right if you disabled the cavebot.

Correct. And again I haven't tested it. I only just got the bot again yesterday and haven't had a chance to play around with it.

Alternatively you could add some delays in your script. 

Link to comment
Share on other sites

  • 3 weeks later...
×
×
  • Create New...