Davy 2 Posted June 15 Share Posted June 15 https://github.com/davyraittdevelops/davys-f2p-runecrafter/tree/main/scripts/DavyF2PRunecrafter/src/scripts Flawlessly works with Air runes, need to extend to other runes but that should be really simple. Supports purchasing rune essence from GE. Built in retry mechanisms so even if an action fails, it retries or has a backup plan. Which makes it reliable. Also complains some nice helper classes you can reuse in your scripts Quote Link to comment Share on other sites More sharing options...
Polymorphic 122 Posted June 23 Share Posted June 23 I took a quick glance at your script, and I have to say, you did a decent job for your (first?) script. Keep pushing forward and improving. One thing I noticed is that you're using a while (true) loop and throwing runtime exceptions to end the script. Instead, you could use a control flag to end the script gracefully. For example, you can use a boolean flag to control the loop and set it to false when you need to end the script. Additionally, you can keep a count of failed attempts. If the count exceeds a certain limit, say 10 failures, you can end the script. Reset the count to 0 whenever an action succeeds. This way, you can handle errors gracefully. boolean running = true; int failureCount = 0; int maxFailures = 10; while (running) { if (performAction()) { // Assume performAction() returns a boolean failureCount = 0; // Reset on success } else { failureCount++; if (failureCount >= maxFailures) { running = false; // End script gracefully } } } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.