Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. tell application "System Events"
  2.    
  3.     #check if discord is open-----------------------------
  4.     if exists process "Discord" then
  5.         tell application "Discord"
  6.            
  7.             #switch to discord--------------------------
  8.             activate
  9.         end tell
  10.         keystroke "test"
  11.         keystroke return
  12.     end if
  13.    
  14.     set frontmostApp to name of application processes whose frontmost is true
  15.     tell application frontmostApp
  16.    
  17.         keystroke "test"
  18.         keystroke return
  19.        
  20.         repeat while "Discord" is frontmostApp #while discord is in front
  21.            
  22.             #heal before start--------------------------------
  23.             delay 4
  24.             keystroke "#!heal auto"
  25.             keystroke return
  26.             keystroke "#!buy health potion 6"
  27.             keystroke return
  28.             #chop and stuff-----------------------------------     
  29.             delay 1
  30.             keystroke "#!chop"
  31.             keystroke return
  32.             delay 1
  33.             keystroke "#!forage"
  34.             keystroke return
  35.             delay 1
  36.             keystroke "#!mine"
  37.             keystroke return
  38.             delay 1
  39.             keystroke "#!fish"
  40.             keystroke return
  41.             #--------------------------------------------------
  42.            
  43.             #adventure for 20 times yay!-------------------
  44.             repeat 20 times
  45.                 keystroke "#!adv"
  46.                 delay (random number from 15 to 17)
  47.             end repeat
  48.             #--------------------------------------------------
  49.            
  50.            
  51.         end repeat
  52.     end tell
  53. end tell
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement