Advertisement
Guest User

Untitled

a guest
Jan 2nd, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. ;This right here is our hotkey!
  2. HotKeySet("{f1}", "LaunchToggle")
  3.  
  4. ;These are our two variables that determine whether or not we are currently doing a process!
  5. Global $launching = False
  6. Global $update = False
  7. Global $searching = False
  8. Global $typing = False
  9. Global $searchX = 1900
  10. Global $searchY = 1050
  11.  
  12. ;This is the user input.
  13. Global $username = "Erryial"
  14. Global $password = "Justin98"
  15.  
  16. While (1)
  17. ;Get into the patchers
  18. If ($launching) Then
  19. Run("D:\Games\lol.launcher.exe")
  20. ;Check For Updates
  21. $searching = True
  22. ;Get into the login screen
  23. While ($searching)
  24. $pix = PixelSearch(0, 0, $searchX, $searchY, 0x862809, 1)
  25. If Not (@error) Then
  26. $searching = False
  27. MouseClick("left", $pix[0], $pix[1], 1, 1)
  28. Else
  29. $searching = True
  30. $pix = PixelSearch(0, 0, $searchX, $searchY, 0x80C8D8, 1)
  31. If Not (@error) Then
  32. $update = True
  33. Sleep(100)
  34. EndIf
  35. EndIf
  36. WEnd
  37. Sleep(5000)
  38. $searching = True
  39.  
  40. While ($update)
  41. Sleep(2000)
  42. $pix = PixelSearch(0, 0, $searchX, $searchY, 0x862809, 1)
  43. If Not (@error) Then
  44. $searching = False
  45. MouseClick("left", $pix[0], $pix[1], 1, 1)
  46. $update = False
  47. Sleep(5000)
  48. MouseClick("left", 828, 756, 1,1)
  49. EndIf
  50. WEnd
  51.  
  52. ;Login feature
  53. While ($searching)
  54. If Not (@error) Then
  55. $searching = False
  56. MouseClick("left", 489, 452, 1, 1)
  57. $typing = True
  58. While ($typing)
  59. Send($username)
  60. Send("{TAB}")
  61. Sleep(1000)
  62. Send($password)
  63. Send("{ENTER}")
  64. $typing = False
  65. WEnd
  66. Else
  67. $searching = True
  68. EndIf
  69. WEnd
  70. $launching = False
  71. Else
  72. Sleep(3000)
  73. EndIf
  74. WEnd
  75.  
  76.  
  77.  
  78. Func LaunchToggle()
  79. If ($launching = True) Then
  80. $launching = False
  81. Else
  82. $launching = True
  83. EndIf
  84. EndFunc ;==>LaunchToggle
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement