Advertisement
Guest User

Untitled

a guest
Jul 4th, 2016
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.66 KB | None | 0 0
  1. #singleinstance force
  2.  
  3. global offset = [320, 87, 320, 68, 448, 103, 737, 260, 733, 422, 0, 0]
  4. global state := 1
  5.  
  6. global user := ""
  7. global pass := ""
  8.  
  9. global lowlvl := 2
  10. global fightlength := 58
  11. global pause := 0
  12. global side := 0
  13. global nog := 8
  14.  
  15. global gromp1 = ["0xC98F30", 1308, 757, 965, 510]
  16. global wolves1 = ["0xDEA239", 1328, 782, 1003, 514]
  17. global wraiths1 = ["0xB07726", 1366, 793, 950, 489]
  18. global golems1 = ["0xBB812B", 1384, 827, 1058, 494]
  19. global gromp2 = ["0xD79B36", 1437, 782, 988, 498]
  20. global wolves2 = ["0xDEA239", 1417, 758, 960, 497]
  21. global wraiths2 = ["0x8D5718", 1380, 745, 962, 492]
  22. global golems2 = ["0xA56C22", 1362, 712, 862, 508]
  23.  
  24. FileRead, info, info.txt
  25. if !info
  26. {
  27. ExitApp
  28. }
  29. else
  30. {
  31. readInfo()
  32. }
  33.  
  34. IfWinNotExist, PVP.net Client
  35. {
  36. startClient()
  37. }
  38.  
  39. loop
  40. {
  41. IfWinExist, PVP.net Client
  42. {
  43. WinActivate
  44. }
  45. state := 2
  46. IfWinExist, PVP.net Client
  47. {
  48. WinGetPos, , , width, height, A
  49. if (width = 1024){
  50. click(663, 79, 1)
  51. click(663, 79, 1)
  52. sleep 4000
  53. click(663, 79, 1)
  54. click(663, 79, 1)
  55. }
  56. if (checkcolor(400, 750, "0x000000") and checkcolor(400, 800, "0x000000"))
  57. {
  58. click(663, 79, 1)
  59. click(663, 79, 1)
  60. sleep 5000
  61. click(663, 79, 1)
  62. click(663, 79, 1)
  63. }
  64. }
  65. if (checkcolor(1008, 605, "0xB64A01") = 1) ; Server busy
  66. {
  67. sleep 10000
  68. click(541, 452, 1)
  69. press(pass)
  70. pressSpecial("enter")
  71. }
  72. if (checkcolor(955, 267, "0x0B1122") = 1) ; Create summoner
  73. {
  74. click(956, 560, 1)
  75. send, %user%
  76. sleep 1000
  77. click(955, 636, 1)
  78. waitfor(948, 320, "0x0B101F")
  79. click(1290, 611, 1)
  80. waitfor(957, 314, "0x0B1121")
  81. click(1186, 460, 1)
  82. waitfor(1241, 613, "0x0F3664")
  83. click(1241, 613, 1)
  84. waitfor(966, 357, "0x0A0F1E")
  85. click(1016, 577, 1)
  86. }
  87. if (checkcolor(948, 320, "0x0B101F") = 1) ; Create icon
  88. {
  89. click(1290, 611, 1)
  90. waitfor(957, 314, "0x0B1121")
  91. click(1186, 460, 1)
  92. waitfor(1241, 613, "0x0F3664")
  93. click(1241, 613, 1)
  94. waitfor(966, 357, "0x0A0F1E")
  95. click(1016, 577, 1)
  96. }
  97. if (checkcolor(1359, 147, "0x091F20") = 1) ; Popup for new champ select
  98. {
  99. click(1542, 152, 1)
  100. }
  101. if (checkcolor(1526, 160, "0x0B282B") = 1) ; Popup for hextech crafting
  102. {
  103. click(1559, 160, 1)
  104. }
  105. if (checkcolor(521, 239, "0x233347") = 1) ; Select queue
  106. {
  107. if (checkcolor(602, 601, "0xE0E0E0") = 1) ; Queue already selected
  108. {
  109. click(1028, 775, 1)
  110. }
  111. else if (checkcolor(1001, 237, "0x0B3A28") = 1) ; Queue stuck
  112. {
  113. click(1018, 280, 1)
  114. sleep 4000
  115. click(985, 225, 1)
  116. sleep 4000
  117. click(1174, 278, 1)
  118. sleep 4000
  119. click(1060, 777, 1)
  120. }
  121. else ; Queue not selected
  122. {
  123. click(654, 240, 1)
  124. sleep 4000
  125. click(783, 217, 1)
  126. sleep 4000
  127. click(985, 225, 1)
  128. sleep 4000
  129. click(1174, 278, 1)
  130. sleep 4000
  131. click(1060, 777, 1)
  132. }
  133. }
  134. if (checkcolor(1144, 118, "0xB2A288") and checkcolor(1461, 84, "0x94A1A3"))
  135. {
  136. ExitApp
  137. }
  138. if (checkcolor(958, 467, "0xFFFFFF") = 1) ; Queue pop
  139. {
  140. click(869, 515, 1)
  141. }
  142. if (checkcolor(625, 515, "0xDA5300") = 1) ; Champ select open
  143. {
  144. champSelect()
  145. }
  146. if (checkcolor(962, 380, "0x0A101F") = 1) ; Reconnect
  147. {
  148. click(954, 524, 1)
  149. }
  150. if (checkcolor(957, 370, "0x546B8F") = 1) ; LeaverBuster Warning
  151. {
  152. click(946, 551, 1)
  153. press("i agree")
  154. pressSpecial("enter")
  155. }
  156. if (checkcolor(913, 424, "0x1F253D") = 1) ; Active game not found
  157. {
  158. click(957, 504, 1)
  159. }
  160. if (checkcolor(936, 652, "0x1F253D") = 1) ; Unknown error
  161. {
  162. click(956, 574, 1)
  163. }
  164. if (checkcolor(944, 357, "0x1F253D")) ; Unknown error
  165. {
  166. click(959, 572, 1)
  167. }
  168. IfWinExist, Error
  169. {
  170. WinClose, Error
  171. }
  172. state := 4
  173. IfWinExist, Whoops! Something broke.
  174. {
  175. WinActivate
  176. Sleep 2000
  177. click(957, 654, 1)
  178. }
  179. IfWinExist, Error
  180. {
  181. WinActivate
  182. PressSpecial("Enter")
  183. }
  184. state := 5
  185. if (checkcolor(840, 540, "0xF0F0F0") = 1) ; Disconnect
  186. {
  187. click(1132, 540, 1)
  188. }
  189. IfWinExist, League of Legends (TM) Client
  190. {
  191. WinActivate
  192. state := 3
  193. fullscreen()
  194. if (checkcolor(905, 325, "0x0C1312") = 1) ; AFK warning
  195. {
  196. click(952, 535, 1)
  197. }
  198. if (checkcolor(886, 338, "0x68C0A0") = 1) ; Disconnected
  199. {
  200. click(955, 535, 1)
  201. }
  202. if (checkcolor(1351, 750, "0x073947") = 1) ; Loaded
  203. {
  204. playGame()
  205. }
  206. sleep 30000
  207. }
  208. IfWinExist, Failed to Connect
  209. {
  210. WinActivate
  211. sleep 1000
  212. pressSpecial("right")
  213. sleep 1000
  214. pressSpecial("enter")
  215. }
  216.  
  217. state := 2
  218. if (checkcolor(916, 208, "0x033450") = 1) ; Waiting for stats
  219. {
  220. click(916, 208, 1)
  221. }
  222. if (checkcolor(898, 401, "0x1F253D") = 1) ; Reported
  223. {
  224. click(964, 522, 1)
  225. }
  226. if (checkcolor(905, 239, "0xA6E9F5") = 1) ; Level 5
  227. {
  228. click(962, 240, 1)
  229. sleep 4000
  230. click(1228, 783, 1)
  231. loop
  232. {
  233. if (checkcolor(1397, 117, "0x092C34") = 1) ; Home
  234. {
  235. click(1397, 117, 1)
  236. }
  237. if (checkcolor(1359, 147, "0x091F20") = 1) ; Popup for new champ select
  238. {
  239. click(1542, 152, 1)
  240. }
  241. if (checkcolor(1526, 160, "0x0B282B") = 1) ; Popup for hextech crafting
  242. {
  243. click(1559, 160, 1)
  244. }
  245. if (checkcolor(863, 323, "0x1B1F26") = 1) ; Profile
  246. {
  247. break
  248. }
  249. }
  250. click(840, 252, 1)
  251. sleep 4000
  252. waitfor(490, 298, "0x737373")
  253. click(490, 298, 1)
  254. sleep 4000
  255. press("rw")
  256. sleep 4000
  257. waitfor(502, 393, "0x988453")
  258. click(502, 393, 1)
  259. sleep 4000
  260. waitfor(1222, 392, "0x15223B")
  261. click(1435, 786, 1)
  262. sleep 4000
  263. waitfor(653, 421, "0x1A2B4A")
  264. click(1276, 555, 1)
  265. sleep 4000
  266. waitfor(1139, 436, "0x06192D")
  267. click(1139, 436, 1)
  268. sleep 4000
  269. waitfor(1222, 392, "0x15223B")
  270. click(1548, 133, 1)
  271. sleep 4000
  272. }
  273. if (checkcolor(934, 110, "0x991C0F") = 1) ; Play button
  274. {
  275. pauseorclose()
  276. click(929, 117, 1)
  277. }
  278. if (checkcolor(856, 78, "0x060E15") = 1) ; Play again
  279. {
  280. pauseorclose()
  281. click(1429, 804, 1)
  282. }
  283. if (checkcolor(1346, 806, "0x6A6A6A") = 1) ; Home
  284. {
  285. click(1228, 783, 1)
  286. }
  287.  
  288. SetTitleMatchMode 2
  289. IfWinExist, Microsoft Edge
  290. {
  291. WinClose
  292. }
  293.  
  294. sleep 1000
  295. }
  296. return
  297.  
  298. readInfo()
  299. {
  300. txt := ""
  301. line := 1
  302. Loop, read, info.txt
  303. {
  304. if (line = 1)
  305. {
  306. line := 2
  307. Array := StrSplit(A_LoopReadLine, " ")
  308. user := Array[1]
  309. pass := Array[2]
  310. }
  311. else if (line = 2)
  312. {
  313. txt := A_LoopReadLine
  314. line := 3
  315. }
  316. else
  317. {
  318. txt := txt . "`n" . A_LoopReadLine
  319. }
  320. }
  321. txt := txt . "`n" . user . " " . pass
  322. FileDelete info.txt
  323. FileAppend, %txt%, info.txt
  324. nog := 8
  325. }
  326. return
  327.  
  328. restartLeague()
  329. {
  330. closeLeague()
  331. readInfo()
  332. startClient()
  333. }
  334. return
  335.  
  336. closeLeague()
  337. {
  338. click(1585, 81, 1)
  339. waitfor(943, 427, "0x1F253D")
  340. click(911, 505, 1)
  341. sleep 10000
  342. }
  343. return
  344.  
  345. pauseorclose()
  346. {
  347. if (checkcolor(962, 380, "0x0A101F") = 1) ; Reconnect
  348. {
  349. return
  350. }
  351. IfWinExist, Whoops! Something broke.
  352. {
  353. return
  354. }
  355. loop
  356. {
  357. if (pause = 0)
  358. {
  359. break
  360. }
  361. IfWinExist, League of Legends (TM) Client
  362. {
  363. break
  364. }
  365. if (pause = 2)
  366. {
  367. shutdown, 12
  368. ExitApp
  369. }
  370. if (pause = 1)
  371. {
  372. if (checkcolor(1197, 784, "0x1C3D64") = 1)
  373. {
  374. click(1197, 784, 1)
  375. }
  376. }
  377. }
  378. if (nog < 1)
  379. {
  380. restartLeague()
  381. }
  382. }
  383. return
  384.  
  385. fullscreen()
  386. {
  387. WinGetPos, a, b, x, y, A
  388. if (x = 1920 AND y = 975)
  389. {
  390. state := 6
  391. click(642, 307, 2)
  392. pressSpecial("esc")
  393. sleep 5000
  394. click(642, 307, 1)
  395. sleep 5000
  396. click(846, 344, 1)
  397. sleep 5000
  398. click(848, 431, 1)
  399. sleep 5000
  400. click(1118, 340, 1)
  401. sleep 5000
  402. click(1117, 413, 1)
  403. sleep 5000
  404. click(774, 499, 1)
  405. sleep 5000
  406. click(1109, 753, 1)
  407. state := 3
  408. sleep 5000
  409. click(1318, 206, 1)
  410. }
  411. }
  412.  
  413. #u::
  414. {
  415. pause := 1
  416. }
  417. return
  418.  
  419. #i::
  420. {
  421. pause := 0
  422. }
  423. return
  424.  
  425. #o::
  426. {
  427. pause := 2
  428. }
  429. return
  430.  
  431. #k::Pause
  432.  
  433. #include game.ahk
  434. #include client.ahk
  435. #include input.ahk
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement