Jump to content

loopback

Members
  • Posts

    16
  • Joined

  • Last visited

  • Feedback

    0%

Profile Information

  • Gender
    Male

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

loopback's Achievements

Newbie

Newbie (1/10)

0

Reputation

  1. Title pretty much says it all. What are some good examples of anti-pattern in code or otherwise. And does it do anything more than anti-ban for example?
  2. This is it! Thank you I knew it was something obvious. This is what I get for cleaning my hard drive at 2am then trying to recreate something from memory. Thanks
  3. So I accidentally deleted my broken mining script and am trying to re-create it from memory, and so far so good. However I am trying to check the color of the rock before I mine it and I am missing something. public enum Rock { CLAY(6705), COPPER(4645), TIN(53), IRON(2576), SILVER(74), COAL(10508), GOLD(8885), MITHRIL(-22239), ADAMANTITE(21662), RUNITE(-31437); private final short COLOUR; Rock(final int COLOUR) { this.COLOUR = (short) COLOUR; } public boolean hasOre(final RS2Object object) { if (object == null || object.getDefinition().getModifiedModelColors() == null || !"Rocks".equals(object.getName())) { return false; } for (final short colour : object.getDefinition().getModifiedModelColors()) { if (colour == this.COLOUR) { return true; } } return false; } } public void Minesomething() throws InterruptedException { goldRock = getObjects().closest( obj -> Rock.GOLD.hasOre(obj)); if (goldRock != null && goldRock.interact("Mine")) { new Sleep(() -> isAnimating() || !Rock.GOLD.hasOre(goldRock), 10000).sleep(); } } That is the code I am having trouble with, It says can not resolve symbol goldRock. And I cant remember how I had it in my original working script. Any pointers?
×
×
  • Create New...