Files
bettergi-scripts-list/repo/js/周本1-王狼/main.js
5117600049 d4097a8ee4 JS脚本:周本2.2更新 (#899)
* 周本2.2更新

* Update repo/js/周本3-公子/main.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update repo/js/周本11-火龙/assets/tp.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-22 02:57:37 +08:00

51 lines
1.1 KiB
JavaScript

(async function () {
//吃料理
async function eatFood() {
let foodName = settings.foodName ?? 0;
if(foodName){
const foodSum = foodName.split('-');
log.info("开始吃菜");
await sleep(1000);
keyPress("B");//打开背包
await sleep(2000);
click(863, 51);//选择食物
await sleep(1000);
for(let i = 0; i < foodSum.length; i++){
click(170, 1020);//筛选
await sleep(1000);
click(195, 1020);//重置
await sleep(1000);
click(110, 110);//输入名字
await sleep(1000);
inputText(foodSum[i]);
await sleep(500);
click(490, 1020);//确认筛选
await sleep(1000);
click(180, 180);//选择第一个食物
await sleep(1000);
click(1690, 1015);//使用
await sleep(1000);
}
keyPress("ESCAPE");
await sleep(1500);
}}
await pathingScript.runFile("assets/前往狼王.json");
await sleep(1000);
await eatFood();//嗑药
keyPress("F");
await sleep(13000);
await dispatcher.runTask(new SoloTask("AutoFight"));
await sleep(1000);
await pathingScript.runFile("assets/领取奖励.json");
keyPress("F");
await sleep(1000);
click(968, 759);//消耗树脂领取
await sleep(5000);
click(975, 1000);//点击空白区域
await sleep(1000);
})();