Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/cheatGUI/src/hacks/misc.ts
Views: 723
// Miscellaneous Hacks1234// BEGIN IMPORTS5import { Toast, Confirm, Swal } from "../utils/swal"; // Import Toast and Confirm from swal6import { category } from "../index"; // Import the Cheat GUI bases.7import Toggler from "../class/Toggler";8import Hack from "../class/Hack";9import { current, player, _ } from "../utils/util"; // Import Prodigy typings10import { startFps, stopFps } from "../utils/fps";11// END IMPORTS121314// BEGIN MISCELLANEOUS HACKS15161718// Begin Skip Tutorial19new Hack(category.misc, "Skip Tutorial").setClick(async () => {20const setQuest = (t: string, i: number, n?: unknown, e?: unknown) => {21_.instance.prodigy.world.getZone(t).testQuest(i, n, e);22try {23Object.fromEntries(_.instance.game.state.states).TileScreen.process();24} catch {}25};2627setQuest("house", 2);28setQuest("academy", 2);29player.state.set("tutorial-0", 4);30player.backpack.addKeyItem(13, 0);31player.tutorial.data.menus[14] = [1];32_.instance.prodigy.open.map(true, []);33player.onTutorialComplete();34player.data.level = Math.max(player.data.level, 5);35});36// End Skip Tutorial37383940// Begin Disable Monster Encounters41new Toggler(category.misc, "Disable Monster Encounters").setEnabled(async () => {42_.constants.constants["GameConstants.Debug.SCALE_ENCOUNTER_DISTANCE"] = 0;43return Toast.fire("Enabled!", "Monsters will no longer battle you.", "success");4445}).setDisabled(() => {46_.constants.constants["GameConstants.Debug.SCALE_ENCOUNTER_DISTANCE"] = 1;47return Toast.fire("Disabled!", "Monsters will now battle you.", "success");48});49// End Disable Monster Encounters505152// Begin FPS Counter53new Toggler(category.beta, "FPS Counter [BETA]", "Shows you a framerate counter").setEnabled(async () => {54startFps();55}).setDisabled(async() => {56stopFps();57});58// End FPS Counter596061// Begin Unlimited Spins62try {63const canSpinBackup = current.user.source.canSpin;64new Toggler(category.misc, "Unlimited Spins", "Lets you spin the wheel as many times as you want!").setEnabled(async () => {65player.canSpin = (() => { true; });66return Toast.fire("Enabled!", "You can now spin the wheel as many times as you want!", "success");67}).setDisabled(async() => {68player.canSpin = canSpinBackup;69return Toast.fire("Disabled!", "You can now spin the wheel only when allowed.", "success");70});71// End Unlimited Spins72} catch (error : unknown) {73console.error("Unlimited Spins ERROR: " + error);74}757677// Begin Bobbify78new Hack(category.misc, "Bobbify", "Converts your account into Bobby Fancywoman.").setClick(async () => {79if (!(80await Confirm.fire("Are you sure you want your account to be turned into Bobby Fancywoman?", "This action is not reversable.")81).value) return;8283player.name.data.nickname = null;84player.name.data.firstName = 44;85player.name.data.middleName = 754;86player.name.data.lastName = 882;87player.data.stars = -1e22;88player.data.level = 69;8990player.appearance.setGender("male");91player.appearance.setEyeColor(1);92player.appearance.setFace(4);93player.appearance.setHair(19, 1);94player.appearance.setSkinColor(1);95player.equipment.setFollow(19);96player.equipment.setHat(19);97player.equipment.setBoots(19);98player.equipment.setOutfit(19);99player.equipment.setWeapon(19);100101return Toast.fire("Bobbified!", "You are now Bobby Fancywoman.", "success");102});103// End Bobbify104105106107// Begin Reset Account108new Hack(category.misc, "Reset Account", "Completely resets your account.").setClick(async () => {109if (!(await Confirm.fire("Are you sure you want to reset your account?", "This action is not reversible.")).value) return;110player.resetAccount();111return Swal.fire("Reset!", "Your account has been reset. Reload Prodigy for the full effect.", "success");112});113// End Reset Account114115116117// Begin Fix Battle Crash118new Hack(category.misc, "[Fix] Fix Battle Crash").setClick(async () => {119// @ts-expect-error120player.kennel.petTeam.forEach(v => {121if (v && (v as any).assignRandomSpells) (v as any).assignRandomSpells();122});123124return Toast.fire("Success!", "Fixed kennel attack bug!", "success");125});126// End Fix Battle Crash127128129130// Begin Stuck in Unfinished Tower Fix131new Hack(category.misc, "[Fix] Stuck in Unfinished Tower Fix", "Takes you out of an unfinished tower if you're stuck in one.").setClick(async () => {132_.instance.prodigy.world.zones["house"].teleport("exit");133return Toast.fire("Success!", "You've been teleported outside of your house.", "success");134});135// End Stuck in Unfinished Tower Fix136137138139140// Begin uwu141new Hack(category.misc, "uwu", "OwO").setClick(async () => {142143if (!(144await Confirm.fire("Are you sure that you want to UwU OwO?", "Reload Prodigy to revert UwU.")145).value) return console.log("uwu cancelled");146147// @ts-ignore148// eslint-disable-next-line149Object.chance = t => { const e = {}; let r = 0; for (const n of Object.keys(t).sort((t, r) => e[t] - e[r]))e[n] = [], e[n][0] = r + 1, e[n][1] = t[n] + r, r = t[n] + r; return e; }, Object.random = t => { const e = Object.values(t); const r = e[e.length - 1][1]; const n = Math.randint(r); return Object.reverse(t)[e.find(t => n >= t[0] && n <= t[1])]; }, Array.prototype.join = function (t = ",") { return typeof t === "string" ? this.reduce((e, r, n, o) => e + (n < this.length - 1 ? r + t : r), "") : t instanceof Function ? this.reduce((e, r, n, o) => e + (n < this.length - 1 ? r + t(o[n], n, o) : r), "") : void 0; }, Array.prototype.leftJoin = function (t = ",") { return typeof t === "string" ? this.reduce((e, r, n) => e + (n ? t + r : r), "") : t instanceof Function ? this.reduce((e, r, n, o) => e + (n ? t(o[n], n, o) + r : r), "") : void 0; }, String.UWUFX = t => { const e = Object.chance({ "owo :3": 20, "✧w✧": 20, UwU: 20, OwO: 10, rawr: 10, "uwu :3": 5, ":3 meow": 15, ":3": 15, X3: 15, "*purrs*": 15, owo: 15, uwu: 15, "^w^": 15, "x3 rawr": 15, owowowowo: 15 }); return t.split(" ").leftJoin((t, e) => Math.floor(6 * Math.random()) === 0 && /[A-Za-z]/.test(t[0]) ? ` ${t[0]}-` : " ").split(" ").join((t, r) => Math.floor(5 * Math.random()) === 0 ? ` ${Object.random(e)} ` : " "); }, String.UWUTable = { y: "wy", l: "w", r: "w", ss: "zs", n: "nw", ove: "uv", ome: "um", x: "ks", com: "cum", stu: "stew", au: "aw" }, Math.randint = (t, e = 0) => Math.floor(Math.random() * t - e) + e, String.prototype.escapeRegex = function () { return this.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); }, String.prototype.replaceAll = function (t, e) { return this.replace(new RegExp(t.toString().escapeRegex(), "gi"), t => e); }, Object.fromArrays = (t, e) => { const r = {}; return t.forEach((t, n) => { r[t] = e[n]; }), r; }, Object.reverse = t => Object.fromArrays(Object.values(t), Object.keys(t)), String.prototype.bulkReplace = function (t) { let e = this; for (const r in t)e = e.replaceAll(r, t[r]); return e; }, String.UWU = t => String(t).bulkReplace(String.UWUTable); Object.keys(_.localizer.dataSource._languageData).map(x => _.localizer.dataSource._languageData[x] = String.UWUFX(String.UWU(_.localizer.dataSource._languageData[x]))); Object.values(_.gameData).map(x => x.map(y => [y.data.name && (y.data.name = String.UWUFX(String.UWU(y.data.name))), y.name && (y.name = String.UWUFX(String.UWU(y.name))), y.data.flavorText && (y.data.flavorText = String.UWUFX(String.UWU(y.data.flavorText)))]));150return Toast.fire("uwu", "Reload Prodigy to fix uwu.", "success");151});152// End uwu153154155156157158// END MISCELLANEOUS HACKS159160161