Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Tutorial How to update your script without having to restart the client

Joined
Jun 4, 2017
Messages
15
So I'm getting into writing scripts for RuneMate, and one thing I've noticed is that after every script change, you have to restart your entire client to test it out. This got very annoying, very quick. So I came up with a solution. Here's how to do it:

1) Assuming you're using Intellij, go to File -> Settings -> Plugins -> Search for "JRebel" and install it
2) Go here: JRebel Trial and sign up. It'll give you an authentication code. Do not lose this.
3) Once JRebel is done installing, restart Intellij.
4) In Intellij, go to Help -> JRebel -> Activation -> "I already have a license" tab
5) Choose the "Activation code" option and paste the code you got from step 2 here.
6) Agree to the terms and conditions and hit Activate JRebel.
That's it for installing JRebel. Now, all you have to do is when you startup your client, rather than simply running it, go to the "Run" menu option, and hit "Run with Jrebel"
UCcI7KB.png

Now you can literally make updates on the fly without having to restart your client. For example, if you are running a local woodcutting script cutting "Yew" trees, you can literally change "Yew" to "Maple" in your script while the script is running, and it'll change on the fly.
 

red

Joined
Nov 17, 2013
Messages
259
Orrrrr, you can click the reload button above the script list :)
EDIT: just read last part, seems pretty cool to be honest.
 
Joined
Jun 4, 2017
Messages
15
Orrrrr, you can click the reload button above the script list :)
EDIT: just read last part, seems pretty cool to be honest.
That never actually updated it for me, which is what led me to this tutorial.
 
Misfits
Joined
Nov 21, 2016
Messages
1,445
when you load client without being in intellij there is a developer option so you can refresh list without restarting client, does require having a published bot on market though
 
Joined
Dec 23, 2016
Messages
221
when you load client without being in intellij there is a developer option so you can refresh list without restarting client, does require having a published bot on market though
oh neat i saw that option, i didnt know it would do it on the fly tho.
 
Java Warlord
Joined
Nov 17, 2014
Messages
4,906
Just use IntelliJ debugging and use Hotswap?
As long as you don't change class structures you can compile during runtime of the bot and it will affect the active session.
Also @Party does the refresh button over the bot list actually do anything else than refresh the manifests? I doubt the client loads every class file upon start, only when you stsrt the respective bot.
 
Client Developer
Joined
Oct 12, 2015
Messages
3,760
Just use IntelliJ debugging and use Hotswap?
As long as you don't change class structures you can compile during runtime of the bot and it will affect the active session.
Also @Party does the refresh button over the bot list actually do anything else than refresh the manifests? I doubt the client loads every class file upon start, only when you stsrt the respective bot.

It's different for local and bot store bots (naturally).
 
Joined
Mar 28, 2017
Messages
286
You can't do this without JRebel? Works fine for me w/o it. Although maybe because I always run it on debug mode...
 
Joined
Jun 21, 2014
Messages
350
In IntelliJ: Settings -> Build, Execution, Deployment -> Debugger -> Hotswap, set reload classes to Always

And run RM in IntelliJ in debugger mode
 
Joined
Jan 25, 2015
Messages
121
In IntelliJ: Settings -> Build, Execution, Deployment -> Debugger -> Hotswap, set reload classes to Always

And run RM in IntelliJ in debugger mode

After changes need I "make" project and after refresh bot list at client? I tried apply your suggestion and after reloading everything bots stills not refreshed.
 
Author of MaxiBots
Joined
Dec 3, 2013
Messages
6,774
Why do you guys always have this issue, i've literally not had it once and i've done numerous reinstalls of my entire system during my time here.
You don't need any hotswapping or Jrebel. You literally just press the rebuild project button and then refresh your bot list in the client. That's it. upload_2018-1-4_10-17-22.png

If it's not updating your bot you've either pressed the wrong button and it hasn't recompiled the files you want it to, or you've done something seriously dodgy with your project.
Either way, it's not a RuneMate issue, it's a you issue.
 
Top