Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 36.54 KB | None | 0 0
  1. // - Tap Titans 2 AdvancedClickBot by Tune389
  2. // - Changes by Mikuchck v2.5.4 rev 1
  3. // - Changelog at end of file
  4.  
  5. SCREEN_SIZE: 480x800
  6.  
  7. // ----------- Settings
  8. var #enableClanShip 0
  9. var #enableFairies 0
  10.  
  11. //; 1 = (default) collect all fairies
  12. //; 0 = no more ad pop ups will apear
  13.  
  14. var #enablePremiumCollect 0
  15. //; 1 = collect all premium popups
  16. //; 0 = (default)
  17.  
  18. var #hatchEggs 0
  19. //; 1 = (default) collect eggs
  20.  
  21. var #enableTapping 1
  22. //; 1 = (default) hit the titans with your sm
  23. //; 0 = disable hits (execept on cq), no fairies will clicked at all
  24.  
  25. // ----------- Actions ----------- [ General ]
  26.  
  27. //level ms, heroes, skills every x minutes
  28. var #runActionsEveryXMinutes 5
  29. var #levelMainHero 1
  30. //; 5 = (default)
  31. //; 1-99 = in Minutes
  32.  
  33. var #runActionsOnStart 1
  34. //; 1 = (default) run actions on script start
  35. //; 0 = run actions after given run time above
  36.  
  37. var #percentManaToUseSkill 90
  38. // Script is clicking a bit faster so set it like 2% higher but dont set it above 100%
  39.  
  40. var #fullManaSkill 7
  41. //; if mana above set percentage press skill
  42. //; 2 = critical strike
  43. //; 3 = (default) midas
  44. //; 4 = fire blade
  45. //; 5 = heroes
  46. //; 6 = shadow clone
  47. //; 7 = heavenly sword
  48.  
  49. //Action Order | 1,2,3 = push heroes | 2,3,1 = push ms
  50. var #orderLevelHeroes 1
  51. var #orderLevelMaster 2
  52. var #orderLevelSkills 3
  53.  
  54. // ----------- Actions ----------- [ ClanQuest ]
  55. var #enableClanQuest 1
  56.  
  57. //fight the clan boss with max possible hits
  58. var #clanQuestRunsPerReadyUp 1
  59. //; 1 = (default) attack every ready up once for free
  60. //; 2-99 = spend dias for more attacks
  61.  
  62. // ----------- Actions ----------- [ Heroes ]
  63. var #enableHeroes 1
  64.  
  65. //clicks on level up per run
  66. var #skillIntensity 1
  67. //; 1 = (default)
  68. //; 2-99 = Multiple level ups
  69.  
  70. var #maxOutHero 2
  71. //; 3 = Damon (Mage)
  72. //; 2 = Nohni (Meel)
  73. //; 1 = Finn (Ranged)
  74.  
  75. // ----------- Actions ----------- [ Skills ]
  76. var #enableSkills 1
  77.  
  78. //prevent sword master leveling after all skills are unlocked ( > lvl 600)
  79. var #stopMasterAfterSkillsUnlocked 0
  80. var #cancelSkillsWhileUpgrading 0
  81.  
  82. var #hsLvl 20
  83. var #dsLvl 2
  84. var #homLvl 2
  85. var #fsLvl 2
  86. var #wcLvl 2
  87. var #scLvl 2
  88.  
  89. // After how many minutes script should start using skills
  90. var #startUsingHSAfter 0
  91. var #startUsingDSAfter 40
  92. var #startUsingHOMAfter 0
  93. var #startUsingFSAfter 40
  94. var #startUsingWCAfter 40
  95. var #startUsingSCAfter 40
  96.  
  97. //press given skills every X seconds
  98. var #intervalStrike 10
  99. var #intervalCrit 0
  100. var #intervalFireBlade 205
  101. var #intervalMidas 205
  102. var #intervalHeroes 0
  103. var #intervalShadowClone 0
  104.  
  105. //just level each skill once
  106. var #justUnlockSkills 0
  107. //; 0 = level skills much as possible
  108. //; 1 = (default) level skills much as possible
  109.  
  110. //run skill check after prestige or now
  111. var #startSkillCheckNow 1
  112.  
  113. // ----------- Actions ----------- [ Boss ]
  114. //cancel actions if boss fight running
  115. var #checkBossFight 1
  116.  
  117. //wait for given skill (2-6) then start boss
  118. var #startBossSkill 1
  119. //; 2 = critical strike
  120. //; 3 = midas
  121. //; 4 = fire blade
  122. //; 5 = heroes
  123. //; 6 = shadow clone
  124.  
  125. //optional skill which will be clicked on start (not checked)
  126. var #startBossSecondarySkill 1
  127. //; 2 = critical strike
  128. //; 3 = midas
  129. //; 4 = fire blade
  130. //; 5 = heroes
  131. //; 6 = shadow clone
  132.  
  133. // ----------- Actions ----------- [ Prestige ]
  134. var #enableAutoprestige 1
  135. var #lowerPrestigeTime 60
  136. var #higherPrestigeTime 75
  137.  
  138. // ----------- Developer / Expert
  139. var #maxHitCount 9999999
  140.  
  141.  
  142. //show current script time
  143. var #showCurrentTime 1
  144.  
  145. //if you wanna sync the script time with real time you can play around with this value
  146. var #timeScaleAddition 17
  147.  
  148.  
  149. // ----------- Dec
  150. var checkManaXCoord 0
  151. var #initialLoopForStart 0
  152. var #randomX 0
  153. var #randomY 0
  154. var #color1 0
  155. var #color2 0
  156. var #colorFairy1 0
  157. var #colorFairy2 0
  158. var #loopCount 0
  159. var #clanQuestLoopCount 0
  160. var #pressLevelUpLoopCount 0
  161. var #skillCheckStepper 0
  162. var #actionStepper 0
  163. var #levelHeroesStepper 0
  164. var #bossFightInProgress 0
  165. var #skillActive 0
  166. var #colorRed 0
  167. var #colorBlue 0
  168. var #colorGreen 0
  169. var #loopDetectionCount 0
  170. var #prestige 0
  171. var #skillsUnlocked 0
  172. var #tryWithDelay 0
  173. var #checkRunning 0
  174. var #clanQuestCount 0
  175. var #calc1 0
  176. var #recheckClanQuest 0
  177. var #hsLoop 0
  178. var #dsLoop 0
  179. var #homLoop 0
  180. var #fsLoop 0
  181. var #wcLoop 0
  182. var #scLoop 0
  183. var #hsMaxOutSkill 0
  184. var #dsMaxOutSkill 0
  185. var #homMaxOutSkill 0
  186. var #fsMaxOutSkill 0
  187. var #wcMaxOutSkill 0
  188. var #scMaxOutSkill 0
  189. var #prestigeAfterXMinutes 0
  190. rand #prestigeAfterXMinutes #lowerPrestigeTime #higherPrestigeTime
  191.  
  192. #hsLvl = #hsLvl - 1
  193. #dsLvl = #dsLvl - 1
  194. #homLvl = #homLvl - 1
  195. #fsLvl = #fsLvl - 1
  196. #wcLvl = #wcLvl - 1
  197. #scLvl = #scLvl - 1
  198.  
  199. // ----------- Delays
  200. var #btnDelay 150
  201. var #hitDelay 40
  202. var #menuSlideDelay 200
  203. var #menuPopUpDelay 500
  204. var #loadingClanQuestDelay 3000
  205.  
  206. // ----------- Menu Coords
  207. var #menuY 780
  208. var #menuStats 15
  209. var #menuHeroes 120
  210. var #menuCloseY 455
  211. var #menuCloseX 466
  212.  
  213. // ----------- Colors
  214. var #colorWhite -65793
  215. var #colorSkillActivated -20993
  216. var #colorInfoNumber 475629
  217. var #colorDia -7970303
  218. var #colorLevelUpAvailable 1338350
  219. var #colorBlack 397861
  220. var #colorStatsButton 3826675
  221. var #colorGray 2695200
  222. var #colorMana -69345
  223. var #colorMana2 -69602
  224. var #colorMana3 -67149
  225.  
  226. //var #colorItemBossActive 2432264 127 70
  227. var #colorFairyWatch -3103447
  228.  
  229. //var #colorSkillNotBought 6
  230. //var ##colorSkillNotBoughtSecond 7
  231. //var #colorSkillCanBeLeveled 20
  232. //var #colorSkillGray -7500402
  233.  
  234. // ----------- TimeSets
  235. var #timeLastActionRun 0
  236. var #timeLastMainHero 0
  237. var #timeDiff 0
  238. var #timeDiffHero 0
  239.  
  240. var #time 0
  241. var #seconds 0
  242. var #secondsTotal 0
  243. var #minutes 0
  244.  
  245. var #lastPressCrit 0
  246. var #lastPressFireBlade 0
  247. var #lastPressMidas 0
  248. var #lastPressShadowClone 0
  249. var #lastPressHeroes 0
  250. var #lastPressStrike 0
  251.  
  252. var #resultManaPool 0
  253. var #resultCheckBoss 0
  254. var #resultUpdateTime 0
  255. var #resultClanQuest 0
  256.  
  257.  
  258. // ----------- MAIN
  259. :start
  260. #loopCount = #loopCount + 1
  261.  
  262. #resultManaPool = #loopCount % 901
  263. #resultCheckBoss = #loopCount % 302
  264. #resultClanQuest = #loopCount % 101
  265. #resultUpdateTime = #loopCount % 80
  266.  
  267. #timeDiff = #minutes - #timeLastActionRun
  268. #timeDiffHero = #minutes - #timeLastMainHero
  269.  
  270. //add general execution delays
  271. #time = #time + #timeScaleAddition
  272.  
  273. if #resultClanQuest == 0 and #enableClanQuest == 1
  274. goto :checkClanQuest
  275. endif
  276.  
  277. if #showCurrentTime == 1 and #resultUpdateTime == 0
  278. toast #minutes:#seconds prestige is set after #prestigeAfterXMinutes
  279. endif
  280.  
  281. if #resultUpdateTime == 0
  282. #seconds = (#time/1000)%60
  283. #secondsTotal = #time/1000
  284. #minutes = (#time/1000)/60
  285. endif
  286.  
  287. if #resultUpdateTime == 0 and #enableClanShip == 1
  288. touchDown 0 65 100
  289. sleep 100
  290. touchUp 0
  291. sleep 300
  292. endif
  293.  
  294. if #resultUpdateTime == 0 and #enablePremiumCollect == 1
  295. touchDown 0 350 630
  296. sleep 100
  297. touchUp 0
  298. sleep 100
  299. endif
  300.  
  301. if #fullManaSkill > 0 and #resultUpdateTime == 0
  302. #checkManaXCoord = 2 * #percentManaToUseSkill
  303. getColor #color1 #checkManaXCoord 638
  304. if #color1 == #colorWhite or #color1 == #colorMana or #color1 == #colorMana2 or #color1 == #colorMana3
  305. toast Mana full starting something and dont waste regen time
  306. goto :startSkill
  307. endif
  308. endif
  309.  
  310. if #resultUpdateTime == 0 and #timeDiff < #runActionsEveryXMinutes
  311. goto :pressSkills
  312. endif
  313.  
  314.  
  315. if #loopCount == 1 and #enableClanQuest == 1
  316. goto :checkClanQuest
  317. elseif #loopCount == 2
  318. goto :init
  319. elseif #minutes >= #prestigeAfterXMinutes and #enableAutoprestige == 1
  320. goto :checkPrestige
  321. // level main hero
  322. elseif #timeDiffHero >= #levelMainHero
  323. goto :levelHeroes
  324. elseif #timeDiff >= #runActionsEveryXMinutes
  325. goto :runActions
  326. elseif #resultCheckBoss == 0
  327. goto :checkBoss
  328. elseif #resultManaPool == 0
  329. goto :checkMana
  330. elseif #loopCount == #maxHitCount
  331. #loopCount = 0
  332. goto :randomTouch
  333. else
  334. goto :randomTouch
  335. endif
  336. :end
  337.  
  338. :afterPrestige
  339. #prestige = #prestige+1
  340. #skillsUnlocked = 0
  341. #time = 0
  342. #seconds = 0
  343. #secondsTotal = 0
  344. #minutes = 0
  345. #hsLoop = 0
  346. #dsLoop = 0
  347. #homLoop = 0
  348. #fsLoop = 0
  349. #wcLoop = 0
  350. #scLoop = 0
  351. #hsMaxOutSkill = 0
  352. #dsMaxOutSkill = 0
  353. #homMaxOutSkill = 0
  354. #fsMaxOutSkill = 0
  355. #wcMaxOutSkill = 0
  356. #scMaxOutSkill = 0
  357. #initialLoopForStart = 0
  358. rand #prestigeAfterXMinutes #lowerPrestigeTime #higherPrestigeTime
  359. goto :init
  360.  
  361.  
  362. // ----------- INIT
  363. :init
  364.  
  365. CheckApp #checkRunning com.gamehivecorp.taptitans2
  366. if #checkRunning == 0
  367. RunApp com.gamehivecorp.taptitans2
  368. WaitApp com.gamehivecorp.taptitans2
  369. sleep 10000
  370. endif
  371.  
  372. if #enablePremiumCollect == 1
  373. touchDown 0 350 630
  374. sleep 100
  375. touchUp 0
  376. sleep 100
  377. endif
  378.  
  379. #lastPressCrit = 0
  380. #lastPressFireBlade = 0
  381. #lastPressMidas = 0
  382. #lastPressShadowClone = 0
  383. #lastPressHeroes = 0
  384. #lastPressStrike = 0
  385. #timeLastActionRun = 0
  386. #timeLastMainHero = 0
  387.  
  388. touchDown 0 #menuCloseX #menuCloseY
  389. sleep #btnDelay
  390. #time = #time + #btnDelay
  391. touchUp 0
  392. sleep #menuSlideDelay
  393. #time = #time + #menuSlideDelay
  394.  
  395. if #runActionsOnStart == 1
  396. goto :runActions
  397. endif
  398. goto :start
  399.  
  400. :loopDetected
  401. toast loop detected - restarting ...
  402. #loopCount = 0
  403. goto :init
  404.  
  405. // ----------- PRESS SKILLS
  406. :pressSkills
  407.  
  408. // check running state
  409. CheckApp #checkRunning com.gamehivecorp.taptitans2
  410. if #checkRunning == 0
  411. RunApp com.gamehivecorp.taptitans2
  412. sleep 10000
  413. goto :init
  414. endif
  415.  
  416. touchDown 0 #menuCloseX #menuCloseY
  417. sleep 50
  418. touchUp 0
  419. sleep #menuSlideDelay
  420. #time = #time + 200
  421. toast starting skills its #minutes min after restart
  422. #timeDiff = #secondsTotal - #lastPressShadowClone
  423. if #timeDiff >= #intervalShadowClone and #intervalShadowClone > 0 and #minutes >= #startUsingSCAfter
  424. #lastPressShadowClone = #secondsTotal
  425. touchPress 0 430 710
  426. #time = #time + 200
  427. endif
  428. #timeDiff = #secondsTotal - #lastPressCrit
  429. if #timeDiff >= #intervalCrit and #intervalCrit > 0 and #minutes >= #startUsingDSAfter
  430. #lastPressCrit = #secondsTotal
  431. touchPress 0 120 710
  432. #time = #time + 200
  433. endif
  434. #timeDiff = #secondsTotal - #lastPressFireBlade
  435. if #timeDiff >= #intervalFireBlade and #intervalFireBlade > 0 and #minutes >= #startUsingFSAfter
  436. #lastPressFireBlade = #secondsTotal
  437. touchPress 0 280 710
  438. #time = #time + 200
  439. endif
  440. #timeDiff = #secondsTotal - #lastPressMidas
  441. if #timeDiff >= #intervalMidas and #intervalMidas > 0 and #minutes >= #startUsingHOMAfter
  442. #lastPressMidas = #secondsTotal
  443. touchPress 0 200 710
  444. #time = #time + 200
  445. endif
  446. #timeDiff = #secondsTotal - #lastPressHeroes
  447. if #timeDiff >= #intervalHeroes and #intervalHeroes > 0 and #minutes >= #startUsingWCAfter
  448. #lastPressHeroes = #secondsTotal
  449. touchPress 0 360 710
  450. #time = #time + 200
  451. endif
  452. #timeDiff = #secondsTotal - #lastPressStrike
  453. if #timeDiff >= #intervalStrike and #intervalStrike > 0
  454. #lastPressStrike = #secondsTotal
  455. touchPress 0 40 710
  456. #time = #time + 200
  457. endif
  458. goto :start
  459.  
  460. // ----------- CHECK MANA
  461. :checkMana
  462. //checking Manabar
  463. #checkManaXCoord = 2 * #percentManaToUseSkill
  464. getColor #color1 #checkManaXCoord 638
  465. if #color1 == #colorWhite or #color1 == #colorMana
  466. toast Mana full starting something and dont waste regen time
  467. goto :startSkill
  468. endif
  469. goto :start
  470.  
  471. :startSkill
  472. if #fullManaSkill == 2
  473. touchPress 0 120 710
  474. elseif #fullManaSkill == 3
  475. touchPress 0 200 710
  476. elseif #fullManaSkill == 5
  477. touchPress 0 360 710
  478. elseif #fullManaSkill == 6
  479. touchPress 0 430 710
  480. elseif #fullManaSkill == 4
  481. touchPress 0 280 710
  482. elseif #fullManaSkill == 7
  483. touchPress 0 40 710
  484. endif
  485. #time = #time + 200
  486. goto :start
  487.  
  488. :levelHeroMain
  489. #timeLastMainHero = #minutes
  490.  
  491.  
  492.  
  493. :runActions
  494. #timeLastActionRun = #minutes
  495. #actionStepper = #actionStepper + 1
  496.  
  497. if #checkBossFight == 1
  498. getColor #color1 139 85
  499. endif
  500.  
  501. if #checkBossFight == 1 and #color1 == #colorWhite
  502. touchPress 0 #menuCloseX #menuCloseY
  503. toast skipping actions - bossfight in progress
  504. goto :pressSkills
  505. endif
  506.  
  507. if #actionStepper == #orderLevelMaster and #skillsUnlocked < 5 and #stopMasterAfterSkillsUnlocked == 1
  508. goto :levelUp
  509. elseif #actionStepper == #orderLevelMaster and #stopMasterAfterSkillsUnlocked == 0
  510. goto :levelUp
  511. elseif #actionStepper == #orderLevelSkills and #enableSkills == 1 and #skillsUnlocked < 5
  512. #skillsUnlocked = 0
  513. goto :checkSkills
  514. elseif #actionStepper == #orderLevelHeroes and #enableHeroes == 1
  515. goto :levelHeroes
  516. elseif #actionStepper == 5 and #enableClanQuest == 1
  517. #actionStepper = 0
  518. goto :checkClanQuest
  519. else
  520. #actionStepper = 0
  521. goto :checkBoss
  522. endif
  523. goto :runActions
  524.  
  525. // ----------- CHECK PRESTIGE
  526. :checkPrestige
  527. sleep 1000
  528. #time = #time + 1000
  529.  
  530. //open stats
  531. sleep #btnDelay
  532. #time = #time + #btnDelay
  533. touchDown 0 #menuStats #menuY
  534. sleep #btnDelay
  535. #time = #time + #btnDelay
  536. touchUp 0
  537. sleep #btnDelay
  538. #time = #time + #btnDelay
  539.  
  540. //wait for slide
  541. sleep #menuSlideDelay
  542. #time = #time + #menuSlideDelay
  543.  
  544. //slide down
  545. touchDown 1 280 740
  546. sleep 200
  547. touchMove 1 280 710
  548. sleep 50
  549. touchMove 1 280 500
  550. sleep 50
  551. touchMove 1 280 410
  552. sleep 50
  553. touchMove 1 280 400
  554. touchUp 1
  555.  
  556. sleep 300
  557. #time = #time + 650
  558.  
  559. touchDown 0 400 720
  560. touchUp 0
  561. sleep #menuPopUpDelay
  562. #time = #time + #menuPopUpDelay
  563.  
  564. touchDown 0 240 640
  565. sleep #btnDelay
  566. touchUp 0
  567. sleep #menuPopUpDelay
  568. getColor #color1 430 540
  569.  
  570. if #color1 == 6384247
  571. touchDown 0 330 535
  572. sleep #btnDelay
  573. touchUp 0
  574. sleep 19000
  575. goto :afterPrestige
  576. else
  577. touchPress 470 450
  578. touchPress 470 450
  579. touchPress 470 450
  580. touchPress 470 450
  581. goto :checkPrestige
  582. endif
  583. goto :start
  584.  
  585.  
  586. // ----------- CHECK CLAN QUEST
  587. :checkClanQuest
  588. getRGB #colorRed #colorGreen #colorBlue 72 21
  589. getColor #color1 65 795
  590.  
  591. if #colorRed < 190 and #colorRed > 120 and #color1 == #colorStatsButton
  592. #recheckClanQuest = 1
  593. goto :checkClanQuestReady
  594. endif
  595.  
  596. goto :start
  597.  
  598. :checkClanQuestReady
  599.  
  600. //open menu
  601. sleep #btnDelay
  602. touchDown 0 80 25
  603. sleep #btnDelay
  604. touchUp 0
  605. sleep #btnDelay
  606.  
  607. //touch clan icon bottom
  608. touchDown 0 100 730
  609. sleep #btnDelay
  610. touchUp 0
  611. sleep #loadingClanQuestDelay
  612.  
  613. getColor #color1 420 725
  614.  
  615. if #color1 == -1785765 and #clanQuestCount == 0
  616. #recheckClanQuest = 0
  617. goto :clanQuestClose
  618. endif
  619.  
  620. //boss progress color
  621. getColor #color1 175 335
  622.  
  623. #clanQuestLoopCount = 0
  624.  
  625. if #color1 == 2055160
  626. //boss up
  627. touchDown 0 310 740
  628. sleep #btnDelay
  629. touchUp 0
  630. sleep #menuPopUpDelay
  631. goto :clanQuestCheckDias
  632. elseif #color1 == 0
  633. //boss down
  634. #recheckClanQuest = 0
  635. endif
  636.  
  637. //close (and recheck)
  638. goto :clanQuestClose
  639.  
  640. :clanQuestCheckDias
  641. getColor #color1 40 215
  642.  
  643. if #color1 == -7775689
  644. //no dias left
  645. #recheckClanQuest = 0
  646. goto :clanQuestClose
  647. else
  648. touchDown 0 325 450
  649. sleep #btnDelay
  650. touchUp 0
  651.  
  652. sleep 3000
  653. getColor #color1 20 770
  654.  
  655. goto :clanQuestHit
  656. endif
  657.  
  658. :clanQuestHit
  659.  
  660. if #color1 == -28929 and #clanQuestLoopCount == 0
  661. //add quest
  662. #clanQuestCount = #clanQuestCount + 1
  663. endif
  664.  
  665. #clanQuestLoopCount = #clanQuestLoopCount + 1
  666.  
  667. if #color1 == -28929 and #clanQuestLoopCount < 1000
  668. //hit the boss
  669. touchDown 0 180 730
  670. touchUp 0
  671. sleep 28
  672. #time = #time + #btnDelay
  673. goto :clanQuestHit
  674. elseif #clanQuestLoopCount > 950
  675. goto :clanQuestClose
  676. endif
  677.  
  678. :clanQuestClose
  679. getColor #color1 65 795
  680. if #color1 == #colorStatsButton
  681. goto :clanQuestCloseCheck
  682. else
  683. touchDown 0 415 45
  684. touchUp 0
  685. sleep 200
  686. touchDown 0 420 210
  687. touchUp 0
  688. sleep 200
  689. #time = #time + #btnDelay
  690. goto :clanQuestClose
  691. endif
  692.  
  693. :clanQuestCloseCheck
  694. if #recheckClanQuest == 1 and #clanQuestCount < #clanQuestRunsPerReadyUp
  695. goto :checkClanQuestReady
  696. else
  697. #clanQuestCount = 0
  698. goto :start
  699. endif
  700.  
  701.  
  702.  
  703. // ----------- lvl hs
  704. :lvlHSToCheck
  705. sleep #btnDelay
  706. #time = #time + #btnDelay
  707. getRGB #colorRed #colorGreen #colorBlue 450 660
  708. if #colorBlue == 2 or #colorBlue == 5 or #colorBlue == 6 or #colorBlue == 7 or #colorBlue == 8 or #colorBlue == 9 or #colorBlue == 20
  709. goto :lvlUpHS
  710. elseif #colorBlue == 72 or #colorBlue == 73 or #colorBlue == 74
  711. toast Not enought gold to buy Heavenly strike
  712. goto :checkSkills
  713. elseif #colorBlue == -121 and #hsMaxOutSkill == 0 and #cancelSkillsWhileUpgrading == 1
  714. touchDown 0 466 660
  715. touchUp 0
  716. sleep #btnDelay
  717. #time = #time + #btnDelay
  718. goto :lvlHSToCheck
  719. endif
  720. if #colorBlue == 2 or #colorBlue == 5 or #colorBlue == 6 or #colorBlue == 7 or #colorBlue == 8 or #colorBlue == 9 or #colorBlue == 20 or #colorBlue == 72 or #colorBlue == 73 or #colorBlue == 74 or #colorBlue == -121
  721. goto :checkSkillsSlideDown
  722. else
  723. toast something went wrong when buying HS reseting
  724. #skillCheckStepper = 0
  725. sleep 5000
  726. #time = #time + 5000
  727. goto :checkIfSkillsOpen
  728. endif
  729. goto :checkSkills
  730.  
  731. :lvlUpHS
  732. if #hsLvl >= #hsLoop
  733. sleep #btnDelay
  734. #time = #time + #btnDelay
  735. // first skill
  736. sleep #btnDelay
  737. #time = #time + #btnDelay
  738. touchDown 0 466 670
  739. touchUp 0
  740. #hsLoop = #hsLoop + 1
  741. sleep #btnDelay
  742. #time = #time + #btnDelay
  743. goto :lvlHSToCheck
  744. else
  745. #hsMaxOutSkill = 1
  746. toast Heavenly strike is at desired lvl
  747. goto :checkSkills
  748. endif
  749. goto :checkSkills
  750.  
  751. // ----------- lvl DS
  752. :lvlDSToCheck
  753. sleep #btnDelay
  754. #time = #time + #btnDelay
  755. getRGB #colorRed #colorGreen #colorBlue 450 735
  756. if #colorBlue == 2 or #colorBlue == 5 or #colorBlue == 6 or #colorBlue == 7 or #colorBlue == 8 or #colorBlue == 9 or #colorBlue == 20
  757. goto :lvlUpDS
  758. elseif #colorBlue == 72 or #colorBlue == 73 or #colorBlue == 74
  759. toast Not enought gold to buy Death strike
  760. goto :checkSkillsSlideDown
  761. elseif #colorBlue == -121 and #dsMaxOutSkill == 0 and #cancelSkillsWhileUpgrading == 1
  762. touchDown 0 466 735
  763. touchUp 0
  764. sleep #btnDelay
  765. #time = #time + #btnDelay
  766. goto :lvlDSToCheck
  767. endif
  768. if #colorBlue == 2 or #colorBlue == 5 or #colorBlue == 6 or #colorBlue == 7 or #colorBlue == 8 or #colorBlue == 9 or #colorBlue == 20 or #colorBlue == 72 or #colorBlue == 73 or #colorBlue == 74 or #colorBlue == -121
  769. goto :checkSkillsSlideDown
  770. else
  771. toast something went wrong reseting skills buy
  772. #skillCheckStepper = 0
  773. sleep 5000
  774. #time = #time + 5000
  775. goto :checkIfSkillsOpen
  776. endif
  777. goto :checkSkills
  778.  
  779. :lvlUpDS
  780. if #dsLvl >= #dsLoop
  781. sleep #btnDelay
  782. #time = #time + #btnDelay
  783. touchDown 0 466 735
  784. touchUp 0
  785. #dsLoop = #dsLoop + 1
  786. sleep #btnDelay
  787. #time = #time + #btnDelay
  788. goto :lvlDSToCheck
  789. else
  790. #dsMaxOutSkill = 1
  791. toast Death strike is at desired lvl
  792. goto :checkSkillsSlideDown
  793. endif
  794. goto :checkSkills
  795.  
  796. // ----------- lvl HOM
  797. :lvlHOMToCheck
  798. sleep #btnDelay
  799. #time = #time + #btnDelay
  800. if #homLvl < #homLoop
  801. #homMaxOutSkill = 1
  802. toast Hand of midas is max out
  803. goto :checkSkillsSlideDown
  804. endif
  805. getRGB #colorRed #colorGreen #colorBlue 450 735
  806. if #colorBlue == 2 or #colorBlue == 5 or #colorBlue == 6 or #colorBlue == 7 or #colorBlue == 8 or #colorBlue == 9 or #colorBlue == 20
  807. goto :lvlUpHOM
  808. elseif #colorBlue == 72 or #colorBlue == 73 or #colorBlue == 74
  809. toast Not enought gold to buy HOM
  810. goto :checkSkillsSlideDown
  811. elseif #colorBlue == -121 and #homMaxOutSkill == 0 and #cancelSkillsWhileUpgrading == 1
  812. touchDown 0 466 735
  813. touchUp 0
  814. sleep #btnDelay
  815. #time = #time + #btnDelay
  816. goto :lvlHOMToCheck
  817. endif
  818. if #colorBlue == 2 or #colorBlue == 5 or #colorBlue == 6 or #colorBlue == 7 or #colorBlue == 8 or #colorBlue == 9 or #colorBlue == 20 or #colorBlue == 72 or #colorBlue == 73 or #colorBlue == 74 or #colorBlue == -121
  819. goto :checkSkillsSlideDown
  820. else
  821. toast something went wrong when buying HOM reseting
  822. #skillCheckStepper = 0
  823. sleep 5000
  824. #time = #time + 5000
  825. goto :checkIfSkillsOpen
  826. endif
  827. goto :checkSkillsSlideDown
  828.  
  829. :lvlUpHOM
  830. if #homLvl >= #homLoop
  831. sleep #btnDelay
  832. #time = #time + #btnDelay
  833. touchDown 0 466 735
  834. touchUp 0
  835. #homLoop = #homLoop + 1
  836. sleep #btnDelay
  837. #time = #time + #btnDelay
  838. goto :lvlHOMToCheck
  839. else
  840. #homMaxOutSkill = 1
  841. toast Hand of midas is at desired lvl
  842. goto :checkSkillsSlideDown
  843. endif
  844. goto :checkSkillsSlideDown
  845.  
  846. // ----------- lvl FS
  847. :lvlFSToCheck
  848. sleep #btnDelay
  849. #time = #time + #btnDelay
  850. if #fsLvl < #fsLoop
  851. #fsMaxOutSkill = 1
  852. toast Fire sword is max out
  853. goto :checkSkillsSlideDown
  854. endif
  855. getRGB #colorRed #colorGreen #colorBlue 450 735
  856. if #colorBlue == 2 or #colorBlue == 5 or #colorBlue == 6 or #colorBlue == 7 or #colorBlue == 8 or #colorBlue == 9 or #colorBlue == 20
  857. goto :lvlUpFS
  858. elseif #colorBlue == 72 or #colorBlue == 73 or #colorBlue == 74
  859. toast Not enought gold to buy Fire sword
  860. goto :checkSkillsSlideDown
  861. elseif #colorBlue == -121 and #fsMaxOutSkill == 0 and #cancelSkillsWhileUpgrading == 1
  862. touchDown 0 466 735
  863. touchUp 0
  864. sleep #btnDelay
  865. #time = #time + #btnDelay
  866. goto :lvlFSToCheck
  867. endif
  868. if #colorBlue == 2 or #colorBlue == 5 or #colorBlue == 6 or #colorBlue == 7 or #colorBlue == 8 or #colorBlue == 9 or #colorBlue == 20 or #colorBlue == 72 or #colorBlue == 73 or #colorBlue == 74 or #colorBlue == -121
  869. goto :checkSkillsSlideDown
  870. else
  871. toast something went wrong when buying FS reseting
  872. #skillCheckStepper = 0
  873. sleep 5000
  874. #time = #time + 5000
  875. goto :checkIfSkillsOpen
  876. endif
  877. goto :checkSkillsSlideDown
  878.  
  879. :lvlUpFS
  880. if #fsLvl >= #fsLoop
  881. sleep #btnDelay
  882. #time = #time + #btnDelay
  883. touchDown 0 466 735
  884. touchUp 0
  885. #fsLoop = #fsLoop + 1
  886. sleep #btnDelay
  887. #time = #time + #btnDelay
  888. goto :lvlFSToCheck
  889. else
  890. #fsMaxOutSkill = 1
  891. toast Fire sword is at desired lvl
  892. goto :checkSkillsSlideDown
  893. endif
  894. goto :checkSkillsSlideDown
  895.  
  896. // ----------- lvl WC
  897. :lvlWCToCheck
  898. sleep #btnDelay
  899. #time = #time + #btnDelay
  900. if #wcLvl < #wcLoop
  901. #wcMaxOutSkill = 1
  902. toast War cry is max out
  903. goto :checkSkillsSlideDown
  904. endif
  905. getRGB #colorRed #colorGreen #colorBlue 450 735
  906. if #colorBlue == 2 or #colorBlue == 5 or #colorBlue == 6 or #colorBlue == 7 or #colorBlue == 8 or #colorBlue == 9 or #colorBlue == 20
  907. goto :lvlUpWC
  908. elseif #colorBlue == 72 or #colorBlue == 73 or #colorBlue == 74
  909. toast Not enought gold to buy War cry
  910. goto :checkSkillsSlideDown
  911. elseif #colorBlue == -121 and #wcMaxOutSkill == 0 and #cancelSkillsWhileUpgrading == 1
  912. touchDown 0 466 735
  913. touchUp 0
  914. sleep #btnDelay
  915. #time = #time + #btnDelay
  916. goto :lvlWCToCheck
  917. endif
  918. if #colorBlue == 2 or #colorBlue == 5 or #colorBlue == 6 or #colorBlue == 7 or #colorBlue == 8 or #colorBlue == 9 or #colorBlue == 20 or #colorBlue == 72 or #colorBlue == 73 or #colorBlue == 74 or #colorBlue == -121
  919. goto :checkSkillsSlideDown
  920. else
  921. toast something went wrong when buying WC reseting
  922. #skillCheckStepper = 0
  923. sleep 5000
  924. #time = #time + 5000
  925. goto :checkIfSkillsOpen
  926. endif
  927. goto :checkSkillsSlideDown
  928.  
  929. :lvlUpWC
  930. if #wcLvl >= #wcLoop
  931. sleep #btnDelay
  932. #time = #time + #btnDelay
  933. touchDown 0 466 735
  934. touchUp 0
  935. #wcLoop = #wcLoop + 1
  936. sleep #btnDelay
  937. #time = #time + #btnDelay
  938. goto :lvlWCToCheck
  939. else
  940. #wcMaxOutSkill = 1
  941. toast War cry is at desired lvl
  942. goto :checkSkillsSlideDown
  943. endif
  944. goto :checkSkillsSlideDown
  945.  
  946. // ----------- lvl SC
  947. :lvlSCToCheck
  948. sleep #btnDelay
  949. #time = #time + #btnDelay
  950. if #scLvl < #scLoop
  951. #scMaxOutSkill = 1
  952. toast Shadow clone is max out
  953. goto :checkSkillsSlideDown
  954. endif
  955. getRGB #colorRed #colorGreen #colorBlue 450 735
  956. if #colorBlue == 2 or #colorBlue == 5 or #colorBlue == 6 or #colorBlue == 7 or #colorBlue == 8 or #colorBlue == 9 or #colorBlue == 20
  957. goto :lvlUpSC
  958. elseif #colorBlue == 72 or #colorBlue == 73 or #colorBlue == 74
  959. toast Not enought gold to buy Shadow Clone
  960. goto :checkSkillsSlideDown
  961. elseif #colorBlue == -121 and #scMaxOutSkill == 0 and #cancelSkillsWhileUpgrading == 1
  962. touchDown 0 466 735
  963. touchUp 0
  964. sleep #btnDelay
  965. #time = #time + #btnDelay
  966. goto :lvlSCToCheck
  967. endif
  968. if #colorBlue == 2 or #colorBlue == 5 or #colorBlue == 6 or #colorBlue == 7 or #colorBlue == 8 or #colorBlue == 9 or #colorBlue == 20 or #colorBlue == 72 or #colorBlue == 73 or #colorBlue == 74 or #colorBlue == -121
  969. goto :checkSkillsSlideDown
  970. else
  971. toast something went wrong when buying SC reseting
  972. #skillCheckStepper = 0
  973. sleep 5000
  974. #time = #time + 5000
  975. goto :checkIfSkillsOpen
  976. endif
  977. goto :checkSkillsSlideDown
  978.  
  979. :lvlUpSC
  980. if #scLvl >= #scLoop
  981. sleep #btnDelay
  982. #time = #time + #btnDelay
  983. touchDown 0 466 735
  984. touchUp 0
  985. #scLoop = #scLoop + 1
  986. sleep #btnDelay
  987. #time = #time + #btnDelay
  988. goto :lvlSCToCheck
  989. else
  990. #scMaxOutSkill = 1
  991. toast Shadow clone is at desired lvl
  992. goto :checkSkillsSlideDown
  993. endif
  994. goto :checkSkillsSlideDown
  995.  
  996.  
  997. :checkSkills
  998.  
  999. if #prestige == 0 and #startSkillCheckNow == 0
  1000. goto :checkSkillsFinish
  1001. endif
  1002.  
  1003. if #hsMaxOutSkill == 1 and #dsMaxOutSkill == 1 and #homMaxOutSkill == 1 and #fsMaxOutSkill == 1 and #wcMaxOutSkill == 1 and #scMaxOutSkill == 1 and #justUnlockSkills == 1
  1004. toast skills unlocked, stop now until next prestige
  1005. goto :checkSkillsFinish
  1006. endif
  1007.  
  1008. #skillCheckStepper = #skillCheckStepper + 1
  1009.  
  1010. if #skillCheckStepper == 1
  1011. touchDown 1 280 650
  1012. sleep 200
  1013. touchMove 1 280 600
  1014. sleep 50
  1015. touchMove 1 280 700
  1016. sleep 50
  1017. touchMove 1 280 750
  1018. sleep 50
  1019. touchMove 1 280 780
  1020. touchUp 1
  1021. #time = #time + 2350
  1022. sleep 500
  1023. touchDown 1 280 650
  1024. sleep 200
  1025. touchMove 1 280 600
  1026. sleep 50
  1027. touchMove 1 280 700
  1028. sleep 50
  1029. touchMove 1 280 750
  1030. sleep 50
  1031. touchMove 1 280 780
  1032. touchUp 1
  1033. sleep 1000
  1034. #time = #time + 2200
  1035. goto :checkSkills
  1036. elseif #skillCheckStepper == 2
  1037. sleep 1000
  1038. #time = #time + 1000
  1039. goto :lvlHSToCheck
  1040. elseif #skillCheckStepper == 3
  1041. sleep 1000
  1042. #time = #time + 1000
  1043. goto :lvlDSToCheck
  1044. elseif #skillCheckStepper == 4
  1045. sleep 1000
  1046. #time = #time + 1000
  1047. goto :lvlHOMToCheck
  1048. elseif #skillCheckStepper == 5
  1049. sleep 1000
  1050. #time = #time + 1000
  1051. goto :lvlFSToCheck
  1052. elseif #skillCheckStepper == 6
  1053. sleep 1000
  1054. #time = #time + 1000
  1055. goto :lvlWCToCheck
  1056. elseif #skillCheckStepper == 7
  1057. sleep 1000
  1058. #time = #time + 1000
  1059. goto :lvlSCToCheck
  1060. elseif #skillCheckStepper <= 7
  1061. goto :checkSkillsUnlock
  1062. endif
  1063.  
  1064. //slide back
  1065. touchDown 1 280 650
  1066. sleep 200
  1067. touchMove 1 280 600
  1068. sleep 50
  1069. touchMove 1 280 700
  1070. sleep 50
  1071. touchMove 1 280 750
  1072. sleep 50
  1073. touchMove 1 280 780
  1074. touchUp 1
  1075. #time = #time + 2350
  1076. sleep 1000
  1077. touchDown 1 280 650
  1078. sleep 200
  1079. touchMove 1 280 600
  1080. sleep 50
  1081. touchMove 1 280 700
  1082. sleep 50
  1083. touchMove 1 280 750
  1084. sleep 50
  1085. touchMove 1 280 780
  1086. touchUp 1
  1087. #time = #time + 1700
  1088. goto :checkSkillsFinish
  1089.  
  1090. :checkSkillsUnlock
  1091.  
  1092. sleep 200
  1093. #time = #time + 250
  1094.  
  1095. getRGB #colorRed #colorGreen #colorBlue 450 735
  1096.  
  1097. if #colorBlue == 2 or #colorBlue == 5
  1098. #skillsUnlocked = #skillsUnlocked + 1
  1099. endif
  1100.  
  1101. if #colorBlue == 2
  1102. sleep 100
  1103. touchDown 0 466 730
  1104. sleep 250
  1105. touchUp 0
  1106. sleep 200
  1107. #time = #time + 450
  1108. endif
  1109.  
  1110. if #justUnlockSkills == 0
  1111. touchPress 0 466 730
  1112. sleep 50
  1113. touchPress 0 466 730
  1114. sleep 50
  1115. touchPress 0 466 730
  1116. sleep 50
  1117. #time = #time + 750
  1118. endif
  1119.  
  1120. if #skillCheckStepper == 7
  1121. goto :checkSkills
  1122. endif
  1123. goto :checkSkillsSlideDown
  1124.  
  1125. :checkSkillsFinish
  1126. #skillCheckStepper = 0
  1127. if #enableHeroes == 1
  1128. goto :runActions
  1129. endif
  1130. goto :closeMenu
  1131.  
  1132.  
  1133. :checkSkillsSlideDown
  1134. getRGB #colorRed #colorGreen #colorBlue 450 735
  1135. if #colorBlue == 2 or #colorBlue == 5 or #colorBlue == 6 or #colorBlue == 7 or #colorBlue == 8 or #colorBlue == 9 or #colorBlue == 20 or #colorBlue == 72 or #colorBlue == 73 or #colorBlue == 74 or #colorBlue == -121
  1136. //slide
  1137. touchDown 1 280 750
  1138. sleep 200
  1139. touchMove 1 280 725
  1140. sleep 50
  1141. touchMove 1 280 660
  1142. sleep 50
  1143. touchMove 1 280 655
  1144. sleep 50
  1145. touchMove 1 280 649
  1146. sleep 200
  1147. touchUp 1
  1148. #time = #time + 550
  1149. else
  1150. toast something went wrong reseting skills buy
  1151. #skillCheckStepper = 0
  1152. sleep 5000
  1153. #time = #time + 5000
  1154. goto :checkIfSkillsOpen
  1155. endif
  1156. goto :checkSkills
  1157.  
  1158. :checkIfSkillsOpen
  1159. getColor #color1 30 764
  1160. if #color1 == #colorWhite
  1161. goto :checkSkills
  1162. else
  1163. touchDown 0 35 782
  1164. sleep 2000
  1165. #time = #time + 2000
  1166. goto :checkSkills
  1167. endif
  1168. goto :checkSkills
  1169.  
  1170. :closeMenu
  1171. sleep #btnDelay
  1172. #time = #time + #btnDelay
  1173. touchDown 0 #menuCloseX #menuCloseY
  1174. sleep #btnDelay
  1175. #time = #time + #btnDelay
  1176. touchUp 0
  1177. sleep #menuSlideDelay
  1178. #time = #time + #menuSlideDelay
  1179. goto :runActions
  1180. :closeMenuHeroMax
  1181. sleep #btnDelay
  1182. #time = #time + #btnDelay
  1183. touchDown 0 #menuCloseX #menuCloseY
  1184. sleep #btnDelay
  1185. #time = #time + #btnDelay
  1186. touchUp 0
  1187. sleep #menuSlideDelay
  1188. #time = #time + #menuSlideDelay
  1189. goto :start
  1190.  
  1191. // ----------- LEVEL HEROES
  1192. :levelHeroes
  1193. //check fairy window
  1194.  
  1195. getColor #colorFairy1 300 635
  1196. getColor #colorFairy2 275 635
  1197. if #colorFairy1 == #colorWhite and #colorFairy2 == #colorFairyWatch and #enablePremiumCollect == 1
  1198. toast zacieta wrozka
  1199. touchDown 0 425 35
  1200. sleep 100
  1201. touchUp 0
  1202. sleep 100
  1203. endif
  1204. //collect gold
  1205. touchDown 0 425 35
  1206. sleep 200
  1207. touchUp 0
  1208.  
  1209. //open menu
  1210. sleep #btnDelay
  1211. #time = #time + #btnDelay
  1212. touchDown 0 #menuHeroes #menuY
  1213. sleep #btnDelay
  1214. #time = #time + #btnDelay
  1215. touchUp 0
  1216. sleep 1000
  1217. #time = #time + 1000
  1218.  
  1219. if #tryWithDelay == 1
  1220. sleep 3000
  1221. endif
  1222.  
  1223. getColor #color1 95 765
  1224. if #color1 == #colorWhite
  1225. #tryWithDelay = 0
  1226.  
  1227. #loopDetectionCount = 0
  1228. #time = #time + 2000
  1229. 500
  1230. //force 1 down scroll
  1231. touchDown 1 280 500
  1232. touchMove 1 280 520
  1233. sleep 100
  1234. touchMove 1 280 540
  1235. touchMove 1 280 560
  1236. sleep 50
  1237. touchMove 1 280 620
  1238. touchMove 1 280 640
  1239. sleep 50
  1240. touchMove 1 280 660
  1241. touchMove 1 280 680
  1242. sleep 20
  1243. touchMove 1 280 700
  1244. touchMove 1 280 720
  1245. sleep 50
  1246. touchMove 1 280 745
  1247. touchUp 1
  1248. sleep 200
  1249.  
  1250. #time = #time + 470
  1251.  
  1252. goto :levelHeroesScrollDown
  1253. endif
  1254.  
  1255. #tryWithDelay = 1
  1256.  
  1257. goto :levelHeroes
  1258.  
  1259.  
  1260. :levelHeroesScrollDown
  1261. #loopDetectionCount = #loopDetectionCount + 1
  1262. if #loopDetectionCount == 50
  1263. goto :loopDetected
  1264. endif
  1265.  
  1266. getColor #color1 475 510
  1267. if #color1 == #colorGray
  1268. #loopDetectionCount = 0
  1269. goto :levelHeroesMaxOutMain
  1270. endif
  1271. //check fairy window
  1272. getColor #colorFairy1 300 635
  1273. getColor #colorFairy2 275 635
  1274. if #colorFairy1 == #colorWhite and #colorFairy2 == #colorFairyWatch and #enablePremiumCollect == 1
  1275. toast zacieta wrozka
  1276. touchDown 0 425 35
  1277. sleep 100
  1278. touchUp 0
  1279. sleep 100
  1280. endif
  1281.  
  1282. sleep 200
  1283. touchDown 1 280 500
  1284. sleep 50
  1285. touchMove 1 280 520
  1286. sleep 50
  1287. touchMove 1 280 540
  1288. sleep 20
  1289. touchMove 1 280 560
  1290. touchMove 1 280 620
  1291. sleep 50
  1292. touchMove 1 280 640
  1293. touchMove 1 280 660
  1294. sleep 50
  1295. touchMove 1 280 680
  1296. touchMove 1 280 700
  1297. sleep 100
  1298. touchMove 1 280 720
  1299. touchMove 1 280 730
  1300. touchMove 1 280 740
  1301. sleep 200
  1302. touchUp 1
  1303.  
  1304.  
  1305. #time = #time + 720
  1306.  
  1307. goto :levelHeroesScrollDown
  1308.  
  1309. :levelHeroesMaxOutMain
  1310. #timeLastMainHero = #minutes
  1311. if #maxOutHero == 1
  1312. touchDown 1 466 570
  1313. sleep 40
  1314. touchUp 1
  1315. sleep 300
  1316. touchDown 1 466 570
  1317. sleep 40
  1318. touchUp 1
  1319. elseif #maxOutHero == 2
  1320. touchDown 1 466 645
  1321. sleep 40
  1322. touchUp 1
  1323. sleep 300
  1324. touchDown 1 466 645
  1325. sleep 40
  1326. touchUp 1
  1327. elseif #maxOutHero == 3
  1328. touchDown 1 466 720
  1329. sleep 40
  1330. touchUp 1
  1331. sleep 300
  1332. touchDown 1 466 720
  1333. sleep 40
  1334. touchUp 1
  1335. endif
  1336. #timeDiff = #minutes - #timeLastActionRun
  1337. if #initialLoopForStart == 0
  1338. #initialLoopForStart = 1
  1339. goto :levelHeroesPressLevelUp
  1340. elseif #timeDiff < #runActionsEveryXMinutes
  1341. toast jezeli #timeDiff jest mniejszy od #runActionsEveryXMinutes
  1342. goto :closeMenuHeroMax
  1343. sleep 3000
  1344. toast zamykanie hero menu
  1345. sleep 3000
  1346. endif
  1347. goto :levelHeroesPressLevelUp
  1348.  
  1349.  
  1350. :levelHeroesSlideUpCollection
  1351.  
  1352. #loopDetectionCount = #loopDetectionCount + 1
  1353. if #loopDetectionCount == 50
  1354. goto :loopDetected
  1355. endif
  1356.  
  1357. getColor #color1 440 760
  1358. if #color1 == #colorGray
  1359. goto :closeMenu
  1360. endif
  1361.  
  1362. touchDown 1 280 742
  1363. sleep 20
  1364. touchMove 1 280 740
  1365. touchMove 1 280 738
  1366. sleep 20
  1367. touchMove 1 280 736
  1368. touchMove 1 280 700
  1369. sleep 20
  1370. touchMove 1 280 690
  1371. touchMove 1 280 670
  1372. sleep 20
  1373. touchMove 1 280 630
  1374. touchMove 1 280 600
  1375. sleep 20
  1376. touchMove 1 280 580
  1377. touchMove 1 280 540
  1378. sleep 20
  1379. touchMove 1 280 520
  1380. touchMove 1 280 516
  1381. sleep 20
  1382. touchMove 1 280 514
  1383. touchMove 1 280 512
  1384. touchMove 1 280 510
  1385. sleep 200
  1386. touchUp 1
  1387. touchPress 1 280 750
  1388.  
  1389. #time = #time + 540
  1390.  
  1391. goto :levelHeroesPressLevelUp
  1392.  
  1393. :levelHeroesPressLevelUp
  1394. #pressLevelUpLoopCount = #pressLevelUpLoopCount + 1
  1395.  
  1396. touchDown 1 466 720
  1397. sleep 40
  1398. touchUp 1
  1399. touchDown 1 466 700
  1400. sleep 40
  1401. touchUp 1
  1402. touchDown 1 466 680
  1403. sleep 40
  1404. touchUp 1
  1405. touchDown 1 466 660
  1406. sleep 40
  1407. touchUp 1
  1408. touchDown 1 466 640
  1409. sleep 40
  1410. touchUp 1
  1411. touchDown 1 466 620
  1412. sleep 40
  1413. touchUp 1
  1414. touchDown 1 466 600
  1415. sleep 40
  1416. touchUp 1
  1417. touchDown 1 466 580
  1418. sleep 40
  1419. touchUp 1
  1420. touchDown 1 466 560
  1421. sleep 40
  1422. touchUp 1
  1423. touchDown 1 466 540
  1424. sleep 40
  1425. touchUp 1
  1426.  
  1427. #time = #time + 440
  1428.  
  1429. if #pressLevelUpLoopCount < #skillIntensity
  1430. goto :levelHeroesPressLevelUp
  1431. endif
  1432. #pressLevelUpLoopCount = 0
  1433. goto :levelHeroesSlideUpCollection
  1434.  
  1435. // ----------- LEVEL UP
  1436. :levelUp
  1437. //open stats
  1438. sleep #btnDelay
  1439. #time = #time + #btnDelay
  1440. touchDown 0 #menuStats #menuY
  1441. sleep #btnDelay
  1442. #time = #time + #btnDelay
  1443. touchUp 0
  1444.  
  1445. //wait for slide
  1446. sleep #menuSlideDelay
  1447. #time = #time + #menuSlideDelay
  1448.  
  1449. //slide top
  1450. touchDown 0 280 650
  1451. sleep 200
  1452. touchMove 0 280 600
  1453. sleep 50
  1454. touchMove 0 280 700
  1455. sleep 50
  1456. touchMove 0 280 750
  1457. sleep 50
  1458. touchMove 0 280 780
  1459. touchUp 0
  1460. sleep 750
  1461. #time = #time + 1100
  1462. touchDown 0 280 650
  1463. sleep 200
  1464. touchMove 0 280 600
  1465. sleep 50
  1466. touchMove 0 280 700
  1467. sleep 50
  1468. touchMove 0 280 750
  1469. sleep 50
  1470. touchMove 0 280 780
  1471. touchUp 0
  1472. sleep 750
  1473. #time = #time + 1100
  1474.  
  1475. goto :levelUpLoop
  1476.  
  1477.  
  1478. :levelUpLoop
  1479. //lvl up
  1480. sleep #btnDelay
  1481. #time = #time + #btnDelay
  1482. touchDown 0 466 580
  1483. touchUp 0
  1484. getColor #color1 460 600
  1485. if #color1 == #colorLevelUpAvailable
  1486. goto :levelUpLoop
  1487. elseif #enableSkills == 1 or #enableHeroes == 1
  1488. goto :runActions
  1489. endif
  1490. goto :closeMenu
  1491.  
  1492. :closeMenu
  1493. //close stats
  1494. sleep #btnDelay
  1495. #time = #time + #btnDelay
  1496. touchPress 0 #menuCloseX #menuCloseY
  1497. touchPress 0 #menuCloseX #menuCloseY
  1498. touchPress 0 #menuCloseX #menuCloseY
  1499. sleep #menuSlideDelay
  1500. #time = #time + #menuSlideDelay
  1501. goto :runActions
  1502.  
  1503. // ----------- CHECK BOSS
  1504. :checkBoss
  1505.  
  1506. getColor #color1 139 85
  1507.  
  1508. if #color1 == #colorWhite
  1509. goto :pressSkills
  1510. endif
  1511.  
  1512. #color1 = 0
  1513. #color2 = 0
  1514.  
  1515. getColor #color2 459 29
  1516.  
  1517. if #startBossSkill == 2
  1518. getColor #color1 108 685
  1519. elseif #startBossSkill == 4
  1520. getColor #color1 268 685
  1521. elseif #startBossSkill == 3
  1522. getColor #color1 189 685
  1523. elseif #startBossSkill == 5
  1524. getColor #color1 348 685
  1525. elseif #startBossSkill == 6
  1526. getColor #color1 428 685
  1527. elseif #startBossSkill == 1
  1528. getColor #color1 38 685
  1529. endif
  1530.  
  1531. if #color1 == #colorWhite and #color2 == #colorBlack
  1532. goto :startBossWithSkills
  1533. elseif #color2 == #colorBlack and #startBossSkill == 0
  1534. touchDown 0 420 40
  1535. sleep #btnDelay
  1536. #time = #time + #btnDelay
  1537. touchUp 0
  1538. sleep #btnDelay
  1539. #time = #time + #btnDelay
  1540. elseif #hatchEggs == 1
  1541. touchPress 0 30 285
  1542. sleep #btnDelay
  1543. #time = #time + #btnDelay
  1544. endif
  1545.  
  1546. goto :pressSkills
  1547.  
  1548. :startBossWithSkills
  1549.  
  1550. if #startBossSkill == 1 or #startBossSecondarySkill == 1
  1551. touchPress 0 35 710
  1552. endif
  1553.  
  1554. if #startBossSkill == 2 or #startBossSecondarySkill == 2
  1555. touchPress 0 120 710
  1556. endif
  1557. if #startBossSkill == 4 or #startBossSecondarySkill == 4
  1558. touchPress 0 280 710
  1559. endif
  1560. if #startBossSkill == 3 or #startBossSecondarySkill == 3
  1561. touchPress 0 200 710
  1562. endif
  1563. if #startBossSkill == 5 or #startBossSecondarySkill == 5
  1564. touchPress 0 360 710
  1565. endif
  1566. if #startBossSkill == 6 or #startBossSecondarySkill == 6
  1567. touchPress 0 430 710
  1568. endif
  1569.  
  1570. #time = #time + 400
  1571.  
  1572. //start boss
  1573. touchDown 0 420 40
  1574. sleep #btnDelay
  1575. #time = #time + #btnDelay
  1576. touchUp 0
  1577. sleep #btnDelay
  1578. #time = #time + #btnDelay
  1579. goto :pressSkills
  1580.  
  1581. // ----------- RANDOM ATTACK
  1582. :randomTouch
  1583. if #enableFairies == 1
  1584. rand #randomX 30 415
  1585. rand #randomY 630 420
  1586. else
  1587. rand #randomX 30 415
  1588. rand #randomY 635 420
  1589. endif
  1590.  
  1591. //equipment stacking
  1592. if #randomX > 280 and #randomX < 430 and #randomY > 300
  1593. goto :randomTouch
  1594. endif
  1595.  
  1596. if #enableTapping == 1
  1597. touchDown 0 60 635
  1598. touchUp 0
  1599. endif
  1600. sleep #hitDelay
  1601. #time = #time + #hitDelay
  1602. goto :start
  1603.  
  1604. // -----TODO LIST-----
  1605. // random time to use skill
  1606. // random time to run acctions
  1607.  
  1608. // -----BUGS-----
  1609. // Skill dont lvl up if its in use (dont really know how to fix it)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement