-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.js
54 lines (47 loc) · 1.36 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
51
52
53
54
const Command = require('command');
module.exports = function InspectDungeonClears(dispatch) {
const command = Command(dispatch);
const DungeonNames = {
9950: "HH20",
9935: "RKHM",
9939: "RRHM",
9970: "RMHM",
9710: "BP",
9716: "SCNM",
9735: "RKNM",
9739: "RRNM",
9770: "RMNM",
9969: "LKHM",
9994: "TRHM",
9760: "KD",
9769: "LKNM",
9794: "TRNM",
9055: "RG",
9720: "AANM",
9920: "AAHM",
// 9766: "SF",
// 9860: "KC",
// 9809: "MC",
// 9808: "SA",
// 9025: "BT",
// 9026: "ACNM",
// 9727: "MCNM",
};
let playerId,
targetName;
dispatch.hook('S_LOGIN', 10, (event) => {
playerId = event.playerId;
});
dispatch.hook('C_DUNGEON_CLEAR_COUNT_LIST', 1, (event) => {
targetName = event.name;
});
dispatch.hook('S_DUNGEON_CLEAR_COUNT_LIST', 1, (event) => {
if (playerId === event.pid) return;
command.message(' ' + targetName + '\'s Dungeon Clears...');
for (let i = 0; i < event.dungeons.length; i++) {
if (DungeonNames[event.dungeons[i].id]) {
command.message(' ' + DungeonNames[event.dungeons[i].id] + '\t\t' + event.dungeons[i].clears);
}
}
});
}