rsps-scripts

Automation scripts for private servers
Log | Files | Refs

inv-1-to-2.sh (536B)


      1 #!/usr/bin/env bash
      2 
      3 # include functions
      4 source "$(dirname "${BASH_SOURCE[0]}")/functions.sh"
      5 
      6 if [ -z "$1" ]; then
      7     echo "Usage: $0 <number>"
      8     echo
      9     echo "Runs the script the specified number of times."
     10     echo
     11     echo "Example:"
     12     echo "  $0 44"
     13     exit 1
     14 fi
     15 
     16 count=$1
     17 
     18 startup
     19 
     20 # Count down
     21 printf " - Starting script in 3 seconds...\n"
     22 sleep 3
     23 
     24 for ((i=count; i>0; i--)); do
     25     printf '\r - Running script %d times' "$i"
     26 		inventory_slot 1
     27 		left_click
     28 		msleep 100 150
     29 		inventory_slot 2
     30 		left_click
     31 done
     32 
     33 complete