Advertisement
Guest User

Untitled

a guest
Feb 18th, 2020
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.63 KB | None | 0 0
  1. function SetUpApp()
  2. CheckFocus()
  3.  
  4. end
  5.  
  6.  
  7. function newClicker()
  8. local found = false;
  9.  
  10. local loc1 = findColors({{16777215,0,0}, {16777215,14,11}, {16777215,27,-1}}, 0, {39.84, 72.82, 34.34, 27.79});
  11.  
  12. local loc2 = findColors({{12830672,0,0}, {12830672,-5,-2}, {12830672,-13,6}, {12830672,-4,15}, {12830672,-3,7}, {12830672,10,-1}, {12830672,10,14}, {12830672,18,0}, {12830672,25,14}, {12830672,32,-1}, {12830672,50,-2}, {12830672,49,7}, {12830672,50,15}, {12830672,39,7}, {12830672,66,-1}, {12830672,73,16}, {12830672,79,-2}, {12830672,88,15}, {12830672,88,-1}, {12830672,99,4}, {12830672,88,9}}, 0, {315.54, 979.80, 120.09, 30.65});
  13.  
  14. local loc3 = findColors({{12830928,0,0}, {12830928,-32,1}, {12830928,-31,35}, {12830928,3,35}, {12830928,-15,16}, {12830928,-7,8}, {12830928,-23,10}}, 0, {491.76, 1251.59, 66.67, 48.33});
  15.  
  16. local loc4 = findColors({{3828153,0,0}, {6786249,14,7}, {6786250,29,4}, {5800132,49,4}, {5800132,60,5}, {6785994,87,4}, {3959481,74,5}, {5208513,92,6}, {6785993,99,5}, {4616894,108,6}, {1461932,115,5}}, 0, {491.86, 181.01, 138.12, 58.86});
  17.  
  18. local loc5 = findColors({{4342338,0,0}, {4342338,6,15}, {4342338,13,0}, {4342338,18,12}, {4342338,25,0}, {4342338,38,10}, {4342338,28,12}, {4342338,47,1}, {4342338,48,15}, {4342338,56,8}, {4342338,66,14}, {4342338,73,7}, {4342338,83,10}, {4342338,103,15}, {4342338,102,5}, {4342338,105,-2}, {4342338,183,14}, {4342338,174,10}, {4342338,162,10}, {4342338,154,10}, {4342338,144,12}, {4342338,138,15}, {4342338,127,8}}, 0, {144.72, 297.89, 497.54, 77.11});
  19.  
  20.  
  21. local loc6 = findColors({{16777215,0,0}, {16777215,23,1}, {16777215,22,23}, {16777215,11,12}, {16777215,1,23}}, 0, {673.83, 44.10, 32.42, 33.65});
  22.  
  23. local loc7 = findColors({{16777215,0,0}, {16777215,11,12}, {16777215,22,0}, {16777215,22,22}, {16777215,1,22}}, 0, {674.55, 42.69, 32.08, 34.72});
  24.  
  25. local loc8 = findColors({{16448250,0,0}, {16448250,11,11}, {16448250,21,20}, {16448250,22,0}, {16448250,0,22}}, 0, {712.13, 4.15, 30.04, 38.56});
  26.  
  27. local loc9 = findColors({{16777215,0,0}, {16777215,10,-10}, {16777215,-12,-12}, {16777215,-11,11}, {16777215,11,12}}, 0, {674.54, 42.25, 32.47, 34.26});
  28.  
  29. local loc10 = findColors({{16777215,0,0}, {16777215,-10,-10}, {16777215,-10,11}, {16777215,11,-12}, {16777215,12,11}}, 0, {675.82, 41.17, 30.38, 37.90});
  30.  
  31. local loc11 = findColors({{16777215,0,0}, {16777215,-11,-11}, {16777215,-11,10}, {16777215,11,-12}, {16777215,11,11}}, 0, {675.57, 43.81, 29.74, 30.74});
  32.  
  33. local loc12 = findColors({{16777215,0,0}, {16777215,-11,-11}, {16777215,10,-10}, {16777215,9,9}, {16777215,-11,11}}, 0, {671.46, 40.96, 34.27, 35.61});
  34.  
  35. local loc13 = findColors({{16711422,0,0}, {10658723,-14,-10}, {16711422,11,-11}, {16711422,11,12}, {10921638,-14,11}}, 0, {694.91, 17.85, 37.88, 41.43});
  36.  
  37. local loc14 = findColors({{5658198,0,0}, {5658198,-1,21}, {5987163,-24,10}, {5658198,-7,5}, {5658198,-8,17}, {5658198,6,13}, {5658198,19,13}, {5658198,12,21}, {5658198,13,6}, {5658198,35,8}, {5658198,30,6}, {5658198,25,10}, {5658198,35,16}, {5658198,25,19}, {5658198,52,18}, {5658198,41,13}, {5658198,47,6}, {5658198,47,20}}, 0, {335.67, 837.84, 81.98, 41.19});
  38.  
  39. local loc15 = findColors({{16777215,0,0}, {16777215,-11,-11}, {16777215,10,-11}, {16777215,11,11}, {16777215,-12,11}}, 0, {673.00, 37.32, 35.11, 42.86});
  40.  
  41. local loc16 = findColors({{16777215,0,0}, {16777215,10,12}, {16777215,9,-11}, {16777215,-13,-10}, {16777215,-13,12}}, 0, {675.24, 40.71, 30.32, 36.41});
  42.  
  43.  
  44. local loc17 = findColors({{16777215,0,0}, {16777215,23,24}, {16777215,13,11}, {16777215,22,0}, {16777215,0,22}}, 0, {675.07, 39.81, 29.63, 37.96});
  45.  
  46. local loc18 = findColors({{16777215,0,0}, {16777215,23,-1}, {16316664,11,13}, {16777215,23,22}, {16777215,0,23}}, 0, {671.88, 40.26, 36.59, 39.94});
  47.  
  48.  
  49.  
  50. local arrLocations = {loc1, loc2, loc3, loc4, loc5, loc6, loc7, loc8, loc9, loc10, loc11, loc12, loc13, loc14, loc15, loc16, loc17, loc18}
  51. for index, loc in ipairs(arrLocations) do
  52. if #loc > 0 then
  53. tap(loc[1][1],loc[1][2]);
  54. found = true;
  55. startTime = os.time();
  56. end
  57. end
  58. return found;
  59. end
  60.  
  61. function CheckFocus()
  62. if frontMostAppId() ~= "com.higheroven.cydhtfour" then
  63. appActivate("com.higheroven.cydhtfour")
  64. usleep(4000000)
  65. end
  66. end
  67.  
  68. function DoThis()
  69. touchDown(2, 559.39, 224.44);
  70. usleep(46434.42);
  71. touchUp(2, 559.39, 224.44);
  72. repeat
  73. if os.difftime(os.time(), startTime) > checkHowLong then
  74. appKill("com.higheroven.cydhtfour");
  75. usleep(4000000);
  76. startTime = os.time();
  77. SetUpApp();
  78. break;
  79. end
  80. usleep(1000000)
  81. until newClicker() == true
  82. usleep(1000000)
  83. CheckFocus()
  84. end
  85.  
  86. checkHowLong = 35; -- seconds
  87. startTime = os.time();
  88. SetUpApp()
  89. while true do
  90. DoThis()
  91. usleep(1000000)
  92. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement