您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
DEPRECATED - Added to SlapChop plugin
// ==UserScript== // @name IdlePixel Quick Fight Buttons // @namespace com.anwinity.idlepixel // @version 1.3.0 // @description DEPRECATED - Added to SlapChop plugin // @author Anwinity // @license MIT // @match *://idle-pixel.com/login/play* // @grant none // @require https://gf.qytechs.cn/scripts/441206-idlepixel/code/IdlePixel+.js?anticache=20220905 // ==/UserScript== (function() { 'use strict'; class QuickFightButtonsPlugin extends IdlePixelPlusPlugin { constructor() { super("quickfight", { about: { name: GM_info.script.name, version: GM_info.script.version, author: GM_info.script.author, description: GM_info.script.description }, config: [ { id: "confirm", label: "Show Confirm", type: "boolean", default: false } ] }); } quickFight(zoneId) { const confirm = this.getConfig("confirm"); if(confirm) { if(window.confirm(`FIGHT: ${zoneId} ?`)) { Combat.modal_area_last_selected = zoneId; IdlePixelPlus.sendMessage(`START_FIGHT=${zoneId}`); } } else { Combat.modal_area_last_selected = zoneId; IdlePixelPlus.sendMessage(`START_FIGHT=${zoneId}`); } } refreshButtonStates() { const fp = IdlePixelPlus.getVarOrDefault("fight_points", 0, "int"); const energy = IdlePixelPlus.getVarOrDefault("energy", 0, "int"); Object.values(IdlePixelPlus.info.combatZones).forEach(zone => { let disabled = fp < zone.fightPointCost || energy < zone.energyCost; if(zone.id == "volcano" && IdlePixelPlus.getVar("volcano_unlocked")!="1") { disabled = true; } else if(zone.id == "northern_field" && IdlePixelPlus.getVar("northern_field_unlocked")!="1") { disabled = true; } $(`button#quickfight-${zone.id}`).prop("disabled", disabled); }); } onVariableSet(key, valueBefore, valueAfter) { // fp increments every tick, so don't bother refreshing when energy changes if(["fight_points", "energy", "volcano_unlocked", "northern_field_unlocked"].includes(key)) { this.refreshButtonStates(); } } onLogin() { let html = '<h5>Quick Fight:</h5><div style="display: flex; flex-direction: row">'; Object.values(IdlePixelPlus.info.combatZones).forEach(zone => { html += `<button id="quickfight-${zone.id}" class="m-1" type="button" onclick="IdlePixelPlus.plugins.quickfight.quickFight('${zone.id}')">${zone.id}</button>`; }); html += `</div><span style="color: red"><strong>Quick Fight DEPRECATED:</strong> Use <a href="https://gf.qytechs.cn/en/scripts/448025-idlepixel-slap-chop" target="_blank">SlapChop Plugin</a> instead.</span><hr>`; $("#panel-combat hr").first().after(html); this.refreshButtonStates(); } } const plugin = new QuickFightButtonsPlugin(); IdlePixelPlus.registerPlugin(plugin); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址