求抖音抢福袋助手

有人有抖音抢福袋助手吗。

我有,自己写一个也非常容易的

@laufy 怎么写呀。可以分享一下脚本吗?

@laufy 跪求分享?让我们学习一下

@凌沐辰 要的话给你写一个。这个简单!

@laufy 大佬帮看看哪里出了问题 帮忙修改一下
"ui";
ui.layout(
<vertical padding="16" id="parent">
<TextView text="抢福袋" gravity="center" textSize="24sp" />
<Switch id="autoService" text="无障碍服务" checked="{{auto.service != null}}" padding="8 8 8 8" textSize="15sp" />
<horizontal>
<TextView w="auto" text="只查看" />
<input w="auto" id="maxWait" minWidth="50" inputType="number" text="180" />
<TextView w="auto" text="秒以内" />
</horizontal>
<horizontal>
<TextView w="auto" text="中奖概率大于"/>
<input w="auto" id="gl" minWidth="50" inputType="number" text="0.1" />
</horizontal>

    <horizontal>
        <button w="*" id="openapp" text="开始工作" />
    </horizontal>
</vertical>

);
qfd.checkYgl = function (time) {
waitTime(3)
var txtwg = textMatches(/^[1-9][0-9].[1-9][0-9]*人/).findOnce();
if (txtwg == null) {
return false;
}
var nu = textMatches(/^\d+$/).className("android.view.View").findOnce();
if (nu == null) {
return false;
}
if (!this.checkedfsp()) {
var txt = txtwg.text();
txt = txt.replace("钻石", "")
txt = txt.replace("(", "")
txt = txt.replace(")", "")
txt = txt.replace("抖币:", "|")
log(txt)
var totaldb = parseInt(txt.split('|')[0])
var total = parseInt(txt.split('|')[1])
total = total == 0 ? 1 : total;
var average = totaldb / total;
var gl = total * time * 1.0 / (parseInt(nu.text()) * 600);
ydb = average * gl
log("可以获得" + average * gl + "抖币")
var ms = average * gl > 1.0;
if (!ms) {
log("-------亏本生意,放弃------")
}
} else {
return true;
}
return ms;

}
qfd.qfd = function () {
var mswg = textMatches(/^([0-1]{1}\d|2[0-3]):([0-5]\d)$/).find();
var size = mswg.length
if (size != 0) {
var had=false;
for (let index = size - 1; index >= 0; index--) {
if(had){
break;
}
had=false;
const txtwg = mswg[index];
var txt = txtwg.text();
var time =timeToSec(txt);
if(txtwg.parent()==null){
continue;
}
if (qfd.ouTime(time)) {
log("超出时间范围" + txt);
continue;
}
txtwg.parent().parent().click();
waitTime(3, "加载...")
if (!text("福袋").exists()) {
click(device.width * 0.1, device.height * 0.3);
waitTime(0.5)

            continue;
        }
        had=true;
        //检测是否满足福袋要求
        if (!qfd.checkYgl(time)) {
            click(device.width * 0.1, device.height * 0.3);
            waitTime(0.5)
            continue;
        }
        //满足
        textStartsWith("一键参与").findOne().click();
        qfd.randomsend(time / 5);
        waitTime(time+2, "等待福袋");
        click(device.width * 0.1, device.height * 0.3);
        waitTime(3, "---")
        log(txt);
        break;
    }
}
nextVideo();
waitTime(6);

}
qfd.sentMsg = function (msg) {
waitTime(1, "随机发消息:" + msg);
click(device.width * 0.1, device.height * 0.97)
waitTime(1, "发送");
var wg = className("android.widget.EditText").findOnce();
if (wg != null) {
wg.setText(msg);
}
waitTime(1, "发送");
var wg2 = className("android.widget.Button").desc("发送").findOnce()
if (wg2 != null) {
wg2.click();
}
waitTime(1, "发送完成");
}