Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; ----------------------
- ; settings and functions
- ; ----------------------
- ; window title to look for
- MyWin = Shakes & Fidget - The Game (s1)
- ; match partial title text
- SetTitleMatchMode, 2
- ; activate this window and wait until it's active
- MyWinActivate()
- {
- global
- IfWinNotExist, %MyWin%,
- {
- MsgBox Window not found, quitting...
- ExitApp
- }
- WinActivate, %MyWin%
- WinWaitActive, %MyWin%
- ; resize the window to 800 x 600
- WinGetPos, Xpos, Ypos, Width, Height, %MyWin%
- Width := Width - 3
- Height := Height - 3
- MouseMove, Width, Height
- MouseClickDrag, Left, Width , Height , 800, 600
- return
- }
- ; pick a random player and attack
- AutoFight()
- {
- ; click on hall of fame
- MouseClick, left, 77, 484
- Sleep, 1000
- ; click on name field
- MouseClick, left, 467, 452
- Sleep, 1000
- ; enter a random number
- Random, MyRandom, 2500, 30000
- Send, %MyRandom%{ENTER}
- ; click on name
- MouseClick, left, 430, 326
- Sleep, 1000
- ; click on attack
- MouseClick, left, 710, 530
- Sleep, 2000
- ; click on skip
- MouseClick, left, 480, 530
- Sleep, 1000
- ; click on OK
- MouseClick, left, 480, 530
- return
- }
- ; ----------------------
- ; here starts the script
- ; ----------------------
- MyWinActivate()
- ; fight every 10 minutes
- Loop
- {
- MyWinActivate()
- AutoFight()
- ; wait 10 mins
- Sleep, 610000
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement