summaryrefslogtreecommitdiff
path: root/world/map/npc/015-3/katze.txt
blob: 75e87be38623cefd8a77b67cb50fe2ed8083e94b (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
// Katze doesn't like the player at first, needs following:
//
// 1. Some milk
// 2. Some steak or chicken leg
// 3. Some fur
//
// Now the cat starts to speak, still needs:
//
// 4. Some wood for scratching
// 5. Some stuff for making somethings nice for the player:
//
//    * 2 Snake skins
//    * 2 Snake tongues
//    * 2 Maggot slimes
//    * 2 White furs
//    * 2 Hard spikes
//    * 2 Tiny potions

015-3.gat,32,25,0|script|Katze|172,{

    set @cat, ((Katze & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT);

    if (@cat == 1 && @catNeedsAlone == 0) goto L_NeedsFood;
    if (@cat == 1) goto L_PreNeedsFood;
    if (@cat == 2 && @catNeedsAlone == 0) goto L_NeedsFur;
    if (@cat == 2) goto L_PreNeedsFur;
    if (@cat == 3) goto L_NeedsWood;
    if (@cat == 4 && @catNeedsAlone == 0) goto L_NeedsStuff;
    if (@cat == 4) goto L_PreNeedsStuff;
    if (@cat == 5) goto L_NeedsStuff2;
    if (@cat == 6 && @catNeedsAlone == 0) goto L_GainEars;
    if (@cat == 6) goto L_PreGainEars;
    if (@cat == 7) goto L_Finished;

L_NeedsMilk:
    mes "[Katze]";
    mes "\"Meow.\"";
    next;
    menu "Throw a stone at the cat.", L_ThrowStone,
         "Leave the cat alone.", -;
    goto L_Close;

L_ThrowStone:
    set @cat, 0;
    callsub S_Update_Katze;
    percentheal -30, 0;
    warp "015-1.gat", 60, 32;
    mes "\"GRAAUWL! Hissss...\"";
    mes "Yikes, the cat attacked you! Your whole body is scratched. Maybe throwing a stone wasn't such a great idea...";
    goto L_Close;

L_PreNeedsFood:
L_NeedsFood:
    mes "[Katze]";
    mes "\"Meow, prrrr...\"";
    next;
    menu
        "Throw a stone at the cat.", L_ThrowStone,
        "Leave the cat alone.", -;
    goto L_Close;

L_PreNeedsFur:

L_NeedsFur:
    mes "[Katze]";
    mes "\"Prrr. Meow, prrr...\"";
    next;
    if (countitem("WhiteFur") > 0)
        menu
            "Make funny movements with the fur near the ground.", L_MoveFur,
            "Throw a stone at the cat.", L_ThrowStone,
            "Leave the cat alone.", -;
    if (countitem("WhiteFur") == 0)
        menu
            "Throw a stone at the cat.", L_ThrowStone,
            "Leave the cat alone.", -;
    goto L_Close;

L_MoveFur:
    delitem "WhiteFur", 1;
    set @cat, 3;
    callsub S_Update_Katze;
    mes "The cat jumps at the fur! You quickly let go of it. The cat happily returns to its spot, carrying the fur in its mouth.";
    next;
    mes "The cat drops the fur and looks at you with half opened eyes. Suddenly she starts talking, and says: \"That was very kind of you.\" She seems to be smiling.";
    goto L_Close;

L_NeedsWood:
    mes "[Katze]";
    mes "\"Prrrr, now I'd like something to sharpen my claws on.\"";
    next;

    if (countitem("RawLog") > 0)
        menu
            "Want this piece of wood?", L_GiveWood,
            "Ok, see you later.", -;
    goto L_Close;

L_GiveWood:
    mes "[Katze]";
    mes "\"Sure! Please put it next to the pot.\"";
    goto L_Close;

L_PreNeedsStuff:
    mes "The cat is still eyeing the piece of wood. She probably needs to be left alone for a bit again.";
    goto L_Close;

L_NeedsStuff:
    set @cat, 5;
    callsub S_Update_Katze;
    mes "[Katze]";
    mes "\"You've been really kind to me. I can make you something nice, but I will need";
    mes "2 Snake Skins,";
    mes "2 Snake Tongues,";
    mes "2 Maggot Slimes,";
    mes "2 White Furs,";
    mes "2 Hard Spikes and";
    mes "2 Tiny Healing Potions.\"";
    goto L_Close;

L_NeedsStuff2:
    mes "[Katze]";
    mes "\"Did you bring what I asked you for?\"";
    next;
    menu
        "Look here.", L_CatChecksStuff,
        "What do you need again?", L_WhatsNeeded,
        "No, I haven't got everything yet.", -;
    goto L_Close;

L_WhatsNeeded:
    mes "[Katze]";
    mes "\"Actually, you should have remembered yourself.\"";
    next;
    menu
        "Please tell me.", L_Please,
        "Never mind.", -;
    goto L_Close;

L_Please:
    mes "[Katze]";
    mes "\"Alright... [the cat glares at you] it was";
    mes "2 Snake Skins,";
    mes "2 Snake Tongues,";
    mes "2 Maggot Slimes,";
    mes "2 White Furs,";
    mes "2 Hard Spikes and";
    mes "2 Tiny Healing Potions.\"";
    goto L_Close;

L_CatChecksStuff:
    if (countitem("SnakeSkin") > 1
        && countitem("SnakeTongue") > 1
        && countitem("MaggotSlime") > 1
        && countitem("WhiteFur") > 1
        && countitem("HardSpike") > 1
        && countitem("TinyHealingPotion") > 1)
            goto L_GiveStuff;
    mes "[Katze]";
    mes "\"You don't seem to have everything yet. Come back later when you do.\"";
    goto L_Close;

L_GiveStuff:
    delitem "SnakeSkin", 2;
    delitem "SnakeTongue", 2;
    delitem "MaggotSlime", 2;
    delitem "WhiteFur", 2;
    delitem "HardSpike", 2;
    delitem "TinyHealingPotion", 2;
    set @cat, 6;
    callsub S_Update_Katze;
    set @catNeedsAlone, 1;
    mes "[Katze]";
    mes "\"Nicely done! Now leave me alone for a while, I need some time to prepare your present.\"";
    goto L_Close;

L_PreGainEars:
    mes "[Katze]";
    mes "\"Please leave me alone for a while, so I can prepare your present.\"";
    goto L_Close;

L_GainEars:
    getitem "CatEars", 1;
    set @xpval, 5000;
    getexp @xpval, 0;
    set @cat, 7;
    callsub S_Update_Katze;
    mes "[Katze]";
    mes "\"Look what I made for you! It makes you look a bit like me! Maybe it will give you a feeling of what it is like to be a cat.\"";
    mes "The cat winks at you.";
    mes "[You gain " + @xpval + " experience points]";
    goto L_Close;

L_Finished:
    mes "[Katze]";
    if (getequipid(equip_head) == 1217)  // Cat ears
        mes "\"Meow, fellow cat.\"";
    if (getequipid(equip_head) != 1217)
        mes "\"Meow. Lost your ears?\"";
    goto L_Close;

L_Close:
    set @cat, 0;
    close;

S_Update_Katze:
    set Katze, (Katze & ~(NIBBLE_0_MASK)) | (@cat << NIBBLE_0_SHIFT);
    return;
}