Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function SetUpApp()
- CheckFocus()
- end
- function newClicker()
- local found = false;
- local loc1 = findColors({{16777215,0,0}, {16777215,-20,18}, {16777215,-41,0}}, 0, {60.11, 182.67, 51.28, 39.35});
- 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});
- 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});
- 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});
- 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});
- 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});
- 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});
- 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});
- 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});
- 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});
- 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});
- 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});
- 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});
- 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});
- local arrLocations = {loc1, loc2, loc3, loc4, loc5, loc6, loc7, loc8, loc9, loc10, loc11, loc12, loc13, loc14}
- for index, loc in ipairs(arrLocations) do
- if #loc > 0 then
- tap(loc[1][1],loc[1][2]);
- found = true;
- startTime = os.time();
- end
- end
- return found;
- end
- function CheckFocus()
- if frontMostAppId() ~= "com.higheroven.cydhtfour" then
- appActivate("com.higheroven.cydhtfour")
- usleep(4000000)
- end
- end
- function DoThis()
- touchDown(2, 777.75, 492.21)
- usleep(86975.88)
- touchUp(2, 777.75, 492.21)
- repeat
- if os.difftime(os.time(), startTime) > checkHowLong then
- appKill("com.higheroven.cydhtfour");
- usleep(3000000);
- startTime = os.time();
- SetUpApp();
- break;
- end
- usleep(1000000)
- until newClicker() == true
- usleep(1000000)
- CheckFocus()
- end
- checkHowLong = 35; -- seconds
- startTime = os.time();
- SetUpApp()
- while true do
- DoThis()
- usleep(1000000)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement