Jump to content
Sign in to follow this  
shaiguy

need help web walking

Recommended Posts

Posted (edited)

New to scripting and been trying to figure out how to walk but I cannot do it. 

I'm not sure where to really start. I've been trying to utilize RSArea with walkTo.

    private final RSArea WALK_SPOT = new RSArea(null);
 

don't know what to put in the null spot. 

 

A simple snippit of walking from lumby to lumby bridge would be very beneficial to me. Thanks for reading. 

 

edit: I have tried Snufflez suggestion and it worked. Would this be the way to do things if I want to walk from say lumbridge to varrock sewers to then continue walking to kill zombies? 

 

Edited by shaiguy

Share this post


Link to post
Share on other sites
22 minutes ago, Snufflez said:

Try creating an RSTile (one tile on the map) and then walking to that. 

 

RSTile tile = new RSTile(x,y,);

And then 

WebWalking.walkTo(tile);

 

 

 

Would this be the way to do things if I want to walk from say lumbridge to varrock sewers to then continue walking to kill moss giants? 

Share this post


Link to post
Share on other sites

To create an area with RSArea you need to specify 2 tiles in the parameters. This creates a rectangle area using the two tiles specified as two opposite corners (You want to pick a NE+SW tile, or a NW+SE Tile) Then, you can use Webwalking to walk to AREA_NAME.getRandomTile.

2 minutes ago, shaiguy said:

 

Would this be the way to do things if I want to walk from say lumbridge to varrock sewers to then continue walking to kill moss giants? 

Yes, and no. The standard web walker doesn't handle most dungeons/obstacles. Using the regular web walker, you'd have to walk to the varrock sewers entrance, and then when the entrance is nearby, you'd have to interact with it to enter the sewers. Repeat with any obstacles between you and your end location.

Alternatively, you could look into using DaxWebWalker, which handles many dungeons already, and is open source. If you're utilizing his web-walker you could simply web walk to the location with just the one line of code. If you do this though, you should add a failsafe, because sometimes the free API key hits the call limit.

  • Like 3

Share this post


Link to post
Share on other sites
1 hour ago, Snufflez said:

Yeah, just set the tile coords to the sewers entrance, web walk, climb into the sewers (possibly supported automatically by webwalking?) and then walk to moss giants

 

1 hour ago, Adventure_Time said:

To create an area with RSArea you need to specify 2 tiles in the parameters. This creates a rectangle area using the two tiles specified as two opposite corners (You want to pick a NE+SW tile, or a NW+SE Tile) Then, you can use Webwalking to walk to AREA_NAME.getRandomTile.

Yes, and no. The standard web walker doesn't handle most dungeons/obstacles. Using the regular web walker, you'd have to walk to the varrock sewers entrance, and then when the entrance is nearby, you'd have to interact with it to enter the sewers. Repeat with any obstacles between you and your end location.

Alternatively, you could look into using DaxWebWalker, which handles many dungeons already, and is open source. If you're utilizing his web-walker you could simply web walk to the location with just the one line of code. If you do this though, you should add a failsafe, because sometimes the free API key hits the call limit.

 

Hi again. Sorry for the bother. 

I manage to walk a short distance ( varrock center to a few tiles away)

But when I try to do varrock center to the sewer entrance, it doesn't walk. 

I tried using WebWalking but it broke right away with EGWPosition

Here's what I'm trying: 

    private RSTile WALK_SPOT = new RSTile(3236,3457,0);
private int toSpot()
    {
        if (!Player.getPosition().equals(WALK_SPOT));
        {
                        
            //break telly 
            RSItem[] item = Inventory.find("Varrock Teleport");
            item[0].click("Break");
            
            Walking.walkTo(WALK_SPOT);
            
            //enter entrance
            
            RSObject[] manhole = Objects.findNearest(5, "Manhole");
            manhole[0].click("Climb-down");
            
            //walk to spot
            
            Walking.walkTo(WALK);
        }
        return 70;
    }

thanks for all the help guys. 

Share this post


Link to post
Share on other sites
Posted (edited)
18 minutes ago, shaiguy said:

Hi again. Sorry for the bother. 

I manage to walk a short distance ( varrock center to a few tiles away)

But when I try to do varrock center to the sewer entrance, it doesn't walk. 

I tried using WebWalking but it broke right away with EGWPosition

I believe this is because Walking.walkto only walks to a point visible on the minimap, so not a large tile radius. Try using WebWalking.walkTo for larger distances

Edit: re: the EGW position error, make sure you're importing 2007 not rs3 webwalking :)

Edited by Snufflez
reeeeeeeeeeeee
  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)
15 minutes ago, Snufflez said:

I believe this is because Walking.walkto only walks to a point visible on the minimap, so not a large tile radius. Try using WebWalking.walkTo for larger distances

Edit: re: the EGW position error, make sure you're importing 2007 not rs3 webwalking :)

