summaryrefslogtreecommitdiff
path: root/world/map/npc/042-2/tanisha.txt
blob: 72d68d84bd1047ba8fb26d2000ef8026edd6cc2b (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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
// This file is part of the Tutorial
// Authors: Jenalya, alastrim
// Cleanup: o11c

042-2.gat,110,88,0|script|Tanisha|114
{
    setarray @npc_loc, 110, 88, 4;
    callfunc "PCtoNPCRange";
    if (@npc_check)
        goto L_Close;

    if (isin("042-2.gat", 98, 84, 106, 89))
        goto L_Fighting;

    callfunc "TutorialState";
    if (@tutorial == 10) goto L_Hasan;
    if (@tutorial >= 8) goto L_Tut_Done;
    if (@tutorial == 7) goto L_Stats;
    if (@tutorial == 6) goto L_Fail;
    if (@tutorial == 5) goto L_Maggots;

    mes "[Tanisha]";
    mes "\"Hey! You're up again!\"";
    emotion EMOTE_HAPPY;
    next;
    mes "\"Are you feeling better?\"";
    menu
        "Yes, thank you.",L_Next,
        "Yeah, but all my stuff is gone.",L_Next;

L_Next:
    mes "[Tanisha]";
    mes "\"I'm glad you're feeling better. It was really bad luck what happened to you.";
    mes "Hey, I have an idea.\"";
    next;
    set @tutorial_tmp, 5;
    callfunc "SetTutorialMask";
    goto L_Maggots;

L_Maggots:
    mes "[Tanisha]";
    mes "\"There are some maggots eating the goods and I'm supposed to get rid of them.";
    mes "But they're so yucky!\"";
    next;
    mes "\"If you kill them, I'll give you my knife.";
    mes "What do you say?\"";
    menu
        "I guess it's the least I can do.",L_Next1;

L_Next1:
    mes "[Tanisha]";
    mes "\"Wonderful!\"";
    // since the check happens here, it is actually possible to have
    // more than $@Maggot_MaxHunters in the area at one time
    // but that's not a BIG problem
    if (getareausers("042-2.gat", 98, 84, 106, 89) >= $@Maggot_MaxHunters)
        goto L_Crowded;
    next;
    goto L_Fight_Again;

L_Fight_Again:
    mes "\"Ok, listen what to do.";
    mes "Equip a weapon and kill the maggots.\"";
    next;
    mes "\"Press ###keyTargetMonster; to focus on a monster. With ###keyTargetAttack; you can focus and start attacking the same time.";
    mes "But it also works to click on the monster with your mouse.\"";
    next;
    mes "\"If you press the ###keyTarget;, you can abort your attack.\"";
    next;
    mes "\"Maggots aren't aggressive, so they won't harm you until you attack them first. Take them out one by one.\"";
    next;
    mes "\"Sometimes dead monsters leave some useful things. You can pick them up by pressing ###keyPickup; or clicking on the items with your mouse.\"";
    close2;
    // The getitem must be in the same place as set @tutorial, 2;
    // since it was moved to after L_Fight_Again, add it conditionally
    callfunc "TutorialState";
    if (@tutorial == 5)
        goto L_GetFightItems;
    goto L_ContinueFight;

L_GetFightItems:
    getitem "Knife", 1;
    getitem "SlingShot", 1;
    getitem "SlingBullet", 100;
    goto L_ContinueFight;

L_ContinueFight:
    set @tutorial_tmp, 6;
    callfunc "SetTutorialMask";
    set @Maggot_Kills, 0;
    set @time, 0;
    if (getareausers("042-2.gat", 98, 84, 106, 89) == 0)
        initnpctimer;
    warp "042-2.gat", 101, 87;
    goto L_Summon;

L_Summon:
    areamonster "042-2.gat", 98, 84, 106, 89, "", 1002, 1, "Tanisha::OnMaggotDeath";
    end;

L_Stats:
    mes "[Tanisha]";
    mes "\"That was great! Like a professional exterminator!\"";
    next;
    mes "\"And it seems you became stronger and more experienced.";
    mes "That means you got some status points which you can use to increase your abilities.\"";
    next;
    mes "\"Press ###keyWindowStatus; or click the Status button in the bar at the upper right to see your status window. There you can distribute your points on six different properties.\"";
    next;
    mes "\"My Uncle sitting at the counter knows a spell to help the younglings reset their stats.\"";
    next;
    mes "\"He also knows of mages with even more powerful reset spells.\"";
    next;
    mes "\"Some strange wizard lurking around in the Tulimshar Noble Quarter.\"";
    next;
    goto L_StatsRe;

L_StatsRe:
    mes "\"Strength makes you hit harder and you can carry more weight.\"";
    next;
    mes "\"Agility increases your attack speed and your ability to dodge attacks.\"";
    next;
    mes "\"Vitality gives you more hit points and more defense against physical attacks.\"";
    next;
    mes "\"Intelligence is useful for magic attack and defense.";
    mes "But as long as you don't know any magic, you shouldn't use your points on this.\"";
    next;
    mes "\"Dexterity is needed to hit monsters. It's also very important for the damage if you use a ranged weapon.\"";
    next;
    mes "\"Luck gives you the chance to do critical hits and lowers the chance to receive a critical hit from your opponent.\"";
    next;
    mes "\"Think about how you want to play before assigning the points.\"";
    next;
    mes "\"My Uncle sitting at the counter knows a spell to help the younglings reset their stats.\"";
    next;
    mes "\"He also knows of mages with even more powerful reset spells.\"";
    next;
    mes "\"Some strange wizard lurking around in the Tulimshar Noble Quarter.\"";
    next;
    mes "Tanisha looks at you with wide opened eyes.";
    next;
    mes "[Tanisha]";
    mes "\"But I doubt he'd do that without a service in return.\"";
    goto L_Money;

L_Money:
    next;
    mes "[Tanisha]";
    mes "\"Hey, you are so smart taking out all that yucky maggots for me.";
    mes "You can have my pocket money. Here.\"";
    set @tutorial_tmp, 8;
    callfunc "SetTutorialMask";
    set Zeny, Zeny + 5;
    next;
    goto L_Advice;

L_Advice:
    mes "\"When you go to Tulimshar, you should see Bernard. He can make a delicious soup!";
    mes "Good luck!\"";
    emotion EMOTE_HAPPY;
    goto L_Close;

L_Explain:
    menu
        "... how to fight?",L_Fight,
        "... monsters?",L_Mob,
        "... status points?",L_StatsRe,
        "... what to do in Tulimshar?",L_Advice,
        "... nevermind.",L_Close;

L_Fight:
    mes "[Tanisha]";
    mes "\"Press ###keyTargetMonster; to focus on a monster. With ###keyTargetAttack; you can focus and attack.";
    mes "But it also works to click on the monster with your mouse.\"";
    next;
    mes "\"If you press the ###keyTarget; button, you can abort your attack.\"";
    next;
    mes "\"Sometimes dead monsters leave some useful things. You can pick them up with pressing ###keyPickup; or clicking on the items with your mouse.\"";
    next;
    mes "\"If you feel exhausted from battle you can sit down by pressing ###keyBeingSit; to recover faster.\"";
    goto L_Close;

L_Mob:
    mes "[Tanisha]";
    mes "\"I don't know much about monsters, I'm just a little girl. But I know a few things.";
    mes "There are several types of monsters...Aggressive, Neutral, and Assistants.\"";
    next;
    mes "\"Aggressive monsters will attack you as soon as they see you.\"";
    next;
    mes "\"Neutral monsters are peaceful until they get attacked.\"";
    next;
    mes "\"Assistants are monsters who help each other.\"";
    goto L_Close;

L_Hasan:
    mes "[Tanisha]";
    mes "\"Hi there! Is everything alright? Do you have questions?\"";
    menu
        "A guy named Hasan is being mean.",L_Next3,
        "Yes, could you explain again about...",L_Explain,
        "No, thanks.",L_Close;

L_Next3:
    mes "[Tanisha]";
    mes "\"Bah, Hasan. He's a jerk. But he's very strong.\"";
    next;
    mes "\"The only thing he's afraid of are scorpions.";
    mes "I'm not sure why, some bad experience when he was a child.";
    mes "That was before I was born.\"";
    set @tutorial_tmp, 11;
    callfunc "SetTutorialMask";
    goto L_Close;

L_Tut_Done:
    mes "[Tanisha]";
    mes "\"These yucky maggots! They're eating our goods!";
    mes "No matter how many of them you kill, they always come back.\"";
    mes "She sighs.";
    next;
    mes "[Tanisha]";
    mes "\"Do you have any questions?\"";
    menu
        "Yes, could you explain about...", L_Explain,
        "No, thanks.", L_Close;

L_Crowded:
    mes "[Tanisha]";
    mes "\"That's great! But...";
    mes "it seems a little crowded in there.\"";
    next;
    mes "\"Let's wait a short while.\"";
    goto L_Close;

L_Sleep:
    warp "042-2.gat", 101, 87;
    mes "[Tanisha]";
    mes "\"What are you doing in there?";
    mes "Sleeping?";
    mes "Come back when you're serious.\"";
    set @Maggot_Kills, 0;
    set @time, 0;
    close2;
    if (getareausers("042-2.gat", 98, 84, 106, 89) == 0)
        goto L_CleanUp;
    end;

L_Fail:
    mes "Tanisha seems to be trying hard to supress laughter.";
    mes "[Tanisha]";
    mes "\"The maggots defeated you.\"";
    next;
    mes "She bursts out with laughter.";
    mes "[Tanisha]";
    mes "\"Oops, I'm sorry. It's just too funny.";
    mes "Do you want to try it again?\"";
    menu
        "Sure!", L_Next2,
        "No, I need a rest.", L_Close;

L_Next2:
    if (getareausers("042-2.gat", 98, 84, 106, 89) >= $@Maggot_MaxHunters)
        goto L_Crowded;
    goto L_Fight_Again;

L_Fighting:
    message strcharinfo(0), "Tanisha: I believe in you!";
    end;

OnTimer1000:
    setnpctimer 0;
    if (getareausers("042-2.gat", 98, 84, 106, 89) == 0)
        goto L_CleanUp;
    // This is needed because multiple players can be in the area at once
    areatimer "042-2.gat", 98, 84, 106, 89, 0, "Tanisha::OnTick";
    end;

L_CleanUp:
    killmonster "042-2.gat", "Tanisha::OnMaggotDeath";
    set $@Maggot_Hunters, 0;
    stopnpctimer;
    areamonster "042-2.gat", 98, 84, 106, 89, "", 1002, 1, "Tanisha::OnMaggotDeath";
    end;

OnTick:
    set @time, @time + 1;
    if (@time > 300)
        goto L_Sleep;
    if (isdead())
        end;
    if (Hp > 20)
        end;
    heal MaxHp, 0;
    message strcharinfo(0), "Tanisha: You're doing good!";
    end;

OnMaggotDeath:
    if (@Maggot_Kills == 1)
        message strcharinfo(0), "Tanisha: Aaahhhh... another one! It will crawl up your legs!";
    if (@Maggot_Kills == 2)
        message strcharinfo(0), "Tanisha: Ohh... Irrhk... Eeeeww... They just appear from nowhere!";
    if (@Maggot_Kills == 3)
        message strcharinfo(0), "Tanisha: Yuck... I think I am getting sick.";
    if (isin("042-2.gat", 98, 84, 106, 89))
        set @Maggot_Kills, @Maggot_Kills + 1;
    if (@Maggot_Kills < 5)
        goto L_Summon;
    // else, complete
    warp "042-2.gat", 110, 88;
    set @tutorial_tmp, 7;
    callfunc "SetTutorialMask";
    set @Maggot_Kills, 0;
    set @time, 0;
    if (getareausers("042-2.gat", 98, 84, 106, 89) == 0)
        goto L_CleanUp;
    end;

L_Close:
    close;

OnInit:
    set $@Maggot_MaxHunters, 4;
    areamonster "042-2.gat", 98, 84, 106, 89, "", 1002, 1, "Tanisha::OnMaggotDeath";
    end;
}
042-2.gat,114,93,0|script|#DoorOutTut2|45,0,0
{
    end;

OnTouch:
    callfunc "TutorialState";
    if (@tutorial >= 8)
        goto L_Warp;
    goto L_Block;

L_Warp:
    warp "042-1.gat", 63, 48;
    end;

L_Block:
    message strcharinfo(0), "Tanisha: Please come here. I'd like some help!";
    end;
}