Jump to content

Apaec

Scripter III
  • Posts

    11137
  • Joined

  • Last visited

  • Days Won

    88
  • Feedback

    100%

Everything posted by Apaec

  1. Cheers for raising this concern; It doesn't seem to be happening to me though. Are you using mirror mode or stealth injection? You might find switching over could help!
  2. I'd just read through some very basic java tutorials to get the jist of what's going on, then jump in and learn more about java through trying to write some scripts!
  3. Not easily, but I will make it stop if you die. That should be a fail safe though; since it should never die. Something must have happened to your bot process perhaps; because I've done very rugged testing of the healing system and low hp failsafe system - this is the first report of a death that i've had all year!
  4. Hey; That must have been the webwalker kicking in because you died... I have no idea how you could have died though unless the script was stopped or interrupted somehow. Did it say anything in the logger?
  5. Cheers for the suggestion; I've made the code base open to expansion in the future such that I could potentially add this. The only issue is that it will slow down start up times quite significantly as instead of just pressing start you would have to navigate the file explorer ! I will perhaps try a few solutions at some point this week Apa
  6. Sounds like you've probably set something up wrong since the stop criteria were very rigidly tested - if you open the console, it will always log a message before stopping; Please let me know what that message is! Apa Awesome progress!!! 12 to 14 hours a day is crazy
  7. Thanks for the kind words!!(:
  8. Hey Cheers for the kind words - as for your quandary, there's unfortunately nothing that I can do about that since it is handled by the client. That being said, it seems to work fine for me; not sure what could be wrong. Apa
  9. Apaec

    RS Unit Format

    public String runescapeFormat(long l) { String[] suffix = new String[] { "K", "M", "B", "T" }; int size = (l != 0) ? (int) Math.log10(l) : 0; if (size >= 3) while (size % 3 != 0) size = size - 1; return (size >= 3) ? + (Math.round((l / Math.pow(10, size)) * 10) / 10d) + suffix[(size / 3) - 1] : + l + ""; } ...But yours is a lot more readable!!
  10. You could use a Map for this, however if you wanted to store more information, you would need something else. Probably your best bet is to store the information in an enum, as below (I wrote the code in the reply box so apologies if I made any mistakes, fingers crossed they should be easy enough to correct!). I included an additional parameter, 'colour', which is just the colour of the axe. In practice this is useless, but I included it to illustrate how to add a second parameter. public enum Axe { BRONZE(1, Color.BROWN), IRON(1, Color.DARK_GRAY), RUNE(41, Color.CYAN); // Add all axes here private final int levelRequirement; private final Color colour; Axe (int levelRequirement, Color colour) { this.levelRequirement = levelRequirement; this.colour = colour; } // Returns whether the current level is sufficient for the axe public boolean hasRequiredLevel(int currentLevel) { return currentLevel >= levelRequirement; } // Returns the associated level requirement public int getRequiredLevel() { return levelRequirement; } // Returns the colour of the axe public Color getColour() { return colour; } // Make it return a cleanly formatted String, e.g 'Rune' public String getTier() { String lower = super.toString().toLowerCase().replace("_", " "); return Character.toUpperCase(lower.charAt(0)) + lower.substring(1, lower.length()); } // Make it return a cleanly formatted String for whole axe, e.g 'Rune axe' public String getName() { return getTier() + "axe"; } @Override public String toString() { return getName(); } } Usage: Axe toUse = Arrays.stream(Axe.values()).filter(a -> a.hasLevelRequirement(getSkills().getStatic(Skill.WOODCUTTING))).reduce(Axe.BRONZE, (a, b) -> b); It is untested but it should hopefully work !! Good luck! Apa
  11. Apologies, I must have entered the wrong script ID! I've given you a fresh trial starting now, which will last for 48 hours instead of 24, as compensation. Sorry about that...! Apa
  12. Just a super quick status update, I've been very busy at the moment doing some contractor work but I found the time today to have a quick look at the (work in progress) script re-write. The structure is pretty much there so I just need to gather some game data (Areas, paths, positions etc), and once that's done the script should be ready to go. I will do a bit more work on the script today while I have the time, but there's still quite a way to go. I'm structuring the script to maximise both reliability and flexibility - something that isn't really that easy to do - I'm also doing it in such a way that in the future it will be easy to add new routes to the bank and new methods of banking (e.g phials). Cheers Apa
  13. Nice work! Just a few tips - Firstly, be sure to check out Conditional Sleeps https://osbot.org/api/org/osbot/rs07/utility/ConditionalSleep.html (Note that the class is abstract so you will have to provide your own implementation, anonymous or otherwise). They will help cut slack time in your script, and make your script suitable for SDN application! Secondly, perhaps you have considered not using static widget child ids? I noticed that when you're checking for widgets in your 'getState()' method, you check for child and grandchild ids; since these values often change, it is advised to use other filters like perhaps checking for the presence of text. Since the parent id rarely (if ever) changes when new content is added, you should be able to refine your filters by providing the root id as a parameter to the Widgets#containingText method. Again, you will probably need to do this for SDN submission. Finally, maybe add a paint? (: Keep it up Apa
  14. Hopefully it lives up to your expectations (:
  15. Hey! I've started a 24h trial on your account; the script is currently up and running well! Cheers Apa
  16. Woo, thanks for the awesome proggie! Glad the script is living up to your expectations (: Apa Hi cjbrown, thanks for getting in touch. Unfortunately the store is handled by OSBot and as a result I have no power to access payments/give scripts. That being said, the process is normally more or less instant when purchasing a script - If you still don't have the script and you didn't pay via e-cheque (these can take up to a week to process i've heard), then i'd suggest getting in contact with the community administrator @Maldesto and explaining the situation to him - he will be able to help! Apa
  17. Lifetime - no monthly costs what-so-ever!! (:
×
×
  • Create New...