that would be why, how do I get 2007 import to show? I'm only getting an import for rs3. 

 

 

edit: how do I use position able rather? 

edit2: I'm dumb, figured it out. thanks a ton. 

Edited by shaiguy

Share this post


Link to post
Share on other sites
Posted (edited)
4 minutes ago, shaiguy said:

that would be why, how do I get 2007 import to show? I'm only getting an import for rs3. 

delete the rs3 import code at the top and depending on your IDE i think you can click on the webwalking method to import again, select 07.

Or just paste ' import org.tribot.api2007.WebWalking ' at the top in place of the rs3

Edited by Snufflez
formatting

Share this post


Link to post
Share on other sites
2 hours ago, shaiguy said:

Hi again. Sorry for the bother. 

I manage to walk a short distance ( varrock center to a few tiles away)

But when I try to do varrock center to the sewer entrance, it doesn't walk. 

I tried using WebWalking but it broke right away with EGWPosition

Here's what I'm trying: 

 

Your code might not work as intended.

I've commented a few things:

private RSTile WALK_SPOT = new RSTile(3236,3457,0);

private int toSpot()
    {
        if (!Player.getPosition().equals(WALK_SPOT));
        {
                        
            
            RSItem[] item = Inventory.find("Varrock Teleport");
            item[0].click("Break"); // This could throw an Array Index out of bounds exception
            
            Walking.walkTo(WALK_SPOT); // How do you know if item[0] was actually clicked?
            
            
            RSObject[] manhole = Objects.findNearest(5, "Manhole");
            manhole[0].click("Climb-down"); // This could also throw an Array Index out of bounds exception
            // The climb down option is only available if the manhole is open
           
            Walking.walkTo(WALK);
        }
        return 70; // Remove this
    }

 

 

Try this instead:

 

private static final RSArea VARROCK_AREA = new RSArea(new RSTile(3206, 3421, 0), new RSTile(3240, 3460, 0));
private static final RSTile MANHOLE_TILE = new RSTile(3237, 3457, 0);

private void getInSewers() {
	if (Player.getPosition().getY() > 9850) {
		General.println("Player is already in sewers.");
		return;
	}

	if (!VARROCK_AREA.contains(Player.getPosition())) {
		if (Clicking.click(Inventory.find("Varrock Teleport"))) // If successfully clicked tab
			Timing.waitCondition(new Condition() { // Wait to arrive in Varrock 
				@Override
				public boolean active() {
					General.sleep(300);
					return VARROCK_AREA.contains(Player.getPosition());
				}
			}, General.random(4000, 6000));
	} else {
		// Else if player is already in Varrock area
		RSObject[] manhole = Objects.findNearest(5, "Manhole");
		if (manhole.length == 0 || !manhole[0].isOnScreen()) {
			Walking.blindWalkTo(MANHOLE_TILE);
		} else {
			if (manhole[0].getID() == 881) { // The lid is on
				if (manhole[0].click("Open")) /// If successfully clicked "Open"
					Timing.waitCondition(new Condition() { // Wait to remove lid
						@Override
						public boolean active() {
							General.sleep(300);
							return Objects.findNearest(3, 882).length > 0;
						}
					}, General.random(5000, 8000));
			} else { // The lid is off
				if (manhole[0].click("Climb-down")) // If successfully clicked "Climb-down"
					Timing.waitCondition(new Condition() { // Wait until the player is inside the sewers
						@Override
						public boolean active() {
							General.sleep(300);
							return Player.getPosition().getY() > 9850; // inside sewers
						}
					}, General.randomLong(2000, 4000));
			}
		}
	}
}

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
6 hours ago, Einstein said:

 

Your code might not work as intended.

I've commented a few things:

private RSTile WALK_SPOT = new RSTile(3236,3457,0);

private int toSpot()
    {
        if (!Player.getPosition().equals(WALK_SPOT));
        {
                        
            
            RSItem[] item = Inventory.find("Varrock Teleport");
            item[0].click("Break"); // This could throw an Array Index out of bounds exception
            
            Walking.walkTo(WALK_SPOT); // How do you know if item[0] was actually clicked?
            
            
            RSObject[] manhole = Objects.findNearest(5, "Manhole");
            manhole[0].click("Climb-down"); // This could also throw an Array Index out of bounds exception
            // The climb down option is only available if the manhole is open
           
            Walking.walkTo(WALK);
        }
        return 70; // Remove this
    }

 

 

Try this instead:

 

private static final RSArea VARROCK_AREA = new RSArea(new RSTile(3206, 3421, 0), new RSTile(3240, 3460, 0));
private static final RSTile MANHOLE_TILE = new RSTile(3237, 3457, 0);

