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.

[Script] stop(String message)

Featured Replies

For the Script class.

Log the message to the console when this is called and then stop the script.

Useful for, for example:

 

if(outofsupplies) stop("Out of supplies");

else if(!coolenough) stop("Not cool enough");

else if(!canbank) stop("Couldn't find bank");

 

Also: stop (String message, boolean logout) because why not.

 

Cheers!

 

It's also a 5 second job for any scripter to write this himself, but I still think this would be a usefull addition to the API.

       public void stop(String message) {
		log(message);
		stop();
	}
	
	public void stop(String message, boolean logout) {
		log(message);
		stop(logout);
	}

Edited by Botre

  • Author

You can just add a log before you call stop.

:s

I don't see alot of benefit from this Personally.

 

Verbosity is the main reason I suppose tongue.png

 

if(outofsupplies) getScript().stop("Out of supplies");

else if(!coolenough) getScript().stop("Not cool enough");

else if(!canbank) getScript().stop("Couldn't find bank");

 

vs:

 

if(outofsupplies) {

getScript().log("Out of supplies");

getScript().stop();

}

else if(!coolenough) {

getScript().log("Not cool enough");

getScript().stop();

}

else if(!canbank) {

getScript().log("Couldn't find bank");

getScript().stop();

}

 

3 lines vs 12 lines, which one would you rather write ? :x

Edited by Botre

Verbosity is the main reason I suppose tongue.png

 

if(outofsupplies) getScript().stop("Out of supplies");

else if(!coolenough) getScript().stop("Not cool enough");

else if(!canbank) getScript().stop("Couldn't find bank");

 

vs:

 

if(outofsupplies) {

getScript().log("Out of supplies");

getScript().stop();

}

else if(!coolenough) {

getScript().log("Not cool enough");

getScript().stop();

}

else if(!canbank) {

getScript().log("Couldn't find bank");

getScript().stop();

}

 

3 lines vs 12 lines, which one would you rather write ? :x

 

Any scripter can write it himself. I don't see the point in adding this to the API.

I don't think that we should flood the API with useless functions that we don't need.

Edited by Xerion

I see what you are saying, but since the api has 2 stop methods then they would also need 2 methods that take string parameters. So alek would have to add 2 methods to keep ot consistent.

Stop (boolean, string)

Stop (string)

Or something like that. Just seems a bit unnecessary imo.

Still love u thou :s

  • Author

I see what you are saying, but since the api has 2 stop methods then they would also need 2 methods that take string parameters. So alek would have to add 2 methods to keep ot consistent.

Stop (boolean, string)

Stop (string)

Or something like that. Just seems a bit unnecessary imo.

Still love u thou :s

 

Nah main fair enough :p

Just figured I suggest it since I needed it myself a while back and perhaps some others were interested in it ^^

Nah main fair enough :p

Just figured I suggest it since I needed it myself a while back and perhaps some others were interested in it ^^

I'm just playing the role of alek.

I'm pretty sure that is what he will think if I had to guess.

:alek: d

Edited by Mysteryy

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.