Jump to content

Apaec

Scripter III
  • Posts

    11137
  • Joined

  • Last visited

  • Days Won

    88
  • Feedback

    100%

Everything posted by Apaec

  1. Apaec

    APA AIO Miner

    Yeah, mirror is a bit buggy with my sand crabs script too. It's frustrating, because there's nothing us scripters can do about it (other than suggest just switching over to stealth injection) - it's less resource intensive and more reliable. All the best Apa
  2. Perhaps, although it might warrant a change in price as would the introduction of any other niche cooking method. That being said, I think there are some good free wine making scripts on the SDN, so be sure to check them out! Apa
  3. Sorry, I can only offer a trial of APA Sand Crabs Just started your trial, enjoy! -Apa
  4. Apaec

    APA AIO Miner

    Hmm, are you sure that, when you selected the rock, it had ore? Make sure the rock is unmined before selecting it!
  5. Since all the data is constant, may as well store it in an enum, but yeah this looks good
  6. Hey, Mirror mode is a little temperamental with this script - for more details please see the main page under the section 'things to consider before buying / trying'. It should run perfectly in stealth injection so i'd suggest switching to that Apa
  7. That's very odd... if it didn't deposit the bars, then it shouldn't try to withdraw the ores. I'll take a look at the banking system now and see what I can do Thanks for letting me know Apa
  8. Woah that's some pretty serious gains!! Hopefully that paid off the $5 haha
  9. Hi guys Probably a type in one of the ingredients, I scraped the name data for stuff from the wiki, but sometimes they're not word-for-word accurate with the ingame names so this can cause issues. I'll see if I have some time in the coming week or so to get this fixed but you can always take a look at the source code yourselves and fix it locally while you wait ! https://github.com/apaec/aio-herblore Apa Does it say anything in the console logger?
  10. It's getting a little bit spaghetti, might be worth re-thinking how you approach this problem! I would suggest creating a pickaxe enum, for example: public enum Pickaxe { BRONZE_PICKAXE(1), IRON_PICKAXE(1), /* ... */ DRAGON_PICKAXE(61); private final int levelReq; Pickaxe(int levelReq) { this.levelReq = levelReq; } public int getRequiredLevel() { return levelReq; } public boolean hasRequiredLevel(MethodProvider mp) { return mp.getSkills().getStatic(Skill.MINING) >= levelReq; } public boolean equip(MethodProvider mp) { /* ... */ } @Override public String toString() { return super./* ... */; } } Then you can use this to determine the highest tier pickaxe to use, i.e Arrays.asList(Pickaxe.values()).stream().filter(pick -> pick.hasRequiredLevel(mp)). /* ... Reduction to highest required level ... */ I've left gaps here and there for you to implement so hopefully you learn something new ! Also, hopefully there are no errors, but I wrote the code in the reply box so if there are, sorry about that, just let me know! Edit: Or, alternatively, you could just as easily use a for loop with some simple logic (i.e "for (Pickaxe axe : Pickaxe.values()) { ... }" ) to find the best pickaxe. I just like streams cause you can make it a tidy one-liner Good luck! -Apa
  11. That's odd; does it say anything in the console logger? -Apa Hey, glad it's working well! I can't really add the wilderness course as this is purely a rooftops script, and adding any more courses would result in me needing to raise the price (to stay in line with OSBot store undercutting rules) which i'm not really wanting to do. Sorry about that As for the canifis thing, i'm not sure what's causing this but I will do a few test runs and see if I can replicate this issue - thanks for letting me know!
  12. I've never tried, sounds like lots of fun though. Don't know where the law stands in the UK about using these in public places tho
  13. Instead of using static ids, why not use the build in API functionality, i.e getBank().depositWornItems(); Be sure to check if the bank is open though!
  14. Hi there, all trials have been activated - enjoy! Hey kinc, unfortunately accounts must be over a week old to qualify for a trial. This is an OSBot rule - sorry about that! Apa
  15. Just running over the code, there are lots of things that could be improved, but for the most part it is a good effort! Instead of critiquing each and every thing, i'll give some general pointers for things to consider in future scripts that you write: Think about conditions OSRS is a live game, and as a result you cannot rely on the bot to successfully execute every interaction command. You have to take this into account when writing your script by making it conditional. If you have multiple chained interactions, for example (arbitrarily), if you wanted to use a raw fish on a fire: getInventory().interact("Raw salmon", "Use"); getObjects().closest("Fire").interact("Use"); Consider what happens if the script misclicks the raw salmon. Then, the script would move on to the next line of code, and attempt to interact 'use' on the fire. However, since an item is not selected, the fire doesn't have a use option, and thus the script is stuck (potentially permanently) hovering over the fire. A better way to structure this would be as follows: if (getInventory().isItemSelected()) { // Optionally add a check for which item is selected here also RS2Object fire = getObjects().closest("Fire"); if (fire != null) fire.interact("Use"); } else { getInventory().interact("Raw salmon", "Use"); } With regards to your code, this especially applies with banking! Use names, not ids Game ids are subject to change following game updates, albeit less so with item ids. Instead, filter things with names. Names are much less likely to change, and using them can make your code significantly more readable! As a general rule of thumb, if you're using an id at any point in your code, there's probably a neater way to solve the problem. Conditional sleeps! Sleeping for a static amount of time, i.e sleep(random(200,500)); // OR sleep(4000); // ... etc is very bad practice. Latency fluctuations, resource allocation and other factors can cause these seemingly stable sleep duration to fall out of sync with what you want to achieve. Instead, use conditional sleeps which will sleep until a threshold is met, or a condition evaluates to true. For example: RS2Object tree = getObjects().closest("Tree"); if (tree != null && tree.interact("Chop down")) { boolean didIStartCutting = new ConditionalSleep(3000) { @Override public boolean condition() { return myPlayer().isAnimating(); } }).sleep(); } This will sleep for 3000ms, or until your player is animating. Avoid flags where possible Flagging is a means of tracking your script status by updating the value of a global variable at a certain stage. While it may work well, it is generally considered poor practice to over use this technique as there are typically better ways structure code to avoid this situation. While you are a beginner, this is not the most serious of problems, but as you learn more about object orientation and programming concepts, you should try and use your knowledge of code structure to avoid this situation. This will make larger projects more digestible and will make debugging a lot easier! ________________________________________________________________________ Hopefully that was useful, let me know if you have any further questions. Good luck! Best Apa
  16. Hey, I'll put these on my list of things to add - hopefully I can find a nice way to incorporate them into the paint. Glad everything else is running smoothly! Apa I have to say, I don't double click at all! But the script does sometimes mis-click, and moves the mouse around based on a gaussian timed movement event system. Whether or not any of this helps is arguable - if you're worried about bans, be sure to give this thread a read: https://osbot.org/forum/topic/124429-preventing-rs-botting-bans-v2/ Best Apa
  17. Ah - sorry about that; I should have made it more clear. The post is referring to the OSBot account - the rule is in place to follow OSBot trial regulations. I will update the post to make it less ambiguous now, in the mean time please come back in a week and i'll be more than happy to give you a trial! -Apa Certainly, done! (:
  18. Yes, it makes dart tips Please post again here when you want your trial to remind me - thanks! Apa
  19. Hey, Thanks for letting me know, I will add this to the list of error regions to add. I've been working on a recovery system recently which will locate common failure areas and attempt to return to the course. Naturally, implementing this system in a generic way is less stable, so i'm spending a bit of extra time making sure it handles each situation perfectly It's not quite ready for release yet though. Apa Certainly, done!
  20. Hey, Unfortunately I can't offer you a second trial as it looks like you already got to give it a quick go. Sorry about that! -Apa Sure thing, done! (:
×
×
  • Create New...