Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;This right here is our hotkey!
- HotKeySet("{f1}", "LaunchToggle")
- ;These are our two variables that determine whether or not we are currently doing a process!
- Global $launching = False
- Global $update = False
- Global $searching = False
- Global $typing = False
- Global $searchX = 1900
- Global $searchY = 1050
- ;This is the user input.
- Global $username = "Erryial"
- Global $password = "Justin98"
- While (1)
- ;Get into the patchers
- If ($launching) Then
- Run("D:\Games\lol.launcher.exe")
- ;Check For Updates
- $searching = True
- ;Get into the login screen
- While ($searching)
- $pix = PixelSearch(0, 0, $searchX, $searchY, 0x862809, 1)
- If Not (@error) Then
- $searching = False
- MouseClick("left", $pix[0], $pix[1], 1, 1)
- Else
- $searching = True
- $pix = PixelSearch(0, 0, $searchX, $searchY, 0x80C8D8, 1)
- If Not (@error) Then
- $update = True
- Sleep(100)
- EndIf
- EndIf
- WEnd
- Sleep(5000)
- $searching = True
- While ($update)
- Sleep(2000)
- $pix = PixelSearch(0, 0, $searchX, $searchY, 0x862809, 1)
- If Not (@error) Then
- $searching = False
- MouseClick("left", $pix[0], $pix[1], 1, 1)
- $update = False
- Sleep(5000)
- MouseClick("left", 828, 756, 1,1)
- EndIf
- WEnd
- ;Login feature
- While ($searching)
- If Not (@error) Then
- $searching = False
- MouseClick("left", 489, 452, 1, 1)
- $typing = True
- While ($typing)
- Send($username)
- Send("{TAB}")
- Sleep(1000)
- Send($password)
- Send("{ENTER}")
- $typing = False
- WEnd
- Else
- $searching = True
- EndIf
- WEnd
- $launching = False
- Else
- Sleep(3000)
- EndIf
- WEnd
- Func LaunchToggle()
- If ($launching = True) Then
- $launching = False
- Else
- $launching = True
- EndIf
- EndFunc ;==>LaunchToggle
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement