summaryrefslogtreecommitdiff
path: root/npc/014-2/mouboo.txt
blob: 52c2d45c78f41cd9e3afb998a8d84446e4fcf5c4 (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
// TMW2/LoF scripts.
// Authors:
//    TMW-LoF Team
//    Jesusalva
// Description:
//    Part from a bigger, very important quest for learning about the MOUBOOTAUR.
//    Interacts with Sagratha (for uncursing).
//
//    Quest Structure:
//      HurnscaldQuest_InjuriedMouboo - STATUS - HPBAR
//    Quest Status:
//      0 - First Met
//      1 - Examined (HP Bar stored on field 2)
//      2 - Healed (Curse not solved - ready for Sagratha Quest)
//      3 - Curse removed (Sagratha's Arc)
//      9 - KILLED YOUR MOUBOO. YOU EVIL MONSTER.

014-2,144,80,0	script	Mouboo#0142injuried	NPC_INJURIED_MOUBOO,{
    .@q=getq(HurnscaldQuest_InjuriedMouboo);

    if (.@q < 2) goto L_Begin;
    if (.@q == 2) goto L_Healed;
    if (.@q == 3) goto L_Uncursed;
    if (.@q == 9) goto L_Killed;
    goodbye;
    end;

// Main Quest
L_Begin:
    .@q=getq(HurnscaldQuest_InjuriedMouboo);
    .@q2=getq2(HurnscaldQuest_InjuriedMouboo);
    mesn l("Injuried Mouboo");
    mesq l("Booo....");
    mesc l("The Mouboo seems to be lying in pain.");
    next;
    select
        l("Examine the Mouboo"),
        rif(.@q == 1, l("Attempt to heal the Mouboo")),
        rif(.@q == 1, l("Attempt to kill the Mouboo")),
        l("Leave the Mouboo alone");
    mes "";
    switch (@menu) {
        case 1:
            mesc l("The Mouboo is lying down on the grass.");
            mesc l("There doesn't seems to be any physical wound.");
            mesc l("A closer inspection suggests this mouboo has been... CURSED.");
            if (.@q == 0)
                setq HurnscaldQuest_InjuriedMouboo, 1, 100;
            next;
            goto L_Begin;
        case 2:
            mes "##B" + l("Drag and drop a healing item from your inventory.") + "##b";

            .@id = requestitem();

            // If ID is invalid, there's not enough items, it is bound = Cannot bury
            if (.@id < 1) close;
            if (.@id < 1 || countitem(.@id) < 1 || checkbound(.@id) || getiteminfo(.@id, ITEMINFO_TYPE) != IT_HEALING) {
                if (checkbound(.@id))
                    mesc l("You cannot part with this item!");
                else if (.@id == MoubooFigurine)
                    mesc l("Haha, this wooden figurine won't do the job, sorry.");
                else if (.@id == PlushMouboo)
                    mesc l("This seems like a good idea at first, but actually, it isn't.");
                else if (.@id == MoubooPendant)
                    mesc l("Wise choice! But can you really part with it? Better think on something else!");
                else if (.@id == MoubooHat || .@id == AlphaMoubooHat)
                    mesc l("...I don't think giving it this hat will really help...");
                else if (getiteminfo(.@id, ITEMINFO_TYPE) != IT_HEALING)
                    mesc l("This is not a healing item.");
                else
                    mesc l("You give up.");
                close;
            }
            if (.@id == MoubooSteak) {
                mesc l("Uhm, this seems like a bad idea.");
                close;
            } else if (.@id == DeathPenalty) {
                mesc l("Uhm, that's an... @@. Do you... want to grow a tree on the mouboo or something? Can't you think on something else?", getitemlink(DeathPenalty));
                close;
            }
            mesc l("Really give your @@ to the Mouboo?", getitemlink(.@id)), 1;
            mesc l("The item will be lost forever.");
            next;
            if (askyesno() == ASK_YES) {
                delitem .@id, 1;
                itemeffect(.@id); // As a bonus, you'll be healed too, because I need to retrieve @max value

                // You need about 9.000 HP-worth healing items, and you can't use Mouboo Steak
                if (.@id == ElixirOfLife)
                    setq2 HurnscaldQuest_InjuriedMouboo, 9999;
                else
                    setq2 HurnscaldQuest_InjuriedMouboo, .@q2+((@min+@max)/10);

                .@q2=getq2(HurnscaldQuest_InjuriedMouboo);
                if (.@q2 > 1000) {
                    mesc l("This will be remembered."), 6;
                    setq HurnscaldQuest_InjuriedMouboo, 2;
                    Karma=Karma+1;
                    getexp 800, 0;
                    close;
                }

                // Progress Report
                if (.@q2 > 900) {
                    mesc l("The mouboo seems to want to thank you, but is still too weak. Let's finish this healing.");
                }
                else if (.@q2 > 700) {
                    mesc l("The mouboo looks a bit more healthy. A little more should do.");
                }
                else if (.@q2 > 400) {
                    mesc l("The mouboo looks a bit less sickly. But this is not enough.");
                }
                if (.@q2 > 100) {
                    mesc l("The mouboo still looks terrible, but you can see a small difference.");
                }
            }
            break;
        case 3:
            mes "##B" + l("Drag and drop a weapon from your inventory.") + "##b";

            .@id = requestitem();

            // If ID is invalid, there's not enough items, it is bound = Cannot bury
            if (.@id < 1) close;
            if (.@id < 1 || countitem(.@id) < 1 || getiteminfo(.@id, ITEMINFO_TYPE) != IT_WEAPON) {
                if (getiteminfo(.@id, ITEMINFO_TYPE) != IT_WEAPON)
                    mesc l("This is not a weapon. Wait, you don't want to explode it, right?!");
                else
                    mesc l("You give up.");
                close;
            }

            mesc l("Really attack the Mouboo with a(n) @@?", getitemlink(.@id)), 1;
            mesc l("There will be consequences.");
            next;
            if (askyesno() == ASK_YES) {
                .@atk=getiteminfo(.@id, ITEMINFO_ATK);
                mesn l("Injuried Mouboo");
                if (.@q2 < 20)
                    mesq l("Re-ref... Reflect.");
                else
                    mesq l("Ma... Magical Re... Re-ref... Reflection.");
                setq2 HurnscaldQuest_InjuriedMouboo, .@q2-(.@atk/10);
                .@q2=getq2(HurnscaldQuest_InjuriedMouboo);

                if (.@q2 <= 0) {
                    mesq l("The... Mou... Boo... Taur...");
                    mesq l("Is... Dan... Ger... Ous...");
                    mesq l("...Help... Me...");
                    setq HurnscaldQuest_InjuriedMouboo, 9;
                    Karma=Karma-1;
                    getexp 800, 0;
                    next;

                    mesc l("This will be remembered."), 6;
                    heal -.@atk, -(.@atk/10);
                    close;
                }

                heal -.@atk, -(.@atk/10);
                next;
            }
            break;
        default:
            close;
    }
    mes "";
    goto L_Begin;


// Sagratha Arc
L_Healed:
    .@q=getq(HurnscaldQuest_InjuriedMouboo);
    .@q2=getq2(HurnscaldQuest_InjuriedMouboo);
    mesn l("Injuried Mouboo");
    mesq l("Zzzzzz....");
    mesc l("The mouboo is sleeping soundly. The curse is still there.");
    // TODO: HANDLE SAGRATHA
    close;

// Final Results
L_Uncursed:
    mesn;
    mesq l("Hello, @@. Thanks for helping me.", strcharinfo(0));
    next;
    mesn;
    mesq l("Don't challenge the Moubootaur. You saw what happened to me.");
    close;

L_Killed:
    mesc l("Did this Mouboo just blinked? No, I made sure to kill it. Must have been my imagination.");
    close;

OnInit:
    .sex=G_OTHER;
    .distance=2;
    end;
}