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/utils/keybinds.ts
Views: 723
1
import { _ } from "../utils/util"; // Import Prodigy typings
2
import { Confirm, Toast } from "../utils/swal"; // Import Swal, Toast, Confirm, Input, and NumberInput from swal
3
4
5
6
7
8
window.addEventListener("keydown", event => {
9
10
11
12
13
switch (event.key) {
14
15
case "`":
16
// Close All Popups
17
_.instance.prodigy.open.menuCloseAll();
18
break;
19
20
case "\\":
21
// Gets you kitted up in Celestial Gear
22
const k = async () => {
23
24
25
26
if (!(
27
await Confirm.fire("Kit", "Would you like to equip Celestial Gear?")
28
).value) {
29
return console.log("Cancelled");;
30
}
31
32
_.player.equipment.setHat(200);
33
_.player.equipment.setBoots(93);
34
_.player.equipment.setOutfit(161);
35
_.player.equipment.setWeapon(196);
36
37
_.player.appearanceChanged = true;
38
39
Toast.fire("Success!", "You are now wearing Celestial Armor and wielding a Dual Blade.", "success");
40
};
41
k();
42
break;
43
44
}
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
58
if (event.code === "KeyL") {
59
Phaser.GAMES[0].state.states.Login._gameObj.user.x = Phaser.GAMES[0].input.mousePointer.position.x;
60
Phaser.GAMES[0].state.states.Login._gameObj.user.y = Phaser.GAMES[0].input.mousePointer.position.y;
61
}
62
if (event.code === "Escape") {
63
Phaser.GAMES[0].state.states.Login._gameObj.open.menus.map(x => x.close());
64
}
65
if (!Phaser.GAMES[0].state.states.Login._gameObj.open.menus.length) {
66
if (event.code === "KeyE") {
67
Phaser.GAMES[0].state.states.Login._gameObj.open.backpack();
68
}
69
if (event.code === "KeyT") {
70
Phaser.GAMES[0].state.states.Login._gameObj.open.chat();
71
}
72
}
73
*/
74
});
75
76