Automatic building brush Taobao meow coin! It's the basic quality of programmers to be able to do nothing automatically!

In recent days, did the double 11's activities toss you around? If not, there are only two possibilities: first, you don't have a girlfriend...

In recent days, did the double 11's activities toss you around? If not, there are only two possibilities: first, you don't have a girlfriend; second, you don't have a girlfriend.

We need to know that Ali will issue a large number of red envelopes, coupons and mutual aid games every year... But these two days, father Ma's "ATM s" are all addicted to these mutual aid games, and we can't help ourselves. I have to save myself: check in? Did you do the task? Upgraded? :

Generally, our programmers are not very interested in this kind of game. After all, there are endless bugs and classes every day. But if your goddess asks for your help at this time, do you take your hand at that level?

So, how can programmers miss such a time when they show their professional ability in front of the goddess? No, today, Simi Mei found on GitHub that a programmer wrote a small script that can automatically do tasks and receive meow coins every day. This helps build buildings for the goddess, and no longer worries about the low level:

It can be seen that at present, this little script has not attracted the attention of programmers, and a star has not been obtained (GitHub address: https://github.com/sleepybear...)

In fact, this script is not difficult. It is implemented based on the auto.js framework. Auto.js is a JavaScript IDE on the Android platform that supports barrier free services. Based on the control, it can automatically run some operations to realize the recording and running of the suspension window. So this script only supports Android.

The detailed script code is as follows:

let deviceWidth = device.width; let deviceHeight = device.height; function openBeginningBtnItem(delay) { let items = textStartsWith("gif;base64").depth(19).find(); console.log("Seek--Mew coin"); if (items.length > 0) { let item = items[items.length - 1]; console.log("click--Mew coin"); clickItemInCenter(item); sleep(delay); return 1; } return -1; } function isOpenBeginning() { let signIn = textContains("Sign in").findOnce(); if (signIn != null) { console.log("Success--Open collection center"); return 1; } return -1; } function ensureOpenBeginning(waitDelay) { if (isOpenBeginning() === -1) { openBeginningBtnItem(waitDelay); } if (isOpenBeginning() === 1) return 1; console.error("fail--Open collection center"); toast("fail--Open collection center"); return -1; } function clickItemInCenter(item, time) { if (time == null) time = 50; if (item == null) return; let x = item.bounds().centerX(); let y = item.bounds().centerY(); press(x, y, time); } function goShopping() { let shopping = text("Browse").findOne(1000); if (shopping == null) { toastLog("End--Unknown problem"); return -1; } console.log("Start browsing..."); clickItemInCenter(shopping); return 1; } function swipeUp() { let x = parseInt(deviceWidth / 2); let duration = 500; let y = [parseInt(deviceHeight * 0.75), parseInt(deviceHeight * 0.25)]; swipe(x, y[0], x, y[1], duration); swipe(x, y[0], x, y[1], duration); } function isFull() { for (let i = 0; i < 10; i++) { if (descContains("Reached the upper limit").findOnce() || textContains("Reached the upper limit").findOnce()) { console.log("Today's limit has been reached"); return 1; } sleep(1000); } return 0 } function waitSwipe() { let swipeAppear; let shoppingFull; for (let i = 0; i < 3; i++) { swipeAppear = desc("Swipe through").findOne(1000); if (swipeAppear != null) break; shoppingFull = descContains("Reached the upper limit").findOne(1000); if (shoppingFull != null) return 0; console.log("i" + i); } sleep(1000); if (swipeAppear != null) { console.log("Start sliding"); swipeUp(); console.log("Wait 15 s"); sleep(1000 * 16); } else { console.log("slow"); console.log("Wait 20 s"); sleep(1000 * 20); } let shoppingFinish = desc("Mission accomplished").findOne(2000); if (shoppingFinish != null) { console.log("After shopping, ready to return"); } else { toastLog("I don't know. Go back"); } return 1; } function browseFinish() { for (let i = 0; i < 10; i++) { let normalFinishDesc = descContains("Already obtained").findOnce(); let normalFinishText = textContains("Already obtained").findOnce(); let swipeFinish = desc("Mission accomplished").findOnce(); if (normalFinishDesc != null || swipeFinish != null || normalFinishText != null) { console.log("Browse end"); return 0; } sleep(250); } console.log("Browse unknown"); return -1; } function judgeWay() { let timeOut = 1000 * 7; let delay = 250; let loops = parseInt(timeOut / delay); for (let i = 0; i < loops; i++) { let swipeAppearDesc = descContains("Swipe through").findOnce(); let swipeAppearText = textContains("Swipe through").findOnce(); if (swipeAppearDesc != null || swipeAppearText != null) { console.log("Obtained slide browse mode"); return 0; } let directBrowseDesc = desc("browse").findOnce(); let directBrowseText = text("browse").findOnce(); if (directBrowseDesc != null || directBrowseText != null) { if (descContains("00 Meow coin").findOnce() != null || textContains("00 Meow coin").findOnce() != null) { console.log("Get normal browse mode"); return 1; } } sleep(delay); } console.log("overtime"); return -1; } function reopenAgain() { console.log("reopen"); let tbs = id("taskBottomSheet").findOnce(); if (tbs == null) return -1; let close = tbs.child(1); if (close != null) { console.log("Close"); clickItemInCenter(close); sleep(1000); return ensureOpenBeginning(1000); } return -1; } function runGoShopping() { let isSuccess; for (let i = 0; i < 20; i++) { isSuccess = ensureOpenBeginning(1000); if (isSuccess !== 1) break; isSuccess = goShopping(); let count = 0; while (isSuccess !== 1) { if (reopenAgain() === 1) { isSuccess = 1; break; } if (count++ >= 2) break; } if (isSuccess === -1) break; let st = waitSwipe(); if (st === 0) { toastLog("Reached the maximum, end script"); return 0; } back(); sleep(1000); } if (isSuccess === 0) { toastLog("Normal end"); return 0; } else if (isSuccess === -1) { toastLog("Abnormal termination"); return 1; } } function clickGoBrowse() { let browse = text("Browse").findOne(1000); if (browse != null) { let guessYouLike = textContains("Guess you like it.").findOnce(); if (guessYouLike != null) { console.log("I guess you like it"); let pp = browse.parent.bounds().top; let ppp = guessYouLike.parent.parent.bounds().top; if (ppp === pp) { console.log("skip--Guess you like it."); let allBrowse = text("Browse").find(); for (let i = 0; i < allBrowse.length; i++) { let item = allBrowse[i]; if (item.bounds().top !== browse.bounds().top) { browse = item; } } } } console.log("click--Browse"); clickItemInCenter(browse); return 1; } return -1; } function runGoBrowse() { let isSuccess = 1; for (let i = 0; i < 40; i++) { isSuccess = ensureOpenBeginning(1000); if (isSuccess !== 1) break; for (let j = 0; j < 3; j++) { isSuccess = clickGoBrowse(); if (isSuccess !== 1) { reopenAgain(); } else break; } if (isSuccess === -1) break; let jw = judgeWay(); sleep(1000); if (jw === 0) swipeUp(); else if (jw === -1) { if (isFull() === 1) { console.log("Reached the upper limit"); back(); sleep(2000); reopenAgain(); continue; } console.log("4s"); sleep(1000 * 4); } console.log("15s"); sleep(1000 * 15); let isF = browseFinish(); if (isF === 0) { console.log("End of browsing, return to"); } else if (isF === -1) { console.log("Browsing did not end normally, return to"); } back(); sleep(2000); } } function removeFile(fileName) { if (files.exists(fileName)) { files.remove(fileName); } } function clearNewScript() { threads.start(function () { removeFile("/sdcard/Script/Taobao meow coins/script.js"); removeFile("/sdcard/Script/Taobao meow coins/version.txt"); toastLog("Clear finish"); }); } function warning(n) { let items = ["Don't update, but try a new script (not guaranteed)", "Clear new scripts downloaded locally, use default scripts", "Click here to download the new APP"]; let ch = dialogs.select("The current new version does not apply to this old one APP,Please update to new APP. ", items, function (index) { if (index >= 0) { if (index === 0) { threads.start(function () { sleep(1000); runRun(n); }); } else if (index === 1) { clearNewScript(); } else if (index === 2) { alert("Where to download the old APP Where to download new APP,I'm not in the mood to publish"); } } }); } function runRun(n) { sleep(500); let statue = runGoBrowse(); toastLog("Browse--Browse end"); alert("End"); } function moveFloating(n) { let i = -1; dialogs.confirm("Move the suspension window to the left as required.", "Click OK to finish and run the script directly.\n Click Cancel to adjust manually.\n" + "(In the middle of browsing, you may jump to Taobao's homepage for browsing. At this time, you need to manually switch back to maopu.)", function (clear) { if (clear) { console.log("Direct operation"); i = 1; } else { toastLog("Please move the suspension window to the left"); i = 0; } }); while (i === -1) { slepp(100); } if (i === 1) { runRun(n); } } function runChoose(n) { let currentVersion = app.versionCode; if (currentVersion === 1) { warning(n); } else { moveFloating(n); } } module.exports = runChoose;

If you don't understand it, download it directly, open the suspension window, and then switch to Taobao:

You can achieve the following effects:

- Finish -

APK Download:
1. Scan the code to follow the "bystander qing" subscription number

2. Reply to "apk" to get

3 November 2019, 07:45 | Views: 9016

Add new comment

For adding a comment, please log in
or create account

0 comments