summaryrefslogtreecommitdiff
path: root/npc/029-1/hasan.txt
blob: d769560a127aac37c6403815618b19416987e48f (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
029-1,35,33,0	script	Scared Man	NPC160,{
    callfunc "PCtoNPCRange";
    if(@npc_check) end;

    if (QL_BEGIN >= 13)
        goto L_TutDone;
    message strcharinfo(0), "He looks too afraid to say anything.";
    goto L_End;

L_TutDone:
    message strcharinfo(0), "Thanks. Hasan has been much nicer to me now";
    goto L_End;

L_End:
    end;
}
029-1,33,33,0	script	Hasan	NPC189,3,3,{
    callfunc "PCtoNPCRange";
    if(@npc_check) end;
    goto L_Main;

L_Main:
    if ((getcharid(3) == $@ScorpionFighter) || ($@ScorpionFighter && $@ScorpionFighter != getcharid(3)))
        goto L_Afraid;
    if (QL_BEGIN == 14)
        goto L_TutDone;
    if (QL_BEGIN == 13)
        goto L_Thank;
    if (QL_BEGIN == 12)
        goto L_Trick;
    if ((QL_BEGIN == 9) || (QL_BEGIN == 10) || (QL_BEGIN == 11))
        goto L_FightAgain;

    mes "You over hear some people nearby.";
    mes "[Unfriendly Guy]";
    mes "\"I told you if you didn't get the money, I'd give you swimming lessons, Haha!\"";
    mes "[Scared Man]";
    mes "\"But the only person I need protection from is you.\"";
    mes "[Unfriendly Guy]";
    mes "\"Thats why the price is so high.\"";
    mes "\"Because I'm the toughest person in all of Candor\"";
    mes "[Scared Man]";
    mes "\"No, your just a mean bully. Wait till I tell the guards about this!\"";
    mes "[Unfriendly Guy]";
    mes "\"You do that and the next swimming lesson will be sleeping with the fishes.\"";
    mes "[Scared Man]";
    mes "\"No, please don't. *sob*\"";
    mes "Sounds like this person is in trouble.\"";
    QL_BEGIN = 9;
    mes "[Unfriendly Guy]";
    mes "\"What are you looking at?\"";
    menu
        "What ever you call maggot slime scrapped off a boat after a walk through the sewers.", L_Fight,
        "Who me? I saw nothing, just passing by.", L_close;

L_FightAgain:
    mes "[Hasan]";
    mes "\"Have you come back for a thrashing?\"";
    menu
        "No.", L_close,
        "Yes.", L_Fight;

L_Fight:
    mes "[Hasan]";
    mes "\"Do you really think you can beat me?\"";
    mes "He pulls out a nasty looking dagger and stabs it in your direction.";
    Hp = 1;
    mes "That hurt! You begin to think searching for a different solution might be healthier.";
    mes "Maybe Kaan can help?";
    goto L_close;

L_Trick:
    mes "[Hasan]";
    mes "\"Have you come back for another thrashing?\"";
    menu
        "No.",L_close,
        "Yes, yours! (Scratch your head.)",L_ScratchHead;

L_ScratchHead:
    if ($@ScorpionFighter)
        goto L_Wait;
    $@ScorpionTimer = 0;
    $@ScorpionFighter = getcharid(3);
    $@ScorpDeath = PC_DIE_COUNTER;
    donpcevent "#ScorpionTrigger::OnCommandHasanSpawn";
    specialeffect 22;
    mes "While you're scratching your head, a scorpion appears.";
    close;

L_Thank:
    mes "[Hasan]";
    mes "\"You - you saved me!";
    mes "I was mean to people, but you still saved me!\"";
    mes "\"Hey, you're a really cool person.";
    mes "I mean, the way you finished that ghastly scorpion!";
    mes "Amazing!\"";
    mes "\"Let me tell you something, I will no longer bully people.";
    mes "And you can have my Sharp Knife.\"";
    getitem "SharpKnife", 1;
    QL_BEGIN = 14;
    mes "\"You want to go to Hurnscald, right? Shall I tell you how to get there?\"";
    menu
        "Sure, thanks.",L_HasanThanks,
        "I'll try to find the way myself.",L_Explore;

L_HasanThanks:
    mes "[Hasan]";
    mes "\"Ok, when you leave here go back to the city. Wait on the south end of";
    mes "the city for the ferry to arrive at the docks. It will take you to Hurnscald.\"";
    goto L_close;

L_Explore:
    mes "[Hasan]";
    mes "\"Alright. Take care!\"";
    goto L_close;

L_TutDone:
    mes "[Hasan]";
    mes "\"You didn't see anything. I tell you what I'll be nicer if you don't tell anyone?\"";
    menu
        "As long as you learned your lesson.", L_TutCont;

L_TutCont:
    mes "\"I have, I promise not to bully people anymore. It's not fun being scared.\"";
    goto L_close;

L_Wait:
    mes "There is a scorpion near Hasan already. I think Kaan is helping someone else... Maybe I should try the plan later.";
    goto L_close;

L_Afraid:
    message strcharinfo(0), "Hasan: \"" + strcharinfo(0) + "! Please help me!\"";
    end;

L_close:
    close;

OnTouch:
    if (QL_BEGIN >= 13)
        end;
    goto L_Main;
}
029-1,0,0,0	script	#ScorpionTrigger	NPC32767,{
    end;

OnCommandHasanSpawn:
    goto L_Summon;

L_Summon:
    monster "029-1", 33, 33, "Weak Scorpion", TameScorpion, 1, "#ScorpionTrigger::OnScorpionDeath";
    initnpctimer;
    end;

L_SummonAgain:
    message strcharinfo(0), l("Kaan is mad at you for your interference! He summons a rock above your head, then summons another scorpion near Hasan!");
    addtimer 10, "#ScorpionTrigger::OnKillYou";
    detachrid();
    goto L_Summon;

OnKillYou:
    die();
    end;

OnTimer5000:
    if (attachrid($@ScorpionFighter) == 0)
        goto L_Clean;
    $@ScorpionTimer = $@ScorpionTimer + 5;
    if ($@ScorpionTimer >= 300)
        goto L_TimeOut;
    if (PC_DIE_COUNTER > $@ScorpDeath)
        goto L_MessageDeath;
    setnpctimer 0;
    end;

OnScorpionDeath:
    if (!playerattached())
        goto L_Summon;
    if (getcharid(3) != $@ScorpionFighter)
        goto L_SummonAgain;
    if (QL_BEGIN != 12)
        goto L_Clean;
    QL_BEGIN = 13;
    message strcharinfo(0), "You saved Hasan.";
    fix_mobkill(Scorpion);
    goto L_Clean;

L_TimeOut:
    message strcharinfo(0), "Hasan, with his eyes almost closed, trembling with fear, runs toward the scorpion and stabs it with all his strength!";
    goto L_Clean;

L_MessageDeath:
    message strcharinfo(0), "Ouch... I should be more careful when fighting these monsters.";
    goto L_Clean;

L_Clean:
    killmonster "029-1", "#ScorpionTrigger::OnScorpionDeath";
    $@ScorpionFighter = 0;
    $@ScorpionTimer = 0;
    $@ScorpDeath = 0;
    stopnpctimer;
    end;
}