Advertisement
Guest User

Untitled

a guest
Feb 19th, 2020
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.79 KB | None | 0 0
  1. function SetUpApp()
  2. CheckFocus()
  3.  
  4. end
  5.  
  6. function newClicker()
  7. local found = false;
  8.  
  9. local loc1 = findColors({{16777215,0,0}, {16777215,-20,18}, {16777215,-41,0}}, 0, {60.11, 182.67, 51.28, 39.35});
  10.  
  11. local loc2 = findColors({{12830672,0,0}, {13619929,19,-7}, {12830672,22,4}, {13225429,33,-11}, {12830672,35,14}, {12830672,44,-10}, {12830672,56,11}, {12830672,68,-9}, {12830672,79,-10}, {12830672,94,-11}, {12830672,78,14}, {13028050,95,13}, {12830672,80,2}, {12830672,92,1}, {12830672,118,-10}, {12830672,127,14}, {12830672,138,-10}, {12830672,151,-9}, {12830672,150,12}, {12830672,169,-3}}, 0, {466.13, 1660.25, 194.38, 72.80});
  12.  
  13. local loc3 = findColors({{12830928,0,0}, {12830928,47,-1}, {12830928,11,14}, {12830928,24,26}, {12830928,34,14}, {12830928,49,51}, {12830928,-2,53}, {12830928,24,54}, {12830928,-3,28}, {12830928,23,0}, {12830928,48,25}}, 0, {749.32, 2227.61, 77.78, 77.14});
  14.  
  15. local loc4 = findColors({{16777215,0,0}, {16777215,-18,-17}, {16777215,14,-16}, {16777215,15,16}, {16777215,-17,15}}, 0, {1008.02, 139.23, 48.09, 43.42});
  16.  
  17. local loc5 = findColors({{16448250,0,0}, {16448250,32,-1}, {16448250,33,32}, {16448250,1,31}, {16448250,18,14}}, 0, {1056.58, 139.34, 62.40, 56.21});
  18.  
  19. local loc6 = findColors({{16777215,0,0}, {16777215,33,1}, {16777215,32,32}, {16777215,15,16}, {16777215,-1,33}}, 0, {1007.89, 133.43, 49.58, 52.82});
  20.  
  21. local loc7 = findColors({{16777215,0,0}, {16777215,32,2}, {16777215,32,34}, {16777215,17,16}, {16777215,1,32}}, 0, {1011.96, 65.09, 45.78, 48.11});
  22.  
  23. local loc8 = findColors({{16777215,0,0}, {16777215,32,0}, {16777215,33,33}, {16777215,17,16}, {16777215,1,32}}, 0, {1008.89, 129.51, 45.68, 56.34});
  24.  
  25. local loc9 = findColors({{16777215,0,0}, {16777215,33,0}, {16777215,16,17}, {16777215,33,33}, {16777215,0,32}}, 0, {1010.13, 136.14, 43.59, 45.76});
  26.  
  27. local loc10 = findColors({{16777215,0,0}, {16777215,32,31}, {16777215,16,16}, {16777215,-1,33}, {16777215,32,0}}, 0, {1008.27, 135.08, 46.55, 49.10});
  28.  
  29. local loc11 = findColors({{16777215,0,0}, {16777215,33,1}, {16777215,16,18}, {16777215,33,34}, {16777215,0,34}}, 0, {1010.70, 134.13, 42.30, 47.53});
  30.  
  31. local loc12 = findColors({{16777215,0,0}, {7105901,1,40}, {7105901,-39,41}, {10790052,-38,-2}, {16777215,-19,20}}, 0, {1047.04, 162.17, 47.70, 55.17});
  32.  
  33. local loc13 = findColors({{5658198,0,0}, {5658198,-23,8}, {5658198,-10,25}, {7763574,2,19}, {5658198,-10,-6}, {5658198,-21,19}, {5658198,10,-6}, {5658198,11,23}, {5658198,31,25}, {5658198,30,2}, {5658198,21,14}, {5658198,39,13}, {5658198,50,21}, {5658198,64,18}, {10855845,64,7}, {5658198,48,7}, {7039851,56,3}, {5658198,90,12}, {5658198,90,21}, {5658198,82,25}, {5658198,73,14}, {5658198,82,2}, {5658198,82,13}}, 0, {498.28, 1486.40, 131.07, 66.76});
  34.  
  35. local loc14 = findColors({{16777215,0,0}, {16777215,32,0}, {16777215,33,34}, {16777215,16,17}, {16777215,0,32}}, 0, {1009.56, 132.11, 45.03, 54.74});
  36.  
  37. local arrLocations = {loc1, loc2, loc3, loc4, loc5, loc6, loc7, loc8, loc9, loc10, loc11, loc12, loc13, loc14}
  38. for index, loc in ipairs(arrLocations) do
  39. if #loc > 0 then
  40. tap(loc[1][1],loc[1][2]);
  41. found = true;
  42. startTime = os.time();
  43. end
  44. end
  45. return found;
  46. end
  47.  
  48. function CheckFocus()
  49. if frontMostAppId() ~= "com.higheroven.cydhtfour" then
  50. appActivate("com.higheroven.cydhtfour")
  51. usleep(4000000)
  52. end
  53. end
  54.  
  55. function DoThis()
  56. touchDown(2, 777.75, 492.21)
  57. usleep(86975.88)
  58. touchUp(2, 777.75, 492.21)
  59. repeat
  60. if os.difftime(os.time(), startTime) > checkHowLong then
  61. appKill("com.higheroven.cydhtfour");
  62. usleep(3000000);
  63. startTime = os.time();
  64. SetUpApp();
  65. break;
  66. end
  67. usleep(1000000)
  68. until newClicker() == true
  69. usleep(1000000)
  70. CheckFocus()
  71. end
  72.  
  73. checkHowLong = 35; -- seconds
  74. startTime = os.time();
  75. SetUpApp()
  76. while true do
  77. DoThis()
  78. usleep(1000000)
  79. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement