ospaul Posted November 27, 2020 Share Posted November 27, 2020 (edited) Hey all, currently having an issue sometimes with walking event. My logger will show that I have reached the walk event, but will sometimes not actually move, or attempt to move, even though in the logger it says it has generated a tile and is executing the walk event. Other times it works perfectly. Im new to the API, so I'm unsure if I should be using WalkingEvent? I might need to fine tune my tile selection though. @Override public void process() throws InterruptedException { List<NPC> dangerousNPC = script.getNpcs().filter(script::isDangerousNPC); dangerousNPC.forEach(npc -> { if (script.currentState != States.LOOT && !script.myPlayer().isMoving()) { WalkingEvent myEvent = new WalkingEvent(new Position(findAnySafeTile(npc, potentialSafeTiles))); script.execute(myEvent); script.log("Generated safe tile.. executing walk."); } }); } Edited November 28, 2020 by ospaul Quote Link to comment Share on other sites More sharing options...
Heist Posted November 28, 2020 Share Posted November 28, 2020 Try webwalking Quote Link to comment Share on other sites More sharing options...
ospaul Posted November 28, 2020 Author Share Posted November 28, 2020 (edited) 4 hours ago, Heist said: Try webwalking I web walk for larger distances this is in a 10x10 area where I sometimes just want to move a tile back. It's to my understanding that webwalking uses the minimap, I don't always want to traverse using the mini map. We walking is also a hog on resources if I'm not mistaken? Edited November 28, 2020 by ospaul Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted November 28, 2020 Share Posted November 28, 2020 7 hours ago, ospaul said: Hey all, currently having an issue sometimes with walking event. My logger will show that I have reached the event sometimes but will not actually move, or attempt to move, even though in the logger it says it has generated a tile and is executing the walk event. Other times it works perfectly. Im new to the API, so I'm unsure if I should be using WalkingEvent? I might need to fine tune my tile selection though. @Override public void process() throws InterruptedException { List<NPC> dangerousNPC = script.getNpcs().filter(script::isDangerousNPC); dangerousNPC.forEach(npc -> { if (script.currentState != States.LOOT && !script.myPlayer().isMoving()) { WalkingEvent myEvent = new WalkingEvent(new Position(findAnySafeTile(npc, potentialSafeTiles))); script.execute(myEvent); script.log("Generated safe tile.. executing walk."); } }); } When creating a walkingevent there is probably a base threshold ste of a few tiles? To fix that you should add myEvent.setMinDistanceThreshold(0); That will make sure you walk on the exact tile you want While myEvent.setMinDistanceThreshold(1); Would stop the event when you ar e inside 1 tile radius ^^ Quote Link to comment Share on other sites More sharing options...
ospaul Posted November 28, 2020 Author Share Posted November 28, 2020 28 minutes ago, Khaleesi said: When creating a walkingevent there is probably a base threshold ste of a few tiles? To fix that you should add myEvent.setMinDistanceThreshold(0); That will make sure you walk on the exact tile you want While myEvent.setMinDistanceThreshold(1); Would stop the event when you ar e inside 1 tile radius ^^ Thanks khal, I’ll try that next time I’m free and let you know if that works! 1 Quote Link to comment Share on other sites More sharing options...