Tutorial Easy way to reset the client to handle the 6 hour RS sessions

Discussion in 'Tutorials & Resources' started by Exia, Nov 29, 2014.

  1. It's actually pretty simple, but here you go. I've updated it so that you no longer need a bat file.
    Code (Text):
    2. public boolean reset(){
    3.         try {
    4.             ProcessBuilder pb = new ProcessBuilder(
    5.             "java -jar \"./RuneMate.jar\" -sdk -bot=" + getMetaData().getName() + " -account=RS account -login=username:password:RS3");
    6.             pb.directory(new File(new File("").getAbsolutePath()));
    7.             pb.inheritIO();
    8.             pb.start();      
    9.         } catch (Exception e) {
    10.             e.printStackTrace();
    11.             return false;
    12.         }
    13.         System.exit(0);
    14.         return true;
    15. }
    Hope this helps some people with long running scripts bots, I'm personally going to be using it in my remote POP script bot.
    #1 Exia, Nov 29, 2014
    Last edited: Feb 2, 2015
    Qosmiof2 and Savior like this.
  2. I'm sorry but although this would work, the script bot would be automatically denied before anyone even sees it. Executing processes is not allowed from within scripts bots, and it's unlikely it ever will be allowed in the future.
  3. Hmm, well I guess people won't be able to run it on the repo, but it works for local scripts bots. Oh well :p
  4. It's just to much of a security risk to even consider. We do manually approve every line but something that severe shouldn't even be risked.
  5. I understand, though if you enforce that it can only invoke a bat file, and that bat file must be created by the user, then there should be much risk. But that would be so case by case. I'm not asking you to change your rules. I don't even know if my port script bot will end up public.
  6. @Cloud @Geashaw I've updated the main post, there was a simple additional step that removes the need for a bat file.
    #8 Exia, Feb 2, 2015
    Last edited: Feb 2, 2015

Share This Page