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
  • Need some help with Linux Bash Scripting (quickstart + random select account)


    mbmaster

    Recommended Posts

    Hi Dreambuddy's

    I try to select a random account, and then start quickstart with this account:

    #! /bin/bash
    
    ## Variables
    SELECT_FILE="/home/martijn/Desktop/Accounts/Accounts.sh"
    
    ## START SELECTING ONE OF THE CHOICES
    CHOICES=`cat "$SELECT_FILE"`
    #echo "$CHOICES"
    CHOSEN=`echo "$CHOICES" | sort -R | sed 1q`
    echo "$CHOSEN"
    
    ## RUN QUICKSTART WITH CHOSEN ACCOUNT
    java -jar /home/martijn/DreamBot/BotData/client.jar -account "echo "$CHOSEN"" -proxy "Proxy 1" -script "{name}" -params {name}

    The 'echo "$CHOSEN"' displays the name of the random chosen account in the terminal, but quickstart isn't loading with it. (I have already double checked whether all accounts are in the account manager of Dreambot :)). Any ideas?

    Link to comment
    Share on other sites

    • mbmaster changed the title to Need some help with Linux Bash Scripting (quickstart + random select account)

    You don't need to use echo to print that variable, and by doing so you were actually un-quoting, messing up the whole thing.

    This worked for me (cleaned it up a little bit):

    #!/bin/bash
    
    ## Variables
    SELECT_FILE="$HOME/Desktop/Accounts/Accounts.sh"
    
    ## START SELECTING ONE OF THE CHOICES
    CHOSEN=$(sort -R < "$SELECT_FILE" | sed 1q)
    echo "$CHOSEN"
    
    ## RUN QUICKSTART WITH CHOSEN ACCOUNT
    java -jar ~/DreamBot/BotData/client.jar -account "$CHOSEN" -proxy "Proxy 1" -script "{name}" -params {name}

     

    Link to comment
    Share on other sites

    10 hours ago, Pandemic said:

    You don't need to use echo to print that variable, and by doing so you were actually un-quoting, messing up the whole thing.

    This worked for me (cleaned it up a little bit):

    
    #!/bin/bash
    
    ## Variables
    SELECT_FILE="$HOME/Desktop/Accounts/Accounts.sh"
    
    ## START SELECTING ONE OF THE CHOICES
    CHOSEN=$(sort -R < "$SELECT_FILE" | sed 1q)
    echo "$CHOSEN"
    
    ## RUN QUICKSTART WITH CHOSEN ACCOUNT
    java -jar ~/DreamBot/BotData/client.jar -account "$CHOSEN" -proxy "Proxy 1" -script "{name}" -params {name}

     

    Hi @Pandemic, Thanks for cleaning up my script a bit :). But still this isn't working for me. 

    #!/bin/bash
    
    ## Variables
    SELECT_FILE="$HOME/Desktop/Accounts/Accounts.sh"
    
    ## START SELECTING ONE OF THE CHOICES
    CHOSEN=$(sort -R < "$SELECT_FILE" | sed 1q)
    echo "$CHOSEN"
    
    ## RUN QUICKSTART WITH CHOSEN ACCOUNT
    java -jar ~/DreamBot/BotData/client.jar -account "$CHOSEN" -proxy "Proxy 1" -script "# Woodcutting"

    In the terminal you see the echo of the CHOSEN account. But when it runs quickstart, it doesn't load it. Is it possible to load the variable first ($CHOSEN), then run the quickstart command?

    Because I think with this command the quickstart command is just looking for the account named: $CHOSEN and not filling in the name of the variable $CHOSEN before starting the command.

     

     

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • 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.