Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #singleinstance force
- global offset = [320, 87, 320, 68, 448, 103, 737, 260, 733, 422, 0, 0]
- global state := 1
- global user := ""
- global pass := ""
- global lowlvl := 2
- global fightlength := 58
- global pause := 0
- global side := 0
- global nog := 8
- global gromp1 = ["0xC98F30", 1308, 757, 965, 510]
- global wolves1 = ["0xDEA239", 1328, 782, 1003, 514]
- global wraiths1 = ["0xB07726", 1366, 793, 950, 489]
- global golems1 = ["0xBB812B", 1384, 827, 1058, 494]
- global gromp2 = ["0xD79B36", 1437, 782, 988, 498]
- global wolves2 = ["0xDEA239", 1417, 758, 960, 497]
- global wraiths2 = ["0x8D5718", 1380, 745, 962, 492]
- global golems2 = ["0xA56C22", 1362, 712, 862, 508]
- FileRead, info, info.txt
- if !info
- {
- ExitApp
- }
- else
- {
- readInfo()
- }
- IfWinNotExist, PVP.net Client
- {
- startClient()
- }
- loop
- {
- IfWinExist, PVP.net Client
- {
- WinActivate
- }
- state := 2
- IfWinExist, PVP.net Client
- {
- WinGetPos, , , width, height, A
- if (width = 1024){
- click(663, 79, 1)
- click(663, 79, 1)
- sleep 4000
- click(663, 79, 1)
- click(663, 79, 1)
- }
- if (checkcolor(400, 750, "0x000000") and checkcolor(400, 800, "0x000000"))
- {
- click(663, 79, 1)
- click(663, 79, 1)
- sleep 5000
- click(663, 79, 1)
- click(663, 79, 1)
- }
- }
- if (checkcolor(1008, 605, "0xB64A01") = 1) ; Server busy
- {
- sleep 10000
- click(541, 452, 1)
- press(pass)
- pressSpecial("enter")
- }
- if (checkcolor(955, 267, "0x0B1122") = 1) ; Create summoner
- {
- click(956, 560, 1)
- send, %user%
- sleep 1000
- click(955, 636, 1)
- waitfor(948, 320, "0x0B101F")
- click(1290, 611, 1)
- waitfor(957, 314, "0x0B1121")
- click(1186, 460, 1)
- waitfor(1241, 613, "0x0F3664")
- click(1241, 613, 1)
- waitfor(966, 357, "0x0A0F1E")
- click(1016, 577, 1)
- }
- if (checkcolor(948, 320, "0x0B101F") = 1) ; Create icon
- {
- click(1290, 611, 1)
- waitfor(957, 314, "0x0B1121")
- click(1186, 460, 1)
- waitfor(1241, 613, "0x0F3664")
- click(1241, 613, 1)
- waitfor(966, 357, "0x0A0F1E")
- click(1016, 577, 1)
- }
- if (checkcolor(1359, 147, "0x091F20") = 1) ; Popup for new champ select
- {
- click(1542, 152, 1)
- }
- if (checkcolor(1526, 160, "0x0B282B") = 1) ; Popup for hextech crafting
- {
- click(1559, 160, 1)
- }
- if (checkcolor(521, 239, "0x233347") = 1) ; Select queue
- {
- if (checkcolor(602, 601, "0xE0E0E0") = 1) ; Queue already selected
- {
- click(1028, 775, 1)
- }
- else if (checkcolor(1001, 237, "0x0B3A28") = 1) ; Queue stuck
- {
- click(1018, 280, 1)
- sleep 4000
- click(985, 225, 1)
- sleep 4000
- click(1174, 278, 1)
- sleep 4000
- click(1060, 777, 1)
- }
- else ; Queue not selected
- {
- click(654, 240, 1)
- sleep 4000
- click(783, 217, 1)
- sleep 4000
- click(985, 225, 1)
- sleep 4000
- click(1174, 278, 1)
- sleep 4000
- click(1060, 777, 1)
- }
- }
- if (checkcolor(1144, 118, "0xB2A288") and checkcolor(1461, 84, "0x94A1A3"))
- {
- ExitApp
- }
- if (checkcolor(958, 467, "0xFFFFFF") = 1) ; Queue pop
- {
- click(869, 515, 1)
- }
- if (checkcolor(625, 515, "0xDA5300") = 1) ; Champ select open
- {
- champSelect()
- }
- if (checkcolor(962, 380, "0x0A101F") = 1) ; Reconnect
- {
- click(954, 524, 1)
- }
- if (checkcolor(957, 370, "0x546B8F") = 1) ; LeaverBuster Warning
- {
- click(946, 551, 1)
- press("i agree")
- pressSpecial("enter")
- }
- if (checkcolor(913, 424, "0x1F253D") = 1) ; Active game not found
- {
- click(957, 504, 1)
- }
- if (checkcolor(936, 652, "0x1F253D") = 1) ; Unknown error
- {
- click(956, 574, 1)
- }
- if (checkcolor(944, 357, "0x1F253D")) ; Unknown error
- {
- click(959, 572, 1)
- }
- IfWinExist, Error
- {
- WinClose, Error
- }
- state := 4
- IfWinExist, Whoops! Something broke.
- {
- WinActivate
- Sleep 2000
- click(957, 654, 1)
- }
- IfWinExist, Error
- {
- WinActivate
- PressSpecial("Enter")
- }
- state := 5
- if (checkcolor(840, 540, "0xF0F0F0") = 1) ; Disconnect
- {
- click(1132, 540, 1)
- }
- IfWinExist, League of Legends (TM) Client
- {
- WinActivate
- state := 3
- fullscreen()
- if (checkcolor(905, 325, "0x0C1312") = 1) ; AFK warning
- {
- click(952, 535, 1)
- }
- if (checkcolor(886, 338, "0x68C0A0") = 1) ; Disconnected
- {
- click(955, 535, 1)
- }
- if (checkcolor(1351, 750, "0x073947") = 1) ; Loaded
- {
- playGame()
- }
- sleep 30000
- }
- IfWinExist, Failed to Connect
- {
- WinActivate
- sleep 1000
- pressSpecial("right")
- sleep 1000
- pressSpecial("enter")
- }
- state := 2
- if (checkcolor(916, 208, "0x033450") = 1) ; Waiting for stats
- {
- click(916, 208, 1)
- }
- if (checkcolor(898, 401, "0x1F253D") = 1) ; Reported
- {
- click(964, 522, 1)
- }
- if (checkcolor(905, 239, "0xA6E9F5") = 1) ; Level 5
- {
- click(962, 240, 1)
- sleep 4000
- click(1228, 783, 1)
- loop
- {
- if (checkcolor(1397, 117, "0x092C34") = 1) ; Home
- {
- click(1397, 117, 1)
- }
- if (checkcolor(1359, 147, "0x091F20") = 1) ; Popup for new champ select
- {
- click(1542, 152, 1)
- }
- if (checkcolor(1526, 160, "0x0B282B") = 1) ; Popup for hextech crafting
- {
- click(1559, 160, 1)
- }
- if (checkcolor(863, 323, "0x1B1F26") = 1) ; Profile
- {
- break
- }
- }
- click(840, 252, 1)
- sleep 4000
- waitfor(490, 298, "0x737373")
- click(490, 298, 1)
- sleep 4000
- press("rw")
- sleep 4000
- waitfor(502, 393, "0x988453")
- click(502, 393, 1)
- sleep 4000
- waitfor(1222, 392, "0x15223B")
- click(1435, 786, 1)
- sleep 4000
- waitfor(653, 421, "0x1A2B4A")
- click(1276, 555, 1)
- sleep 4000
- waitfor(1139, 436, "0x06192D")
- click(1139, 436, 1)
- sleep 4000
- waitfor(1222, 392, "0x15223B")
- click(1548, 133, 1)
- sleep 4000
- }
- if (checkcolor(934, 110, "0x991C0F") = 1) ; Play button
- {
- pauseorclose()
- click(929, 117, 1)
- }
- if (checkcolor(856, 78, "0x060E15") = 1) ; Play again
- {
- pauseorclose()
- click(1429, 804, 1)
- }
- if (checkcolor(1346, 806, "0x6A6A6A") = 1) ; Home
- {
- click(1228, 783, 1)
- }
- SetTitleMatchMode 2
- IfWinExist, Microsoft Edge
- {
- WinClose
- }
- sleep 1000
- }
- return
- readInfo()
- {
- txt := ""
- line := 1
- Loop, read, info.txt
- {
- if (line = 1)
- {
- line := 2
- Array := StrSplit(A_LoopReadLine, " ")
- user := Array[1]
- pass := Array[2]
- }
- else if (line = 2)
- {
- txt := A_LoopReadLine
- line := 3
- }
- else
- {
- txt := txt . "`n" . A_LoopReadLine
- }
- }
- txt := txt . "`n" . user . " " . pass
- FileDelete info.txt
- FileAppend, %txt%, info.txt
- nog := 8
- }
- return
- restartLeague()
- {
- closeLeague()
- readInfo()
- startClient()
- }
- return
- closeLeague()
- {
- click(1585, 81, 1)
- waitfor(943, 427, "0x1F253D")
- click(911, 505, 1)
- sleep 10000
- }
- return
- pauseorclose()
- {
- if (checkcolor(962, 380, "0x0A101F") = 1) ; Reconnect
- {
- return
- }
- IfWinExist, Whoops! Something broke.
- {
- return
- }
- loop
- {
- if (pause = 0)
- {
- break
- }
- IfWinExist, League of Legends (TM) Client
- {
- break
- }
- if (pause = 2)
- {
- shutdown, 12
- ExitApp
- }
- if (pause = 1)
- {
- if (checkcolor(1197, 784, "0x1C3D64") = 1)
- {
- click(1197, 784, 1)
- }
- }
- }
- if (nog < 1)
- {
- restartLeague()
- }
- }
- return
- fullscreen()
- {
- WinGetPos, a, b, x, y, A
- if (x = 1920 AND y = 975)
- {
- state := 6
- click(642, 307, 2)
- pressSpecial("esc")
- sleep 5000
- click(642, 307, 1)
- sleep 5000
- click(846, 344, 1)
- sleep 5000
- click(848, 431, 1)
- sleep 5000
- click(1118, 340, 1)
- sleep 5000
- click(1117, 413, 1)
- sleep 5000
- click(774, 499, 1)
- sleep 5000
- click(1109, 753, 1)
- state := 3
- sleep 5000
- click(1318, 206, 1)
- }
- }
- #u::
- {
- pause := 1
- }
- return
- #i::
- {
- pause := 0
- }
- return
- #o::
- {
- pause := 2
- }
- return
- #k::Pause
- #include game.ahk
- #include client.ahk
- #include input.ahk
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement