Jump to content

Phony's Walker


phony

Recommended Posts

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
Link to comment
Share on other sites

  • 10 months later...
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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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