Advertisement
mov51

mine_obsidian

Feb 24th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. windowTitle1 = mov52-afk ;window title to target, repeats down to target multiple windows.
  2. windowTitle2 = mov53-afk
  3. windowTitle3 = mov54-afk
  4. SetTitleMatchMode 3 ;sets window match mode to exact
  5. #SingleInstance Force ;only one version of the script can be open, makes it easy to replace old version with new one
  6.  
  7. !^v::
  8. counts = 204 ;how many obsidian you plan on mining
  9. ;this varys depending on the height of the pillar and whether ort not you are mining 2 or 1 blocks per y height
  10. loop{
  11.     if (counts < 1) ; checks to see how far along the obsidian pillar you are
  12.         {
  13.             BreakLoop = 1 ;if you are at the end, it sets breakLoop to 1
  14.         }
  15.     if (BreakLoop = 1) ;if breakLoop is equal to 1 it runs the bwlow code, if not this is skipped
  16.         {
  17.             BreakLoop = 0;resets the break loop
  18.             sleep 200
  19.             ControlSend, ,{t down}, %windowTitle1% ;opens the chat window for each named window. to add more duplicate the line below the last one and iterate.
  20.             ControlSend, ,{t down}, %windowTitle2%
  21.             ControlSend, ,{t down}, %windowTitle3%
  22.             sleep 200
  23.             ControlSend, ,{t up}, %windowTitle1%
  24.             ControlSend, ,{t up}, %windowTitle2%
  25.             ControlSend, ,{t up}, %windowTitle3%
  26.             sleep 200
  27.             ControlSend, ,{text}done!, %windowTitle1% ;types the word done! to add more duplicate the line below the last one and iterate.
  28.             ControlSend, ,{text}done!, %windowTitle2%
  29.             ControlSend, ,{text}done!, %windowTitle3%
  30.             sleep 200
  31.             ControlSend, ,{enter}, %windowTitle1% ; sends the message. to add more duplicate the line below the last one and iterate.
  32.             ControlSend, ,{enter}, %windowTitle2%
  33.             ControlSend, ,{enter}, %windowTitle3%
  34.             sleep 200
  35.            
  36.             break
  37.         }
  38.     ControlClick, , %windowTitle1%, ,left, , NAD ;presses the left click button for each named window. to add more duplicate the line below the last one and iterate.
  39.     ControlClick, , %windowTitle2%, ,left, , NAD
  40.     ControlClick, , %windowTitle3%, ,left, , NAD
  41.     Sleep 1970 ;waits the leanth of time it takes to mine one obsidian with an eff5 pick and haste 2
  42.     ControlClick, , %windowTitle1%, ,left, , NAU ; releases the left click button for each named window. to add more duplicate the line below the last one and iterate.
  43.     ControlClick, , %windowTitle2%, ,left, , NAU
  44.     ControlClick, , %windowTitle3%, ,left, , NAU
  45.     sleep 100
  46.     counts--
  47. }
  48.  
  49. !^b::
  50. BreakLoop = 1 ;stops the script by setting the breakLoop variable to 1
  51. return
  52.  
  53. !^r:: ;reloads the script. do this before running it again
  54. reload
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement