dmmslaver Posted November 27, 2016 Share Posted November 27, 2016 I kind of assumed it would be handled in the webwalking since it's so fancy. However, if you walk by draynor, and it runs into one of the tree npcs, it will literally just kill you in that spot over and over. Anyone have a workaround? Quote Link to comment Share on other sites More sharing options...
House Posted November 27, 2016 Share Posted November 27, 2016 create your own solution to handle the obstacle? add it into the break condition if the tree is X distance away and handle it yourself 1 Quote Link to comment Share on other sites More sharing options...
Sysm Posted November 27, 2016 Share Posted November 27, 2016 fail safe if ur hp bar is visable run away to square ... , ... 1 Quote Link to comment Share on other sites More sharing options...
House Posted November 27, 2016 Share Posted November 27, 2016 fail safe if ur hp bar is visable run away to square ... , ... hmm if he is around that area, what if he is attacked by the guards on the way? Quote Link to comment Share on other sites More sharing options...
Sysm Posted November 27, 2016 Share Posted November 27, 2016 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/ Quote Link to comment Share on other sites More sharing options...
House Posted November 27, 2016 Share Posted November 27, 2016 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 Quote Link to comment Share on other sites More sharing options...
Sysm Posted November 27, 2016 Share Posted November 27, 2016 Just check for that darn tree haha there a few of them so better to just add the whole draynor manor area Quote Link to comment Share on other sites More sharing options...
House Posted November 27, 2016 Share Posted November 27, 2016 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 Quote Link to comment Share on other sites More sharing options...
dmmslaver Posted November 27, 2016 Author Share Posted November 27, 2016 (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 November 27, 2016 by dmm_slaver Quote Link to comment Share on other sites More sharing options...
dmmslaver Posted November 27, 2016 Author Share Posted November 27, 2016 create your own solution to handle the obstacle? add it into the break condition if the tree is X distance away and handle it yourself How to add it into the break condition so it stops the webwalk? Quote Link to comment Share on other sites More sharing options...
progamerz Posted November 27, 2016 Share Posted November 27, 2016 How to add it into the break condition so it stops the webwalk? WebWalkEvent: http://osbot.org/api/org/osbot/rs07/event/WebWalkEvent.html 1 Quote Link to comment Share on other sites More sharing options...
dmmslaver Posted November 27, 2016 Author Share Posted November 27, 2016 WebWalkEvent: http://osbot.org/api/org/osbot/rs07/event/WebWalkEvent.html 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(); Quote Link to comment Share on other sites More sharing options...
progamerz Posted November 27, 2016 Share Posted November 27, 2016 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); Quote Link to comment Share on other sites More sharing options...
dmmslaver Posted November 27, 2016 Author Share Posted November 27, 2016 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. Quote Link to comment Share on other sites More sharing options...
progamerz Posted November 27, 2016 Share Posted November 27, 2016 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. Quote Link to comment Share on other sites More sharing options...