Advertisement
Guest User

Untitled

a guest
Aug 20th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; ----------------------
  2. ; settings and functions
  3. ; ----------------------
  4.  
  5. ; window title to look for
  6. MyWin = Shakes & Fidget - The Game (s1)
  7.  
  8. ; match partial title text
  9. SetTitleMatchMode, 2
  10.  
  11. ; activate this window and wait until it's active
  12. MyWinActivate()
  13.   {
  14.   global
  15.  
  16.   IfWinNotExist, %MyWin%,
  17.     {
  18.     MsgBox Window not found, quitting...
  19.     ExitApp
  20.     }
  21.  
  22.   WinActivate, %MyWin%
  23.   WinWaitActive, %MyWin%
  24.  
  25.   ; resize the window to 800 x 600
  26.   WinGetPos, Xpos, Ypos, Width, Height, %MyWin%
  27.   Width := Width - 3
  28.   Height := Height - 3
  29.   MouseMove, Width, Height
  30.   MouseClickDrag, Left, Width , Height , 800, 600
  31.  
  32.   return
  33.   }
  34.  
  35. ; pick a random player and attack
  36. AutoFight()
  37.   {
  38.   ; click on hall of fame
  39.   MouseClick, left,  77,  484
  40.   Sleep, 1000
  41.  
  42.   ; click on name field
  43.   MouseClick, left,  467,  452
  44.   Sleep, 1000
  45.  
  46.   ; enter a random number
  47.   Random, MyRandom, 2500, 30000
  48.   Send, %MyRandom%{ENTER}
  49.  
  50.   ; click on name
  51.   MouseClick, left,  430,  326
  52.   Sleep, 1000
  53.  
  54.   ; click on attack
  55.   MouseClick, left,  710,  530
  56.   Sleep, 2000
  57.  
  58.   ; click on skip
  59.   MouseClick, left,  480,  530
  60.   Sleep, 1000
  61.    
  62.   ; click on OK
  63.   MouseClick, left,  480,  530
  64.  
  65.   return
  66.   }
  67.  
  68. ; ----------------------
  69. ; here starts the script
  70. ; ----------------------
  71.  
  72. MyWinActivate()
  73.  
  74. ; fight every 10 minutes
  75. Loop
  76.   {
  77.   MyWinActivate()
  78.  
  79.   AutoFight()
  80.  
  81.   ; wait 10 mins
  82.   Sleep, 610000
  83.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement