1
0
Fork 0

更新 'mcbbs/vending-machine.user.js'

master
502647092 2021-01-09 12:59:47 +00:00
parent 8f272e3e0a
commit 2968132bc5
1 changed files with 5 additions and 2 deletions

View File

@ -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)