Jump to content
Jammer

Potion data

Recommended Posts

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
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...