-
Posts
11153 -
Joined
-
Last visited
-
Days Won
91 -
Feedback
100%
Everything posted by Apaec
-
Certainly, done! (:
-
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?
-
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
-
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!
-
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
-
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!
-
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
-
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
-
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
-
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! (:
-
Yes, it makes dart tips Please post again here when you want your trial to remind me - thanks! Apa
-
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!
-
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! (:
-
The below patch will fix this issue. Thanks for reporting it to me ________________________________________________________________________________________________ UPDATE: Version 1.02 Added selection checks prior to looting Marks of Grace. The script will no longer get stuck trying to loot a mark when alchemy is selected. I am also working on some other new features, such as spatial error detection and correction, but these are not quite ready for release. Best Apa
-
Woah, that's pretty crazy progress! Hopefully the $5 investment was worth while Best Apa
-
Hey! Yes- that must be it. I thought I already added a spell selection check to looting but apparently not. I'll get that done for you now. cheers! -Apa Unfortunately accounts must be over a week old to qualify for a trial - this is an OSBot rule. Sorry about that -Apa
-
That's really weird. Does it loot them elsewhere in the course? There's no difference between the code running for that mark vs. others! I'll take a look Apa
-
Hey, that should be possible. Please post again when you want the trial to start and i'll set it up then. Thanks!
-
Hmm, that's odd. Perhaps there's something up with the casket looting system - I'll take a look. In the mean time, I suggest running the bot with looting disabled. Cheers!