summaryrefslogtreecommitdiff
path: root/world/map/npc/annuals/2022.txt
blob: c566c697bbdbb1bad73abdb1b2ea22a81f86a4b8 (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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
// Evol script
// Year: 2022
//
////////////////////////////////////////////////
// Controls the party and puppets

003-1,42,94,0|script|#P2022Exit|400,4,0
{
    end;
OnTouch:
    mes "Do you want to leave the party?";
    if (#X21 < 10) goto L_Warn;
    goto L_Prompt;

L_Warn:
    mes "##1You won't be able to complete the party events once you leave.##0";
    goto L_Prompt;

L_Prompt:
    if (strcharinfo(0) == "Prsm") set $@PRSM_ONLINE, 0;
    next;
    menu
        "I'll stay a bit longer.", L_Close,
        "Leave to Tulimshar", L_Tulim,
        "Leave to Pachua Village", L_Pachua,
        "Leave to Hurnscald", L_Hurns,
        "Leave to Terranite Cave", L_Terra,
        "Leave to Nivalis", L_Nivalis,
        "Leave to Blue Sage Manor", L_Blue,
        "Leave to Graveyard", L_Crypt,
        "Leave to Keshlam Swamps", L_Keshlam,
        "Leave to Candor", L_Candor,
        "I've changed my mind.", L_Close;
L_Close:
    close;

L_Tulim:
    set #X21, 10;
    warp "002-1", 60, 42;
    close;

L_Pachua:
    set #X21, 10;
    warp "006-1", 28, 97;
    close;

L_Hurns:
    set #X21, 10;
    warp "008-1", 79, 84;
    close;

L_Terra:
    set #X21, 10;
    warp "012-3", 445, 65;
    close;

L_Nivalis:
    set #X21, 10;
    warp "020-1", 53, 122;
    close;

L_Blue:
    set #X21, 10;
    warp "048-2", 26, 47;
    close;

L_Crypt:
    set #X21, 10;
    warp "026-1", 49, 45;
    close;

// FIXME Map size changed?
L_Keshlam:
    set #X21, 10;
    warp "099-7", 75, 13;
    close;

L_Candor:
    set #X21, 10;
    warp "029-1", 69, 69;
    close;
}

////////////////////////////////////////////////
function|script|P22Login
{
    if (gettime(7) != 2022) goto L_Return;
    if (gettime(6) != 4) goto L_Return;
    if (gettime(5) != 2 && gettime(5) != 3) goto L_Return;
    if (gettimetick(2) - TUT_var < 1*7*86400) goto L_Return; // One week
    if (#X21 < 4) goto L_Warp;
    if (getmap() == "003-1") goto L_FixMask;
    return;

L_FixMask:
    mapmask 1 | 2;
    return;

L_Warp:
    set #X21, 4;
    warp "003-1", 45, 24;
    mapmask 1 | 2;
    if (strcharinfo(0) == "Prsm") goto L_Prsm;
    return;

L_Prsm:
    npctalk "Constable Bob#P21", "Prsm, congratulations for 11 years in TMW Staff! \o/";
    set $@PRSM_ONLINE, 1;
    sc_end(SC_HIDE);
    return;

L_Return:
    return;
}

////////////////////////////////////////////////
003-1,41,24,0|script|Constable Bob#P21|419
{
    if (!$@PRSM_PARTY) goto L_Over;
    mapmask 1 | 2;
    mes "[Constable Bob]";
    mes "\"Hello, and welcome to the celebration I've prepared for my best friend and comrade in keeping The Mana World safe: ##BPrsm##b.\"";
    next;
    mes "[Constable Bob]";
    mes "\"Prsm has enforced the laws for ##Beleven years##b, that's way longer than me. Not to say how he have been around for at least fifteen.\"";
    mes "\"This may be just my seventh year on staff, but I must admit that working with Prsm made the most wonderful years I had. I couldn't ask for a better partner.\"";
    next;
    mes "[Constable Bob]";
    mes "\"Which is why I asked the admins for mass warp powers and the devs to prepare a party; this is the least I could do for my friend. Please enjoy yourself while you're here, and once you're done, you can leave with the south gate.\"";
    close;

L_Over:
    mes "[Constable Bob]";
    mes "\"The party is over; Please leave with the south gate before the developers seal it off again.\"";
    close;

OnInit:
    goto OnClock0000;

OnClock0000:
    if (gettime(7) != 2022) goto L_None;
    if (gettime(6) != 4) goto L_None;
    if (gettime(5) != 2 && gettime(5) != 3) goto L_Off;
    set $@PRSM_PARTY, 1;
    end;

L_Off:
    set $@PRSM_PARTY, 0;
    end;

L_None:
    end;
}

////////////////////////////////////////////////
// $GUESTBOOK_AUTHOR$[entry] + $GUESTBOOK_MESSAGE$[entry]
// Persistent to survive an eventual crash
// Major bit: 8 (#X21 & 8) ─ Because it could tax map server otherwise
// NOTE: We actually could use Elli, as she is the notes keeper?
003-1,34,46,0|script|Numa#P22|393
{
    if (strcharinfo(0) == "Prsm") goto L_Done;
    if (#X21 & 8) goto L_Done;
    if (!$@PRSM_PARTY) goto L_Over;
    mapmask 1 | 2;
    mes "[Numa]";
    mes "\"I'm making a book with the wishes from the whole The Mana World Community. Do you want to write something to Prsm? Everyone will be able to read it.\"";
    next;
    menu
        "Yes", L_Write,
        "No", L_Close;

L_Write:
    set @msg$, "";
    input @msg$;
    if (@msg$ == "")
        goto L_Close;
    mes "[Numa]";
    mes @msg$;
    mes "##0##BNuma carefully looks over your message, and nodding in approval, she says:##b";
    mes "\"Are you sure you want to post this? Do note that spam, harassment, and attempts to ruin the party will get you kicked or worse, so think carefully!\"";
    menu
        "Yes", L_Save,
        "No", L_Close;

L_Save:
    set @loop, getarraysize($GUESTBOOK_AUTHOR$) - 1;
    if (@loop < 0) set @loop, 0;
    if ($GUESTBOOK_AUTHOR$[@loop] != "") set @loop, @loop + 1;
    set $GUESTBOOK_AUTHOR$[@loop], strcharinfo(0);
    set $GUESTBOOK_MESSAGE$[@loop], @msg$;
    set #X21, #X21 | 8;
    mes "[Numa]";
    mes "\"There we go! Thanks. Do you want to read the book, now?\"";
    next;
    menu
        "Yes", L_Show,
        "No", L_Close;

L_Over:
    mes "[Numa]";
    mes "\"The party is over; Please leave with the south gate before the developers seal it off again.\"";
    close;

L_Done:
    mes "[Numa]";
    mes "\"Do you want to read what the players wrote for Prsm?\"";
    menu
        "Yes", L_Show,
        "No", L_Close;

L_Show:
    set @loop, 0;
    goto L_ShowNext;

L_ShowNext:
    if ($GUESTBOOK_AUTHOR$[@loop] == "")
        goto L_Close;
    mes "##B"+$GUESTBOOK_AUTHOR$[@loop] + "##b - " + $GUESTBOOK_MESSAGE$[@loop]+"##0";
    set @loop, @loop + 1;
    if ((@loop % 5) == 0 && $GUESTBOOK_AUTHOR$[@loop] != "")
        goto L_PauseCont;
    goto L_ShowNext;

L_PauseCont:
    next;
    goto L_ShowNext;

L_Close:
    set @msg$, "";
    set @loop, 0;
    close;
}