Advertisement
Guest User

Untitled

a guest
Apr 21st, 2019
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 44.54 KB | None | 0 0
  1. // Dec 23, 2018
  2. // - Tap Titans 2 AdvancedClickBot by Tune389 [ v1.3 dev 1]
  3. // edited by djo5296 '17-12-30
  4. // now fully handled by chrisreyn
  5. // thanks to tommy8208 for testing
  6. // code and suggestions from atereshkov, GitGud2018
  7. SCREEN_SIZE: 480x800
  8.  
  9. // ---------- Click Areas
  10. var #enableFairies 0
  11. var #enablePremiumCollect 0
  12. var #agree 0
  13. var #decline 1
  14.  
  15. var #enableTapping 1
  16. // 1 = (default) hit the titans with your sword master
  17. // 0 = disable hits (except on CQ)
  18.  
  19. var #enableCO 1
  20. var #PHoM 1
  21. var #astralAwakening 1
  22. // #astralAwakening is also affected by #equipStack below
  23.  
  24. var #equipStack 0
  25. // if set to 1, will skip some heroes when tapping for Astral Awakening
  26. // ---------- Actions ---------- [ Prestige ]
  27. var #enableAutoprestige 1
  28.  
  29. var #lateRun 0
  30. // if 0, no change to run
  31. // if #lateRun > 0, will resume run at #minutes = #lateRun
  32. // 2nd run onwards (aka after prestige) will NOT adjust time
  33.  
  34. var #prestigeStartTime 29
  35. // input minimum time in minutes before prestige
  36. // prestige time range is ALWAYS +10 more minutes greater than StartTime to prevent teapot
  37. // ---------- Actions ---------- [ General ]
  38. var #runActionsEveryXSeconds 94
  39. // recommended equal to total SC+ED+DShift duration minus ~6 or 7 seconds
  40. // ^esp if you cant level SC in the first run
  41. // ^so that when runActions runs, SC is done and script can level up SC
  42. // also note that displayed run time is not very accurate with real time
  43. // IMPORTANT go to line 248 and edit the settings there
  44.  
  45. var #runActionsOnStart 1
  46. // 1 = (default) run actions on script start
  47. // 0 = run actions after given run time above
  48. // ---------- Actions ---------- [ ClanQuest ]
  49. var #enableClanQuest 1
  50.  
  51. //clan boss with max possible hits
  52. var #clanQuestRunsPerReadyUp 1
  53. // 1 = (default) attack every ready up once for free
  54. // 2-99 = spend dias for more attacks
  55. // ---------- Actions ---------- [ Heroes ]
  56. var #enableHeroes 1
  57. var #heroIntensity 2
  58. var #topHeroes 0
  59. //level top hero every X seconds, leave at 0 to disable
  60. // ---------- Actions ---------- [ Skills ]
  61. var #enableSkills 1
  62. var #skipHS 0
  63.  
  64. var #fullManaSkill 5
  65. // 1 = HS
  66. // 2 = DS
  67. // 3 = HoM
  68. // 4 = FS
  69. // 5 = WC
  70. // 6 = SC
  71.  
  72. //press given skills every X seconds
  73. var #intervalHS 10
  74. var #intervalDS 60
  75. var #intervalFS 60
  76. var #intervalHoM 60
  77. var #intervalWC 60
  78. var #intervalSC 60
  79.  
  80. var #scActiveCheck 0
  81. //used mainly for SC+Mana Siphon procs
  82. //0 = Activate skills every X seconds normally
  83. //1 = Activate skills every X seconds only if SC is active and has 1/4 duration left
  84. // 1/4th duration of SC is usually enough to generate mana from a decent level of Mana Siphon
  85.  
  86. var #unlocked 0
  87. // ^dont edit unless you know what it's for
  88. //these will be the skill intervals when #lateRun > 0
  89. //time dependent variable changes in :start will still apply, be sure to check :start section
  90. if #lateRun > 0
  91. #intervalHS = 0
  92. #intervalDS = 11
  93. #intervalFS = 31
  94. #intervalHoM = 11
  95. #intervalWC = 11
  96. #intervalSC = 11
  97. if #lateRun > #maxSkillsAtXMinutes
  98. #unlocked = 8
  99. else
  100. #unlocked = 4
  101. endif
  102. endif
  103.  
  104. //just level each skill once
  105. var #justUnlockSkills 0
  106. // 1 = (default) just unlock
  107. // 0 = level skills much as possible
  108. // will always max HS and SC whether 1 or 0
  109. // see Tune389 Issue 80 if using #justUnlockSkills 1
  110.  
  111. //only applicable when #justUnlockSkills == 1
  112. // use 0 if you don't like
  113. var #maxSkillsAtXMinutes 34
  114.  
  115. var #stopLevelSkillMins 3
  116.  
  117. //run skill check after prestige (0) or now (1)
  118. var #startSkillCheckNow 1
  119. // ---------- Actions ---------- [ Boss ]
  120. //wait for given skill (2-6) then start boss
  121. var #startBossSkill 6
  122.  
  123. //optional skill which will be clicked on start (not checked)
  124. var #startBossSecondarySkill 2
  125. // ---------- Developer / Expert
  126. var #maxHitCount 9999999
  127.  
  128. //show current script runtime
  129. var #showCurrentTime 0
  130.  
  131. //if you wanna sync the script time with real time you can play around with this value
  132. var #timeScaleAddition 20
  133. // ---------- Dec
  134. var #randomX 0
  135. var #randomY 0
  136. var #color1 0
  137. var #color2 0
  138. var #loopCount 0
  139. var #clanQuestLoopCount 0
  140. var #pressLevelUpLoopCount 0
  141. var #skillCheckStepper 0
  142. var #actionStepper 0
  143. var #levelHeroesStepper 0
  144. var #skillActive 0
  145. var #colorRed 0
  146. var #colorBlue 0
  147. var #colorGreen 0
  148. var #loopDetectionCount 0
  149. var #skillsUnlocked 0
  150. var #tryWithDelay 0
  151. var #checkRunning 0
  152. var #clanQuestCount 0
  153. var #recheckClanQuest 0
  154. var #count 0
  155. var #hitCount 0
  156. var #skillAvailable 0
  157. var #loopBreak 0
  158. set #rAEXS #runActionsEveryXSeconds
  159. set #iHS #intervalHS
  160. set #iDS #intervalDS
  161. set #iFS #intervalFS
  162. set #iHoM #intervalHoM
  163. set #iWC #intervalWC
  164. set #iSC #intervalSC
  165. calc #minz #lateRun * 60000
  166. var #prestigeAfterXMinutes 60
  167. if #prestigeStartTime > 0
  168. calc #prestigeEndTime #prestigeStartTime + 10
  169. rand #prestigeAfterXMinutes #prestigeStartTime #prestigeEndTime
  170. else
  171. set #prestigeStartTime 29
  172. calc #prestigeEndTime #prestigeStartTime + 10
  173. endif
  174. var #maxedOutSkills 0
  175. if #lateRun > 0
  176. #maxedOutSkills = 2
  177. #startSkillCheckNow = 0
  178. endif
  179. var #prestigeSlide 0
  180. var #manualMax 0
  181. var #hero 0
  182. var #scAC 0
  183. // ---------- Delays
  184. var #btnDelay 150
  185. var #hitDelay 40
  186. var #hitDelay2 20
  187. var #menuSlideDelay 200
  188. var #menuPopUpDelay 500
  189. var #loadingClanQuestDelay 3000
  190. var #shipDelay 200
  191. var #skillDelay 50
  192. // ---------- Menu Coords
  193. var #menuY 780
  194. var #menuStats 15
  195. var #menuHeroes 120
  196. var #menuCloseY 455
  197. var #menuCloseX 466
  198. // ---------- Colors
  199. var #colorWhite -65793
  200. var #colorSkillActivated -20993
  201. var #colorInfoNumber 475629
  202. var #colorDia -7970303
  203. var #colorLevelUpAvailable 1338350
  204. var #skillGray 7829367
  205. var #skillBlue -3693762
  206. var #colorBlack 397861
  207. var #colorStatsButton 3695603
  208. var #colorGray 2695200
  209. // ---------- TimeSets
  210. var #timeLastActionRun 0
  211. var #timeDiff 0
  212. var #time 0
  213. var #seconds 0
  214. var #secondsTotal 0
  215. var #minutes 0
  216. var #lastPressHS 0
  217. var #lastPressDS 0
  218. var #lastPressFS 0
  219. var #lastPressHoM 0
  220. var #lastPressSC 0
  221. var #lastPressWC 0
  222. var #lastTopHeroes 0
  223. var #resultManaPool 0
  224. var #resultCheckBoss 0
  225. var #resultUpdateTime 0
  226. var #resultClanQuest 0
  227. // ---------- MAIN
  228. :start
  229. #loopCount = #loopCount + 1
  230. #resultManaPool = #loopCount % 901
  231. #resultCheckBoss = #loopCount % 302
  232. #resultClanQuest = #loopCount % 101
  233. #resultUpdateTime = #loopCount % 75
  234. #timeDiff = #secondsTotal - #timeLastActionRun
  235.  
  236. //add general execution delays
  237. #time = #time + #timeScaleAddition
  238.  
  239. if #resultClanQuest == 0 and #enableClanQuest == 1
  240. goto :checkClanQuest
  241. endif
  242.  
  243. if #resultUpdateTime == 0
  244. #seconds = (#time/1000)%60
  245. #secondsTotal = #time/1000
  246. #minutes = (#time/1000)/60
  247.  
  248. if #enableSkills == 1
  249. //time dynamic skill interval clicks
  250. if #minutes > 10
  251. #runActionsEveryXSeconds = 50
  252. endif
  253. endif
  254. endif
  255.  
  256. if #showCurrentTime == 1 and #resultUpdateTime == 0
  257. toast #minutes:#seconds
  258. endif
  259.  
  260. if #resultUpdateTime == 0 and #enablePremiumCollect == 1 and #agree == 1
  261. touchDown 0 350 630
  262. sleep 30
  263. touchUp 0
  264. sleep 30
  265. #time = #time + 60
  266. endif
  267.  
  268. if #resultUpdateTime == 0 and #enablePremiumCollect == 1 and #decline == 1
  269. touchDown 0 195 630
  270. sleep 30
  271. touchUp 0
  272. sleep 30
  273. #time = #time + 60
  274. endif
  275. if #resultUpdateTime == 0 and #timeDiff < #runActionsEveryXSeconds
  276. goto :pressSkills
  277. endif
  278.  
  279. if #loopCount == 1 and #enableClanQuest == 1
  280. goto :checkClanQuest
  281. elseif #loopCount == 2
  282. goto :init
  283. elseif #minutes >= #prestigeAfterXMinutes and #enableAutoprestige == 1
  284. goto :checkPrestige
  285. elseif #timeDiff >= #runActionsEveryXSeconds
  286. goto :runActions
  287. elseif #resultCheckBoss == 0
  288. toast Prestiging at #prestigeAfterXMinutes minutes
  289. goto :checkBoss
  290. elseif #resultManaPool == 0
  291. goto :checkMana
  292. elseif #loopCount == #maxHitCount
  293. #loopCount = 0
  294. goto :randomTouch
  295. else
  296. goto :randomTouch
  297. endif
  298. :end
  299.  
  300. :afterPrestige
  301. #count = 0
  302. #skillsUnlocked = 0
  303. #time = 0
  304. #seconds = 0
  305. #secondsTotal = 0
  306. #minutes = 0
  307. #unlocked = 0
  308. #lateRun = 0
  309. #runActionsEveryXSeconds = #rAEXS
  310. #maxedOutSkills = 0
  311. #prestigeSlide = 0
  312. #startSkillCheckNow = 1
  313.  
  314. #intervalHS = #iHS
  315. #intervalDS = #iDS
  316. #intervalFS = #iFS
  317. #intervalHoM = #iHoM
  318. #intervalWC = #iWC
  319. #intervalSC = #iSC
  320. rand #prestigeAfterXMinutes #prestigeStartTime #prestigeEndTime
  321. goto :init
  322. // ---------- INIT
  323. :init
  324. if #enablePremiumCollect == 1
  325. if #agree == 1
  326. touchDown 0 350 630
  327. sleep 50
  328. touchUp 0
  329. sleep 50
  330. #time = #time + 100
  331. endif
  332. if #decline == 1
  333. touchDown 0 195 630
  334. sleep 50
  335. touchUp 0
  336. sleep 50
  337. #time = #time + 100
  338. endif
  339. endif
  340.  
  341. #lastPressHS = 0
  342. #lastPressDS = 0
  343. #lastPressFS = 0
  344. #lastPressHoM = 0
  345. #lastPressSC = 0
  346. #lastPressWC = 0
  347. #timeLastActionRun = 0
  348.  
  349. touchDown 0 #menuCloseX #menuCloseY
  350. sleep #btnDelay
  351. #time = #time + #btnDelay
  352. touchUp 0
  353. sleep #menuSlideDelay
  354. #time = #time + #menuSlideDelay
  355.  
  356. if #runActionsOnStart == 1
  357. #actionStepper = 0
  358. goto :runActions
  359. endif
  360. goto :start
  361.  
  362. :loopDetected
  363. toast loop detected - repeating ...
  364. #loopCount = 0
  365. #loopDetectionCount = 0
  366. goto :start
  367. // ---------- PRESS SKILLS
  368. :pressSkills
  369. //click "Fight Boss"
  370. getColor #color1 372 24
  371. if #color1 == 1076975
  372. toast FightBoss1
  373. touchPress 0 390 36
  374. sleep 40
  375. touchUp
  376. sleep 40
  377. #time = #time + 80
  378. goto :pressSkills
  379. endif
  380.  
  381. touchDown 0 #menuCloseX #menuCloseY
  382. sleep 40
  383. touchUp 0
  384. sleep #menuSlideDelay
  385. #time = #time + #menuSlideDelay + 40
  386.  
  387. if #enableCO == 1
  388. touchPress 0 175 410
  389. sleep #shipDelay
  390. touchPress 0 175 410
  391. sleep #shipDelay
  392. touchPress 0 175 410
  393. sleep #shipDelay
  394. touchPress 0 175 410
  395. sleep #shipDelay
  396. #time = #time + 4 * #shipDelay
  397. endif
  398.  
  399. #timeDiff = #secondsTotal - #lastPressSC
  400. if #timeDiff >= #intervalSC and #intervalSC > 0
  401. #lastPressSC = #secondsTotal
  402. touchPress 0 430 710
  403. sleep #skillDelay
  404. touchPress 0 430 710
  405. sleep #skillDelay
  406. #time = #time + #skillDelay * 2
  407. endif
  408.  
  409. #timeDiff = #secondsTotal - #lastPressHoM
  410. if #timeDiff >= #intervalHoM and #intervalHoM > 0
  411. if #scActiveCheck == 1
  412. if #scAC == 0
  413. #scAC = 1
  414. getRGB #colorRed #colorGreen #colorBlue 423 688
  415. #time = #time + 100
  416. endif
  417.  
  418. if #colorRed == -1 and #colorBlue == 0 and #intervalHoM > 0
  419. #lastPressHoM = #secondsTotal
  420. touchPress 0 200 710
  421. sleep #skillDelay
  422. touchPress 0 200 710
  423. sleep #skillDelay
  424. #time = #time + #skillDelay * 2
  425. endif
  426. elseif #scActiveCheck == 0
  427. #lastPressHoM = #secondsTotal
  428. touchPress 0 200 710
  429. sleep #skillDelay
  430. touchPress 0 200 710
  431. sleep #skillDelay
  432. #time = #time + #skillDelay * 2
  433. endif
  434. endif
  435. goto :pressSkillsB
  436.  
  437. :pressSkillsB
  438. #timeDiff = #secondsTotal - #lastPressDS
  439. if #timeDiff >= #intervalDS and #intervalDS > 0
  440. if #scActiveCheck == 1
  441. if #scAC == 0
  442. #scAC = 1
  443. getRGB #colorRed #colorGreen #colorBlue 423 688
  444. #time = #time + 100
  445. endif
  446.  
  447. if #colorRed == -1 and #colorBlue == 0 and #intervalDS > 0
  448. #lastPressDS = #secondsTotal
  449. touchPress 0 120 710
  450. sleep #skillDelay
  451. touchPress 0 120 710
  452. sleep #skillDelay
  453. #time = #time + #skillDelay * 2
  454. endif
  455. elseif #scActiveCheck == 0
  456. #lastPressHoM = #secondsTotal
  457. touchPress 0 120 710
  458. sleep #skillDelay
  459. touchPress 0 120 710
  460. sleep #skillDelay
  461. #time = #time + #skillDelay * 2
  462. endif
  463. endif
  464. #timeDiff = #secondsTotal - #lastPressWC
  465. if #timeDiff >= #intervalWC and #intervalWC > 0
  466. if #scActiveCheck == 1
  467. if #scAC == 0
  468. #scAC = 1
  469. getRGB #colorRed #colorGreen #colorBlue 423 688
  470. #time = #time + 100
  471. endif
  472.  
  473. if #colorRed == -1 and #colorBlue == 0 and #intervalWC > 0
  474. #lastPressWC = #secondsTotal
  475. touchPress 0 360 710
  476. sleep #skillDelay
  477. touchPress 0 360 710
  478. sleep #skillDelay
  479. #time = #time + #skillDelay * 2
  480. endif
  481. elseif #scActiveCheck == 0
  482. #lastPressHoM = #secondsTotal
  483. touchPress 0 360 710
  484. sleep #skillDelay
  485. touchPress 0 360 710
  486. sleep #skillDelay
  487. #time = #time + #skillDelay * 2
  488. endif
  489. endif
  490. goto :pressSkillsC
  491.  
  492. :pressSkillsC
  493. #timeDiff = #secondsTotal - #lastPressFS
  494. if #timeDiff >= #intervalFS and #intervalFS > 0
  495. if #scActiveCheck == 1
  496. if #scAC == 0
  497. #scAC = 1
  498. getRGB #colorRed #colorGreen #colorBlue 423 688
  499. #time = #time + 100
  500. endif
  501.  
  502. if #colorRed == -1 and #colorBlue == 0 and #intervalFS > 0
  503. #lastPressFS = #secondsTotal
  504. touchPress 0 280 710
  505. sleep #skillDelay
  506. touchPress 0 280 710
  507. sleep #skillDelay
  508. #time = #time + #skillDelay * 2
  509. endif
  510. elseif #scActiveCheck == 0
  511. #lastPressHoM = #secondsTotal
  512. touchPress 0 280 710
  513. sleep #skillDelay
  514. touchPress 0 280 710
  515. sleep #skillDelay
  516. #time = #time + #skillDelay * 2
  517. endif
  518. endif
  519. #timeDiff = #secondsTotal - #lastPressHS
  520. if #timeDiff >= #intervalHS and #intervalHS > 0
  521. if #scActiveCheck == 1
  522. if #scAC == 0
  523. #scAC = 1
  524. getRGB #colorRed #colorGreen #colorBlue 423 688
  525. #time = #time + 100
  526. endif
  527.  
  528. if #colorRed == -1 and #colorBlue == 0 and #intervalHS > 0
  529. #lastPressHS = #secondsTotal
  530. touchPress 0 40 710
  531. sleep #skillDelay
  532. touchPress 0 40 710
  533. sleep #skillDelay
  534. #time = #time + #skillDelay * 2
  535. endif
  536. elseif #scActiveCheck == 0
  537. #lastPressHoM = #secondsTotal
  538. touchPress 0 40 710
  539. sleep #skillDelay
  540. touchPress 0 40 710
  541. sleep #skillDelay
  542. #time = #time + #skillDelay * 2
  543. endif
  544. endif
  545.  
  546. #scAC = 0
  547. goto :pressSkillsD
  548.  
  549. :pressSkillsD
  550. if #topHeroes > 0
  551. #timeDiff = #secondsTotal - #lastTopHeroes
  552. if #timeDiff >= #topHeroes
  553. #lastTopHeroes = #secondsTotal
  554. sleep 100
  555. //open stats
  556. sleep #btnDelay
  557. #time = #time + #btnDelay + 100
  558. touchDown 0 #menuHeroes #menuY
  559. sleep #btnDelay
  560. touchUp 0
  561. sleep 1000
  562. #time = #time + 1000 + #btnDelay
  563.  
  564. //wait for slide
  565. sleep #menuSlideDelay
  566. #time = #time + #menuSlideDelay
  567.  
  568. //slide top
  569. touchDown 0 280 650
  570. sleep 200
  571. touchMove 0 280 600
  572. sleep 50
  573. touchMove 0 280 700
  574. sleep 50
  575. touchMove 0 280 750
  576. sleep 50
  577. touchMove 0 280 780
  578. sleep 50
  579. touchUp 0
  580. sleep 750
  581. sleep #btnDelay
  582. #time = #time + #btnDelay + 1150
  583.  
  584. //level top heroes
  585. touchPress 0 410 580
  586. sleep #btnDelay
  587. touchPress 0 410 650
  588. sleep #btnDelay
  589. touchPress 0 410 730
  590. sleep #btnDelay
  591. #time = #time + #btnDelay * 3
  592.  
  593. //close stats
  594. sleep #btnDelay
  595. #time = #time + #btnDelay
  596. touchPress 0 #menuCloseX #menuCloseY
  597. touchPress 0 #menuCloseX #menuCloseY
  598. touchPress 0 #menuCloseX #menuCloseY
  599. sleep #menuSlideDelay
  600. #time = #time + #menuSlideDelay
  601. endif
  602. endif
  603. goto :start
  604. // ---------- CHECK MANA
  605. :checkMana
  606. getColor #color1 208 638
  607. if #color1 == #colorWhite
  608. goto :startSkill
  609. endif
  610. goto :start
  611.  
  612. :startSkill
  613. if #fullManaSkill == 1
  614. touchPress 0 40 710
  615. elseif #fullManaSkill == 2
  616. touchPress 0 120 710
  617. elseif #fullManaSkill == 3
  618. touchPress 0 200 710
  619. elseif #fullManaSkill == 4
  620. touchPress 0 280 710
  621. elseif #fullManaSkill == 5
  622. touchPress 0 360 710
  623. elseif #fullManaSkill == 6
  624. touchPress 0 430 710
  625. endif
  626. #time = #time + 150
  627. goto :start
  628.  
  629. :runActions
  630. #timeLastActionRun = #secondsTotal
  631. #actionStepper = #actionStepper + 1
  632.  
  633. //since skills should have been maxed, it wont go to openSwordMasterTab after
  634. if #unlocked >= 8 or #maxedOutSkills > 1 and #actionStepper == 1
  635. #actionStepper = #actionStepper + 1
  636. endif
  637.  
  638. if #justUnlockSkills == 0 and #minutes >= #stopLevelSkillMins and #actionStepper == 1
  639. #actionStepper = #actionStepper + 1
  640. endif
  641.  
  642. if #actionStepper == 1 and #enableSkills == 1 and #skillsUnlocked < 6
  643. #skillsUnlocked = 0
  644. goto :openSwordMasterTab
  645. elseif #actionStepper == 2 and #enableHeroes == 1
  646. goto :levelHeroes
  647. elseif #actionStepper == 5 and #enableClanQuest == 1
  648. #actionStepper = 0
  649. goto :checkClanQuest
  650. else
  651. #actionStepper = 0
  652. goto :checkBoss
  653. endif
  654. goto :runActions
  655.  
  656. // ---------- CHECK PRESTIGE
  657. :checkPrestige
  658. sleep 4000
  659. //#time = #time + 4000
  660.  
  661. if #agree == 1
  662. touchDown 0 350 630
  663. sleep 30
  664. touchUp 0
  665. sleep 30
  666. touchDown 0 350 630
  667. sleep 30
  668. touchUp 0
  669. sleep 30
  670. touchDown 0 350 630
  671. sleep 30
  672. touchUp 0
  673. sleep 30
  674. endif
  675.  
  676. sleep 100
  677. //open stats
  678. sleep #btnDelay
  679. touchDown 0 #menuStats #menuY
  680. sleep #btnDelay
  681. touchUp 0
  682. sleep 30
  683. //#time = #time + #btnDelay + #btnDelay + 130
  684.  
  685. //wait for slide
  686. sleep #menuSlideDelay
  687. //#time = #time + #menuSlideDelay
  688.  
  689. //slide top
  690. touchDown 0 280 650
  691. sleep 200
  692. touchMove 0 280 600
  693. sleep 50
  694. touchMove 0 280 700
  695. sleep 50
  696. touchMove 0 280 750
  697. sleep 50
  698. touchMove 0 280 780
  699. sleep 50
  700. touchUp 0
  701. sleep 800
  702. sleep #btnDelay
  703. touchDown 0 280 650
  704. sleep 200
  705. touchMove 0 280 600
  706. sleep 50
  707. touchMove 0 280 700
  708. sleep 50
  709. touchMove 0 280 750
  710. sleep 50
  711. touchMove 0 280 780
  712. sleep 50
  713. touchUp 0
  714. sleep 800
  715. sleep #btnDelay
  716. touchDown 0 280 650
  717. sleep 200
  718. touchMove 0 280 600
  719. sleep 50
  720. touchMove 0 280 700
  721. sleep 50
  722. touchMove 0 280 750
  723. sleep 50
  724. touchMove 0 280 780
  725. sleep 50
  726. touchUp 0
  727. sleep 800
  728. sleep #btnDelay
  729. //#time = #time + #btnDelay + 1200
  730.  
  731. //lvl up
  732. sleep #btnDelay
  733. sleep 50
  734. //#time = #time + #btnDelay + 50
  735. touchDown 0 466 580
  736. sleep 50
  737. touchUp 0
  738. sleep 200
  739. touchDown 0 466 580
  740. sleep 50
  741. touchUp 0
  742. sleep 200
  743. touchDown 0 466 580
  744. sleep 50
  745. touchUp 0
  746. sleep 200
  747. //#time = #time + 750
  748.  
  749. sleep 400
  750. goto :checkPrestigeB
  751.  
  752. :checkPrestigeB
  753. if #prestigeSlide < 7
  754. //slide down
  755. touchDown 1 280 740
  756. sleep 200
  757. touchMove 1 280 710
  758. sleep 50
  759. touchMove 1 280 500
  760. sleep 50
  761. touchMove 1 280 410
  762. sleep 50
  763. touchMove 1 280 400
  764. sleep 50
  765. touchUp 1
  766. sleep 300
  767. //#time = #time + 700
  768. #prestigeSlide = #prestigeSlide + 1
  769. goto :checkPrestigeB
  770. endif
  771.  
  772. #loopBreak = #loopBreak + 1
  773. if #loopBreak > 11
  774. #loopBreak = 0
  775. #prestigeSlide = 0
  776.  
  777. //close stats
  778. sleep #btnDelay
  779. //#time = #time + #btnDelay
  780. touchPress 0 #menuCloseX #menuCloseY
  781. touchPress 0 #menuCloseX #menuCloseY
  782. touchPress 0 #menuCloseX #menuCloseY
  783. sleep #menuSlideDelay
  784. //#time = #time + #menuSlideDelay
  785.  
  786. goto :checkPrestige
  787. endif
  788.  
  789. touchDown 0 400 720
  790. sleep 30
  791. touchUp 0
  792. sleep 30
  793. sleep #menuPopUpDelay
  794. //#time = #time + #menuPopUpDelay + 60
  795.  
  796. touchDown 0 240 640
  797. sleep #btnDelay
  798. touchUp 0
  799. sleep #menuPopUpDelay
  800. sleep 120
  801. getColor #color1 430 540
  802. if #color1 == 6384245
  803. touchDown 0 330 535
  804. sleep #btnDelay
  805. touchUp 0
  806. sleep 19000
  807. goto :afterPrestige
  808. else
  809. touchPress 470 450
  810. touchPress 470 450
  811. touchPress 470 450
  812. touchPress 470 450
  813. #prestigeSlide = 0
  814. goto :checkPrestige
  815. endif
  816. goto :start
  817.  
  818. // ---------- CHECK CLAN QUEST
  819. :checkClanQuest
  820. sleep 300
  821.  
  822. getRGB #colorRed #colorGreen #colorBlue 72 21
  823. getColor #color1 65 795
  824. if #colorRed < 190 and #colorRed > 120 and #color1 == #colorStatsButton
  825. #recheckClanQuest = 1
  826. goto :checkClanQuestReady
  827. endif
  828. goto :start
  829.  
  830. :checkClanQuestReady
  831. if #agree == 1
  832. sleep 3500
  833. getRGB #colorRed #colorGreen #colorBlue 428 639
  834. if #colorRed == -216 or #colorGreen == -96
  835. touchDown 0 300 630
  836. sleep 50
  837. touchUp 0
  838. sleep 50
  839. touchDown 0 300 630
  840. sleep 50
  841. touchUp 0
  842. sleep 50
  843. touchDown 0 300 630
  844. sleep 50
  845. touchUp 0
  846. sleep 1100
  847. endif
  848. endif
  849.  
  850. //open CQ menu
  851. sleep #btnDelay
  852. touchDown 0 80 25
  853. sleep #btnDelay
  854. touchUp 0
  855. sleep #btnDelay
  856. sleep 250
  857. sleep 250
  858.  
  859. //touch clan icon bottom
  860. touchDown 0 100 730
  861. sleep #btnDelay
  862. touchUp 0
  863. sleep #loadingClanQuestDelay
  864.  
  865. sleep 3000
  866. //check titan HP if > 0
  867. getColor #color1 420 725
  868. //420 730
  869.  
  870. if #color1 == -1785765 and #clanQuestCount == 0
  871. #recheckClanQuest = 0
  872. goto :clanQuestClose
  873. endif
  874.  
  875. //boss progress color
  876. getColor #color1 175 335
  877.  
  878. #clanQuestLoopCount = 0
  879.  
  880. if #color1 == 2055160
  881. //boss up
  882. touchDown 0 310 740
  883. sleep #btnDelay
  884. touchUp 0
  885. sleep #menuPopUpDelay
  886. goto :clanQuestCheckDias
  887. elseif #color1 == 0
  888. //boss down
  889. #recheckClanQuest = 0
  890. endif
  891.  
  892. //close (and recheck)
  893. goto :clanQuestClose
  894.  
  895. :clanQuestCheckDias
  896. getColor #color1 40 215
  897.  
  898. if #color1 == -7775689
  899. //no dias left
  900. #recheckClanQuest = 0
  901. goto :clanQuestClose
  902. else
  903. touchDown 0 325 450
  904. //330 450
  905. sleep #btnDelay
  906. touchUp 0
  907.  
  908. sleep 3000
  909. getColor #color1 20 770
  910.  
  911. goto :clanQuestHit
  912. endif
  913.  
  914. :clanQuestHit
  915. if #color1 == -28929 and #clanQuestLoopCount == 0
  916. //add quest
  917. #clanQuestCount = #clanQuestCount + 1
  918. endif
  919.  
  920. #clanQuestLoopCount = #clanQuestLoopCount + 1
  921.  
  922. if #color1 == -28929 and #clanQuestLoopCount < 1000
  923. //hit the boss
  924. touchDown 0 180 730
  925. touchUp 0
  926. sleep 28
  927. goto :clanQuestHit
  928. elseif #clanQuestLoopCount > 950
  929. goto :clanQuestClose
  930. endif
  931.  
  932. :clanQuestClose
  933. getColor #color1 65 788
  934. if #color1 == #colorStatsButton
  935. goto :clanQuestCloseCheck
  936. else
  937. touchDown 0 415 45
  938. sleep 35
  939. touchUp 0
  940. sleep 200
  941. touchDown 0 420 210
  942. sleep 35
  943. touchUp 0
  944. sleep 200
  945. goto :clanQuestClose
  946. endif
  947.  
  948. :clanQuestCloseCheck
  949. if #recheckClanQuest == 1 and #clanQuestCount < #clanQuestRunsPerReadyUp
  950. goto :checkClanQuestReady
  951. else
  952. #clanQuestCount = 0
  953. goto :start
  954. endif
  955.  
  956. // ---------- LEVEL SKILLS
  957. :openSwordMasterTab
  958. if #count < 2
  959. if #lateRun < 1 and #count < 2
  960. if #count == 0
  961. sleep 100
  962. //open sword master tab
  963. sleep #btnDelay
  964. #time = #time + #btnDelay + 100
  965. touchDown 0 #menuStats #menuY
  966. sleep #btnDelay
  967. #time = #time + #btnDelay
  968. touchUp 0
  969. sleep 20
  970.  
  971. //wait for menu open
  972. sleep #menuSlideDelay
  973. #time = #time + #menuSlideDelay
  974. endif
  975.  
  976. //slide top
  977. touchDown 0 280 650
  978. sleep 200
  979. touchMove 0 280 600
  980. sleep 50
  981. touchMove 0 280 700
  982. sleep 50
  983. touchMove 0 280 750
  984. sleep 50
  985. touchMove 0 280 780
  986. sleep 50
  987. touchUp 0
  988. sleep 750
  989.  
  990. //slide top
  991. touchDown 0 280 650
  992. sleep 200
  993. touchMove 0 280 600
  994. sleep 50
  995. touchMove 0 280 700
  996. sleep 50
  997. touchMove 0 280 750
  998. sleep 50
  999. touchMove 0 280 780
  1000. sleep 50
  1001. touchUp 0
  1002. sleep 750
  1003.  
  1004. //slide top
  1005. touchDown 0 280 650
  1006. sleep 200
  1007. touchMove 0 280 600
  1008. sleep 50
  1009. touchMove 0 280 700
  1010. sleep 50
  1011. touchMove 0 280 750
  1012. sleep 50
  1013. touchMove 0 280 780
  1014. sleep 50
  1015. touchUp 0
  1016. sleep 750
  1017. sleep #btnDelay
  1018. #time = #time + #btnDelay + 3450
  1019.  
  1020. touchDown 0 466 580
  1021. sleep 50
  1022. touchUp 0
  1023. sleep 200
  1024. touchDown 0 466 580
  1025. sleep 50
  1026. touchUp 0
  1027. sleep 200
  1028. touchDown 0 466 580
  1029. sleep 50
  1030. touchUp 0
  1031. sleep 200
  1032. #time = #time + 750
  1033. endif
  1034.  
  1035. if #lateRun > 0 and #count < 1
  1036. #time = #time + #minz
  1037. #seconds = (#time/1000)%60
  1038. #secondsTotal = #time/1000
  1039. #minutes = (#time/1000)/60
  1040. #lateRun = 0
  1041. endif
  1042.  
  1043. if #count < 2
  1044. #count = #count + 1
  1045. endif
  1046.  
  1047. if #count < 2
  1048. goto :openSwordMasterTab
  1049. endif
  1050. endif
  1051.  
  1052. //slide top
  1053. touchDown 0 280 650
  1054. sleep 200
  1055. touchMove 0 280 600
  1056. sleep 50
  1057. touchMove 0 280 700
  1058. sleep 50
  1059. touchMove 0 280 750
  1060. sleep 50
  1061. touchMove 0 280 780
  1062. touchUp 0
  1063. sleep 600
  1064. #time = #time + 950
  1065.  
  1066. if #enableSkills == 1 or #enableHeroes == 1
  1067. goto :checkSkills
  1068. endif
  1069.  
  1070. goto :closeMenu
  1071.  
  1072. :checkSkills
  1073. if #startSkillCheckNow == 0
  1074. goto :checkSkillsFinish
  1075. endif
  1076.  
  1077. if #skillsUnlocked == 6 and #justUnlockSkills == 1
  1078. toast skills unlocked, stop now until next prestige
  1079. goto :checkSkillsFinish
  1080. endif
  1081.  
  1082. #skillCheckStepper = #skillCheckStepper + 1
  1083.  
  1084. if #skillCheckStepper == 1
  1085. if #maxedOutSkills > 0 or #skipHS == 1
  1086. #skillCheckStepper = #skillCheckStepper + 1
  1087. endif
  1088. endif
  1089. goto :checkSkillsB
  1090.  
  1091. :checkSkillsB
  1092. #manualMax = #manualMax + 1
  1093.  
  1094. if #skillCheckStepper > 1 and #maxedOutSkills < 1 and #justUnlockSkills == 0
  1095. touchPress 0 415 750
  1096. sleep 34
  1097. touchPress 0 415 750
  1098. touchPress 0 415 750
  1099. touchPress 0 415 750
  1100. sleep 45
  1101. touchPress 0 415 750
  1102. sleep 38
  1103. #time = #time + 115
  1104. endif
  1105.  
  1106. if #manualMax < 11
  1107. goto :checkSkillsB
  1108. else
  1109. #manualMax = 0
  1110. goto :checkSkillsC
  1111. endif
  1112.  
  1113. :checkSkillsC
  1114. if #skillCheckStepper == 1
  1115. touchPress 0 405 680
  1116. sleep 34
  1117. touchPress 0 405 680
  1118. touchPress 0 405 680
  1119. touchPress 0 405 680
  1120. sleep 45
  1121. touchPress 0 405 680
  1122. sleep 38
  1123. #time = #time + 115
  1124. goto :maxHS
  1125. elseif #skillCheckStepper == 6
  1126. goto :maxSkill
  1127. elseif #skillCheckStepper < 6
  1128. goto :checkSkillsUnlock
  1129. endif
  1130.  
  1131. //slide back
  1132. touchDown 1 280 650
  1133. sleep 200
  1134. touchMove 1 280 600
  1135. sleep 50
  1136. touchMove 1 280 700
  1137. sleep 50
  1138. touchMove 1 280 750
  1139. sleep 50
  1140. touchMove 1 280 780
  1141. touchUp 1
  1142. #time = #time + 350
  1143. goto :checkSkillsFinish
  1144.  
  1145. :lvlSkill
  1146. if #minutes >= #maxSkillsAtXMinutes and #maxSkillsAtXMinutes > 0 and #unlocked < 8 and #skillCheckStepper <= 5
  1147. touchPress 0 459 755
  1148. sleep 300
  1149. #time = #time + 300
  1150. #unlocked = #unlocked + 1
  1151. endif
  1152.  
  1153. #time = #time + 100
  1154. getRGB #colorRed #colorGreen #colorBlue 459 755
  1155. if #colorBlue <= -45
  1156. sleep 10
  1157. #time = #time + 10
  1158. goto :endLvlSkill
  1159.  
  1160. elseif #justUnlockSkills == 0
  1161. goto :maxSkill
  1162.  
  1163. elseif #justUnlockSkills == 1
  1164. if #skillCheckStepper < 6
  1165. if #unlocked < 4
  1166. #unlocked = #unlocked + 1
  1167. touchPress 0 459 755
  1168. sleep #btnDelay
  1169. #time = #time + #btnDelay
  1170. goto :endLvlSkill
  1171. elseif #unlocked >= 4
  1172. if #minutes < #maxSkillsAtXMinutes
  1173. goto :endLvlSkill
  1174. else
  1175. if #unlocked < 8
  1176. touchPress 0 459 755
  1177. sleep #btnDelay
  1178. #time = #time + #btnDelay
  1179. endif
  1180. goto :maxSkill
  1181. endif
  1182. endif
  1183. endif
  1184. endif
  1185. goto :endLvlSkill
  1186.  
  1187. :endLvlSkill
  1188. if #skillCheckStepper == 6 and #maxedOutSkills == 0
  1189. #maxedOutSkills = #maxedOutSkills + 1
  1190. //slide
  1191. touchDown 1 280 750
  1192. sleep 200
  1193. touchMove 1 280 730
  1194. sleep 50
  1195. touchMove 1 280 660
  1196. sleep 50
  1197. touchMove 1 280 655
  1198. sleep 50
  1199. touchMove 1 280 649
  1200. sleep 200
  1201. touchUp 1
  1202. sleep 200
  1203. #time = #time + 750
  1204. goto :maxSkill
  1205. elseif #skillCheckStepper == 6
  1206. goto :checkSkills
  1207. else
  1208. goto :checkSkillsSlideDown
  1209. endif
  1210.  
  1211. :maxHS
  1212. #loopBreak = #loopBreak + 1
  1213. if #loopBreak > 13
  1214. #loopBreak = 0
  1215. //slide back
  1216. touchDown 1 280 650
  1217. sleep 200
  1218. touchMove 1 280 600
  1219. sleep 50
  1220. touchMove 1 280 700
  1221. sleep 50
  1222. touchMove 1 280 750
  1223. sleep 50
  1224. touchMove 1 280 780
  1225. touchUp 1
  1226. //slide back
  1227. touchDown 1 280 650
  1228. sleep 200
  1229. touchMove 1 280 600
  1230. sleep 50
  1231. touchMove 1 280 700
  1232. sleep 50
  1233. touchMove 1 280 750
  1234. sleep 50
  1235. touchMove 1 280 780
  1236. touchUp 1
  1237. #time = #time + 350 * 2
  1238. goto :checkSkills
  1239. endif
  1240.  
  1241. touchPress 0 405 680
  1242. sleep 34
  1243. touchPress 0 405 680
  1244. touchPress 0 405 680
  1245. touchPress 0 405 680
  1246. sleep 45
  1247. touchPress 0 405 680
  1248. sleep 38
  1249. #time = #time + 115
  1250. goto :maxHS
  1251.  
  1252. :maxSkill
  1253. sleep 70
  1254. #time = #time + 70
  1255.  
  1256. #loopBreak = #loopBreak + 1
  1257. if #loopBreak > 15
  1258. #loopBreak = 0
  1259. goto :endLvlSkill
  1260. endif
  1261.  
  1262. getRGB #colorRed #colorGreen #colorBlue 459 755
  1263.  
  1264. sleep 50
  1265. #time = #time + 50
  1266.  
  1267. if #colorRed < -100 or #colorGreen < -100 or #colorBlue <= -40
  1268. #loopBreak = 0
  1269. goto :endLvlSkill
  1270. endif
  1271.  
  1272. touchPress 0 415 750
  1273. sleep 34
  1274. touchPress 0 415 750
  1275. touchPress 0 415 750
  1276. touchPress 0 415 750
  1277. sleep 45
  1278. touchPress 0 415 750
  1279. sleep 38
  1280. #time = #time + 115
  1281. goto :maxSkill
  1282.  
  1283. :checkSkillsUnlock
  1284. sleep 200
  1285. #time = #time + 200
  1286.  
  1287. getRGB #colorRed #colorGreen #colorBlue 450 660
  1288.  
  1289. if #colorBlue == 2 or #colorBlue == 5
  1290. #skillsUnlocked = #skillsUnlocked + 1
  1291. endif
  1292.  
  1293. if #colorBlue == 2
  1294. sleep 100
  1295. touchDown 0 466 660
  1296. sleep 300
  1297. touchUp 0
  1298. sleep 200
  1299. #time = #time + 600
  1300. endif
  1301.  
  1302. if #justUnlockSkills == 0
  1303. getColor #skillAvailable 466 660
  1304. if #skillAvailable == #skillBlue
  1305. goto :checkSkillsSlideDown
  1306. else
  1307. goto :lvlSkill
  1308. endif
  1309. endif
  1310.  
  1311. if #skillCheckStepper == 6
  1312. goto :checkSkills
  1313. endif
  1314. goto :checkSkillsSlideDown
  1315.  
  1316. :checkSkillsSlideDown
  1317. //slide
  1318. touchDown 1 280 750
  1319. sleep 200
  1320. touchMove 1 280 725
  1321. sleep 50
  1322. touchMove 1 280 660
  1323. sleep 50
  1324. touchMove 1 280 655
  1325. sleep 50
  1326. touchMove 1 280 649
  1327. sleep 200
  1328. touchUp 1
  1329. sleep 200
  1330. #time = #time + 750
  1331. goto :checkSkills
  1332.  
  1333. :checkSkillsFinish
  1334. #skillCheckStepper = 0
  1335. #maxedOutSkills = #maxedOutSkills + 1
  1336.  
  1337. if #enableHeroes == 1
  1338. goto :runActions
  1339. endif
  1340. goto :closeMenu
  1341. // ---------- LEVEL HEROES
  1342. :levelHeroes
  1343.  
  1344. //collect gold
  1345. touchDown 0 30 230
  1346. sleep 50
  1347. touchUp 0
  1348. sleep 50
  1349. #time = #time + 100
  1350.  
  1351. if #agree == 1
  1352. sleep 2000
  1353. touchDown 0 350 630
  1354. sleep 30
  1355. touchUp 0
  1356. sleep 30
  1357. touchDown 0 350 630
  1358. sleep 30
  1359. touchUp 0
  1360. sleep 30
  1361. touchDown 0 350 630
  1362. sleep 30
  1363. touchUp 0
  1364. sleep 30
  1365. #time = #time + 2180
  1366. endif
  1367.  
  1368. if #decline == 1
  1369. sleep 2000
  1370. touchDown 0 200 630
  1371. sleep 30
  1372. touchUp 0
  1373. sleep 30
  1374. touchDown 0 200 630
  1375. sleep 30
  1376. touchUp 0
  1377. sleep 30
  1378. #time = #time + 2120
  1379. endif
  1380.  
  1381. if #minutes < 1
  1382. goto :closeMenu
  1383. endif
  1384. goto :levelHeroes2
  1385.  
  1386. :levelHeroes2
  1387. //open menu
  1388. sleep #btnDelay
  1389. #time = #time + #btnDelay
  1390. touchDown 0 #menuHeroes #menuY
  1391. sleep #btnDelay
  1392. #time = #time + #btnDelay
  1393. touchUp 0
  1394. sleep 1100
  1395. #time = #time + 1100
  1396.  
  1397. if #tryWithDelay == 1
  1398. sleep 3000
  1399. endif
  1400.  
  1401. getColor #color 330 480
  1402. if #color != 5000276
  1403. sleep 500
  1404. goto :levelHeroes2
  1405. endif
  1406.  
  1407. #loopDetectionCount = #loopDetectionCount + 1
  1408. if #loopDetectionCount > 3
  1409. #loopDetectionCount = 0
  1410. toast levelHeroes loop
  1411. //goto :loopDetected
  1412. goto :scrollTop
  1413. endif
  1414.  
  1415. //scroll up
  1416. touchDown 0 280 650
  1417. sleep 200
  1418. touchMove 0 280 600
  1419. sleep 50
  1420. touchMove 0 280 700
  1421. sleep 50
  1422. touchMove 0 280 750
  1423. sleep 50
  1424. touchMove 0 280 780
  1425. touchUp 0
  1426. sleep 200
  1427.  
  1428. touchDown 0 280 650
  1429. sleep 200
  1430. touchMove 0 280 600
  1431. sleep 50
  1432. touchMove 0 280 700
  1433. sleep 50
  1434. touchMove 0 280 750
  1435. sleep 50
  1436. touchMove 0 280 780
  1437. touchUp 0
  1438. sleep 200
  1439. #time = #time + 2 * 550
  1440.  
  1441. //code check if already at top, currently on the process of being removed
  1442. // getColor #color1 95 764
  1443. // if #color1 == #colorWhite
  1444. //getColor #color1 300 510
  1445. //if #color1 == #colorGray
  1446. //#loopDetectionCount = 0
  1447. #tryWithDelay = 0
  1448. //#time = #time + 2000
  1449.  
  1450. goto :scrollTop
  1451. //endif
  1452.  
  1453. #tryWithDelay = 1
  1454. goto :levelHeroes2
  1455.  
  1456. :scrollTop
  1457. #loopDetectionCount = #loopDetectionCount + 1
  1458. if #loopDetectionCount > 20
  1459. #loopDetectionCount = 0
  1460. toast scrollTop loop
  1461. //goto :loopDetected
  1462. goto :lvlTopHero
  1463. endif
  1464.  
  1465. sleep 90
  1466. #time = #time + 90
  1467.  
  1468. getColor #color1 275 527
  1469. getColor #color2 275 519
  1470. //300 510
  1471. #time = #time + 110
  1472. if #color1 == #colorGray and #color2 == #colorGray
  1473. #loopDetectionCount = 0
  1474. sleep 400
  1475. #time = #time + 400
  1476.  
  1477. touchDown 0 280 650
  1478. sleep 200
  1479. touchMove 0 280 600
  1480. sleep 50
  1481. touchMove 0 280 700
  1482. sleep 50
  1483. touchMove 0 280 750
  1484. sleep 50
  1485. touchMove 0 280 780
  1486. touchUp 0
  1487. sleep 600
  1488. #time = #time + 950
  1489.  
  1490. goto :lvlTopHero
  1491. endif
  1492.  
  1493. touchDown 0 280 650
  1494. sleep 200
  1495. touchMove 0 280 600
  1496. sleep 50
  1497. touchMove 0 280 700
  1498. sleep 50
  1499. touchMove 0 280 750
  1500. sleep 50
  1501. touchMove 0 280 780
  1502. touchUp 0
  1503. sleep 200
  1504.  
  1505. touchDown 0 280 650
  1506. sleep 200
  1507. touchMove 0 280 600
  1508. sleep 50
  1509. touchMove 0 280 700
  1510. sleep 50
  1511. touchMove 0 280 750
  1512. sleep 50
  1513. touchMove 0 280 780
  1514. touchUp 0
  1515. sleep 200
  1516. #time = #time + 2 * 550
  1517. goto :scrollTop
  1518.  
  1519. :lvlTopHero
  1520. touchPress 0 466 570
  1521. sleep #btnDelay
  1522. touchPress 0 466 570
  1523. sleep #btnDelay
  1524. touchPress 0 466 570
  1525. sleep #btnDelay
  1526. touchPress 0 460 670
  1527. sleep #btnDelay
  1528. touchPress 0 460 670
  1529. sleep #btnDelay
  1530. touchPress 0 460 670
  1531. sleep #btnDelay
  1532. touchPress 0 460 670
  1533. sleep #btnDelay
  1534. #time = #time + #btnDelay * 7
  1535.  
  1536. //lvl up only nearby heroes at this time onwards
  1537. //edit as you see fit
  1538. if #minutes >= 5 or #lateRun > 0
  1539. //slide down
  1540. touchDown 1 280 740
  1541. sleep 200
  1542. touchMove 1 280 710
  1543. sleep 50
  1544. touchMove 1 280 500
  1545. sleep 50
  1546. touchMove 1 280 410
  1547. sleep 50
  1548. touchMove 1 280 400
  1549. touchUp 1
  1550.  
  1551. sleep 300
  1552. #time = #time + 650
  1553.  
  1554. goto :levelHeroesPressLevelUp
  1555. endif
  1556.  
  1557. goto :levelHeroesScrollDown
  1558.  
  1559. :levelHeroesScrollDown
  1560. #loopDetectionCount = #loopDetectionCount + 1
  1561. if #loopDetectionCount > 29
  1562. toast levelHeroesScrollDown loop
  1563. goto :loopDetected
  1564. endif
  1565.  
  1566. getColor #color1 440 760
  1567. if #color1 == #colorGray
  1568. #loopDetectionCount = 0
  1569.  
  1570. touchDown 1 280 750
  1571. touchMove 1 280 745
  1572. sleep 100
  1573. touchMove 1 280 740
  1574. touchMove 1 280 735
  1575. sleep 50
  1576. touchMove 1 280 700
  1577. touchMove 1 280 690
  1578. sleep 50
  1579. touchMove 1 280 500
  1580. touchMove 1 280 450
  1581. sleep 20
  1582. touchMove 1 280 420
  1583. touchMove 1 280 410
  1584. sleep 50
  1585. touchMove 1 280 400
  1586. touchUp 1
  1587. sleep 300
  1588.  
  1589. touchDown 1 280 750
  1590. touchMove 1 280 745
  1591. sleep 100
  1592. touchMove 1 280 740
  1593. touchMove 1 280 735
  1594. sleep 50
  1595. touchMove 1 280 700
  1596. touchMove 1 280 690
  1597. sleep 50
  1598. touchMove 1 280 500
  1599. touchMove 1 280 450
  1600. sleep 20
  1601. touchMove 1 280 420
  1602. touchMove 1 280 410
  1603. sleep 50
  1604. touchMove 1 280 400
  1605. touchUp 1
  1606. sleep 300
  1607. #time = #time + 1140
  1608.  
  1609. if #minutes < 4
  1610. //temp
  1611. touchDown 1 280 750
  1612. touchMove 1 280 745
  1613. sleep 100
  1614. touchMove 1 280 740
  1615. touchMove 1 280 735
  1616. sleep 50
  1617. touchMove 1 280 700
  1618. touchMove 1 280 690
  1619. sleep 50
  1620. touchMove 1 280 500
  1621. touchMove 1 280 450
  1622. sleep 20
  1623. touchMove 1 280 420
  1624. touchMove 1 280 410
  1625. sleep 50
  1626. touchMove 1 280 400
  1627. touchUp 1
  1628. sleep 300
  1629.  
  1630. touchDown 1 280 750
  1631. touchMove 1 280 745
  1632. sleep 100
  1633. touchMove 1 280 740
  1634. touchMove 1 280 735
  1635. sleep 50
  1636. touchMove 1 280 700
  1637. touchMove 1 280 690
  1638. sleep 50
  1639. touchMove 1 280 500
  1640. touchMove 1 280 450
  1641. sleep 20
  1642. touchMove 1 280 420
  1643. touchMove 1 280 410
  1644. sleep 50
  1645. touchMove 1 280 400
  1646. touchUp 1
  1647. sleep 300
  1648. #time = #time + 1140
  1649.  
  1650. //temp
  1651. touchDown 1 280 750
  1652. touchMove 1 280 745
  1653. sleep 100
  1654. touchMove 1 280 740
  1655. touchMove 1 280 735
  1656. sleep 50
  1657. touchMove 1 280 700
  1658. touchMove 1 280 690
  1659. sleep 50
  1660. touchMove 1 280 500
  1661. touchMove 1 280 450
  1662. sleep 20
  1663. touchMove 1 280 420
  1664. touchMove 1 280 410
  1665. sleep 50
  1666. touchMove 1 280 400
  1667. touchUp 1
  1668. sleep 300
  1669.  
  1670. touchDown 1 280 750
  1671. touchMove 1 280 745
  1672. sleep 100
  1673. touchMove 1 280 740
  1674. touchMove 1 280 735
  1675. sleep 50
  1676. touchMove 1 280 700
  1677. touchMove 1 280 690
  1678. sleep 50
  1679. touchMove 1 280 500
  1680. touchMove 1 280 450
  1681. sleep 20
  1682. touchMove 1 280 420
  1683. touchMove 1 280 410
  1684. sleep 50
  1685. touchMove 1 280 400
  1686. touchUp 1
  1687. sleep 300
  1688. #time = #time + 1140
  1689.  
  1690. //temp
  1691. touchDown 1 280 750
  1692. touchMove 1 280 745
  1693. sleep 100
  1694. touchMove 1 280 740
  1695. touchMove 1 280 735
  1696. sleep 50
  1697. touchMove 1 280 700
  1698. touchMove 1 280 690
  1699. sleep 50
  1700. touchMove 1 280 500
  1701. touchMove 1 280 450
  1702. sleep 20
  1703. touchMove 1 280 420
  1704. touchMove 1 280 410
  1705. sleep 50
  1706. touchMove 1 280 400
  1707. touchUp 1
  1708. sleep 300
  1709.  
  1710. touchDown 1 280 750
  1711. touchMove 1 280 745
  1712. sleep 100
  1713. touchMove 1 280 740
  1714. touchMove 1 280 735
  1715. sleep 50
  1716. touchMove 1 280 700
  1717. touchMove 1 280 690
  1718. sleep 50
  1719. touchMove 1 280 500
  1720. touchMove 1 280 450
  1721. sleep 20
  1722. touchMove 1 280 420
  1723. touchMove 1 280 410
  1724. sleep 50
  1725. touchMove 1 280 400
  1726. touchUp 1
  1727. sleep 300
  1728. #time = #time + 1140
  1729. endif
  1730.  
  1731. goto :lvlBottomHero
  1732. endif
  1733.  
  1734. touchDown 1 280 750
  1735. touchMove 1 280 745
  1736. sleep 100
  1737. touchMove 1 280 740
  1738. touchMove 1 280 735
  1739. sleep 50
  1740. touchMove 1 280 700
  1741. touchMove 1 280 690
  1742. sleep 50
  1743. touchMove 1 280 500
  1744. touchMove 1 280 450
  1745. sleep 20
  1746. touchMove 1 280 420
  1747. touchMove 1 280 410
  1748. sleep 50
  1749. touchMove 1 280 400
  1750. touchUp 1
  1751. sleep 270
  1752. #time = #time + 540
  1753. goto :levelHeroesScrollDown
  1754.  
  1755. :lvlBottomHero
  1756. // for legacy coordinates:
  1757. // 1 = Finn (Ranged) 466 570
  1758. // 2 = Nohni (Melee) 466 645
  1759. // 3 = Damon (Mage) 466 720
  1760.  
  1761. touchPress 0 466 720
  1762. sleep #btnDelay
  1763. touchPress 0 466 720
  1764. sleep #btnDelay
  1765. #time = #time + #btnDelay * 2
  1766.  
  1767. #seconds = (#time/1000)%60
  1768. #secondsTotal = #time/1000
  1769. #minutes = (#time/1000)/60
  1770. goto :levelHeroesPressLevelUp
  1771.  
  1772. :levelHeroesSlideUpCollection
  1773. #loopDetectionCount = #loopDetectionCount + 1
  1774. if #loopDetectionCount > 34
  1775. #loopDetectionCount = 0
  1776. toast levelHeroesSlideUpCollection loop
  1777. goto :closeMenu
  1778. endif
  1779.  
  1780. getColor #color1 275 527
  1781. getColor #color2 275 519
  1782. //300 510
  1783. #time = #time + 210
  1784. if #color1 == #colorGray and #color2 == #colorGray
  1785. #loopDetectionCount = 0
  1786. goto :closeMenu
  1787. endif
  1788.  
  1789. touchDown 1 280 510
  1790. sleep 20
  1791. touchMove 1 280 512
  1792. touchMove 1 280 514
  1793. touchMove 1 280 516
  1794. sleep 20
  1795. touchMove 1 280 520
  1796. touchMove 1 280 540
  1797. sleep 20
  1798. touchMove 1 280 580
  1799. touchMove 1 280 600
  1800. sleep 20
  1801. touchMove 1 280 630
  1802. touchMove 1 280 670
  1803. sleep 20
  1804. touchMove 1 280 690
  1805. touchMove 1 280 700
  1806. sleep 20
  1807. touchMove 1 280 736
  1808. touchMove 1 280 738
  1809. sleep 20
  1810. touchMove 1 280 740
  1811. touchMove 1 280 742
  1812. sleep 200
  1813. touchUp 1
  1814. touchPress 1 280 750
  1815. #time = #time + 690
  1816. goto :levelHeroesPressLevelUp
  1817.  
  1818. :levelHeroesPressLevelUp
  1819. #pressLevelUpLoopCount = #pressLevelUpLoopCount + 1
  1820.  
  1821. touchDown 1 466 720
  1822. sleep 42
  1823. touchUp 1
  1824. sleep 42
  1825. touchDown 1 466 700
  1826. sleep 42
  1827. touchUp 1
  1828. sleep 42
  1829. touchDown 1 466 680
  1830. sleep 42
  1831. touchUp 1
  1832. sleep 42
  1833. touchDown 1 466 660
  1834. sleep 42
  1835. touchUp 1
  1836. sleep 42
  1837. touchDown 1 466 640
  1838. sleep 42
  1839. touchUp 1
  1840. sleep 42
  1841. touchDown 1 466 620
  1842. sleep 42
  1843. touchUp 1
  1844. sleep 42
  1845. touchDown 1 466 600
  1846. sleep 42
  1847. touchUp 1
  1848. sleep 42
  1849. touchDown 1 466 580
  1850. sleep 42
  1851. touchUp 1
  1852. sleep 42
  1853. touchDown 1 466 560
  1854. sleep 42
  1855. touchUp 1
  1856. sleep 42
  1857. touchDown 1 466 540
  1858. sleep 42
  1859. touchUp 1
  1860. sleep 42
  1861.  
  1862. #time = #time + 840
  1863.  
  1864. if #pressLevelUpLoopCount < #heroIntensity
  1865. goto :levelHeroesPressLevelUp
  1866. endif
  1867.  
  1868. #pressLevelUpLoopCount = 0
  1869. goto :levelHeroesSlideUpCollection
  1870.  
  1871. :closeMenu
  1872. //close stats
  1873. sleep #btnDelay
  1874. #time = #time + #btnDelay
  1875. touchPress 0 #menuCloseX #menuCloseY
  1876. touchPress 0 #menuCloseX #menuCloseY
  1877. touchPress 0 #menuCloseX #menuCloseY
  1878. sleep #menuSlideDelay
  1879. #time = #time + #menuSlideDelay
  1880. goto :runActions
  1881.  
  1882. // ---------- CHECK BOSS
  1883. :checkBoss
  1884. getColor #color1 139 85
  1885.  
  1886. if #color1 == #colorWhite
  1887. goto :pressSkills
  1888. endif
  1889.  
  1890. getColor #color2 459 29
  1891.  
  1892. if #startBossSkill == 2
  1893. getColor #color1 108 685
  1894. elseif #startBossSkill == 4
  1895. getColor #color1 268 685
  1896. elseif #startBossSkill == 3
  1897. getColor #color1 189 685
  1898. elseif #startBossSkill == 5
  1899. getColor #color1 348 685
  1900. elseif #startBossSkill == 6
  1901. getColor #color1 428 685
  1902. endif
  1903.  
  1904. if #color1 == #colorWhite and #color2 == #colorBlack
  1905. goto :startBossWithSkills
  1906. elseif #color2 == #colorBlack and #startBossSkill == 0
  1907. toast FightBoss2
  1908. touchDown 0 390 36
  1909. sleep #btnDelay
  1910. touchUp 0
  1911. sleep #btnDelay
  1912. touchDown 0 390 36
  1913. sleep #btnDelay
  1914. touchUp 0
  1915. sleep #btnDelay
  1916. #time = #time + 4 * #btnDelay
  1917. endif
  1918.  
  1919. //hatchEggs
  1920. touchPress 0 30 285
  1921. sleep 30
  1922. touchUp 0
  1923. sleep #btnDelay
  1924. #time = #time + #btnDelay
  1925. goto :pressSkills
  1926.  
  1927. :startBossWithSkills
  1928. getColor #color1 372 24
  1929. if #color1 == 1204718
  1930. toast FightBoss3
  1931. touchPress 0 390 36
  1932. sleep 300
  1933. #time = #time + 300
  1934. goto :startBossWithSkills
  1935. endif
  1936.  
  1937. #time = #time + 400
  1938.  
  1939. if #enableCO == 1
  1940. touchPress 0 175 410
  1941. sleep #shipDelay
  1942. touchPress 0 175 410
  1943. sleep #shipDelay
  1944. touchPress 0 175 410
  1945. sleep #shipDelay
  1946. touchPress 0 175 410
  1947. sleep #shipDelay
  1948. #time = #time + #shipDelay * 4
  1949. endif
  1950.  
  1951. if #startBossSkill == 2
  1952. touchPress 0 120 710
  1953. sleep 200
  1954. goto :startBossWithSecondarySkill
  1955. elseif #startBossSkill == 3
  1956. touchPress 0 200 710
  1957. sleep 200
  1958. goto :startBossWithSecondarySkill
  1959. elseif #startBossSkill == 4
  1960. touchPress 0 280 710
  1961. sleep 200
  1962. goto :startBossWithSecondarySkill
  1963. elseif #startBossSkill == 5
  1964. touchPress 0 360 710
  1965. sleep 200
  1966. goto :startBossWithSecondarySkill
  1967. elseif #startBossSkill == 6
  1968. touchPress 0 430 710
  1969. sleep 200
  1970. goto :startBossWithSecondarySkill
  1971. endif
  1972.  
  1973. :startBossWithSecondarySkill
  1974. if #startBossSecondarySkill == 2
  1975. touchPress 0 120 710
  1976. elseif #startBossSecondarySkill == 3
  1977. touchPress 0 200 710
  1978. elseif #startBossSecondarySkill == 4
  1979. touchPress 0 280 710
  1980. elseif #startBossSecondarySkill == 5
  1981. touchPress 0 360 710
  1982. elseif #startBossSecondarySkill == 6
  1983. touchPress 0 430 710
  1984. endif
  1985.  
  1986. #time = #time + 400
  1987. goto :pressSkills
  1988.  
  1989. // ---------- RANDOM ATTACK
  1990. :randomTouch
  1991.  
  1992. rand #randomX 60 415
  1993. if #enableFairies == 1
  1994. rand #randomY 160 420
  1995. else
  1996. rand #randomY 270 420
  1997. endif
  1998.  
  1999. //equipment stacking
  2000. if #equipStack == 1
  2001. if #randomX > 300 and #randomX < 420 and #randomY > 280
  2002. goto :randomTouch
  2003. endif
  2004. endif
  2005.  
  2006. //prevent hero story window
  2007. if #randomY > 184 and #randomY < 233 and #randomX > 403
  2008. goto :randomTouch
  2009. endif
  2010.  
  2011. if #enableTapping == 1
  2012. touchDown 0 #randomX #randomY
  2013. touchUp 0
  2014. endif
  2015.  
  2016. sleep #hitDelay2
  2017. #time = #time + #hitDelay
  2018.  
  2019. if #astralAwakening == 1
  2020. #hero = #hero + 1
  2021.  
  2022. if #equipmentStacking == 1
  2023. if #hero == 1 or #hero == 6
  2024. #hero = #hero + 1
  2025. endif
  2026. endif
  2027.  
  2028. if #hero == 1
  2029. //Maya
  2030. touchDown 0 350 400
  2031. touchUp 0
  2032. elseif #hero == 2
  2033. //Zato
  2034. touchDown 0 135 400
  2035. touchUp 0
  2036. elseif #hero == 3
  2037. //Sophia
  2038. touchDown 0 435 390
  2039. touchUp 0
  2040. elseif #hero == 4
  2041. //Lance
  2042. touchDown 0 100 395
  2043. touchUp 0
  2044. elseif #hero == 5
  2045. //Pingo
  2046. touchDown 0 100 315
  2047. touchUp 0
  2048. elseif #hero == 6
  2049. //Rosabella
  2050. touchDown 0 400 305
  2051. touchUp 0
  2052. elseif #hero == 7
  2053. //Gulbrand
  2054. touchDown 0 55 275
  2055. touchUp 0
  2056. elseif #hero == 8
  2057. //Captain Davey
  2058. touchDown 0 455 305
  2059. touchUp 0
  2060. elseif #hero == 9
  2061. //Rhys
  2062. touchDown 0 35 305
  2063. touchUp 0
  2064. elseif #hero == 10
  2065. //Kronus
  2066. touchDown 0 50 375
  2067. touchUp 0
  2068. endif
  2069. endif
  2070. goto :randomTouchB
  2071.  
  2072. :randomTouchB
  2073. if #astralAwakening == 1
  2074. if #equipmentStacking == 1
  2075. if #hero == 11 or #hero == 19
  2076. #hero = #hero + 1
  2077. endif
  2078. endif
  2079.  
  2080. if #hero == 11
  2081. //Cosette
  2082. touchDown 0 400 400
  2083. touchUp 0
  2084. elseif #hero == 12
  2085. //Kiki
  2086. touchDown 0 10 305
  2087. touchUp 0
  2088. elseif #hero == 13
  2089. //Maddie
  2090. touchDown 0 75 410
  2091. touchUp 0
  2092. elseif #hero == 14
  2093. //Beany
  2094. touchDown 0 425 305
  2095. touchUp 0
  2096. elseif #hero == 15
  2097. //Sawyer
  2098. touchDown 0 400 225
  2099. touchUp 0
  2100. elseif #hero == 16
  2101. //Lil' Ursa
  2102. touchDown 0 465 410
  2103. touchUp 0
  2104. elseif #hero == 17
  2105. //Saje
  2106. touchDown 0 20 380
  2107. touchUp 0
  2108. elseif #hero == 18
  2109. //Wally
  2110. touchDown 0 15 210
  2111. touchUp 0
  2112. elseif #hero == 19
  2113. //Jayce
  2114. touchDown 0 380 365
  2115. touchUp 0
  2116. elseif #hero == 20
  2117. //Great Pharaoh
  2118. touchDown 0 445 205
  2119. touchUp 0
  2120. endif
  2121. endif
  2122. goto :randomTouchC
  2123.  
  2124. :randomTouchC
  2125. if #astralAwakening == 1
  2126. if #equipmentStacking == 1
  2127. if #hero == 22
  2128. #hero = #hero + 1
  2129. endif
  2130. endif
  2131.  
  2132. if #hero == 21
  2133. //Boomoh Doctor
  2134. touchDown 0 50 225
  2135. touchUp 0
  2136. elseif #hero == 22
  2137. //Dex-1000
  2138. touchDown 0 375 305
  2139. touchUp 0
  2140. elseif #hero == 23
  2141. //Great Madame Cass
  2142. touchDown 0 470 225
  2143. touchUp 0
  2144. elseif #hero == 24
  2145. //Lala
  2146. touchDown 0 80 225
  2147. touchUp 0
  2148. elseif #hero == 25
  2149. //Aya
  2150. touchDown 0 75 305
  2151. touchUp 0
  2152. elseif #hero == 26
  2153. //Lady Lucy
  2154. touchDown 0 445 170
  2155. touchUp 0
  2156. elseif #hero == 27
  2157. //Jazz
  2158. touchDown 0 415 170
  2159. touchUp 0
  2160. elseif #hero == 28
  2161. //Maple
  2162. touchDown 0 370 170
  2163. touchUp 0
  2164. elseif #hero == 29
  2165. //Kin
  2166. touchDown 0 95 190
  2167. touchUp 0
  2168. elseif #hero == 30
  2169. //Princess Titania
  2170. touchDown 0 25 175
  2171. touchUp 0
  2172. endif
  2173. endif
  2174. goto :randomTouchD
  2175.  
  2176. :randomTouchD
  2177. if #astralAwakening == 1
  2178. if #hero == 31
  2179. //Miki
  2180. touchDown 0 425 225
  2181. touchUp 0
  2182. elseif #hero == 32
  2183. //Mina
  2184. touchDown 0 465 120
  2185. touchUp 0
  2186. elseif #hero == 33
  2187. //Yzafa
  2188. touchDown 0 385 135
  2189. touchUp 0
  2190. elseif #hero == 34
  2191. //Zolom
  2192. touchDown 0 60 170
  2193. touchUp 0
  2194. elseif #hero == 35
  2195. //Finn
  2196. touchDown 0 465 125
  2197. touchUp 0
  2198. elseif #hero == 36
  2199. //Nohni
  2200. touchDown 0 120 145
  2201. touchUp 0
  2202. elseif #hero == 37
  2203. //Damon
  2204. touchDown 0 420 80
  2205. touchUp 0
  2206. endif
  2207.  
  2208. sleep #hitDelay2
  2209. #time = #time + #hitDelay
  2210.  
  2211. if #hero > 36
  2212. #hero = 0
  2213. endif
  2214. endif
  2215.  
  2216. if #hitCount > 12
  2217. #hitCount = 0
  2218. goto :extra
  2219. endif
  2220.  
  2221. if #agree == 1 or #decline == 1 or #PHoM == 1
  2222. #hitCount = #hitCount + 1
  2223. endif
  2224. goto :start
  2225.  
  2226. :extra
  2227. #hitCount = 0
  2228. if #PHoM == 1
  2229. touchDown 0 270 370
  2230. sleep 12
  2231. touchUp 0
  2232. sleep 14
  2233. touchPress 0 270 370
  2234. sleep 2
  2235. touchUp
  2236. sleep 3
  2237. touchPress 0 270 370
  2238. sleep 16
  2239. touchUp 0
  2240. sleep 18
  2241. touchDown 0 270 370
  2242. sleep 10
  2243. touchUp 0
  2244. sleep 18
  2245. #time = #time + 60
  2246. endif
  2247.  
  2248. if #agree == 1
  2249. touchDown 0 300 630
  2250. sleep 40
  2251. touchUp 0
  2252. sleep 40
  2253. touchDown 0 300 630
  2254. sleep 40
  2255. touchUp 0
  2256. sleep 40
  2257. #time = #time + 180
  2258. endif
  2259.  
  2260. if #decline == 1
  2261. touchDown 0 200 630
  2262. sleep 30
  2263. touchUp 0
  2264. sleep 30
  2265. touchDown 0 200 630
  2266. sleep 30
  2267. touchUp 0
  2268. sleep 30
  2269. #time = #time + 150
  2270. endif
  2271. goto :randomTouch
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement