summaryrefslogtreecommitdiff
path: root/npc/012-1/injured-mouboo.txt
blob: 167e91d8518213b970e0113a8c68313f567fe693 (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
function	script	QuestMoubooHeal	{
    @Q_MASK = NIBBLE_2_MASK;
    @Q_SHIFT = NIBBLE_2_SHIFT;

    @Q_status = (QUEST_MAGIC & @Q_MASK) >> @Q_SHIFT;
    @Q_status_upper = @Q_status & 12;
    @Q_status = @Q_status & 3;

    @STATE_INITIAL = 0;
    @STATE_HEALED_MOUBOO = 3;

    if (@Q_status != @STATE_INITIAL)
        goto L_Nothing;

    @Q_status = @STATE_HEALED_MOUBOO;
    callsub S_Update_Var;
    mes "[Injured Mouboo]";
    mes "A soft white glow surrounds the mouboo's leg, which slowly shifts back into place.";
    mes "As the glow subsides, the mouboo gets up, carefully, and takes a few steps. It seems to be fully healed!";
    mes "[5000 experience points]";
    getexp 5000, 0;
    next;
    mes "[Injured Mouboo]";
    mes "Visibly happy, the mouboo lies down on the ground and snuggles with a black piece of cloth it had been lying on.";
    mes "The healing process must have been exhausting, for it is asleep in an instant.";
    next;
    @value = 15;
    callfunc "QuestSagathaHappy";
    close2;
    return;

L_Nothing:
    mes "Your spell has no effect.";
    close2;
    return;

S_Update_Var:
    @Q_wr_status = @Q_status | @Q_status_upper;
    set QUEST_MAGIC,
        (QUEST_MAGIC & ~(@Q_MASK)
        | (@Q_wr_status << @Q_SHIFT));
    return;
}

012-1,57,153,0	script	Mouboo	NPC171,{
    @Q_MASK = NIBBLE_2_MASK;
    @Q_SHIFT = NIBBLE_2_SHIFT;

    @Q_status = (QUEST_MAGIC & @Q_MASK) >> @Q_SHIFT;
    @Q_status_upper = @Q_status & 12;
    @Q_status = @Q_status & 3;

    @STATE_INITIAL = 0;
    @STATE_KILLED_MOUBOO = 1;
    @STATE_TOOK_KILL_REWARD = 2;
    @STATE_HEALED_MOUBOO = 3;

    if (@Q_status == @STATE_KILLED_MOUBOO)
        goto L_Dead;
    if (@Q_status == @STATE_TOOK_KILL_REWARD)
        goto L_took_reward;
    if (@Q_status == @STATE_HEALED_MOUBOO)
        goto L_healed;

    mes "[Injured Mouboo]";
    mes "You notice a mouboo lying on the ground, groaning, as if in pain.";
    next;
    goto L_Menu;

L_Menu:
    menu
        "Examine the mouboo", L_examine,
        "Give the mouboo something", L_Give,
        "Kill the mouboo", L_Kill,
        "Leave", L_close;

L_examine:
    mes "[Injured Mouboo]";
    mes "Looking closer, you notice that the mouboo's left hind leg is bent at a very unnatural angle – that seems to be the cause for its pain.";
    next;
    mes "[Injured Mouboo]";
    mes "You also notice that the mouboo is lying on top of what appears to be a black turtleneck sweater.";
    mes "Do you want to pick up the sweater?";
    next;
    menu
        "Yes.", L_pickup_alive,
        "No.", L_Menu;

L_pickup_alive:
    mes "[Injured Mouboo]";
    mes "The Mouboo groans and pushes your hand away. It seems to be rather fond of the sweater.";
    next;
    goto L_Menu;

L_Give:
    @items_nr = 12;
    setarray @items$, "CactusDrink", "CactusPotion", "ChocolateBar", "Milk", "OrangeCupcake", "RedApple", "Beer", "BottleOfWater", "TinyHealingPotion", "SmallHealingPotion", "MediumHealingPotion", "LargeHealingPotion";
    setarray @itemnames$, "Cactus Drink", "Cactus Potion", "Chocolate Bar", "Milk", "Orange Cupcake", "Red Apple", "Beer", "Bottle of Water", "Tiny Healing Potion", "Small Healing Potion", "Medium Healing Potion", "Large Healing Potion";
    setarray @itemeat, 0,   0,   1,   0,   1,   1,   0,   1,   0,   0,   0,   0;

    setarray @menuitems$, "", "", "", "", "", "", "", "", "", "", "", "", "";
    @choices_nr = 0;
    setarray @menuNames$, "", "", "", "", "", "", "", "", "", "", "", "", "";
    setarray @choice_eat, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;

    @n = 0;
    @ct = 0;
    goto L_nloop;

L_nloop:
    @k$ = @items$[@n];
    if (countitem(@k$) == 0)
        goto L_nloop_skip;

    @menuitems$[@ct] = @itemnames$[@n];
    @menuNames$[@ct] = @k$;
    @choice_eat[@ct] = @itemeat[@n];
    @ct = @ct + 1;
    goto L_nloop_skip;

L_nloop_skip:
    @n = @n+1;
    if (@n < @items_nr)
        goto L_nloop;

    @menuitems$[@ct] = "Nevermind";

    menu
        @menuitems$[0], L_MenuItems,
        @menuitems$[1], L_MenuItems,
        @menuitems$[2], L_MenuItems,
        @menuitems$[3], L_MenuItems,
        @menuitems$[4], L_MenuItems,
        @menuitems$[5], L_MenuItems,
        @menuitems$[6], L_MenuItems,
        @menuitems$[7], L_MenuItems,
        @menuitems$[8], L_MenuItems,
        @menuitems$[9], L_MenuItems,
        @menuitems$[10], L_MenuItems,
        @menuitems$[11], L_MenuItems,
        @menuitems$[12], L_MenuItems;

L_MenuItems:
    @menu = @menu - 1;
    if (@menu == @ct)
        goto L_Menu;
    @choice$ = @menuNames$[@menu];
    @verb$ = "drinks";
    if (@choice_eat[@menu])
        @verb$ = "eats";
    if (@choice$ != "" && countitem(@choice$))
        goto L_consume;
    goto L_Menu;

L_consume:
    mes "[Injured Mouboo]";
    mes "The mouboo " + @verb$ + " your " + getitemlink(@choice$) + ".";
    delitem @choice$, 1;
    next;
    if (@choice$ == "LargeHealingPotion")
        goto L_do_heal;
    mes "[Injured Mouboo]";
    mes "Unfortunately, it seems to have had no effect.";
    next;
    goto L_Menu;

L_do_heal:
    callfunc "QuestMoubooHeal";
    end;

L_Kill:
    mes "[Injured Mouboo]";
    if (BaseLevel > 44)
        goto L_Kill_success;
    mes "The mouboo deflects your attack and counterattacks!";
    mes "It misses you only barely.";
    mes "Injured though it may be, this mouboo is still more than a match for you!";
    next;
    goto L_Menu;

L_Kill_success:
    mes "After some wrestling, the mouboo succumbs to your attacks.";
    mes "[100 experience points]";
    getexp 100, 0;
    @Q_status = @STATE_KILLED_MOUBOO;
    callsub S_Update_Var;
    next;
    goto L_Dead;

L_Dead:
    mes "[Dead Mouboo]";
    mes "The dead mouboo is lying on top of a black T-neck sweater.";
    getinventorylist;
    if (@inventorylist_count == 100)
        goto L_Nopickup;
    getitem "BlackTurtleneck", 1;
    mes "You pull out the sweater and stuff it into your backpack.";
    @Q_status = @STATE_TOOK_KILL_REWARD;
    callsub S_Update_Var;
    close;

L_took_reward:
    mes "[Dead Mouboo]";
    mes "You see a dead mouboo.";
    close;

L_Nopickup:
    mes "Unfortunately, you can't carry any more.";
    close;

L_healed:
    mes "[Mouboo]";
    mes "The mouboo is sleeping soundly, smiling in its dreams.";
    close;

L_close:
    close;

S_Update_Var:
    @Q_wr_status = @Q_status | @Q_status_upper;
    set QUEST_MAGIC,
        (QUEST_MAGIC & ~(@Q_MASK)
        | (@Q_wr_status << @Q_SHIFT));
    return;
}