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.

Stamina Potions

Featured Replies

Im trying to make a script where it takes stamina potions every two minutes. I've come up with this but it doesnt work. It keeps drinking the potions. Any idea why?

public static long staminaPotionIntake = 0;
	public static long staminaPotionDuration = System.currentTimeMillis() - staminaPotionIntake;
	public static String[] staminaNames = {"Stamina potion(4)", "Stamina potion(3)", "Stamina potion(2)", "Stamina potion(1)"}; 
	public Banking(Script sI) throws InterruptedException {
		
		 
		
		if(staminaPotionDuration > 120000) {
			if(sI.getInventory().contains(staminaNames)) {
			sI.getInventory().interact("Drink", staminaNames);
			staminaPotionIntake = System.currentTimeMillis();
			}
		}

 

looks as though you're checking the duration once oustside the method so only ever updated once?

Also you can check if stamina potion is active via configs:

public boolean isStaminaPotionActive() {
    return getConfigs().get(638) > 0;
}

Edited by Fruity

  • 1 year later...
On 3/30/2018 at 10:02 PM, Fruity said:

looks as though you're checking the duration once oustside the method so only ever updated once?

Also you can check if stamina potion is active via configs:


public boolean isStaminaPotionActive() {
    return getConfigs().get(638) > 0;
}

Thanks Big Boss.

 

For those wondering, config changed to: 1575.

Following code works as of date:

    public boolean isStaminaPotionActive() {
        return getConfigs().get(1575) > 0;
    }

 

Create an account or sign in to comment

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.