米奇妙妙屋
👇 Source code
const client = axios.create({
baseURL: 'https://elves.x-meta.online',
});
async function sendFisheryOption(options) {
const { token, action } = options
const onAction = async (inst, opts = null) => await client
.get(`/fishery/inst/push?token=${token}&inst=${inst}` + (opts ? `&opts=${opts}` : ''), {})
.then(({ data }) => {
if (data.code !== 0) {
throw JSON.stringify(data)
}
return data
})
const Actions = {
HarpoonPicking: () => onAction('捡鱼叉'),
TouchTheNet: () => onAction('摸渔网'),
Biu: () => onAction('biu', 'vmet'),
}
return await Actions[action]()
}
function clickActionButton(action) {
return sendFisheryOption({
token: document.getElementById("token").value,
action
})
}