From 2968132bc58d855aafc58a33817cf923b45d67b4 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Sat, 9 Jan 2021 12:59:47 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'mcbbs/vending-machine.use?= =?UTF-8?q?r.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mcbbs/vending-machine.user.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mcbbs/vending-machine.user.js b/mcbbs/vending-machine.user.js index c38be4e..1b2b267 100644 --- a/mcbbs/vending-machine.user.js +++ b/mcbbs/vending-machine.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name MCBBS自动售卖机 // @namespace https://miaowoo.cc/ -// @version 0.6.2 +// @version 0.6.3 // @description 自动售卖道具 // @author MiaoWoo // @match https://www.mcbbs.net/home.php?mod=magic** @@ -190,9 +190,12 @@ async function sendOrderAction(openFn, back = false) { let timeoutTask = setTimeout(() => { refresh() }, 120000) let count = 0 + if (stock < 50) { + setTimeout(() => { refresh() }, 15000) + } let result = await fetch('https://reward.yumc.pw/mcbbs/needSendOrder').then(r => r.json()) if (result.code != 200) { - if (++checkTimes > 5 || back || stock < 30) { + if (++checkTimes > 5 || back) { refresh() } clearTimeout(timeoutTask)