Botre Posted March 15, 2015 Share Posted March 15, 2015 (edited) 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, 2015 by Botre Quote Link to comment Share on other sites More sharing options...
AresScripts Posted March 15, 2015 Share Posted March 15, 2015 (edited) this is cleaner than a jar of jif before you put the knife in for the first time Edited March 15, 2015 by AresScripts 2 Quote Link to comment Share on other sites More sharing options...
Joseph Posted March 15, 2015 Share Posted March 15, 2015 I'm not a fan of collecting and using animations. Get enumerates though Quote Link to comment Share on other sites More sharing options...
Botre Posted March 15, 2015 Author Share Posted March 15, 2015 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 Quote Link to comment Share on other sites More sharing options...
Joseph Posted March 15, 2015 Share Posted March 15, 2015 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. Quote Link to comment Share on other sites More sharing options...
Botre Posted March 15, 2015 Author Share Posted March 15, 2015 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 Quote Link to comment Share on other sites More sharing options...
Joseph Posted March 15, 2015 Share Posted March 15, 2015 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 1 Quote Link to comment Share on other sites More sharing options...
Botre Posted March 26, 2015 Author Share Posted March 26, 2015 UPDATED Quote Link to comment Share on other sites More sharing options...