Everything posted by Apaec
-
A Beginners Guide to Writing OSBot Scripts (where to get started!) by Apaec
Hmm, this is certainly a niche situation, but can definitely be done. Might be a little trickier though. Typically, when the players inventory is full of junk so a script cannot run, the script should either terminate and let the player know this, or do something loss-less, such as going to a bank and depositing the junk. Arbitrarily dropping items isn't a great idea in general: what is the inventory was full of godswords? Anyway, to achieve what you're looking for, the default API entries won't seem to provide this functionality. We'll have to create our own filter: (Note that I haven't tested this code and wrote it here in the reply box so there could be errors, let me know if it doesn't work!) if (getInventory().isFull()) { getInventory().dropForFilter(new Filter<Item>(){ @Override public boolean match(Item x) { return !x.getName().equals("Cup of Tea"); } }); }
-
A Beginners Guide to Writing OSBot Scripts (where to get started!) by Apaec
Sounds like the relevant part of the API to you would be the inventory API: https://osbot.org/api/org/osbot/rs07/api/Inventory.html Something like inventory#dropAllExcept sounds about right. For example: if (getInventory().isFull()) { getInventory().dropAllExcept("Cup of Tea"); }
- APA Rooftop Agility
-
APA AIO Cooker
Hmm, this might be useful, though I would need a few more lines than just those three. Could you perhaps send me (here or in a PM if you prefer) a slightly longer snippet of the console when this happens? Cheers
-
A Beginners Guide to Writing OSBot Scripts (where to get started!) by Apaec
Exactly
-
APA AIO Cooker
Hmm, that's odd, thanks for letting me know. Not sure what might be causing this, as the bank pin solver is an OSBot thing and so the script won't be in control. Next time this happens, please could you see if there is anything unusual displayed in the console logger? (accessed via the settings gear). Let me know -Apa
-
APA Script Trials
Sure - trial started Apa
-
A Beginners Guide to Writing OSBot Scripts (where to get started!) by Apaec
APIs can take a bit of scavenging to find what you need. Useful links are the alphabetical 'index' at the top of the docs, when you are looking for a method but don't know which class it might belong to. Also, the '!' is a negation operator, i.e., if you take something that evaluates to true and negate it with a '!', the result will be false (just thought i'd clear that up as that's unrelated to the OSBot API). It just takes a bit of practice to learn where most things are, as with all APIs. I'd suggest asking for help on specifics when you get stuck (perhaps in the OSBot discord). Good luck!
-
APA Script Trials
Sure - trial started! -Apa
-
APA Script Trials
Sure thing - trial started! Apa
- APA Rooftop Agility
- APA Rooftop Agility
-
APA Script Trials
Sure- trial activated! Apa
-
APA Script Trials
Sure thing - trial activated ! Apa
-
APA Rooftop Agility
Sure thing - trial started Apa
-
APA Script Trials
Sure - trial started Apa
-
APA AIO Cooker
No, but it can cook them thoroughly or poorly. Apa
-
APA Script Trials
Sure thing - both trials started Apa
-
APA Script Trials
Sure - trial started Apa
-
APA Script Trials
Sure -trial started Apa
-
APA AIO Cooker
Ok - I assume a trial - activated! -Apa
-
APA Script Trials
Sure - trial activated ! Apa
-
APA Rooftop Agility
Yes! That's an option Let me know if you'd be interested in trying it out for yourself. -Apa
-
APA AIO Cooker
Hey, I'm not sure what you mean by this - a trial perhaps? If so, please refer to this thread: https://osbot.org/forum/topic/61445-apa-script-trials Best Apa
-
APA Script Trials
Both trials started -Apa