CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
ProdigyPNP

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: ProdigyPNP/ProdigyMathGameHacking
Path: blob/master/cheatGUI/src/hacks/misc.ts
Views: 723
1
// Miscellaneous Hacks
2
3
4
5
// BEGIN IMPORTS
6
import { Toast, Confirm, Swal } from "../utils/swal"; // Import Toast and Confirm from swal
7
import { category } from "../index"; // Import the Cheat GUI bases.
8
import Toggler from "../class/Toggler";
9
import Hack from "../class/Hack";
10
import { current, player, _ } from "../utils/util"; // Import Prodigy typings
11
import { startFps, stopFps } from "../utils/fps";
12
// END IMPORTS
13
14
15
// BEGIN MISCELLANEOUS HACKS
16
17
18
19
// Begin Skip Tutorial
20
new Hack(category.misc, "Skip Tutorial").setClick(async () => {
21
const setQuest = (t: string, i: number, n?: unknown, e?: unknown) => {
22
_.instance.prodigy.world.getZone(t).testQuest(i, n, e);
23
try {
24
Object.fromEntries(_.instance.game.state.states).TileScreen.process();
25
} catch {}
26
};
27
28
setQuest("house", 2);
29
setQuest("academy", 2);
30
player.state.set("tutorial-0", 4);
31
player.backpack.addKeyItem(13, 0);
32
player.tutorial.data.menus[14] = [1];
33
_.instance.prodigy.open.map(true, []);
34
player.onTutorialComplete();
35
player.data.level = Math.max(player.data.level, 5);
36
});
37
// End Skip Tutorial
38
39
40
41
// Begin Disable Monster Encounters
42
new Toggler(category.misc, "Disable Monster Encounters").setEnabled(async () => {
43
_.constants.constants["GameConstants.Debug.SCALE_ENCOUNTER_DISTANCE"] = 0;
44
return Toast.fire("Enabled!", "Monsters will no longer battle you.", "success");
45
46
}).setDisabled(() => {
47
_.constants.constants["GameConstants.Debug.SCALE_ENCOUNTER_DISTANCE"] = 1;
48
return Toast.fire("Disabled!", "Monsters will now battle you.", "success");
49
});
50
// End Disable Monster Encounters
51
52
53
// Begin FPS Counter
54
new Toggler(category.beta, "FPS Counter [BETA]", "Shows you a framerate counter").setEnabled(async () => {
55
startFps();
56
}).setDisabled(async() => {
57
stopFps();
58
});
59
// End FPS Counter
60
61
62
// Begin Unlimited Spins
63
try {
64
const canSpinBackup = current.user.source.canSpin;
65
new Toggler(category.misc, "Unlimited Spins", "Lets you spin the wheel as many times as you want!").setEnabled(async () => {
66
player.canSpin = (() => { true; });
67
return Toast.fire("Enabled!", "You can now spin the wheel as many times as you want!", "success");
68
}).setDisabled(async() => {
69
player.canSpin = canSpinBackup;
70
return Toast.fire("Disabled!", "You can now spin the wheel only when allowed.", "success");
71
});
72
// End Unlimited Spins
73
} catch (error : unknown) {
74
console.error("Unlimited Spins ERROR: " + error);
75
}
76
77
78
// Begin Bobbify
79
new Hack(category.misc, "Bobbify", "Converts your account into Bobby Fancywoman.").setClick(async () => {
80
if (!(
81
await Confirm.fire("Are you sure you want your account to be turned into Bobby Fancywoman?", "This action is not reversable.")
82
).value) return;
83
84
player.name.data.nickname = null;
85
player.name.data.firstName = 44;
86
player.name.data.middleName = 754;
87
player.name.data.lastName = 882;
88
player.data.stars = -1e22;
89
player.data.level = 69;
90
91
player.appearance.setGender("male");
92
player.appearance.setEyeColor(1);
93
player.appearance.setFace(4);
94
player.appearance.setHair(19, 1);
95
player.appearance.setSkinColor(1);
96
player.equipment.setFollow(19);
97
player.equipment.setHat(19);
98
player.equipment.setBoots(19);
99
player.equipment.setOutfit(19);
100
player.equipment.setWeapon(19);
101
102
return Toast.fire("Bobbified!", "You are now Bobby Fancywoman.", "success");
103
});
104
// End Bobbify
105
106
107
108
// Begin Reset Account
109
new Hack(category.misc, "Reset Account", "Completely resets your account.").setClick(async () => {
110
if (!(await Confirm.fire("Are you sure you want to reset your account?", "This action is not reversible.")).value) return;
111
player.resetAccount();
112
return Swal.fire("Reset!", "Your account has been reset. Reload Prodigy for the full effect.", "success");
113
});
114
// End Reset Account
115
116
117
118
// Begin Fix Battle Crash
119
new Hack(category.misc, "[Fix] Fix Battle Crash").setClick(async () => {
120
// @ts-expect-error
121
player.kennel.petTeam.forEach(v => {
122
if (v && (v as any).assignRandomSpells) (v as any).assignRandomSpells();
123
});
124
125
return Toast.fire("Success!", "Fixed kennel attack bug!", "success");
126
});
127
// End Fix Battle Crash
128
129
130
131
// Begin Stuck in Unfinished Tower Fix
132
new Hack(category.misc, "[Fix] Stuck in Unfinished Tower Fix", "Takes you out of an unfinished tower if you're stuck in one.").setClick(async () => {
133
_.instance.prodigy.world.zones["house"].teleport("exit");
134
return Toast.fire("Success!", "You've been teleported outside of your house.", "success");
135
});
136
// End Stuck in Unfinished Tower Fix
137
138
139
140
141
// Begin uwu
142
new Hack(category.misc, "uwu", "OwO").setClick(async () => {
143
144
if (!(
145
await Confirm.fire("Are you sure that you want to UwU OwO?", "Reload Prodigy to revert UwU.")
146
).value) return console.log("uwu cancelled");
147
148
// @ts-ignore
149
// eslint-disable-next-line
150
Object.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)))]));
151
return Toast.fire("uwu", "Reload Prodigy to fix uwu.", "success");
152
});
153
// End uwu
154
155
156
157
158
159
// END MISCELLANEOUS HACKS
160
161