-
Notifications
You must be signed in to change notification settings - Fork 23
Script Reloading and API Reloading
So script reloading is extremely easy with IntelliJ. After you launch the script (the Gradle task configuration botRunGUI here)
If this isn't present then it can be found in the Gradle sidebar here:
from the Gradle sidebar under execution, click run on it. It’ll then be added to the drop-down menu above.
For script reloading in this order:
- Make your script changes
- Hit the Build button next to the configuration dropdown
(the hammer)
- Hit the Reload button in the script panel
- Select your script and hit start again
- Done!
Now for advanced users, you can actually modify the API in the same manner from script-template. It involves cloning the OSRSBot API (and optionally the DaxWalkerRSB) and then setting up the Gradle files accordingly. In the settings.gradle you’ll want to uncomment these lines. Adjust the paths if needed too. (Leave DaxWalkerRSB commented out if you aren’t using it)
include ":OSRSBot"
include ":DaxWalkerRSB"
project(":OSRSBot").projectDir = file("../OSRSBot")
project(":DaxWalkerRSB").projectDir = file("../DaxWalkerRSB")
This adds the project to the IntelliJ environment for script-template. So now you can work on the API and script-template all in one! Now you need to add that to the actual build dependencies of Gradle Head to the build.gradle and under dependencies remove or comment out
implementation group: 'com.github.OSRSB', name: 'OsrsBot', version: osrsbotVersion
and remove the comments
//implementation project(":OSRSBot")
(Similarly, do this for DaxWalkerRSB should you want that)
Now you’ve got the API set up for easy changes and you can redeploy your script without relaunching the client! Enjoy! 🎉 🎉 🎉