Jump to content

Septron

Members
  • Posts

    88
  • Joined

  • Last visited

  • Feedback

    100%

Profile Information

  • Gender
    Male

Recent Profile Visitors

3078 profile views

Septron's Achievements

Iron Poster

Iron Poster (3/10)

67

Reputation

  1. Ah, if that's the case then maybe try writing a quester? I've always found writing quests to be the most fun. Mostly because I never have to do them again manually.
  2. I would personally suggest trying to make a small script for each of the easier skills first to get a better understanding of how to use OSBot's API correctly and to its fullest potential. Once you have a solid understanding of what to look for when writing scripts everything else just falls into place.
  3. I think Alek's post about preventing bans here says everything you need to know about how not to get banned quickly.
  4. how can i attach a debugger to this application
  5. I try to complete one line of code per hour. Here's an example cow killer. getNpcs().getAll().stream().sorted(Comparator.comparingDouble(a -> getMap().distance(a))).filter(npc -> "Cow".equals(npc.getName()) && Stream.of(npc.getActions()).anyMatch("Attack"::equals)).findFirst().ifPresent(npc -> npc.interact("Attack"));
  6. https://suicidepreventionlifeline.org/
  7. format your data into enums so it's easier to manage/update private enum Product { ARROW_SHAFT("Logs", 270, 14, 38); private final String log; private final int[] widget; Product(String log, int... widget) { this.log = log; this.widget = widget; } } private RS2Widget getWidget(Product product) { return getWidgets().get(product.widget[0], product.widget[1], product.widget[2]); } then you can simplify that ugly if else method a bit int level = skills.getDynamic(Skill.FLETCHING); if (level >= 70) { } else if (level >= 55) { } else if (level >= 50) { } else if (level >= 40) { } else if (level >= 35) { } else if (level >= 25) { } else if (level >= 10) { } else { return ARROW_SHAFT; } do yourself a favor and simplify those nasty ConditionalSleeps public boolean sleep(int ms, BooleanSupplier supplier) { return new ConditionalSleep(ms) { @Override public boolean condition() throws InterruptedException { return supplier.getAsBoolean(); } }.sleep(); } sleep(5000, () -> bank.isOpen());
  8. Wow Alek, great work. Keep it up!
  9. Septron

    OSBot 2.4.148

    Good job my dudes.
  10. I would have to disagree, something like this is not acceptable in my book.
  11. While this doesn't solve the problem pointed out in Alek's post, this might be a good reason to keep them. https://gist.github.com/48df1acb2e1de82f52d8e9877664efec
  12. I would avoid falling into the trap of passing the script instance into the class constructor when you can just handle it in the params for the method allowing for the use of interfaces. https://gist.github.com/anonymous/86628d433f7f7cb444f20b4463c25d41
  13. Hmm, not sure I understand the situation completely but this is how I'd do what I think it is you're trying to do. https://gist.github.com/anonymous/920432652d87d5502a3cabfbdccd65bd
  14. Noticed a few things I would have done differently. Your bank method doesn't check if the previous step is complete. Meaning when it fails it'll walk back to the sheep then realise the inventory is still full and walk back. Another thing with the banking method there's a method to open all banks in the API already. When grabbing the next NPC you can use a filter to check if the name is equal and has the action. Here's my version: https://gist.github.com/anonymous/26be13656547372bfd4296cf424032ef
×
×
  • Create New...