Jump to content

Razeth

Members
  • Posts

    8
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by Razeth

  1. Always Hide Roofs, which I believe is the default
  2. Were you standing in the exact position I gave? 2945,3335. Because using your code in my script has the same error. Modified the script to run exactly to that space. WebWalk uses Banks.FALADOR_WEST, spammed with Exceeded attempt threshold. import org.osbot.rs07.script.Script; import org.osbot.rs07.event.WalkingEvent; import org.osbot.rs07.event.WebWalkEvent; import org.osbot.rs07.event.webwalk.PathPreferenceProfile; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.map.constants.Banks; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; @ScriptManifest(author = "Razeth", info = "Walking Bug", name = "Walking Bug", version = 0.01, logo = "") public class main extends Script { @Override public void onStart() { log("Script started"); } private enum State { TRAVEL2GEM, TRAVEL2GEM_WALK, TRAVEL2BANK }; private State getState() { if(myPlayer().getPosition().distance(new Position(2945,3335,0))>3) return State.TRAVEL2GEM; if(myPlayer().getPosition().distance(new Position(2945,3335,0))>0) return State.TRAVEL2GEM_WALK; return State.TRAVEL2BANK; } @Override public int onLoop() throws InterruptedException { // Am I moving? If so do nothing if(myPlayer().isMoving()) return(random(2000, 3000)); // Initialise Locals int tempX = 0; int tempY = 0; WebWalkEvent oEvent; PathPreferenceProfile oPPP; // Get Next State switch(getState()) { case TRAVEL2GEM: // Set ourself to walk to West Falador bank then walk there tempX = 2945; tempY = 3335; log("WebWalking to Gem Store ("+tempX+","+tempY+")"); oEvent = new WebWalkEvent(new Position(tempX, tempY, 0)); oPPP = new PathPreferenceProfile(); oPPP.setAllowObstacles(false); oPPP.setAllowTeleports(true); oEvent.setPathPreferenceProfile(oPPP); execute(oEvent); break; case TRAVEL2GEM_WALK: // Set ourself to walk to West Falador bank then walk there tempX = 2945; tempY = 3335; log("Normal walking to Gem Store exact pos ("+tempX+","+tempY+")"); WalkingEvent oWalkEvent = new WalkingEvent(new Position(tempX, tempY, 0)); oWalkEvent.setMinDistanceThreshold(0); execute(oWalkEvent); break; case TRAVEL2BANK: // Set ourself to walk to West Falador bank then walk there log("WebWalking to West Falador Bank"); oEvent = new WebWalkEvent(Banks.FALADOR_WEST); oPPP = new PathPreferenceProfile(); oPPP.setAllowObstacles(true); oPPP.setAllowTeleports(true); oEvent.setPathPreferenceProfile(oPPP); oEvent.prefetchRequirements(getBot().getMethods()); execute(oEvent); break; } return random(400, 800); } @Override public void onExit() { log("Script ended"); } @Override public void onPaint(Graphics2D g) { } } WalkExample.jar EDIT: Got someone else to test it and I'm not crazy! They get the same issue! Strangely enough, they noticed if you run it with the door CLOSED, it'll use a Fally tele tab to get out. Door open, can't find a path
  3. I've actually managed to make a complete script just to show this off, standing in the gem shop right now running this (2945, 3335) import org.osbot.rs07.script.Script; import org.osbot.rs07.event.WebWalkEvent; import org.osbot.rs07.event.webwalk.PathPreferenceProfile; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; @ScriptManifest(author = "Razeth", info = "Walking Bug", name = "Walking Bug", version = 0.01, logo = "") public class main extends Script { @Override public void onStart() { log("Script started"); } private enum State { TRAVEL2BANK }; private State getState() { return State.TRAVEL2BANK; } @Override public int onLoop() throws InterruptedException { // Am I moving? If so do nothing if(myPlayer().isMoving()) return(random(2000, 3000)); // Initialise Locals int tempX = 0; int tempY = 0; WebWalkEvent oEvent; PathPreferenceProfile oPPP; // Get Next State switch(getState()) { case TRAVEL2BANK: // Set ourself to walk to West Falador bank then walk there tempX = 2946; tempY = 3369; log("WebWalking to West Falador Bank ("+tempX+","+tempY+")"); oEvent = new WebWalkEvent(new Position(tempX, tempY, 0)); oPPP = new PathPreferenceProfile(); oPPP.setAllowObstacles(true); oPPP.setAllowTeleports(true); oEvent.setPathPreferenceProfile(oPPP); oEvent.prefetchRequirements(getBot().getMethods()); execute(oEvent); break; } return random(400, 800); } @Override public void onExit() { log("Script ended"); } @Override public void onPaint(Graphics2D g) { } }
  4. case TRAVEL2BANK: // Set ourself to walk to the closest bank then walk there Bank oClosestBank = null; for(Bank oBank: Banks) { if(oClosestBank==null) { log("Setting first closest bank to "+oBank.BankName); oClosestBank = oBank; } else if(oBank.BankPosition.distance(myPlayer().getPosition())<oClosestBank.BankPosition.distance(myPlayer().getPosition())) { log(oBank.BankName+" is closer."); oClosestBank = oBank; } } if(oClosestBank!=null) { tempX = oClosestBank.BankPosition.getX()+(random(-1,1)); tempY = oClosestBank.BankPosition.getY()+(random(-1,1)); log("Walking to "+oClosestBank.BankName+" ("+tempX+","+tempY+")"); oEvent = new WebWalkEvent(new Position(tempX, tempY, oClosestBank.BankPosition.getZ())); oPPP = new PathPreferenceProfile(); oPPP.setAllowObstacles(true); oPPP.setAllowTeleports(true); oEvent.setPathPreferenceProfile(oPPP); oEvent.prefetchRequirements(getBot().getMethods()); execute(oEvent); } break; That's the walking part, works for everywhere except from very, very specific locations. The Bank class contains basically just the banks name and position for now. The heart of the problem seems to be this:- oEvent = new WebWalkEvent(new Position(2946,3369,0)); oPPP = new PathPreferenceProfile(); oPPP.setAllowObstacles(true); oPPP.setAllowTeleports(true); oEvent.setPathPreferenceProfile(oPPP); oEvent.prefetchRequirements(getBot().getMethods()); execute(oEvent); Web Walking from the Gem Shop to the West Falador Bank (2946, 3369) just doesn't seem to work. The +1/-1 is to add a touch of randomness and, occasionally it'll throw an error because it might try to calculate a path into a booth/solid object. But without the randomness, same problem, constant stream of "WebWalkingEvent; Terminated! Exceeded attempt threshold"
  5. Got another one in Falador, Gem Shop (2944, 3334) to West Falador Bank (2946, 3369) [INFO][Bot #1][04/22 03:55:22 PM]: Walking to West Falador (2946,3369) [INFO][Bot #1][04/22 03:55:24 PM]: WebWalkingEvent; Terminated! Exceeded attempt threshold. [INFO][Bot #1][04/22 03:55:28 PM]: Walking to West Falador (2945,3369) [INFO][Bot #1][04/22 03:55:29 PM]: WebWalkingEvent; Terminated! Exceeded attempt threshold. [INFO][Bot #1][04/22 03:55:32 PM]: Walking to West Falador (2946,3369) [INFO][Bot #1][04/22 03:55:33 PM]: WebWalkingEvent; Terminated! Exceeded attempt threshold. [INFO][Bot #1][04/22 03:55:38 PM]: Walking to West Falador (2946,3368) [INFO][Bot #1][04/22 03:55:40 PM]: WebWalkingEvent; Terminated! Exceeded attempt threshold. [INFO][Bot #1][04/22 03:55:41 PM]: Walking to West Falador (2945,3370) [INFO][Bot #1][04/22 03:55:43 PM]: WebWalkingEvent; Terminated! Exceeded attempt threshold. [INFO][Bot #1][04/22 03:55:47 PM]: Walking to West Falador (2945,3370) [INFO][Bot #1][04/22 03:55:49 PM]: WebWalkingEvent; Terminated! Exceeded attempt threshold. Etc etc etc
  6. They are definitely walkable, GE I think is between 2 certain coords I'll have to get again next time it happens. That Falador one though literally only just happened and was stuck in that for about 5-10 mins before I gave up, ended the script and did it manually.
  7. Hey guys, hope you can help. I've noticed I constantly get 'WebWalkingEvent; Terminated! Exceeded attempt threshold.' but only when walking between specific start/end points that it shouldn't have any difficulty with. For example, from Falador Mail Shop (2970, 3311) to the East Falador Bank (3013, 3356), it just can't find a route, at all. Another one I found was between the Grand Exchange and the Varrock Rune Shop, it just can't find a route. Is there anything specific about these areas I'm not aware of? Just so I know how to code around it.
×
×
  • Create New...