summaryrefslogtreecommitdiff
path: root/world/map/npc/functions/superdebug.txt
blob: 5654dd4ccb9e0cf6104811e6cd878499fd658953 (plain) (blame)
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
55
56
57
58
59
60
61
62
63
64
65
// all-in-one debug
// author: meko

function|script|SuperDebug
{
    if(@from_npc) goto L_Main;
    npcaction 6, 12;
    title "Numa";
    goto L_Main;

L_Main:
    set @from_npc, 0;
    mes "[Numa]";
    mes "How may I help you?";
    next;
    menu
        "Announcements", L_StoneBoard,
        "MOTD", L_MOTD,
        "Holiday debug", L_Holiday,
        "Event debug", L_Event;
        // todo: generic npcs (in a future PR)
        // todo: map list (in a future PR)
        // todo: quest log debug (in a future PR)

L_Holiday:
    if(getgmlevel() < 40) goto L_GM;
    mes "[Numa]";
    mes "What holiday do you want to debug?";
    next;
    menu
        "Xmas.", L_XmasDebug,
        "Halloween.", L_HalloweenDebug;

L_XmasDebug:
    gmlog strcharinfo(0) + " accessed the Xmas debug.";
    callfunc "XmasDebug";
    end;

L_HalloweenDebug:
    gmlog strcharinfo(0) + " accessed the Halloween debug.";
    callfunc "HalloweenDebug";
    end;

L_Event:
    if(getgmlevel() < 60) goto L_GM;
    gmlog strcharinfo(0) + " accessed the GM event debug.";
    callfunc "GmDebug";
    close;

L_StoneBoard:
    if (getgmlevel() < 30) goto L_GM;
    callfunc "SBConfig";
    close;

L_MOTD:
    if (getgmlevel() < 40) goto L_GM;
    callfunc "MOTDConfig";
    close;

L_GM:
    mes "[Numa]";
    mes "I'm awfully sorry.";
    mes "You do not have the required GM level to perform this action.";
    close;
}