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

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. Exia

    Joined:
    Nov 3, 2013
    Messages:
    609
    Likes Received:
    259
    It's actually pretty simple, but here you go. I've updated it so that you no longer need a bat file.
    Code (Text):
    1.  
    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. }
    16.  
    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. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    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. Exia

    Joined:
    Nov 3, 2013
    Messages:
    609
    Likes Received:
    259
    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. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    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. Exia

    Joined:
    Nov 3, 2013
    Messages:
    609
    Likes Received:
    259
    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. Geashaw

    Joined:
    Jan 8, 2015
    Messages:
    1,429
    Likes Received:
    252
  7. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
  8. Exia

    Joined:
    Nov 3, 2013
    Messages:
    609
    Likes Received:
    259
    @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

Loading...