Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
  • [Guide] Preparing for GoldFarming..Part 1


    Donald Trump
     Share

    Recommended Posts

    This guide aims to provide a method of how to handle the way your bots interact with your mules. It's a pretty simple method but very effective and does pretty much the same job as anything else. One of the benefits of this method I'll show you is it eliminates the clan chat middleman and secondly you can dynamically decide on various factors like mule name without having to restart a client which is a big pain if you do gold farming.

     

    Firstly here are some of the software requirements:

    1. NGINX (Web Server)
    2. RSYNC (Syncing Solution)
    3. CRON (Automated Command Executing)

    Now before exploring further you need to have a basic understanding of Linux and scripting if you're looking to integrate that into your existing code, if you don't then there's no point in continuing. If you do want assistance you can contact me via Discord and I'll set it all up for a fee ;).

     

    #1

     

     

    Code for Scripters:

     

    Using the code below you can implement a timer so that every 30 seconds for example it'll get the status from like "127.0.0.1/name-mulestatus.txt" or things like mulename, muleworld. Then you could make it start the mule process if the mulestatus is true.

    private String getData(String filename) {
    try {
    String webPage = "http://" + serverIP + "/name-" + filename + ".txt";
    URL url = new URL(webPage);
    URLConnection urlConnection = url.openConnection();
    InputStream is = urlConnection.getInputStream();
    InputStreamReader isr = new InputStreamReader(is);
    
    int numCharsRead;
    char[] charArray = new char[1024];
    StringBuffer sb = new StringBuffer();
    while ((numCharsRead = isr.read(charArray)) > 0) {
    sb.append(charArray, 0, numCharsRead);
    }
    String result = sb.toString();
    
    return result.replaceAll("\\s+","");
    } catch (Exception e) {
    System.out.println("Exception occurred at getData.");
    }
    
    return "";
    }
    

     

     

     

    #2

     

     

    This part you need to setup the actual files on your desktop or wherever suitable, we're gonna use these files with rsync so it syncs with the nginx web server later on. Simply do something like this:

    510185fb6f.png

     

     

    #3

     

     

    Type "crontab -e" within the PuTTY/Terminal window then choose your preferred editor like vim or nano (nano better for newbs). Now simply adjust this line and insert this as ROOT:

    "* * * * * rsync -a /home/user/Desktop/scripts/TOaks/sync/* /var/www/html >/dev/null 2>&1"

    This above will execute rsync to sync the files into the web server so that the supported scripts can see when the mule is operational. Step 4 will show you the code for the mulescript.

     

     

     

    #4

     

     

     

    Explains itself basically whenever the mulescript executes it'll input ready into the mulestatus file, it's name and the world it's assigned to. Then your bots will know when to mule. Also then when it closes it'll change back so its not ready and the bots will know that too. Pretty good simple method am i right? I also recommend you have the operationstatus file so you can control stuff easier.

    # Clears the sync files
    sed -i -e "1d" /home/user/Desktop/scripts/TOaks/sync/oak-mulename.txt
    sed -i -e "1d" /home/user/Desktop/scripts/TOaks/sync/oak-mulestatus.txt
    sed -i -e "1d" /home/user/Desktop/scripts/TOaks/sync/oak-muleworld.txt
    
    # Variables
    mulename="Zezima"
    muleworld="393"
    email="[email protected]"
    pass="blahblah123"
    
    # Set files
    echo $mulename >> /home/user/Desktop/scripts/TOaks/sync/oak-mulename.txt
    echo "ready" >> /home/user/Desktop/scripts/TOaks/sync/oak-mulestatus.txt
    echo $muleworld >> /home/user/Desktop/scripts/TOaks/sync/oak-muleworld.txt
    
    # Java Client
    timeout 1200 java -Xmx750M -Dhttp.proxyHost=IPHERE -Dhttp.proxyPort=1080 -Dhttp.proxyUser=blah -Dhttp.proxyPassword=blah -jar -Xbootclasspath/p:/home/user/DreamBot/BotData/client.jar /home/user/DreamBot/BotData/client.jar -username "Donald Trump" -password "notmypassword123" -accountUsernames $email -accountPasswords $pass -fps 30 -world $muleworld -script "YourTrader" -params "blah blah"
    
    # Clear
    sed -i -e "1d" /home/user/Desktop/scripts/TOaks/sync/oak-mulename.txt
    sed -i -e "1d" /home/user/Desktop/scripts/TOaks/sync/oak-mulestatus.txt
    sed -i -e "1d" /home/user/Desktop/scripts/TOaks/sync/oak-muleworld.txt
    
    # Waits 2 Hours then executes again
    echo "Sleeping"
    sleeping=$(shuf -i 7200-7500 -n1)
    sleep "$sleeping""s"
    operationstatus=$(head -1 /home/user/Desktop/scripts/TOaks/operationstatus.txt)
    if [[ $operationstatus = "online" ]]; then
    /home/user/Desktop/scripts/TOaks/mulescript.sh
    echo $operationstatus
    fi
    
    

     

     

     

    Any Questions? Just reply below!

    Any Suggestions? Just reply below!

    Do you like this guide? Give it a thumbs up!

     

     

    inb4 This is the easiest way that I've found to handle the mules. Yes you can use java server stuff but for me this is the easiest.

    Edited by Donald Trump
    Link to comment
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     Share

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.