summaryrefslogtreecommitdiff
path: root/world/map/npc/commands/numa.txt
blob: 5d5e18db7f4a63cdc63c43e86e338f870cec3393 (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
// all-in-one debug
// author: meko

-|script|SuperDebug|32767
{
    if (GM < MAP_LOUNGE && GM < G_SYSOP && !debug) goto L_GM2; // make sure you can enter the gm lounge
    if (target(BL_ID,getnpcid("Numa"),1)) goto L_Main;
    npcaction 6, 12;
    title "Numa";
    goto L_Main;

L_GM2:
    message strcharinfo(0), "numa : GM command is level "+ MAP_LOUNGE +", but you are level " + GM;
    end;

L_Main:
    mes "How may I help you?";
    next;
    menu
        "Announcements", L_StoneBoard,
        "MOTD", L_MOTD,
        "Holiday debug", L_Holiday,
        "Event debug", L_Event,
        "Quest debug", L_Quest,
        "Who are you?", L_WhoAmI,
        "Close", L_Close;
        // todo: generic npcs
        // todo: map list

L_WhoAmI:
    mes "I am Numa, also known as `SuperDebug`.";
    mes "My sole purpose is to assist TMW staff from behind-the-scene.";
    mes "Using me, you can access several debug menus.";
    mes "You can call me from anywhere using the ##B@numa##b spell, or you can come see me in person.";
    next;
    goto L_Main;

L_Holiday:
    if (GM < DBG_HOLIDAY && GM < G_SYSOP) goto L_GM;
    mes "What holiday do you want to debug?";
    next;
    menu
        "Xmas.", L_XmasDebug,
        "Halloween.", L_HalloweenDebug,
        "Easter.", L_EasterDebug;

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

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

L_EasterDebug:
    gmlog strcharinfo(0) + " accessed the Easter debug.";
    callfunc "Easter Debug";
    goto L_Close;

L_Event:
    if (GM < EVT_DEBUG && GM < G_EVENT) goto L_GM;
    gmlog strcharinfo(0) + " accessed the GM event debug.";
    callfunc "GmDebug";
    goto L_Close;

L_StoneBoard:
    if (GM < DBG_SCHEDULED && GM < G_SYSOP) goto L_GM;
    callfunc "SBConfig";
    goto L_Close;

L_MOTD:
    if (GM < DBG_MOTD && GM < G_SYSOP) goto L_GM;
    callfunc "MOTDConfig";
    goto L_Close;

L_GM:
    mes "I'm awfully sorry.";
    mes "You do not have the required GM level to perform this action.";
    goto L_Close;

L_Quest:
    callfunc "QuestDebug";
    goto L_Close;

L_Close:
    close;

OnInit:
    registercmd chr(ATCMD_SYMBOL) + "numa", strnpcinfo(0);
    registercmd chr(ATCMD_SYMBOL) + "superdebug", strnpcinfo(0);
    if (puppet("017-9", 30, 28, "Numa", 393) < 1) mapexit;
    if(!($@FIGHT_CAVE_MAX_LEVEL))
        set $@FIGHT_CAVE_MAX_LEVEL, 2200;
    end;
}

function|script|QuestDebug
{
    goto L_ChooseContinent;

L_ChooseContinent:
    mes "Choose a continent.";
    next;
    menu
        "Argeas", L_Argeas,
        "World", L_World,
        "Close", L_Return;

L_Argeas:
    mes "Choose an area.";
    next;
    menu
        "Woodland", L_Woodland,
        "Choose a continent", L_ChooseContinent,
        "Close", L_Return;

L_Woodland:
    mes "Choose a quest.";
    next;
    menu
        "Illia Sisters", L_Valia,
        "Candor Battle", L_Candor,
        "Choose an area", L_Argeas,
        "Close", L_Return;

L_World:
    mes "Choose an event.";
    next;
    menu
        "Doomsday", L_Doomsday,
        "Kimarr", L_Fluffy,
        "Choose a continent", L_ChooseContinent,
        "Close", L_Return;

L_Return:
    return;

//////////////////////////////

L_Valia:
    callfunc "IlliaDebug";
    goto L_Return;

L_Doomsday:
    callfunc "DoomsdayDebug";
    goto L_Return;

L_Fluffy:
    callfunc "FluffyDebug";
    goto L_Return;

L_Candor:
    callfunc "CandorDebug";
    goto L_Return;
}