-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
50 lines (40 loc) · 1.24 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
module.exports = function dildo(wdym) {
let isEnabled = true;
// WHAT DO YOU MEAN BY DILDO?
function getDildoSpawnVersion() {
let ver = 18
switch (wdym.majorPatchVersion) {
case 92: ver = 15;
break;
case 100: ver = 16;
break;
default: ver = '*'
}
return ver
}
wdym.hook('S_SPAWN_USER', getDildoSpawnVersion(), event => {
if (event.gm) {
let message = 'GM ' + event.name + ' detected!';
if (event.gmInvisible) message += ' (Invisible)';
// NOTIFY A CHEATING IDIOT THAT SOMEONE IS WATCHING
wdym.command.message(message);
let msgObject = {
message : text,
type: 42,
chat: 0,
channel: 27
};
wdym.send("S_DUNGEON_EVENT_MESSAGE", 2, msgObject);
event.gmInvisible = false;
return true;
}
});
// DISABLE THIS / ENABLE
wdym.command.add('gm', {
'$default'() {
isEnabled = !isEnabled;
wdym.command.message(' Mod is now ' + (isEnabled ? 'enabled' : 'disabled') + '.');
}
});
// ESCAPE ROOM SOONTM
}