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

setting up cli parameters

Featured Replies

Hey, im looking to add cli parameters to my script.

 

im looking for it to withdraw items that are on the cli parameters

 

such as:

test:log,apple,mind rune

Hey, im looking to add cli parameters to my script.

im looking for it to withdraw items that are on the cli parameters

such as:

test:log,apple,mind rune

You get the script parameters string using the getParameters() method in the Script class

String parameters = getParameters();

Edited by Explv

do it? :???:

 

on a more serious note i'm guessing you are looking to find out how to do it? Should probably include a question then :)

        public String getParameterString(int i) {
		String[] parameters = getParameters().split("-");
		return parameters[i].replace("_", " ");
	}

	public int getParameterInteger(int i) {
		String[] parameters = getParameters().split("-");
		return Integer.parseInt(parameters[i]);
	}

Example usage:


-script AIOGodwarsDungeon:bandons-brews-1000
  • Author

 

do it? emote32342.png

 

on a more serious note i'm guessing you are looking to find out how to do it? Should probably include a question then smile.png

 

 

i thought the thread being in script help would be pretty self explanatory

 

also, what would i add to say, banking method

 

such as: withdraw parameter 1

i thought the thread being in script help would be pretty self explanatory

 

also, what would i add to say, banking method

 

such as: withdraw parameter 1

 

You can withdraw items from the bank using:

getBank().withdraw(String itemName, int amount);

Consider reading the API documentation: http://osbot.org/api/org/osbot/rs07/api/Bank.html#withdraw-java.lang.String-int-

Edited by Explv

  • Author

 

You can withdraw items from the bank using:

getBank().withdraw(String itemName, int amount);

i want to withdraw using parameters lol, i know how to withdraw normally lol

 

such as

bank.withdrawAll(PARAMETER_1);

bank.withdrawAll(PARAMETER_2);

Edited by Lewis

i want to withdraw using parameters lol, i know how to withdraw normally lol

 

such as

bank.withdrawAll(PARAMETER_1);

bank.withdrawAll(PARAMETER_2);

 

I have shown you how to get the parameters String, parse the information you need from that String using whatever format you want.

 

If you don't know what to do after that, I would recommend that you spend some more time learning Java, because this isn't really a scripting help question, it's just basic programming.

  • Author

I have shown you how to get the parameters String, parse the information you need from that String using whatever format you want.

 

If you don't know what to do after that, I would recommend that you spend some more time learning Java, because this isn't really a scripting help question, it's just basic programming.

im sure this a help section for a reason lol

im sure this a help section for a reason lol

 

Yes and I have helped you, this is the scripting help section, not the teaching basics of Java section

 

You get the parameters String using:

String parameters = getParameters();

Parse the information you need from the String, store the results.

 

Then when you want to withdraw from the bank you use

getBank().withdraw(String itemName, int amount);

Using your stored information.

 

I am not going to write down every line of code to do that, because you should be able to do it if you have basic knowledge of Java. Which is why I am recommending, that if you DONT know how to do that, then you should learn some more Java then come back to Scripting.

Edited by Explv

  • Author

I have shown you how to get the parameters String, parse the information you need from that String using whatever format you want.

 

If you don't know what to do after that, I would recommend that you spend some more time learning Java, because this isn't really a scripting help question, it's just basic programming.

feel free to link me the appropriate info. Ive been googling it for the past 3 hours

  • Author

Yes and I have helped you, this is the scripting help section, not the teaching basics of Java section

 

 

I am not going to write down every line of code to do that, because you should be able to do it if you have basic knowledge of Java. Which is why I am recommending, that if you DONT know how to do that, then you should learn some more Java then come back to Scripting.

 

no need to be a douche about it?

no need to be a douche about it?

 

I'm a douche for not writing your script for you? I don't see how recommending that you spend some more time learning Java to help yourself makes me a douche either.

no need to be a douche about it?

 

 

I'm a douche for not writing your script for you? I don't see how recommending that you spend some more time learning Java to help yourself makes me a douche either.

 

Seeing as you have a indication in the right direction, going to close this. 

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

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.