March 15, 201510 yr package org.bjornkrols.woodcutting; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.script.Script; /** * @author Bjorn Krols (Botre) * @version 0.1 * @since March 15, 2015 */ public enum Axe { BRONZE(1, 1), IRON(1, 1), STEEL(6, 5), BLACK(6, 10), MITHRIL(21, 20), ADAMANT(31, 30), RUNE(41, 40), DRAGON(61, 60); private final String name; private final int requiredWoodcuttingLevel; private final int requiredAttacklevel; private Axe(final int requiredWoodcuttingLevel, final int requiredAttacklevel) { String temp = super.toString().toLowerCase().concat(" axe"); name = Character.toUpperCase(temp.charAt(0)) + temp.substring(1); this.requiredWoodcuttingLevel = requiredWoodcuttingLevel; this.requiredAttacklevel = requiredAttacklevel; } public String getName() { return name; } public int getRequiredWoodcuttingLevel() { return requiredWoodcuttingLevel; } public boolean canUse(Script script) { return requiredWoodcuttingLevel <= script.getSkills().getDynamic(Skill.WOODCUTTING); } public int getRequiredAttackLevel() { return requiredAttacklevel; } public boolean canWield(Script script) { return requiredAttacklevel <= script.getSkills().getDynamic(Skill.ATTACK); } @Override public String toString() { return getName(); } } Edited March 26, 201510 yr by Botre
March 15, 201510 yr this is cleaner than a jar of jif before you put the knife in for the first time Edited March 15, 201510 yr by AresScripts
March 15, 201510 yr Author I'm not a fan of collecting and using animations. Get enumerates though I got them from another site and it seems like they haven't changed in ages so I think they are relatively safe to use. isAnimating() isn't specific enough for some of my need so... :p
March 15, 201510 yr I got them from another site and it seems like they haven't changed in ages so I think they are relatively safe to use. isAnimating() isn't specific enough for some of my need so... care to explain more. Because i know for my plunder its enough. Since there is a underAttack(), all the other animation is him thieving.
March 15, 201510 yr Author care to explain more. Because i know for my plunder its enough. Since there is a underAttack(), all the other animation is him thieving. I can't think of an example other than being attacked tbh. Better safe than sorry I guess :x
March 15, 201510 yr I can't think of an example other than being attacked tbh. Better safe than sorry I guess :x true especially since it was found data. If i had to collect them i would just die
Create an account or sign in to comment