1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Tutorials & Resources' started by Jdelacrix, Jun 8, 2017.

  1. qverkk

    Joined:
    Sep 22, 2015
    Messages:
    1,603
    Likes Received:
    381
    Jrebel is nice if you have a bot that you don't need to add any other new classes and u just want to change some stuff so it replaces it instantly and changes are applied after compiling, super useful at least for me so I don't waste time refreshing the bots and getting RuneMate client frozen cause of some weird issue regarding my pc :/ but other than that yea aidden is right, it's always best to click the refresh button every compile and run the bot again

    Sent from my MI 5s using Tapatalk
     
  2. LucasSousa

    Joined:
    Jan 25, 2015
    Messages:
    121
    Likes Received:
    19
    I really understand you and sorry for taking this discussion up again, however, since I start coding bots I didn't got refresh it well.

    All times I start a new project I make it simple as a "hello world" project. Place manifests inside correct folders/packages and so on. The "make" button recompile the classes but the changes not happens when I try to run the bot again at the same opened/running client.

    The are a wrong step for hello worlds/tutorials here on forum? I still don't knowing the cause of this problem.
     
  3. Snufalufugus

    Joined:
    Aug 23, 2015
    Messages:
    1,961
    Likes Received:
    757
    I tried this out, and a name change in my manifest updated, but actual code changes to the bot that goes along with that manifest don't take effect. I configured IntelliJ following the guides on forum.
     
  4. tyb51

    tyb51 Niche bots at your disposal

    Joined:
    Dec 23, 2015
    Messages:
    1,098
    Likes Received:
    439
    I have to agree with aidden. I have no clue what you guys are having issues with. I can edit my code while the bot is running just by using the 'Build project option (ctrl+F9)'. IntelliJ even gives you a message in the bottom left corner (a popup from the debug-tab) if it is successful. If it is green (and tells you how many classes have reloaded it was successful, if it is red you need to restart runemate.

    Generally you can expect these exceptions:
    If you change class variables you need to restart the bot (not the client)
    If you add methods (not sure) or dependencies you have to restart the client.
    If the message is green but it says 0 classes reloaded, consider restarting the bot if the effect is not what you want.

    Some things I cannot predict but just follow the green=OK and red = not OK rule.
     
    LucasSousa and Jux7apose like this.
  5. LucasSousa

    Joined:
    Jan 25, 2015
    Messages:
    121
    Likes Received:
    19
    I really don't got this pop-up when rebuild (ctrl + F9). I think I know what you talking about because I receive this pop-up when I code at Android Studio, that shows me some notifications. But in my standard intellij these alerts doesn't shows up. I'm using InteliJ IDEA Ultimate 2017.3.

    Unrefreshing classes to client is clearly wrong configurations in IDE, but I still don't knowing what is to fix.
     
  6. tyb51

    tyb51 Niche bots at your disposal

    Joined:
    Dec 23, 2015
    Messages:
    1,098
    Likes Received:
    439
    Do you run in 'Run' or 'Debug mode'?
     
    LucasSousa likes this.
  7. LucasSousa

    Joined:
    Jan 25, 2015
    Messages:
    121
    Likes Received:
    19
    After your comment I back to test IDE. I clicked "Debug (shift + F9) upload_2018-1-4_13-20-35.png " instead of "Run (shift+ F10) upload_2018-1-4_13-21-11.png ". After this I made some changes at code and it all was correctly refresh to the bot of the running client, without stop and run client again.

    Actions to get code refresh:
    - Debug the project (shift + F9);
    - Test your bot;
    - Make changes on the bot's code;
    - Click on make (ctrl + F9, upload_2018-1-4_13-26-13.png );
    - Refresh your bot list at client ( upload_2018-1-4_13-26-44.png ).

    This seems the correct way to run (or debug) the project then.
    This is what you all do when will code at IDE?
     
    Ridz likes this.
  8. tyb51

    tyb51 Niche bots at your disposal

    Joined:
    Dec 23, 2015
    Messages:
    1,098
    Likes Received:
    439
    Yeah, I always use debug. I only use the run button when I accidentally misclick :D
     
    LucasSousa likes this.
  9. LucasSousa

    Joined:
    Jan 25, 2015
    Messages:
    121
    Likes Received:
    19
    Hahahaha, tragic...

    Thanks for help then. I hope others with this "problem" got it solved now. ;)
     
  10. Snufalufugus

    Joined:
    Aug 23, 2015
    Messages:
    1,961
    Likes Received:
    757
    That was probably my issue, I always used "Run" instead of debug as well.
     
    LucasSousa likes this.
  11. Aidden

    Aidden Author of MaxiBots

    Joined:
    Dec 3, 2013
    Messages:
    6,606
    Likes Received:
    990
    Which still doesn't make sense, because if i launch runemate outside of the IDE it still refreshes the bots fine for me. And you'd expect the run command and running independently would be the same... Also pretty sure i always used run not debug, so it's still a mystery...
     
    LucasSousa and Snufalufugus like this.
  12. LucasSousa

    Joined:
    Jan 25, 2015
    Messages:
    121
    Likes Received:
    19
    @Party, can you add a observation to this in your walkthough? I think your text is one of the most viewed, so could be good have this information there, to others know how to avoid this "potential issue".

     

Share This Page

Loading...