rsps-scripts

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

reroller.sh (632B)


      1 #!/usr/bin/env bash
      2 
      3 # include functions
      4 source "$(dirname "${BASH_SOURCE[0]}")/functions.sh"
      5 
      6 function run_action() {
      7 	printf ' - Re-rolling slayer task...\n'
      8 	slayer_master=$(current_mouse)
      9 	left_click
     10 	msleep 250 350
     11 	move_mouse 234 1025 143 6
     12 	msleep 650 850
     13 	left_click
     14 	msleep 250 350
     15 	move_mouse 171 961 179 9
     16 	msleep 250 350
     17 	left_click
     18 	move_mouse ${slayer_master/,/}
     19 }
     20 
     21 CLEANUP_DONE=0
     22 function on_exit() {
     23 	if [[ "$CLEANUP_DONE" -eq 1 ]]; then
     24 		return
     25 	fi
     26 	CLEANUP_DONE=1
     27 
     28 	cleanup
     29 	exit 0
     30 }
     31 
     32 startup
     33 
     34 printf ' - Press F11 to re-roll slayer task\n'
     35 
     36 while true; do
     37 	if read -r _line < "$pipe"; then
     38 		run_action
     39 	fi
     40 done