Jump to content

Phony's Walker


Recommended Posts

Posted (edited)

Phony's Walker

 

- Simple lightweight walker

- It will walk to given location from anywhere

- Includes simple GUI

 

This is my first script so any feedback would be appreciated!

If you find any bugs or want anything added, just let me know!

 

Shout out to @Apaec for helping me with the GUI!

 

Download:

Walker.jar

walker.gif

Edited by phony
  • Like 5
  • 10 months later...
Posted (edited)
2 hours ago, Mahdan said:

Same

 

@zekeria

Just create your own if you need one here is code to do it this example checks if player is at the small varrock bank if they are will walk to square then to ge, but if its not at small bank to start will walk there then go to square then ge after just example if u wanted it to go multiple places before stopping or could edit it to only got one spot.

 

import org.osbot.rs07.api.map.Area;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;


@ScriptManifest(name = "Walking Script", author = "", version = 1.0, info = "", logo = "") 

public class Main extends Script {
	
	// Get area codes here - https://explv.github.io/
	Area varrockSquare = new Area(3207, 3434, 3219, 3422);
	Area grandExchange = new Area(3161, 3492, 3167, 3487);
	Area varrockSmallBank = new Area(3250, 3422, 3257, 3419);
	
    @Override
    public void onStart() throws InterruptedException {
    }

    @Override
    public void onExit() {
    }
    
    @Override
    public int onLoop() throws InterruptedException {
    		// checks if player is at first location, if they are then will walk to second location, but if player isnt at first location will walk to first, once player is at second
    		// location, it will then walk to final location.
    		if(varrockSmallBank.contains(myPlayer())) {
    			log("At first location walking to second.");
    			getWalking().webWalk(varrockSquare);
    		} else {
    			getWalking().webWalk(varrockSmallBank);
    			log("was not at first location walking to it.");
    		}
    		if(varrockSquare.contains(myPlayer())) {
    			log("At second location walking to final");
    			getWalking().webWalk(grandExchange);
    		}
    		if(grandExchange.contains(myPlayer())) {
    			stop();
    			log("At final location stopping");
    		}
        return random(800);
    }
}

 

Edited by DeadPk3r
  • Like 1
Posted
42 minutes ago, DeadPk3r said:

 

@zekeria

Just create your own if you need one here is code to do it this example checks if player is at the small varrock bank if they are will walk to square then to ge, but if its not at small bank to start will walk there then go to square then ge after just example if u wanted it to go multiple places before stopping or could edit it to only got one spot.

 


import org.osbot.rs07.api.map.Area;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;


@ScriptManifest(name = "Walking Script", author = "", version = 1.0, info = "", logo = "") 

public class Main extends Script {
	
	// Get area codes here - https://explv.github.io/
	Area varrockSquare = new Area(3207, 3434, 3219, 3422);
	Area grandExchange = new Area(3161, 3492, 3167, 3487);
	Area varrockSmallBank = new Area(3250, 3422, 3257, 3419);
	
    @Override
    public void onStart() throws InterruptedException {
    }

    @Override
    public void onExit() {
    }
    
    @Override
    public int onLoop() throws InterruptedException {
    		// checks if player is at first location, if they are then will walk to second location, but if player isnt at first location will walk to first, once player is at second
    		// location, it will then walk to final location.
    		if(varrockSmallBank.contains(myPlayer())) {
    			log("At first location walking to second.");
    			getWalking().webWalk(varrockSquare);
    		} else {
    			getWalking().webWalk(varrockSmallBank);
    			log("was not at first location walking to it.");
    		}
    		if(varrockSquare.contains(myPlayer())) {
    			log("At second location walking to final");
    			getWalking().webWalk(grandExchange);
    		}
    		if(grandExchange.contains(myPlayer())) {
    			stop();
    			log("At final location stopping");
    		}
        return random(800);
    }
}

 

Oh, thank you very much!

  • Like 1
Posted
On ١٤‏/٤‏/٢٠١٨ at 9:30 AM, DeadPk3r said:

 

@zekeria

Just create your own if you need one here is code to do it this example checks if player is at the small varrock bank if they are will walk to square then to ge, but if its not at small bank to start will walk there then go to square then ge after just example if u wanted it to go multiple places before stopping or could edit it to only got one spot.

 


import org.osbot.rs07.api.map.Area;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;


@ScriptManifest(name = "Walking Script", author = "", version = 1.0, info = "", logo = "") 

public class Main extends Script {
	
	// Get area codes here - https://explv.github.io/
	Area varrockSquare = new Area(3207, 3434, 3219, 3422);
	Area grandExchange = new Area(3161, 3492, 3167, 3487);
	Area varrockSmallBank = new Area(3250, 3422, 3257, 3419);
	
    @Override
    public void onStart() throws InterruptedException {
    }

    @Override
    public void onExit() {
    }
    
    @Override
    public int onLoop() throws InterruptedException {
    		// checks if player is at first location, if they are then will walk to second location, but if player isnt at first location will walk to first, once player is at second
    		// location, it will then walk to final location.
    		if(varrockSmallBank.contains(myPlayer())) {
    			log("At first location walking to second.");
    			getWalking().webWalk(varrockSquare);
    		} else {
    			getWalking().webWalk(varrockSmallBank);
    			log("was not at first location walking to it.");
    		}
    		if(varrockSquare.contains(myPlayer())) {
    			log("At second location walking to final");
    			getWalking().webWalk(grandExchange);
    		}
    		if(grandExchange.contains(myPlayer())) {
    			stop();
    			log("At final location stopping");
    		}
        return random(800);
    }
}

 

how do i add this to my local script?

Posted
1 hour ago, zekeria said:

how do i add this to my local script?

You will need to edit my script above, and then compile it after that just add it to folder below change your username first though, if you don't know how to compile it look in the tutorial section there are a few tutorials on how to set it up.

C:\Users\USERNAME\OSBot\Scripts

  • 2 months later...

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...