Jump to content
Razeth

WebWalking Between Certain Places Fails

Recommended Posts

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.

Link to comment
Share on other sites

3 minutes ago, Razeth said:

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.


Make sure the positions you are using are walkable, I just web walked from GE to the rune shop & back with no issues.

Link to comment
Share on other sites

On 4/21/2018 at 12:40 PM, Explv said:


Make sure the positions you are using are walkable, I just web walked from GE to the rune shop & back with no issues.

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

  • Like 1
Link to comment
Share on other sites

On 4/22/2018 at 4:40 PM, Alek said:

Can you please show the complete code as it currently is, I promise nobody will want to steal it.

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"

Link to comment
Share on other sites

On 4/22/2018 at 4:40 PM, Alek said:

Can you please show the complete code as it currently is, I promise nobody will want to steal it.

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) {
		
	}
	
}

 

Link to comment
Share on other sites

1 hour ago, Razeth said:

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) {
		
	}
	
}

 

Gem store to fally West works fine with :

walking.webWalk(Banks.FALADOR_WEST);

Chain store to fally East works fine with :

walking.webWalk(Banks.FALADOR_EAST);

Both work with this:
 

WebWalkEvent oEvent = new WebWalkEvent(Banks.FALADOR_WEST);
PathPreferenceProfile oPPP = new PathPreferenceProfile();
oPPP.setAllowObstacles(true);
oPPP.setAllowTeleports(true);
oEvent.setPathPreferenceProfile(oPPP);
oEvent.prefetchRequirements(getBot().getMethods());
execute(oEvent);

try using the Banks that are part of the api or use a set area not a position

EDIT:

tried this with the positions you've used, using pre set position, or using new position in the event and I can't get the error

 

Edited by GPSwap
Link to comment
Share on other sites

2 hours ago, GPSwap said:

Gem store to fally West works fine with :


walking.webWalk(Banks.FALADOR_WEST);

Chain store to fally East works fine with :


walking.webWalk(Banks.FALADOR_EAST);

Both work with this:
 


WebWalkEvent oEvent = new WebWalkEvent(Banks.FALADOR_WEST);
PathPreferenceProfile oPPP = new PathPreferenceProfile();
oPPP.setAllowObstacles(true);
oPPP.setAllowTeleports(true);
oEvent.setPathPreferenceProfile(oPPP);
oEvent.prefetchRequirements(getBot().getMethods());
execute(oEvent);

try using the Banks that are part of the api or use a set area not a position

EDIT:

tried this with the positions you've used, using pre set position, or using new position in the event and I can't get the error

 

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

Edited by Razeth
Link to comment
Share on other sites

1 hour ago, Razeth said:

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.

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

edit:

closed the door adn ran it, opens the door and does the path like you would expect

GIF:

Spoiler

42adb0a94501b295360a4bd0b8744e2d.gif

Using that exact positon of 2945, 3335 with the code of

  public int onLoop() {
    	if(Banks.FALADOR_WEST.contains(myPlayer())){
    		stop(false);
    	}else{
    		walking.webWalk(Banks.FALADOR_WEST);
    	}
        return 100; 


    }

Works perfectly as you can see, come in chatbot and talk with me

Edited by GPSwap
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.

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