Jump to content

Apaec

Scripter III
  • Posts

    11151
  • Joined

  • Last visited

  • Days Won

    91
  • Feedback

    100%

Everything posted by Apaec

  1. Yep, that's more or less what is going on. It looks a bit complicated and is certainly advanced syntax (it's an anonymous instantiation) so don't worry too much if you're not comfortable with it.
  2. Hey, Sorry that you're experiencing this. Sounds like the script is misclicking a lot (naturally, the script is not programmed to click on this ladder!), this can happen when it is low on resources (e.g in low cpu mode) or when there are severe fluctuations in latency. Are either of these perhaps the case for you? If so, fixing that issue may help the scripts performance! I've been working on an error correction mechanism which will attempt to correct the script and get it back on route when misclicks occur, but this system is not ready yet and I have not had a chance to work on it in recent times. I will do my best to pencil some time in to work on this so the script is able to recover for you. Best Apa
  3. 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"); } }); }
  4. 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"); }
  5. Both trials started -Apa
  6. 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
  7. 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
  8. Sure - trial started Apa
  9. 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!
  10. Sure - trial started! -Apa
  11. Sure thing - trial started! Apa
  12. Sure - trial started Apa
  13. Sure- trial activated! Apa
  14. Sure thing - trial activated ! Apa
  15. Sure thing - trial started Apa
  16. Sure - trial started Apa
  17. No, but it can cook them thoroughly or poorly. Apa
  18. Sure thing - both trials started Apa
  19. Sure - trial started Apa
  20. Sure -trial started Apa
  21. Ok - I assume a trial - activated! -Apa
  22. Sure - trial activated ! Apa
  23. Yes! That's an option Let me know if you'd be interested in trying it out for yourself. -Apa
×
×
  • Create New...