Jump to content

How to handle trees that grab you?


Recommended Posts

Posted

there a few of them so better to just add the whole draynor manor area

 

In general i personally don't recommend walking to current location + x because it will not work with WalkingEvent if the tile is not walkable which can be the case because you base it on current location + x

 

Just my two cents

Posted (edited)

In general i personally don't recommend walking to current location + x because it will not work with WalkingEvent if the tile is not walkable which can be the case because you base it on current location + x

 

Just my two cents

exactly where im currently at lol

what im thinking:

if tree is north - walk west/east

if tree is west/east walk north

just figured someone had already written the code ;)

Edited by dmm_slaver
Posted

hmm maybe i am using it incorrectly

 

 

[iNFO][bot #1][11/27 11:47:10 AM]: java.lang.NullPointerException

at org.osbot.rs07.event.WebWalkEvent.execute(ji:29)
at SharkMuler.onLoop(SharkMuler.java:134)
at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(mh:48)
at java.lang.Thread.run(Thread.java:745)
 

 

WebWalkEvent ev = new WebWalkEvent(edgeLever);
                        ev.setBreakCondition(new Condition() {
                            @[member=Override]
                            public boolean evaluate() {
                                return myPlayer().isHitBarVisible();
                            }
                        });
                        ev.execute();

at SharkMuler.onLoop(SharkMuler.java:134)

is 

 

ev.execute();
Posted

execute(ev);

 Okay I am more confused now. It seems to be working, slightly. 

 

                        WebWalkEvent ev = new WebWalkEvent(edgeLever);
                        ev.setBreakCondition(new Condition() {
                            @[member=Override]
                            public boolean evaluate() {
                                log("Check");
                                return myPlayer().isHitBarVisible();
                            }
                        });
                        execute(ev);

when im walking normally, it says "check" every couple of steps. However, it seems to only check while i am moving. So if I get stuck behind the tree, and it's smacking me for 3 damage every tick, its just sitting there, and its not saying "check" at all until i pause the bot and move manually or it dies. 

Posted

 Okay I am more confused now. It seems to be working, slightly. 

 

                        WebWalkEvent ev = new WebWalkEvent(edgeLever);
                        ev.setBreakCondition(new Condition() {
                            @[member='Override']
                            public boolean evaluate() {
                                log("Check");
                                return myPlayer().isHitBarVisible();
                            }
                        });
                        execute(ev);

when im walking normally, it says "check" every couple of steps. However, it seems to only check while i am moving. So if I get stuck behind the tree, and it's smacking me for 3 damage every tick, its just sitting there, and its not saying "check" at all until i pause the bot and move manually or it dies. 

Add me on skype.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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