private void getInSewers() {
	if (Player.getPosition().getY() > 9850) {
		General.println("Player is already in sewers.");
		return;
	}

	if (!VARROCK_AREA.contains(Player.getPosition())) {
		if (Clicking.click(Inventory.find("Varrock Teleport"))) // If successfully clicked tab
			Timing.waitCondition(new Condition() { // Wait to arrive in Varrock 
				@Override
				public boolean active() {
					General.sleep(300);
					return VARROCK_AREA.contains(Player.getPosition());
				}
			}, General.random(4000, 6000));
	} else {
		// Else if player is already in Varrock area
		RSObject[] manhole = Objects.findNearest(5, "Manhole");
		if (manhole.length == 0 || !manhole[0].isOnScreen()) {
			Walking.blindWalkTo(MANHOLE_TILE);
		} else {
			if (manhole[0].getID() == 881) { // The lid is on
				if (manhole[0].click("Open")) /// If successfully clicked "Open"
					Timing.waitCondition(new Condition() { // Wait to remove lid
						@Override
						public boolean active() {
							General.sleep(300);
							return Objects.findNearest(3, 882).length > 0;
						}
					}, General.random(5000, 8000));
			} else { // The lid is off
				if (manhole[0].click("Climb-down")) // If successfully clicked "Climb-down"
					Timing.waitCondition(new Condition() { // Wait until the player is inside the sewers
						@Override
						public boolean active() {
							General.sleep(300);
							return Player.getPosition().getY() > 9850; // inside sewers
						}
					}, General.randomLong(2000, 4000));
			}
		}
	}
}

 

thank you very much for the input. Last night I was just trying to get it to do what I wanted then I would work out the kinks. 

This is very useful though. Thanks again.

Share this post


Link to post
Share on other sites
2 hours ago, shaiguy said:

thank you very much for the input. Last night I was just trying to get it to do what I wanted then I would work out the kinks. 

This is very useful though. Thanks again.

 

You're welcome! :)

If you need more help, feel free to send me a PM. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Our picks

    • This release includes:

      Fix updater bug which was causing a bunch of issues


      TRiBot will no longer require manual hook fixes every time the RS client updates - the updater has been fully patched for objects


      Hooked login fields


      Improved the login bot


      Ability to recognize the banned/locked messages again


      Ability to read the current input for username and password fields


      If the username or password is already entered correctly, it won't be erased


      If only part of the username or password is already entered correctly, it won't be erased. The login bot will fill in what's missing.


      If there are a few invalid characters after a valid substring of your username/password, only (approximately) those invalid characters will be erased. The login bot will then proceed to fill in the missing characters.





      Coming soon:

      Skull icon fix


      Improve screen rate and responsiveness of the RS client (both regular client and LG)


      Much more
        • Thanks
        • Like
      • 15 replies
    • This release includes:

      Fix shift clicking option selecting


      Fix high paint delay settings saving


      Update prayer IDs for the quick select menu


      Remove RS3 support


      Fix hooks



      RS3 Support Removed

      The RS3 client hasn't been updated since our Old-School version of TRiBot was released, as many of you may have noticed. Keeping all of the RS3 code in the client made the client as a whole harder to maintain, larger, slower, and messier. As hardly anyone still uses the RS3 client, and since the RS3 API was hardly functioning, we made the decision to completely remove it from TRiBot.

      For the average user, this means that the client will be smaller, cleaner, and faster. Future updates will also take less work meaning there will be more frequent updates.

      If you were one of the few users still using the RS3 client, we apologize for the inconvenience. No future support for RS3 is planned. There are many other botting clients which has support for RS3, so we recommend finding an alternative if you wish to continue botting on RS3.
        • Thanks
        • Like
      • 25 replies
    • Please welcome our new developers, @JoeDezzy1, @erickho123, @Encoded, and @wastedbro.

      These members will be responsible for working on, maintaining, and improving TRiBot.

      This means that bug fixes and improvements will now come at a much faster pace! We're committed to providing users with the best botting experience possible!
        • Thanks
        • Like
      • 30 replies
    • This release includes:

      More 3rd party libraries for script writers to use


      Apache Commons Codec


      Apache Commons Collections


      Apache Commons Configuration


      Apache Commons IO


      Apache Commons Lang


      Apache Commons Math


      GSON


      Guava


      JFoenix




      Hint arrow API


      Game#getHintArrowX


      Game#getHintArrowY




      Fix player hooks including Player#getSkullIcon and Prayer#getPrayerIcon
        • Thanks
        • Like
      • 49 replies
    • This update includes:

      Fix broken hooks


      Fix login bot for the message "No reply from login server. Please wait 1 minute and try again."


      Fix bug relating to which bot tab is sent human input


      General#randomLong bug fix involving negative numbers


      Fix GE API



      Please note: There are still some issues with the login bot due to a change in the game mechanisms handling the login screen. We're working on a fix and will upload it when ready.
        • Thanks
        • Like
      • 37 replies
  • Recently Browsing   0 members

    No registered users viewing this page.

×