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.

Potion data

Featured Replies

Wrote some potion data. The potion class is missing some methods but I'm sure you can add them yourself. 

It should be possible to add other boosting items like brews and such. 

constructive criticism is welcome.

Potion class:

package data;

import wrappers.IncreaseValue;
import wrappers.PotionInfo;


import org.osbot.rs07.api.ui.Skill;
import org.osbot.rs07.script.MethodProvider;



public class Potions {
	
	
	
	
	public enum Potion{
		ATTACK_POTION( new PotionInfo()
				      .add(Skill.ATTACK , new IncreaseValue(3,10))),
		
		SUPER_ATTACK( new PotionInfo()
				.add(Skill.ATTACK, new IncreaseValue(5,15))),
		
		STRENGTH_POTION(new PotionInfo()
				.add(Skill.STRENGTH, new IncreaseValue(3,10))),
		
		SUPER_STRENGTH(new PotionInfo()
				.add(Skill.STRENGTH, new IncreaseValue(5,15))),
		
		COMBAT_POTION(new PotionInfo()
				.add(Skill.STRENGTH, new IncreaseValue(3,10))
		        .add(Skill.ATTACK , new IncreaseValue(3,10))),
		
		SUPER_COMBAT_POTION(new PotionInfo()
				.add(Skill.ATTACK, new IncreaseValue(5,15))
				.add(Skill.ATTACK, new IncreaseValue(5,15))
		        .add(Skill.DEFENCE , new IncreaseValue(5,15))),
		
		DEFENCE_POTION(new PotionInfo()
				.add(Skill.DEFENCE , new IncreaseValue(3,10))),
		
		SUPER_DEFENCE(new PotionInfo()
				.add(Skill.DEFENCE , new IncreaseValue(5,15))),
		
		RANGING_POTION(new PotionInfo()
				.add(Skill.RANGED , new IncreaseValue(3,10))),
		
		SUPER_RANGING(new PotionInfo()
				.add(Skill.RANGED, new IncreaseValue(5,15))),
		
		MAGIC_POTION(new PotionInfo()
				.add(Skill.MAGIC, new IncreaseValue(3,10))),
		
		SUPER_MAGIC(new PotionInfo()
				.add(Skill.MAGIC, new IncreaseValue(5,15))),
		PRAYER_POTION(new PotionInfo()
				.add(Skill.PRAYER, new IncreaseValue(7,25)));
		
		
	 
		PotionInfo potionInfo;

		Potion( PotionInfo potionInfo) {
			this.potionInfo = potionInfo;
		}
		
		public PotionInfo getPotionInfo() {
			return potionInfo;
		}
		
		public String getPotionName() {
			String lower = super.toString().toLowerCase().replace("_", " ");
			return Character.toUpperCase(lower.charAt(0)) + lower.substring(1);
		}
		
	}

IncreaseValue class:

package wrappers;

public class IncreaseValue {

    int baseIncrease;
	int percentageIncrease;
	
	public IncreaseValue(int baseIncrease, int percentageIncrease) {
		this.baseIncrease = baseIncrease;
		this.percentageIncrease = percentageIncrease;
	}
	
	public int getBaseIncrease() {
		return baseIncrease;
	}
	
	public int getPercentageIncrease() {
		return percentageIncrease;
	}
	
}

PotionInfo class:

package wrappers;

import java.util.HashMap;
import java.util.Map;
import wrappers.IncreaseValue;

import org.osbot.rs07.api.ui.Skill;
import org.osbot.rs07.script.MethodProvider;

public class PotionInfo {

	Map<Skill, IncreaseValue> boostMap = new HashMap();

	public PotionInfo add(Skill skill, IncreaseValue levelIncrease) {
		boostMap.put(skill, levelIncrease);
		return this;
	}

}

 

Edited by Jammer

Thanks for sharing and contributing to the Community :)

Maybe it could also come in handy to place the in-game name as a String, in case of banking?

Edited by Eagle Scripts

  • Author
16 minutes ago, Eagle Scripts said:

Thanks for sharing and contributing to the Community :)

Maybe it could also come in handy to place the in-game name as a String, in case of banking?

In the enum? Is there an advantage of doing that instead of the getPotionName method?

 

26 minutes ago, Jammer said:

In the enum? Is there an advantage of doing that instead of the getPotionName method?

 

My apologies, I looked at it a bit too swiftly. I was referring to something like the #getPotionName indeed. Well done :)

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.