-
Posts
88 -
Joined
-
Last visited
-
Feedback
100%
Profile Information
-
Gender
Male
Septron's Achievements
Iron Poster (3/10)
67
Reputation
-
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.
-
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.
-
I think Alek's post about preventing bans here says everything you need to know about how not to get banned quickly.
-
how can i attach a debugger to this application
-
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"));
-
https://suicidepreventionlifeline.org/
-
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());
-
Wow Alek, great work. Keep it up!
-
I would have to disagree, something like this is not acceptable in my book.
-
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
-
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
-
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
-
Septron changed their profile photo
-
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