Jump to content

Botre

Members
  • Posts

    5883
  • Joined

  • Last visited

  • Days Won

    18
  • Feedback

    100%

Everything posted by Botre

  1. I like the idea of packages. Limited times of usage could work if the pricing is correct. As long as scripters don't end up losing money (there isn't much left to lose as it is).
  2. I can't think of an example other than being attacked tbh. Better safe than sorry I guess :x
  3. 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
  4. 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(); } }
  5. Botre

    Hello

    Those didn't count. This one did though.
  6. Botre

    Hello

    I know you are but what am I? gf my pants Should have called it "Hungry Hobos".
  7. Here's a Java 8 way to do it: Predicate<NPC> predicate = o -> (o != null && o.exists() && o.getName().equals("Rat") && getMap().canReach(o)); List<NPC> potential = getNpcs().getAll().stream().filter(predicate).collect(Collectors.toList()); NPC target = potential.size() > 0 ? potential.get(random.nextInt(potential.size())) : null;
×
×
  • Create New...