Jump to content

How to handle trees that grab you?


dmmslaver

Recommended Posts

isUnderAttack
public boolean isUnderAttack()
Whether the character is under attack.
Returns:
True if the hitbar is not visible OR the hitbar is visible and this character is interacting with another character.

hmm if he is around that area, what if he is attacked by the guards on the way?

u can add a area to it, using explv tool: http://explv.github.io/

Link to comment
Share on other sites

isUnderAttack
public boolean isUnderAttack()
Whether the character is under attack.
Returns:
True if the hitbar is not visible OR the hitbar is visible and this character is interacting with another character.

u can add a area to it, using explv tool: http://explv.github.io/

 

 

Just check for that darn tree haha

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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();
Link to comment
Share on other sites

 

hmm maybe i am using it incorrectly

 

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();

execute(ev);

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

 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.

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...