您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
QOL and helper scripts for FarmRPG
当前为
// ==UserScript== // @name FarmRPG Helper // @namespace https://greasyfork.org/users/1114461 // @homepage https://github.com/fewfre/farmrpg-helper // @version 1.0.5 // @description QOL and helper scripts for FarmRPG // @author Fewfre // @license GNU GPLv3 // @match https://farmrpg.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=farmrpg.com // @resource scriptStyle https://raw.githubusercontent.com/fewfre/farmrpg-helper/main/greasyfork/index.css?v=1.0.5 // @grant GM_getResourceText // @grant GM_addStyle // @grant unsafeWindow // ==/UserScript== var xe = Object.defineProperty; var Ze = (s, e, t) => e in s ? xe(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t; var R = (s, e, t) => (Ze(s, typeof e != "symbol" ? e + "" : e, t), t); (function () { const e = document.createElement("link").relList; if (e && e.supports && e.supports("modulepreload")) return; for (const i of document.querySelectorAll('link[rel="modulepreload"]')) n(i); new MutationObserver(i => { for (const r of i) if (r.type === "childList") for (const o of r.addedNodes) o.tagName === "LINK" && o.rel === "modulepreload" && n(o) }).observe(document, { childList: !0, subtree: !0 }); function t(i) { const r = {}; return i.integrity && (r.integrity = i.integrity), i.referrerPolicy && (r.referrerPolicy = i.referrerPolicy), i.crossOrigin === "use-credentials" ? r.credentials = "include" : i.crossOrigin === "anonymous" ? r.credentials = "omit" : r.credentials = "same-origin", r } function n(i) { if (i.ep) return; i.ep = !0; const r = t(i); fetch(i.href, r) } })(); var L; (s => { const e = (typeof unsafeWindow < "u" ? unsafeWindow : window).myApp; function t(r, o) { e.onPageInit(r, o) } s.onPageInit = t; function n(r, o) { e.onPageBeforeRemove(r, o) } s.onPageBeforeRemove = n; function i() { e.mainView.router.refreshPage() } s.refreshPage = i })(L || (L = {})); var re; (s => { s.SOUND_FINISHED = new Audio("data:audio/mpeg;base64,/+OIZAAmbgceBaxkAalUbdgBQXgADBlj4luzGczlAw1dwUqQuWXjSLWOxNnbO2drvUEWIxByHcch3IpdfyHL0rdty3Ld+f+5DD+O4/kYpKSnp5XG43G43G3/chyH8hyMRiMRiMQ+/7/v+/8Py/tSNy+33WHJW5a7F2NchyWUlJGIcd9/5f2pGIxLMaSkpIYdhnC7F2Nca+1td6p0x0Vy4ZgjmeicEBwPG0saBAOEe1SsChmOKaBxnGGUMAhEUHUj7W2vs4UwLgAAAwgjCALiK4nXAa5DljDCpY5hhvOnzzzzwwwqUlJSUlJL6enjcbjdPT28P/9YYVKSnp6enp886enpKSMUljDDCkjcvp88869PTxiMRiMRiWUlJSU9PT09PT09PT0lJSUlJSUlJSU9PT09vPPO3SUlJSUlJgAB4eHh4YAAAAAB4f////wAX////////////////xS99/++////////7w36sVjyJrN7316UpSlKXve973v/////e973v/73/////////9KPHjyJe79+/fx94ve973u/fqxWRMv1ezzvEPQ9Rq9/e/vSlHjx48ePI98MCcORDIpfw1AhhkRU+aZpnWzvHjx48ePKZgRKf/wGBD0PUavf3wwIYTsnZpnWh6jV6vUZ0IYhiGKAAQUDIqCldQGyEWJkUMEAAkAQOErkkQnR7ZOPAsMABaYCEYx8YDG61MCAlEcyEkjUogS/MVCYOFJhUAmNgqYZGxjdDmcIQTCAwoUDby9MjDcz/+OIZFIw5d86VM5sACsLwgWhgXgAcdBwW474phycoLgoKGuFBhwmg8DQUQihn1YYaEoCgIOGbFaAx5KWVOhAEbliBbXYCEAErCzswEHMNDUVRQEMMEFKVgjCAxYAeCn1lnKOMSiAUvGYRhStkS5GgPKXXCAMQgKIhYBEoDGQVAa8AcFpAviLAZgggYyEOGyRdLPTAAVPE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qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq") })(re || (re = {})); function We(s, e) { return Math.random() * (e - s) + s } async function F(s, e) { return new Promise(t => { setTimeout(t, e ? We(s * 1e3, e * 1e3) : s * 1e3) }) } function oe(s, e = {}) { return new Promise((t, n) => { const i = o => $(o).is(":visible") && parseInt($(o).css("opacity")) > .1; if ($(s).length && (!e.visible || i(s))) return t($(s + ":visible").first()[0]); const r = new MutationObserver(o => { $(s).length && (!e.visible || i(s)) && (t($(s + ":visible").first()[0]), r.disconnect()) }); e.timeout && F(e.timeout).then(() => { r.disconnect(), n(new Error("observer timed out")) }), r.observe(e.target || document.body, { attributes: !0, childList: !0, subtree: !0, ...e.config }) }) } async function pe(s, e) { return fetch(`worker.php?go=buyitem&id=${s}&qty=${e}`, { method: "POST" }).then(t => t.text()).then(t => Number.isNaN(Number.parseInt(t)) ? t : pe(s, t)) } const we = class extends EventTarget { constructor() { super(); R(this, "active", !1); R(this, "stopRequested", !1) } get isActive() { return this.active } get isStopRequested() { return this.stopRequested } async start() { if (!this.active) { this.active = !0; try { if (!$(".explorebtn").length) throw new Error("No exploration area detected"); for (; this.getStaminaCount() > 0 && (await this.exploreOne(), !this.stopRequested);)await F(.12, .28); this.active = !1, this.stopRequested = !1, this.dispatchEvent(new Event(we.FINISHED)), re.SOUND_FINISHED.play() } catch (t) { alert(t.message) } } } stop() { this.stopRequested || !this.active || (this.stopRequested = !0) } async exploreOne() { if (!$(".explorebtn").length) throw new Error("No exploration area detected"); $(".explorebtn").trigger("click") } getStaminaCount() { return parseInt($("#stamina").text() || "0") } }; let H = we; R(H, "FINISHED", "FINISHED"); function M() { } function Ge(s) { return s() } function Ae() { return Object.create(null) } function ce(s) { s.forEach(Ge) } function Te(s) { return typeof s == "function" } function Q(s, e) { return s != s ? e == e : s !== e || s && typeof s == "object" || typeof s == "function" } let ie; function j(s, e) { return ie || (ie = document.createElement("a")), ie.href = e, s === ie.href } function Ve(s) { return Object.keys(s).length === 0 } function _(s, e) { s.appendChild(e) } function y(s, e, t) { s.insertBefore(e, t || null) } function k(s) { s.parentNode && s.parentNode.removeChild(s) } function te(s, e) { for (let t = 0; t < s.length; t += 1)s[t] && s[t].d(e) } function w(s) { return document.createElement(s) } function I(s) { return document.createTextNode(s) } function P() { return I(" ") } function Fe() { return I("") } function Y(s, e, t, n) { return s.addEventListener(e, t, n), () => s.removeEventListener(e, t, n) } function p(s, e, t) { t == null ? s.removeAttribute(e) : s.getAttribute(e) !== t && s.setAttribute(e, t) } function ze(s) { return Array.from(s.childNodes) } function x(s, e) { e = "" + e, s.data !== e && (s.data = e) } function U(s, e, t, n) { t == null ? s.style.removeProperty(e) : s.style.setProperty(e, t, n ? "important" : "") } let _e; function X(s) { _e = s } const J = [], ke = []; let K = []; const ye = [], Je = Promise.resolve(); let ue = !1; function Ke() { ue || (ue = !0, Je.then(Ye)) } function fe(s) { K.push(s) } const ae = new Set; let z = 0; function Ye() { if (z !== 0) return; const s = _e; do { try { for (; z < J.length;) { const e = J[z]; z++, X(e), He(e.$$) } } catch (e) { throw J.length = 0, z = 0, e } for (X(null), J.length = 0, z = 0; ke.length;)ke.pop()(); for (let e = 0; e < K.length; e += 1) { const t = K[e]; ae.has(t) || (ae.add(t), t()) } K.length = 0 } while (J.length); for (; ye.length;)ye.pop()(); ue = !1, ae.clear(), X(s) } function He(s) { if (s.fragment !== null) { s.update(), ce(s.before_update); const e = s.dirty; s.dirty = [-1], s.fragment && s.fragment.p(s.ctx, e), s.after_update.forEach(fe) } } function $e(s) { const e = [], t = []; K.forEach(n => s.indexOf(n) === -1 ? e.push(n) : t.push(n)), t.forEach(n => n()), K = e } const Xe = new Set; function et(s, e) { s && s.i && (Xe.delete(s), s.i(e)) } function tt(s, e, t, n) { const { fragment: i, after_update: r } = s.$$; i && i.m(e, t), n || fe(() => { const o = s.$$.on_mount.map(Ge).filter(Te); s.$$.on_destroy ? s.$$.on_destroy.push(...o) : ce(o), s.$$.on_mount = [] }), r.forEach(fe) } function st(s, e) { const t = s.$$; t.fragment !== null && ($e(t.after_update), ce(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []) } function nt(s, e) { s.$$.dirty[0] === -1 && (J.push(s), Ke(), s.$$.dirty.fill(0)), s.$$.dirty[e / 31 | 0] |= 1 << e % 31 } function Z(s, e, t, n, i, r, o, l = [-1]) { const q = _e; X(s); const u = s.$$ = { fragment: null, ctx: [], props: r, update: M, not_equal: i, bound: Ae(), on_mount: [], on_destroy: [], on_disconnect: [], before_update: [], after_update: [], context: new Map(e.context || (q ? q.$$.context : [])), callbacks: Ae(), dirty: l, skip_bound: !1, root: e.target || q.$$.root }; o && o(u.root); let g = !1; if (u.ctx = t ? t(s, e.props || {}, (f, h, ...E) => { const b = E.length ? E[0] : h; return u.ctx && i(u.ctx[f], u.ctx[f] = b) && (!u.skip_bound && u.bound[f] && u.bound[f](b), g && nt(s, f)), h }) : [], u.update(), g = !0, ce(u.before_update), u.fragment = n ? n(u.ctx) : !1, e.target) { if (e.hydrate) { const f = ze(e.target); u.fragment && u.fragment.l(f), f.forEach(k) } else u.fragment && u.fragment.c(); e.intro && et(s.$$.fragment), tt(s, e.target, e.anchor, e.customElement), Ye() } X(q) } class W { $destroy() { st(this, 1), this.$destroy = M } $on(e, t) { if (!Te(t)) return M; const n = this.$$.callbacks[e] || (this.$$.callbacks[e] = []); return n.push(t), () => { const i = n.indexOf(t); i !== -1 && n.splice(i, 1) } } $set(e) { this.$$set && !Ve(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1) } } function it(s) { let e; return { c() { e = I("AUTO EXPLORE") }, m(t, n) { y(t, e, n) }, d(t) { t && k(e) } } } function rt(s) { let e; return { c() { e = I("❌ STOP EXPLORING") }, m(t, n) { y(t, e, n) }, d(t) { t && k(e) } } } function ot(s) { let e; return { c() { e = I("❌ STOPPING") }, m(t, n) { y(t, e, n) }, d(t) { t && k(e) } } } function lt(s) { let e, t, n, i, r, o, l; function q(f, h) { return f[0] ? ot : f[1] ? rt : it } let u = q(s), g = u(s); return { c() { e = w("div"), t = w("div"), t.textContent = "🤖", n = P(), i = w("div"), g.c(), p(t, "class", "item-media"), p(i, "class", "item-inner"), p(e, "class", r = "item-content " + (s[0] ? "disabled" : "") + " svelte-i5qs34") }, m(f, h) { y(f, e, h), _(e, t), _(e, n), _(e, i), g.m(i, null), o || (l = Y(e, "click", s[2]), o = !0) }, p(f, [h]) { u !== (u = q(f)) && (g.d(1), g = u(f), g && (g.c(), g.m(i, null))), h & 1 && r !== (r = "item-content " + (f[0] ? "disabled" : "") + " svelte-i5qs34") && p(e, "class", r) }, i: M, o: M, d(f) { f && k(e), g.d(), o = !1, l() } } } function qt(s, e, t) { let n, i; const r = le.bot; function o() { r.isActive ? r.stop() : r.start(), t(1, n = r.isActive), t(0, i = r.isStopRequested) } return r.addEventListener(H.FINISHED, () => { t(1, n = r.isActive), t(0, i = r.isStopRequested) }), t(1, n = r.isActive), t(0, i = r.isStopRequested), [i, n, o] } class ct extends W { constructor(e) { super(), Z(this, e, qt, lt, Q, {}) } } var le; (s => { s.bot = new H; function e({ container: n }) { const i = $("<li />").insertAfter($(n).find(".explorebtn").closest("li")); if (i.length) return new ct({ target: i[0] }) } function t() { L.onPageInit("area", e), L.onPageInit("*", ({ name: n }) => { n !== "area" && s.bot.stop() }) } s.setup = t })(le || (le = {})); function ve(s, e, t) { const n = s.slice(); return n[8] = e[t].id, n[9] = e[t].name, n[10] = e[t].img, n } function Ee(s, e, t) { const n = s.slice(); return n[8] = e[t].id, n[9] = e[t].name, n[10] = e[t].img, n } function Ce(s) { let e, t, n, i, r, o = s[9] + "", l, q, u; function g() { return s[6](s[8]) } return { c() { e = I("- Last: "), t = w("button"), n = w("img"), l = I(o), j(n.src, i = s[10]) || p(n, "src", i), p(n, "alt", r = s[9]), p(n, "height", "16"), p(t, "class", "last-bought-button svelte-sejlla"), t.disabled = s[1] }, m(f, h) { y(f, e, h), y(f, t, h), _(t, n), _(t, l), q || (u = Y(t, "click", g), q = !0) }, p(f, h) { s = f, h & 9 && !j(n.src, i = s[10]) && p(n, "src", i), h & 9 && r !== (r = s[9]) && p(n, "alt", r), h & 9 && o !== (o = s[9] + "") && x(l, o), h & 2 && (t.disabled = s[1]) }, d(f) { f && k(e), f && k(t), q = !1, u() } } } function Ie(s) { let e, t; return { c() { e = w("div"), t = I(s[2]), U(e, "color", "red") }, m(n, i) { y(n, e, i), _(e, t) }, p(n, i) { i & 4 && x(t, n[2]) }, d(n) { n && k(e) } } } function Se(s) { let e, t, n, i, r = s[9] + "", o, l, q, u; function g() { return s[7](s[8]) } return { c() { e = w("button"), t = w("img"), o = I(r), l = P(), j(t.src, n = s[10]) || p(t, "src", n), p(t, "alt", i = s[9]), p(t, "height", "20"), e.disabled = s[1], p(e, "class", "svelte-sejlla") }, m(f, h) { y(f, e, h), _(e, t), _(e, o), _(e, l), q || (u = Y(e, "click", g), q = !0) }, p(f, h) { s = f, h & 1 && !j(t.src, n = s[10]) && p(t, "src", n), h & 1 && i !== (i = s[9]) && p(t, "alt", i), h & 1 && r !== (r = s[9] + "") && x(o, r), h & 2 && (e.disabled = s[1]) }, d(f) { f && k(e), q = !1, u() } } } function at(s) { let e, t, n, i, r, o, l, q, u, g, f, h, E, b, C, S, N = s[0].filter(s[5]), O = []; for (let a = 0; a < N.length; a += 1)O[a] = Ce(Ee(s, N, a)); let D = s[2] && Ie(s), v = s[0], c = []; for (let a = 0; a < v.length; a += 1)c[a] = Se(ve(s, v, a)); return { c() { e = w("div"), t = w("div"), n = w("div"), i = w("div"), r = w("div"), o = I(`Quick buy and plant seeds\r `); for (let a = 0; a < O.length; a += 1)O[a].c(); l = P(), q = w("br"), u = P(), g = w("span"), g.textContent = "also harvests all finished plots to make room", f = P(), D && D.c(), h = P(), E = w("ul"), b = w("li"), C = w("div"), S = w("div"); for (let a = 0; a < c.length; a += 1)c[a].c(); U(g, "font-size", "11px"), p(r, "class", "item-title"), p(i, "class", "item-content"), U(i, "display", "block"), U(i, "min-height", "auto"), p(S, "class", "item-inner seed-list svelte-sejlla"), p(C, "class", "item-content"), p(n, "class", "list-block"), p(t, "class", "card-content"), p(e, "class", "card") }, m(a, m) { y(a, e, m), _(e, t), _(t, n), _(n, i), _(i, r), _(r, o); for (let d = 0; d < O.length; d += 1)O[d] && O[d].m(r, null); _(r, l), _(r, q), _(r, u), _(r, g), _(i, f), D && D.m(i, null), _(n, h), _(n, E), _(E, b), _(b, C), _(C, S); for (let d = 0; d < c.length; d += 1)c[d] && c[d].m(S, null) }, p(a, [m]) { if (m & 27) { N = a[0].filter(a[5]); let d; for (d = 0; d < N.length; d += 1) { const A = Ee(a, N, d); O[d] ? O[d].p(A, m) : (O[d] = Ce(A), O[d].c(), O[d].m(r, l)) } for (; d < O.length; d += 1)O[d].d(1); O.length = N.length } if (a[2] ? D ? D.p(a, m) : (D = Ie(a), D.c(), D.m(i, null)) : D && (D.d(1), D = null), m & 19) { v = a[0]; let d; for (d = 0; d < v.length; d += 1) { const A = ve(a, v, d); c[d] ? c[d].p(A, m) : (c[d] = Se(A), c[d].c(), c[d].m(S, null)) } for (; d < c.length; d += 1)c[d].d(1); c.length = v.length } }, i: M, o: M, d(a) { a && k(e), te(O, a), D && D.d(), te(c, a) } } } function ut(s, e, t) { let n, i, r, { seeds: o } = e; async function l(f) { t(1, n = !0), t(2, i = null); const h = V.getNumberOfHarvestablePlots(), E = V.getNumberOfEmptyPlots(), b = h + E; if (b <= 0) { t(2, i = "ERROR: No empty plots found"), t(1, n = !1); return } if (h > 0) try { await fetch(`worker.php?go=harvestall&id=${V.getFarmID()}`, { method: "POST" }) } catch (C) { console.error(C), t(2, i = "ERROR"), t(1, n = !1); return } try { const C = await pe(f, b); C === "success" ? (await fetch(`worker.php?go=plantall&id=${V.getFarmID()}`, { method: "POST" }), t(3, r = f), localStorage.setItem("few-farm-lastbought", f.toString()), L.refreshPage()) : t(2, i = `ERROR: ${C || "blank response; inventory already full?"}`) } catch (C) { console.error(C), t(2, i = "ERROR") } t(1, n = !1) } const q = f => f.id === r, u = f => l(f), g = f => l(f); return s.$$set = f => { "seeds" in f && t(0, o = f.seeds) }, t(1, n = !1), t(2, i = null), t(3, r = localStorage.getItem("few-farm-lastbought") != null && parseInt(localStorage.getItem("few-farm-lastbought"))), [o, n, i, r, l, q, u, g] } class ft extends W { constructor(e) { super(), Z(this, e, ut, at, Q, { seeds: 0 }) } } var V; (s => { const e = [{ name: "Pepper", id: 12, img: "/img/items/seeds_peppers.png" }, { name: "Carrot", id: 20, img: "/img/items/seeds_carrots.png" }, { name: "Pea", id: 28, img: "/img/items/seeds_peas.png" }, { name: "Cucumber", id: 30, img: "/img/items/seeds_cucumber.png" }, { name: "Eggplant", id: 14, img: "/img/items/seeds_eggplants.png" }, { name: "Radish", id: 32, img: "/img/items/seeds_radish.png" }, { name: "Onion", id: 34, img: "/img/items/seeds_onions.png" }, { name: "Hops", id: 47, img: "/img/items/seeds_hops.png" }, { name: "Potato", id: 49, img: "/img/items/seeds_potato.png" }, { name: "Tomato", id: 16, img: "/img/items/seeds_tomato.png" }, { name: "Leek", id: 51, img: "/img/items/seeds_leek.png" }, { name: "Watermelon", id: 60, img: "/img/items/seeds_watermelon.png" }, { name: "Corn", id: 64, img: "/img/items/seeds_corn.png" }, { name: "Cabbage", id: 66, img: "/img/items/seeds_cabbage.png" }, { name: "Pine", id: 410, img: "/img/items/seeds_pine.png" }, { name: "Pumpkin", id: 68, img: "/img/items/seeds_pumpkin.png" }, { name: "Wheat", id: 70, img: "/img/items/seeds_wheet.png" }, { name: "Mushroom", id: 395, img: "/img/items/seeds_mushroom.png" }, { name: "Broccoli", id: 257, img: "/img/items/seeds_broccoli.png" }, { name: "Cotton", id: 255, img: "/img/items/seeds_cotton.png" }, { name: "Sunflower", id: 374, img: "/img/items/seeds_sunflower.png" }, { name: "Beet", id: 449, img: "/img/items/seeds_beet.png" }, { name: "Rice", id: 631, img: "/img/items/seeds_rice.png" }]; function t() { return $("#croparea [data-farm]").data("farm") } s.getFarmID = t; function n() { return $("#crops").find(".cropitem,.plantseed").length } s.getNumberOfPlots = n; function i() { return $("#crops").find(".plantseed").length } s.getNumberOfEmptyPlots = i; function r() { return $("#crops").find(".harvest").length } s.getNumberOfHarvestablePlots = r; function o({ container: q }) { const u = $("<div />").insertAfter($(q).find("#croparea")); if (u.length) return new ft({ target: u[0], props: { seeds: e } }) } function l() { L.onPageInit("xfarm", o) } s.setup = l })(V || (V = {})); const be = class extends EventTarget { constructor() { super(); R(this, "active", !1); R(this, "stopRequested", !1) } get isActive() { return this.active } get isStopRequested() { return this.stopRequested } async start() { if (!this.active) { this.active = !0; try { if (!$("#fishinwater").length) throw new Error("No fishing area detected"); for (; this.getBaitCount() > 0 && (await this.fishOne(), !this.stopRequested);)await F(.3, .4); this.active = !1, this.stopRequested = !1, this.dispatchEvent(new Event(be.FINISHED)), re.SOUND_FINISHED.play() } catch (t) { alert(t.message) } } } stop() { this.stopRequested || !this.active || (this.stopRequested = !0) } async fishOne() { if (await this.clickFish() === "mealworm") return this.stopRequested ? void 0 : await F(.07, .185); try { await oe(".picker-catch.modal-in", { visible: !0, timeout: .1 }) } catch { return this.stopRequested ? void 0 : await this.fishOne() } if (await F(.33), this.stopRequested) { this.catchFish(); return } await F(.23, .888), await this.catchFish(), await F(.05, .115) } async clickFish() { if (!$("#fishinwater").length) throw new Error("No fishing area detected"); const t = await oe(".fish.catch, .fish.fishcaught:not([src*='/splash'])", { visible: !0 }); return t.click(), t.classList.contains("fishcaught") ? "mealworm" : !0 } async catchFish() { if (!$(".picker-catch .fishcaught").length) throw new Error("Cannot find fishing to catch"); $(".picker-catch .fishcaught").trigger("click") } getBaitCount() { return parseInt($("#baitarea strong").first().text() || "0") } }; let ee = be; R(ee, "FINISHED", "FINISHED"); function dt(s) { let e; return { c() { e = I("🤖 AUTO FISH") }, m(t, n) { y(t, e, n) }, d(t) { t && k(e) } } } function mt(s) { let e; return { c() { e = I("🤖❌ STOP FISHING") }, m(t, n) { y(t, e, n) }, d(t) { t && k(e) } } } function ht(s) { let e; return { c() { e = I("🤖❌ STOPPING") }, m(t, n) { y(t, e, n) }, d(t) { t && k(e) } } } function gt(s) { let e, t, n; function i(l, q) { return l[0] ? ht : l[1] ? mt : dt } let r = i(s), o = r(s); return { c() { e = w("button"), o.c(), e.disabled = s[0] }, m(l, q) { y(l, e, q), o.m(e, null), t || (n = Y(e, "click", s[2]), t = !0) }, p(l, [q]) { r !== (r = i(l)) && (o.d(1), o = r(l), o && (o.c(), o.m(e, null))), q & 1 && (e.disabled = l[0]) }, i: M, o: M, d(l) { l && k(e), o.d(), t = !1, n() } } } function pt(s, e, t) { let n, i; const r = se.bot; function o() { r.isActive ? r.stop() : r.start(), t(1, n = r.isActive), t(0, i = r.isStopRequested) } return r.addEventListener(ee.FINISHED, () => { t(1, n = r.isActive), t(0, i = r.isStopRequested) }), t(1, n = r.isActive), t(0, i = r.isStopRequested), [i, n, o] } class _t extends W { constructor(e) { super(), Z(this, e, pt, gt, Q, {}) } } function Me(s, e, t) { const n = s.slice(); return n[8] = e[t].name, n[9] = e[t].num, n[10] = e[t].imgSrc, n } function wt(s) { let e, t = s[0], n = []; for (let i = 0; i < t.length; i += 1)n[i] = Re(Me(s, t, i)); return { c() { for (let i = 0; i < n.length; i += 1)n[i].c(); e = Fe() }, m(i, r) { for (let o = 0; o < n.length; o += 1)n[o] && n[o].m(i, r); y(i, e, r) }, p(i, r) { if (r & 65) { t = i[0]; let o; for (o = 0; o < t.length; o += 1) { const l = Me(i, t, o); n[o] ? n[o].p(l, r) : (n[o] = Re(l), n[o].c(), n[o].m(e.parentNode, e)) } for (; o < n.length; o += 1)n[o].d(1); n.length = t.length } }, d(i) { te(n, i), i && k(e) } } } function bt(s) { let e; return { c() { e = I("No other baits available") }, m(t, n) { y(t, e, n) }, p: M, d(t) { t && k(e) } } } function At(s) { let e; return { c() { e = I(s[1]) }, m(t, n) { y(t, e, n) }, p(t, n) { n & 2 && x(e, t[1]) }, d(t) { t && k(e) } } } function kt(s) { let e; return { c() { e = I("Loading...") }, m(t, n) { y(t, e, n) }, p: M, d(t) { t && k(e) } } } function Re(s) { let e, t, n, i, r, o = s[9] + "", l, q, u, g, f; function h() { return s[7](s[8]) } return { c() { e = w("span"), t = w("img"), r = P(), l = I(o), q = P(), j(t.src, n = s[10]) || p(t, "src", n), p(t, "height", "14"), p(t, "alt", i = s[8]), p(e, "class", "quick-swap-bttn svelte-ziplh9"), p(e, "title", u = s[8]) }, m(E, b) { y(E, e, b), _(e, t), _(e, r), _(e, l), _(e, q), g || (f = Y(e, "click", h), g = !0) }, p(E, b) { s = E, b & 1 && !j(t.src, n = s[10]) && p(t, "src", n), b & 1 && i !== (i = s[8]) && p(t, "alt", i), b & 1 && o !== (o = s[9] + "") && x(l, o), b & 1 && u !== (u = s[8]) && p(e, "title", u) }, d(E) { E && k(e), g = !1, f() } } } function yt(s) { let e; return { c() { e = I("BUY 200 WORMS") }, m(t, n) { y(t, e, n) }, p: M, d(t) { t && k(e) } } } function vt(s) { let e; return { c() { e = I(s[3]) }, m(t, n) { y(t, e, n) }, p(t, n) { n & 8 && x(e, t[3]) }, d(t) { t && k(e) } } } function Et(s) { let e, t, n, i, r, o, l, q, u; function g(S, N) { return S[2] ? kt : S[1] ? At : S[0].length <= 0 ? bt : wt } let f = g(s), h = f(s); function E(S, N) { return S[3] ? vt : yt } let b = E(s), C = b(s); return { c() { e = w("div"), t = w("div"), n = w("div"), i = w("div"), r = I(`Quick Swap:\r `), h.c(), o = P(), l = w("button"), C.c(), p(i, "class", "quick-swap-area svelte-ziplh9"), l.disabled = s[4], U(n, "display", "flex"), p(t, "class", "row"), U(t, "margin-bottom", "0"), p(e, "class", "card-content-inner"), U(e, "padding", "5px") }, m(S, N) { y(S, e, N), _(e, t), _(t, n), _(n, i), _(i, r), h.m(i, null), _(n, o), _(n, l), C.m(l, null), q || (u = Y(l, "click", s[5]), q = !0) }, p(S, [N]) { f === (f = g(S)) && h ? h.p(S, N) : (h.d(1), h = f(S), h && (h.c(), h.m(i, null))), b === (b = E(S)) && C ? C.p(S, N) : (C.d(1), C = b(S), C && (C.c(), C.m(l, null))), N & 16 && (l.disabled = S[4]) }, i: M, o: M, d(S) { S && k(e), h.d(), C.d(), q = !1, u() } } } function Ct(s, e, t) { let n, i, r, o; async function l() { try { t(4, n = !0); const f = await pe(18, 200); t(4, n = !1), f == "success" || f === "" ? L.refreshPage() : t(3, i = f) } catch (f) { t(3, i = "ERROR"), console.error(f) } } let q; oe("#last_bait").then(async () => { try { t(2, r = !1), t(0, q = await se.getCachedBaitData(jQuery("#last_bait").html())), t(0, q = q.filter(f => !f.selected)) } catch (f) { console.error(f) } }); async function u(f) { try { const h = await fetch(`worker.php?go=selectbait&bait=${f}`, { method: "POST" }).then(E => E.text()); h === "success" ? L.refreshPage() : t(1, o = `ERROR: ${h}`) } catch (h) { t(1, o = "ERROR"), console.error(h) } } const g = f => u(f); return t(4, n = !1), t(3, i = null), t(2, r = !0), t(0, q = []), t(1, o = null), [q, o, r, i, n, l, u, g] } class It extends W { constructor(e) { super(), Z(this, e, Ct, Et, Q, {}) } } var se; (s => { s.bot = new ee; async function e() { return new Promise(q => { $("<div/>").load("changebait.php?from=fishing&id=" + $(".zone_id").html(), function () { q($(this).find(".selectbait").map(function () { return { name: $(this).data("bait"), num: $(this).find(".item-after").text(), imgSrc: $(this).find("img").attr("src"), selected: $(this).find(".item-title i").text() === "check" } }).get()) }) }) } let t; async function n(q) { var g; const u = t && q && t.active === q ? t.list : await e(); return t = { list: u.slice(), active: (g = u.find(f => f.selected)) == null ? void 0 : g.name }, u } s.getCachedBaitData = n; function i(q) { const u = $(q).find(".buttons-row").append("<div />"); if (u.length) return new _t({ target: u[0] }) } function r(q) { const u = $("<div />").insertAfter($(q).find("#baitarea")); if (u.length) return new It({ target: u[0] }) } function o({ container: q }) { i(q), r(q) } function l() { L.onPageInit("fishing", o), L.onPageInit("*", ({ name: q }) => { q !== "fishing" && s.bot.stop() }) } s.setup = l })(se || (se = {})); function Oe(s) { let e, t, n; return { c() { e = w("button"), e.textContent = "CLAIM ALL", U(e, "margin-left", "10px") }, m(i, r) { y(i, e, r), t || (n = Y(e, "click", s[1]), t = !0) }, p: M, d(i) { i && k(e), t = !1, n() } } } function St(s) { let e, t = s[0] && Oe(s); return { c() { t && t.c(), e = Fe() }, m(n, i) { t && t.m(n, i), y(n, e, i) }, p(n, [i]) { n[0] ? t ? t.p(n, i) : (t = Oe(n), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null) }, i: M, o: M, d(n) { t && t.d(n), n && k(e) } } } function Mt(s, e, t) { let n; function i() { t(0, n = !1), r() } async function r() { jQuery(".claimbtn").length && (jQuery(".claimbtn").first().click(), await oe(".modal-button", { timeout: .25 }), await F(.5), jQuery(".modal-button").first().click(), await F(.25), await r()) } return t(0, n = !0), [n, i] } class Rt extends W { constructor(e) { super(), Z(this, e, Mt, St, Q, {}) } } var de; (s => { function e({ container: n }) { if (!$(n).find(".claimbtn").length) return; const i = $("<span />").appendTo($(".claimbtn:first-of-type").closest(".list-block").prev()); if (i.length) return new Rt({ target: i[0] }) } function t() { L.onPageInit("mastery", e) } s.setup = t })(de || (de = {})); function De(s, e, t) { const n = s.slice(); return n[1] = e[t].section, n[2] = e[t].links, n } function Ne(s, e, t) { const n = s.slice(); return n[5] = e[t].link, n[6] = e[t].text, n[7] = e[t].icon, n[8] = e[t].params, n[10] = t, n } function Be(s) { let e, t, n = s[1] + "", i; return { c() { e = w("div"), t = w("strong"), i = I(n), U(e, "margin-top", "3px") }, m(r, o) { y(r, e, o), _(e, t), _(t, i) }, p(r, o) { o & 1 && n !== (n = r[1] + "") && x(i, n) }, d(r) { r && k(e) } } } function Ot(s) { let e; return { c() { e = I(" •") }, m(t, n) { y(t, e, n) }, d(t) { t && k(e) } } } function Pe(s) { let e, t, n, i; return { c() { e = w("img"), i = P(), j(e.src, t = s[7]) || p(e, "src", t), p(e, "alt", n = s[6]), p(e, "height", "12") }, m(r, o) { y(r, e, o), y(r, i, o) }, p(r, o) { o & 1 && !j(e.src, t = r[7]) && p(e, "src", t), o & 1 && n !== (n = r[6]) && p(e, "alt", n) }, d(r) { r && k(e), r && k(i) } } } function Le(s) { let e, t, n = (s[6] ?? "") + "", i, r, o = s[10] != 0 && Ot(), l = s[7] && Pe(s); return { c() { o && o.c(), e = P(), t = w("a"), l && l.c(), i = I(n), p(t, "href", r = s[5] + ".php" + (s[8] ? "?" + new URLSearchParams(s[8]).toString() : "")), p(t, "class", "close-panel"), p(t, "data-view", ".view-main") }, m(q, u) { o && o.m(q, u), y(q, e, u), y(q, t, u), l && l.m(t, null), _(t, i) }, p(q, u) { q[7] ? l ? l.p(q, u) : (l = Pe(q), l.c(), l.m(t, i)) : l && (l.d(1), l = null), u & 1 && n !== (n = (q[6] ?? "") + "") && x(i, n), u & 1 && r !== (r = q[5] + ".php" + (q[8] ? "?" + new URLSearchParams(q[8]).toString() : "")) && p(t, "href", r) }, d(q) { o && o.d(q), q && k(e), q && k(t), l && l.d() } } } function Ue(s) { let e, t, n, i = s[1] && Be(s), r = s[2], o = []; for (let l = 0; l < r.length; l += 1)o[l] = Le(Ne(s, r, l)); return { c() { e = w("div"), i && i.c(), t = P(); for (let l = 0; l < o.length; l += 1)o[l].c(); n = P() }, m(l, q) { y(l, e, q), i && i.m(e, null), _(e, t); for (let u = 0; u < o.length; u += 1)o[u] && o[u].m(e, null); _(e, n) }, p(l, q) { if (l[1] ? i ? i.p(l, q) : (i = Be(l), i.c(), i.m(e, t)) : i && (i.d(1), i = null), q & 1) { r = l[2]; let u; for (u = 0; u < r.length; u += 1) { const g = Ne(l, r, u); o[u] ? o[u].p(g, q) : (o[u] = Le(g), o[u].c(), o[u].m(e, n)) } for (; u < o.length; u += 1)o[u].d(1); o.length = r.length } }, d(l) { l && k(e), i && i.d(), te(o, l) } } } function Dt(s) { let e, t, n, i, r, o, l, q, u, g = s[0], f = []; for (let h = 0; h < g.length; h += 1)f[h] = Ue(De(s, g, h)); return { c() { e = w("div"), t = w("div"), n = w("div"), i = w("div"), i.innerHTML = '<i class="fa fa-fw fa-lightbulb-o"></i>', r = P(), o = w("div"), l = w("div"), l.textContent = " Shortcuts", q = P(), u = w("div"); for (let h = 0; h < f.length; h += 1)f[h].c(); p(l, "class", "item-title"), U(u, "font-size", "14px"), U(n, "display", "grid"), U(n, "grid-template-columns", "1fr auto"), p(t, "class", "item-inner"), p(e, "class", "item-content") }, m(h, E) { y(h, e, E), _(e, t), _(t, n), _(n, i), _(n, r), _(n, o), _(o, l), _(o, q), _(o, u); for (let b = 0; b < f.length; b += 1)f[b] && f[b].m(u, null) }, p(h, [E]) { if (E & 1) { g = h[0]; let b; for (b = 0; b < g.length; b += 1) { const C = De(h, g, b); f[b] ? f[b].p(C, E) : (f[b] = Ue(C), f[b].c(), f[b].m(u, null)) } for (; b < f.length; b += 1)f[b].d(1); f.length = g.length } }, i: M, o: M, d(h) { h && k(e), te(f, h) } } } function Nt(s, e, t) { let { sections: n } = e; return s.$$set = i => { "sections" in i && t(0, n = i.sections) }, [n] } class Bt extends W { constructor(e) { super(), Z(this, e, Nt, Dt, Q, { sections: 0 }) } } var me; (s => { function e() { return $('.view-main a[href^="xfarm.php?id="]').attr("href").match(/\?id=(\d*)/)[1] } const t = [{ links: [{ link: "xfarm", text: "Farm", params: { id: e() } }, { link: "town", text: "Town" }, { link: "fish", text: "Fish" }, { link: "explore", text: "Explore" }] }, { section: "Town", links: [{ link: "market", text: "Sell" }, { link: "pets", text: "Pets" }, { link: "bank", text: "Bank" }, { link: "steakmarket", text: "Steak" }] }, { section: "Daily", links: [{ link: "daily", text: "Chores" }, { link: "well", text: "Well" }, { link: "crack", text: "Vault" }, { link: "spin", text: "Wheel" }, { link: "comm", text: "Community Center" }] }]; function n({ container: r }) { const o = $("<li />").insertAfter($(r).find(".list-block li:first-of-type")); if (o.length) return new Bt({ target: o[0], props: { sections: t } }) } function i() { n({ container: document.querySelector(".view.view-left.navbar-through .page") }) } s.setup = i })(me || (me = {})); function Pt(s) { let e, t; return { c() { e = I(`🤖 CHEAT\r `), t = w("abbr"), t.textContent = "ⓘ", p(t, "title", "Passwords fetched from the buddy.farm passwords list: https://buddy.farm/passwords/") }, m(n, i) { y(n, e, i), y(n, t, i) }, d(n) { n && k(e), n && k(t) } } } function Lt(s) { let e; return { c() { e = I("ALL USED") }, m(t, n) { y(t, e, n) }, d(t) { t && k(e) } } } function Ut(s) { let e; return { c() { e = I("Loading...") }, m(t, n) { y(t, e, n) }, d(t) { t && k(e) } } } function Gt(s) { let e, t, n, i; function r(q, u) { return q[1] ? Ut : q[0] ? Lt : Pt } let o = r(s), l = o(s); return { c() { e = w("button"), l.c(), e.disabled = t = s[0] || s[1], p(e, "class", "svelte-1bj479l") }, m(q, u) { y(q, e, u), l.m(e, null), n || (i = Y(e, "click", s[2]), n = !0) }, p(q, [u]) { o !== (o = r(q)) && (l.d(1), l = o(q), l && (l.c(), l.m(e, null))), u & 3 && t !== (t = q[0] || q[1]) && (e.disabled = t) }, i: M, o: M, d(q) { q && k(e), l.d(), n = !1, i() } } } function Tt(s, e, t) { let n, i; async function r() { t(1, n = !0); const { allPasswords: o, usedPasswords: l } = await qe.getPasswordData(); t(1, n = !1); const q = o.filter(u => !l.includes(u)); if (q.length <= 0) { t(0, i = !0); return } jQuery("#popw").val(q[0]) } return t(1, n = !1), t(0, i = !1), [i, n, r] } class Ft extends W { constructor(e) { super(), Z(this, e, Tt, Gt, Q, {}) } } var qe; (s => { async function e() { return fetch("https://buddy.farm/page-data/passwords/page-data.json").then(q => q.json()).then(q => q.result.data.farmrpg.passwords.map(u => u.password)) } async function t() { return new Promise(q => { $("<div/>").load("popwlog.php", function () { q($(this).find(".list-block .item-title span:first-of-type").map((u, g) => $(g).text()).get()) }) }) } let n, i; async function r() { return n ?? (n = (await e()).map(q => q.toLowerCase())), i ?? (i = (await t()).map(q => q.toLowerCase())), { allPasswords: n, usedPasswords: i } } s.getPasswordData = r; function o({ container: q }) { const u = $(q).find("#popw").closest(".item-inner").append("<div />"); if ($(".popwbtn").on("click", function () { i == null || i.push($("#popw").val().toString()) }), !!u.length) return new Ft({ target: u[0] }) } function l() { L.onPageInit("postoffice", o) } s.setup = l })(qe || (qe = {})); var he; (s => { const t = "0123456789".split(""), n = Array.from({ length: Math.pow(10, 4) }).map((v, c) => c.toString().padStart(4, "0")), i = { WRONG: 0, PARTIAL: 1, CORRECT: 2 }, r = (v, c) => Array.from({ length: v }).fill(c), o = v => v[Math.floor(Math.random() * v.length)], l = (v, c) => Array.from(v).filter(a => a == c).length, q = (v, c) => { let a = v.indexOf(c); return a > -1 && v.splice(a, 1)[0] }, u = (v, c) => Array.from(v).filter(a => !Array.from(c).includes(a)); class g { constructor(c) { R(this, "word_list"); R(this, "letter_count"); R(this, "word_scores"); R(this, "position_letter_count"); R(this, "position_word_scores"); this.word_list = (c == null ? void 0 : c()) ?? [], this.letter_count = {}, this.word_scores = {}, this.position_letter_count = r(4).map(() => ({})), this.position_word_scores = {}, this.gen_word_scores(), this.gen_positional_word_scores() } copy() { let c = new g; return c.word_list = this.word_list.slice(), c.word_scores = { ...this.word_scores }, c.position_word_scores = { ...this.position_word_scores }, c } get length() { return this.word_list.length } get_random_word() { return o(this.word_list) } get_hiscore_word(c = !1) { const a = c ? this.position_word_scores : this.word_scores; let m = "", d = 0; for (let A of this.word_list) a[A] > d && (d = a[A], m = A); return m } get_maximized_word(c) { this.gen_letter_count(); let a = "", m = 0; for (let d of this.word_list) { let A = 0; for (let B of c) d.indexOf(B) > -1 && (A += 1); A > m && (m = A, a = d) } return a } gen_letter_count() { this.letter_count = Object.fromEntries(t.map(c => [c, 0])); for (let c of this.word_list) for (let a of new Set(c)) this.letter_count[a] += 1 } gen_positional_letter_count() { for (let c = 0; c < 4; c++)this.position_letter_count[c] = Object.fromEntries(t.map(a => [a, 0])); for (let c of this.word_list) Array.from(c).forEach((a, m) => { this.position_letter_count[m][a] += 1 }) } gen_word_scores() { this.gen_letter_count(), this.word_scores = {}; for (let c of this.word_list) { let a = 0; for (let m of new Set(c)) a += this.letter_count[m]; this.word_scores[c] = a } } gen_positional_word_scores() { this.gen_positional_letter_count(), this.position_word_scores = {}; for (let c of this.word_list) { let a = {}; Array.from(c).forEach((m, d) => { a[m] !== void 0 ? a[m] = this.position_letter_count[d][m] : a[m] = Math.max(a[m], this.position_letter_count[d][m]) }), this.position_word_scores[c] = Object.values(a).length } } filter_by_mask(c, a, m) { let d = []; for (let A of this.word_list) if (!c.some((T, G) => !!T.length && A[G] != T[0])) { let T = !0; for (let G = 0; G < a.length; G++) { let ne = !1; const je = a[G]; for (let Qe of je) A[G] == Qe && (ne = !0); if (ne) { T = !1; break } } T && (t.some(G => !m[l(A.split(""), G)].has(G)) || d.push(A)) } this.word_list = d } } class f { constructor(c, a, m) { R(this, "word"); R(this, "result"); R(this, "guessed_correctly"); this.word = c, this.result = m ?? this.get_result(a), this.guessed_correctly = l(this.result, i.CORRECT) === 4 } toString() { let c = `${this.word}: `; for (let a of this.result) return a == 2 ? c += "G" : a == 1 && (c += "Y"), a == 0 && (c += "_"), c } get_result(c) { let a = r(4, i.WRONG), m = [...c]; Array.from(this.word).forEach((d, A) => { d == m[A] && (a[A] = i.CORRECT, m[A] = "") }); for (let d = 0; d < this.word.length; d++)if (m.includes(this.word[d]) && a[d] != i.CORRECT) { a[d] = i.PARTIAL; for (let A = 0; A < 4; A++)if (m[A] == this.word[d]) { m[A] = ""; break } } return l(a, i.CORRECT) === 4 && (this.guessed_correctly = !0), a } } class h { constructor(c = "#random") { R(this, "correct_word"); R(this, "guesses"); c === "#random" ? this.correct_word = N.get_random_word() : N.word_list.indexOf(c) > -1 && (this.correct_word = c), this.guesses = [] } toString() { return `::${this.correct_word}::` + this.guesses.map((c, a) => ` ${a + 1}. ${c}`).join("") } guess(c, a) { return this.guesses.push(new f(c, this.correct_word, a)), this.guesses.at(-1).guessed_correctly } } class E { constructor(c) { R(this, "yes_mask"); R(this, "no_mask"); R(this, "allowed_mask"); R(this, "must_use"); R(this, "remaining_words"); this.yes_mask = r(4).map(() => []), this.no_mask = r(4).map(() => []), this.allowed_mask = r(4 + 1).map(() => new Set(t)), this.must_use = new Set, this.remaining_words = c.copy() } filter_word_list() { this.remaining_words.filter_by_mask(this.yes_mask, this.no_mask, this.allowed_mask) } reuse_green() { let c = r(4).map(() => []), a = this.yes_mask, m = new Set; this.yes_mask.concat(this.no_mask).forEach(G => { for (let ne of G) m.add(ne) }); let d = new Set(u(this.allowed_mask[1], m)), A = d, B = [new Set(t), ...r(4).map(() => new Set(A))], T = O.copy(); return T.filter_by_mask(c, a, B), T.length > 0 ? T.get_maximized_word(Array.from(d)) : "" } make_guess() { if (!D.includes("scored") || D.includes("firstrandom") && this.remaining_words.length == O.length) return this.remaining_words.get_random_word(); let c = 4 - this.yes_mask.filter(a => a.length === 0).length; if (D.includes("easymode") && c > 0 && this.remaining_words.length > 2) { let a = this.reuse_green(); if (a != "") return a } return D.includes("recount") && (this.remaining_words.gen_word_scores(), this.remaining_words.gen_positional_word_scores()), D.includes("position") ? this.remaining_words.get_hiscore_word(!0) : this.remaining_words.get_hiscore_word(!1) } update_yes_mask(c) { c.result.forEach((a, m) => { a == i.CORRECT && (this.yes_mask[m].includes(c.word[m]) || this.yes_mask[m].push(c.word[m])) }) } update_no_mask(c) { c.result.forEach((a, m) => { a == i.PARTIAL && (this.no_mask[m].includes(c.word[m]) || this.no_mask[m].push(c.word[m])), a == i.WRONG && l(c.word, c.word[m]) > 1 && (this.no_mask[m].includes(c.word[m]) || this.no_mask[m].push(c.word[m])) }) } update_allowed_mask(c) { let a = {}; Array.from(c.word).forEach((m, d) => { a[m] ? a[m].push(c.result[d]) : a[m] = [c.result[d]] }), Object.entries(a).forEach(([m, d]) => { if (d.includes(i.WRONG)) { let A = d.length - l(d, i.WRONG); for (let B = A + 1; B < 4; B++)this.allowed_mask[B].delete(m) } if (d.includes(i.PARTIAL) || d.includes(i.CORRECT)) { let A = l(d, i.PARTIAL) + l(d, i.CORRECT); for (let B = 0; B < A; B++)this.allowed_mask[B].delete(m) } }) } update_mask_with_guess(c) { this.update_yes_mask(c), this.update_no_mask(c), this.update_allowed_mask(c) } update_mask_with_remaining_words() { this.remaining_words.gen_letter_count(), Object.entries(this.remaining_words.letter_count).forEach(([c, a]) => { if (a == 0) for (let m = 1; m < this.allowed_mask.length; m++)this.allowed_mask[m].delete(c) }) } remove_word(c) { q(this.remaining_words.word_list, c) } } function b() { const v = new h(null), c = new E(O); return { getGuess() { return c.make_guess() }, submitResult(a, m) { const d = v.guess(a, (typeof m == "string" ? m.split("") : m).map(A => parseInt(A))); return c.remove_word(a), c.update_mask_with_guess(v.guesses.at(-1)), c.filter_word_list(), c.update_mask_with_remaining_words(), d } } } s.realtimeGameSolver = b; function C(v = !0, c = null) { v || console.log("game started"); const a = new h("9876"), m = new E(O); let d = !1, A = 10; for (; !d && A > 0;) { let B = m.make_guess(); a.guess(B) && (d = !0), m.remove_word(B), m.update_mask_with_guess(a.guesses.at(-1)), m.filter_word_list(), m.update_mask_with_remaining_words(), A-- } return v || console.log(a), a.guesses.at(-1).guessed_correctly ? a.guesses : -1 } function S() { let v = Date.now(); C(!1), console.log(`Time: ${Date.now() - v}`) } s.main = S; const N = new g(() => n), O = new g(() => n), D = ["scored", "recount", "firstrandom_off", "position", "easymode"] })(he || (he = {})); function Yt(s) { let e, t, n; return { c() { e = w("button"), e.textContent = "🤖 GUESS" }, m(i, r) { y(i, e, r), t || (n = Y(e, "click", s[0]), t = !0) }, p: M, i: M, o: M, d(i) { i && k(e), t = !1, n() } } } function jt(s) { const e = { G: 0, Y: 1, B: 2 }; function t() { const n = he.realtimeGameSolver(); jQuery(".col-25[data-type]").closest(".card-content-inner").find(".row").map((r, o) => ({ cellsResult: jQuery(o).find("[data-type]").map((l, q) => e[jQuery(q).data("type")]).get(), cellsGuess: jQuery(o).find("[data-type]").map((l, q) => jQuery(q).text()).get() })).get().forEach(r => n.submitResult(r.cellsGuess.join(""), r.cellsResult)), jQuery("#vaultcode").val(n.getGuess()) } return [t] } class Qt extends W { constructor(e) { super(), Z(this, e, jt, Yt, Q, {}) } } var ge; (s => { function e({ container: n }) { const i = $("<div />").appendTo($(n).find("#vaultcode").closest(".item-inner")); if (i.length) return new Qt({ target: i[0] }) } function t() { L.onPageInit("crack", e) } s.setup = t })(ge || (ge = {})); typeof GM_getResourceText < "u" && GM_addStyle(GM_getResourceText("scriptStyle")); me.setup(); se.setup(); le.setup(); qe.setup(); ge.setup(); de.setup(); V.setup();