Skip to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Walking To New Position

Featured Replies

import org.osbot.script.Scriptimport org.osbot.script.ScriptManifestimport org.osbot.script.mouse.*import org.osbot.script.rs2.*import org.osbot.script.rs2.map.Positionimport org.osbot.script.rs2.model.GroundItemimport org.osbot.script.rs2.model.Itemimport org.osbot.script.rs2.model.PrimaryObjectimport org.osbot.script.rs2.model.RS2Objectimport org.osbot.script.rs2.model.Playerimport org.osbot.script.rs2.model.Characterimport org.osbot.script.rs2.model.Entityimport org.osbot.script.rs2.ui.*					@ScriptManifest(name = "telk1", author = "mafia", version = 1.0D, info="walkstobankandfurn")		class telk1 extends Script {		                			enum State {				PATH, ONPATH, IDLE			}			 		 State state = State.IDLE;						Position bankp = new Position(3269, 3167, 0)					void onStart() {				log("Checking Status")						log("Walk to dat bank")						state = State.onPATH					}								}						int onLoop() {				switch(state){										   case State.PATH:						return onPath()				}				return 600 + random(600)			}											 		 int onPath() {		log("to Bank")						walk(new Position(3269, 3167, 0));					return 100 + random(100, 1000)		 }	

 

 

subject of my problem:  scripts

Problem Description: 

  So Im trying to walk from the alkarid furnace to the alkarid bank. Any tips why it wont load in the client? it did load but then it failed to start :/ now it wont load at all. I set it up in eclipse as a groovy project then copied it over. Note it has some code of others scripts, but its for learning purposes only!

Media: Media Up there^

Remaining: nothing remaining.

Edited by mafiamiles

 

import org.osbot.script.Scriptimport org.osbot.script.ScriptManifestimport org.osbot.script.mouse.*import org.osbot.script.rs2.*import org.osbot.script.rs2.map.Positionimport org.osbot.script.rs2.model.GroundItemimport org.osbot.script.rs2.model.Itemimport org.osbot.script.rs2.model.PrimaryObjectimport org.osbot.script.rs2.model.RS2Objectimport org.osbot.script.rs2.model.Playerimport org.osbot.script.rs2.model.Characterimport org.osbot.script.rs2.model.Entityimport org.osbot.script.rs2.ui.*					@ScriptManifest(name = "telk1", author = "mafia", version = 1.0D, info="walkstobankandfurn")		class telk1 extends Script {		                			enum State {				PATH, ONPATH, IDLE			}			 		 State state = State.IDLE;						Position bankp = new Position(3269, 3167, 0)					void onStart() {				log("Checking Status")						log("Walk to dat bank")						state = State.onPATH					}								}						int onLoop() {				switch(state){										   case State.PATH:						return onPath()				}				return 600 + random(600)			}											 		 int onPath() {		log("to Bank")						walk(new Position(3269, 3167, 0));					return 100 + random(100, 1000)		 }
 

 

subject of my problem:  scripts

Problem Description: 

    So Im trying to walk from the alkarid furnace to the alkarid bank. Any tips why it wont load in the client? it did load but then it failed to start :/ now it wont load at all. I set it up in eclipse as a groovy project then copied it over. Note it has some code of others scripts, but its for learning purposes only!

Media: Media Up there^

Remaining: nothing remaining.

 

You're missing a bracket at the end of all of it.

Edited by Speakmore

  • Author

I think you posted to soon about the bracket. Ive been adding and removing brackets all over with eclipse and it doesnt solve anything :/ if Im wrong my bad.

Edited by mafiamiles

  • Author

ok so 3 different places or 3 tiles? and result at what part of the script? After the walkto?

If anyone has a baseline walk to script I could study that would be great. I know there are walking to places in several scripts but they all have methods becides walking.

Edited by mafiamiles

int onPath() {
log("to Bank")

walk(new Position(3269, 3167, 0));

  walk(new Position(3269, 3167, 0)); //enter tile

  walk(new Position(3269, 3167, 0)); //enter tile
return 100 + random(100, 1000)
}

 

Give that a shot.

  • Author
import org.osbot.script.Scriptimport org.osbot.script.ScriptManifestimport org.osbot.script.mouse.*import org.osbot.script.rs2.*import org.osbot.script.rs2.map.Positionimport org.osbot.script.rs2.model.GroundItemimport org.osbot.script.rs2.model.Itemimport org.osbot.script.rs2.model.PrimaryObjectimport org.osbot.script.rs2.model.RS2Objectimport org.osbot.script.rs2.model.Playerimport org.osbot.script.rs2.model.Characterimport org.osbot.script.rs2.model.Entityimport org.osbot.script.rs2.ui.*				@ScriptManifest(name = "telk1", author = "josiah", version = 1.0D, info="walkstobankandfurn")		class telk extends Script {				  							enum State {				PATH, ONPATH, IDLE			}			 					  int bankId = 2213														void onStart() {				log("Checking Status")					log("Walk to dat bank")														if(client.getMyPlayer().getZ() == 0){				log("Walk to dat ladder")				state = State.ONPATH					}								}						int onLoop() {				switch(state){										   case State.PATH:						return onPath()				}				return 600 + random(600)			}											 		 int onPath() {		log("to Bank")						walk(new Position(3274, 3186, 0)); //enter tile								walk(new Position(3277, 3175, 0)); //enter tile				walk(new Position(3269, 3167, 0));					return 100 + random(100, 1000)		 }	}

 

Now it loads the script and when i press play it gives me a error code in mass, like 300+ lines a minute. I think its due to the if(client.getMyPlayer().getZ() == 0){. any idea?

Edit* No Idea how to get rid of getz without crashing the code.

How do I look up object(in inv) ids? Ive been dropping stuff on ground and ginding ground item info but it seems sketchy.

Edited by mafiamiles

  • Author

Ignore. Making into java instead of groovy.

Edited by mafiamiles

My walkExact lines weren't working later on in the day for me and IDK why.

I was able to run it fine earloer, but when I got home and came to it, I was getting errors with:

int toDoor() {

log("Walking to the Door!")

walkExact(new Position(2465, 3491))

return 1000

state = State.OPENDOOR

return 1000

}

Speak are you talking about your script or my version? :p

My own script

Sorry

I'm having walking issues as well and IDK why :/

My walkExact lines weren't working later on in the day for me and IDK why.

I was able to run it fine earloer, but when I got home and came to it, I was getting errors with:

int toDoor() {

log("Walking to the Door!")

walkExact(new Position(2465, 3491))

return 1000

state = State.OPENDOOR

return 1000

}

Your missing an extra int in the possition, if i am correct

Your missing an extra int in the possition, if i am correct

Tried it with the 0, didn't change anything :/

I think Link helped me out though

I cant test it until i can use my comp tomorrow as its 1250 am now

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.