Jump to content

Is it possible to disable running when using WebWalkEvent?


Colon Nel

Recommended Posts

 

  On 3/17/2018 at 1:17 AM, apa said:

If youre not using advanced methods in the event, you could try

walking.webWalk();

I'd assume this sets same defaults as the WebWalkEvent under the hood though. I'd go with setting energy threshold to 101 if the method doesn't clamp it to 1 - 100.

Expand  


I tried setting energy threshold to 101 but it is ignored apparently.

Link to comment
Share on other sites

  On 3/17/2018 at 10:43 AM, Colon Nel said:

 


I tried setting energy threshold to 101 but it is ignored apparently.

Expand  

It doesn't look like there's an easy way to do this. You could interrupt, disable run, and recall the web-walk, but that won't accomplish anything as it'll just turn run back on, and be slower recalculating the web-walk (if it precomputes), as theres no way to get a path back from the event, only destination point it seems.

An addition to the API for this would be easy enough.

Link to comment
Share on other sites

This can easily be done but you have to create the webwalk event and pass it to the exector instead of calling the web walking methods inside of the walking class. Just tested this code and it will never run. If you use intellij you can look at the obbed source code of web walking event and see what goes inside to figure these things out quicker.

        Position alkharidBank = new Position(3269, 3167, 0);
        WebWalkEvent webWalkEvent = new WebWalkEvent(varrock);
        webWalkEvent.setEnergyThreshold(Integer.MAX_VALUE);
        this.execute(webWalkEvent).hasFinished();

https://osbot.org/api/org/osbot/rs07/event/WebWalkEvent.html#setEnergyThreshold-int-

 

osbot code that handles runnng in WebWalkEvent

  Reveal hidden contents

 

Edited by battleguard
  • Like 1
Link to comment
Share on other sites

  • 2 years later...
  On 2/9/2021 at 8:28 PM, Psychotechno said:

This doesn't work for me.... When I put in something like this:

WebWalkEvent dungeonWalk = new WebWalkEvent(DUNGEON);
dungeonWalk.setEnergyThreshold(;
;
"In Desired area";

It still enables run somewhere in the middle of the webwalk. Any help would be appreciated. 

 

Expand  

Try copying your  code properly. What you have here won't even compile. You were supposed to set energy threshold to something higher than 100 eg. 101

Link to comment
Share on other sites

  On 2/10/2021 at 10:07 AM, Jarl said:

Try copying your  code properly. What you have here won't even compile. You were supposed to set energy threshold to something higher than 100 eg. 101

Expand  

Whooooops, my bad:

WebWalkEvent dungeonWalk = new WebWalkEvent(DUNGEON);
dungeonWalk.setEnergyThreshold(101);
execute(dungeonWalk);

It doesn't turn on run at first, but after two clicks in the minimap it does turn on run again (Even though energy is much lower than 100%, ideally I don't want to turn it on at all during the WebWalk). 

Edited by Psychotechno
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...