summaryrefslogtreecommitdiff
path: root/npc/023-3-2/logic.txt
blob: d1c64d093189b1c60a6957c64ea92486cc46c7c5 (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
// TMW2 scripts.
// Author:
//    Jesusalva
// Description:
//    023-3-2 Isbamuth's Study Room Configuration File

023-3-2	mapflag	zone	MMO

023-3-2,39,59,0	script	#Exit02332	NPC_HIDDEN,1,0,{
    end;
OnTouch:
    .@q=getq(General_Narrator);
    .@q2=getq2(General_Narrator);
    // Cheater Detected
    if (.@q < 15) { 
        warp "Save", 0, 0;
        percentheal -100, -100;
        end;
    }
    if (.@q == 15) {
        dispbottom lg("I'm not a coward! I must press forward!");
        end;
    }
    /*
    Access to the dungeon is now prohibted.
	.@mapn$="023-3-1";
    warp .@mapn$, 45, 28;
    */
    .@mapn$="024-16";
    warp .@mapn$, 30, 26;
    end;
}

// The Master Room... We use field 3, too, but bitwise position 2 is reserved.
023-3-2,38,30,0	script	Cauldron#MKHB	NPC_NO_SPRITE,{
    .@q=getq3(FrostiaQuest_Homunculus);
    if (.@q < 4095) {
        mesn;
        mesc l("It's steaming. Who knows what insanity Isbamuth is brewing inside?!");
        next;
        mesc l("Keep exploring the Study Room and certify it is safe first. Also, make sure to learn what this was used for.");
        close;
    }
    mesn;
    mesc l("It's steaming hot, but you guess this is where Isbamuth created homunculus. Most bandits, thieves and assassins seems to have been born here.");
    next;
    mesc l("He just abandoned this place and left everything behind... It's suspcious at best. You don't think anyone will be able to decrypt the secrets of Artifical Lifeforms.");
    next;
    mesc l("Hesitant, you reach out your hand, and grab whatever was on the Cauldron. It seems to be an Embryo.");
    next;
    skill AM_CALLHOMUN, 1, 0;
    mesc l("You have collect enough evidence, it's time to leave and report.");
    setq1 FrostiaQuest_Homunculus, 4;
    setq1 General_Narrator, 16;
    close;
OnInit:
    .distance=2;
    end;
}

023-3-2,40,25,0	script	Notebook#MKHB	NPC_NO_SPRITE,{
    .@q=getq3(FrostiaQuest_Homunculus);
    if (.@q < 4094) {
        mesn;
        mesc l("Uhm, of course a book like this has to be a trap, right?");
        next;
        mesc l("Keep exploring the Study Room and certify it is safe first.");
        close;
    }
    mesn l("Diary, 31st May 297 AT");
    mesc l("I've been delving in the secrets of Mana, using the stolen Mana Stone we got the other day.");
    next;
    mesc l("I'm almost in the point of no return. I cannot believe this, but mana... is alive.");
    next;
    mesc l("I'll keep studying it in secret. I'm so proud of my thieves!");
    next;
    mesn l("Diary, 21st June 297 AT");
    mesc l("I've managed to create the first mana-based artifical lifeform, it survived three seconds, the record so far.");
    next;
    mesc l("Saul is supplying me the alchemist resources for that. In exchange, my thieves supply him gold and spare his friends.");
    next;
    mesc l("He thinks he is using me to his rebellion, but I'm the one using him. I'm not the Bandit Lord for no reason.");
    next;
    mesn l("Diary, 1st April 298 AT");
    mesc l("I've managed to create a Maggot. It did not die. And it was not an April Fool's joke. Nice one.");
    next;
    mesn l("Diary, 12nd December 298 AT");
    mesc l("The Mana Stone... is a scary being. It changes you. I'm no longer myself, but some thieves are still at my side... for now.");
    next;
    mesn l("Diary, 3rd August 299 AT");
    mesc l("Saul is planning an assault at the Magic Tower. I want these Mana Stones.");
    next;
    mesc l("Most thieves left, but that's not a problem, I created an army out of Homunculus. I already have 500 bandits. I will create more later, to get Mana Stones;");
    next;
    mesn l("Diary, 2nd March 300 AT");
    mesc l("It's time. My army already have tens of thousands of monsters, homunculus, persons. The mana stones I've got thus far are all dried out, now.");
    next;
    mesc l("I could not be the Bandit King. But once I steal all Mana Stones, I'll be not only the best thief in the world. I already decided my new title.");
    next;
    mesc l("I shall call myself from there on, after this great assault... @@.", b(l("the Monster King")));
    next;
    mesn l("Diary, 3rd March 300 AT");
    mesc l("To create an homunculus, I should follow the secrets in the book \"The Man Who Played God\". I wrote this narrative with the greatest secrets of it.");
    next;
    mesc l("I shall leave this book with my son, SphinxNox. I will not fail, and live forever. This will be their inheritance for him.");
    next;
    mesc l("Raid might be great. Saul might be popular. SphinxNox might be an annoying brat. But I'm, or rather, will soon be... @@.", b(l("the Monster King")));
    next;

// Implicit fallthrough
L_BookRead:
    mesc l(".:: The Homunculus Keeping Manual ::."), 3;
    mesc l("To create an homunculus out of the embryo mass: Use the Call Homunculus Skill. It'll be random, based on the embryo nature.");
    next;
    mesc l(".:: The Homunculus Keeping Manual ::."), 3;
    mesc l("Homunculus are a bit dumb, although the ones I've cultivated and took personal care of can express reactions. In future, I'll research sentience.");
    next;
    mesc l(".:: The Homunculus Keeping Manual ::."), 3;
    mesc l("They need to be feed, when hunger falls below 75. @@ is the best food for them.", getitemlink(Bread));
    next;
    mesc l(".:: The Homunculus Keeping Manual ::."), 3;
    mesc l("Also, they level up when they attack, and can be revived with the right skill.");
    next;
    mesc l(".:: The Homunculus Keeping Manual ::."), 3;
    mesc l("Once they get too annoying, I need to kill them... But I think I could put them to rest with the Rest Homunculus skill.");
    next;
    mesc l(".:: The Homunculus Keeping Manual ::."), 3;
    mesc l("It's totally safe. They are loyal as long that feed. And to think I started off giving @@ to the poor...", getitemlink(Bread));
    mes "";
    mesc "-- " + l("The Monster King.");

    if (!(.@q & .hcID)) {
        skill AM_REST, 1, 0;
        skill AM_RESURRECTHOMUN, 1, 0;
        setq3 FrostiaQuest_Homunculus, .@q|.hcID;
    }
    close;

OnBookRead:
    .@q=getq(General_Narrator);
    if (.@q < 16) end;
    .@q=.hcID;
    goto L_BookRead;

OnInit:
    .hcID=1;
    .distance=2;
    bindatcmd "homunculus", "Notebook#MKHB::OnBookRead", 0, 100, 0;
    end;
}

023-3-2,36,31,0	script	Machinery#MKHB	NPC_NO_SPRITE,{
    .@q=getq3(FrostiaQuest_Homunculus);
    mesn;
    mesc l("You have no idea what this piece of equipment is used for.");
    next;
    mesn;
    mesc l("It have the same shape as those used to polish weapons, but there are blood stains everywhere.");
    if (!(.@q & .hcID))
        setq3 FrostiaQuest_Homunculus, .@q|.hcID;
    close;
OnInit:
    .hcID=4;
    .distance=2;
    end;
}

023-3-2,40,20,0	script	Staircase#MKHB	NPC_NO_SPRITE,{
    .@q=getq3(FrostiaQuest_Homunculus);
    mesn;
    mesc l("The stairs have magic cast on them, I cannot climb.");
    next;
    mesn;
    mesc l("I have no idea what's above. Behind the stair, is the painting of a table.");
    next;
    mesn;
    mesc l("Seems to be related to alchemy.");
    if (!(.@q & .hcID))
        setq3 FrostiaQuest_Homunculus, .@q|.hcID;
    close;
OnInit:
    .hcID=8;
    .distance=2;
    end;
}

023-3-2,41,30,0	script	Potions#MKHB	NPC_NO_SPRITE,{
    .@q=getq3(FrostiaQuest_Homunculus);
    mesn;
    mesc l("Several flasks are aligned there. They seemed to be dyes, but a close inspection reveals they're not.");
    next;
    mesn;
    mesc l("They must be reagents used in alchemy.");
    if (!(.@q & .hcID))
        setq3 FrostiaQuest_Homunculus, .@q|.hcID;
    close;
OnInit:
    .hcID=16;
    .distance=2;
    end;
}

023-3-2,36,25,0	script	Bookcase#MKHB1	NPC_NO_SPRITE,{
    .@q=getq3(FrostiaQuest_Homunculus);
    mesn;
    mesc l("Several books about alchemy. Seems to be pretty advanced.");
    if (!(.@q & .hcID))
        setq3 FrostiaQuest_Homunculus, .@q|.hcID;
    close;
OnInit:
    .hcID=32;
    .distance=2;
    end;
}


023-3-2,44,25,0	script	Bookcase#MKHB2	NPC_NO_SPRITE,{
    .@q=getq3(FrostiaQuest_Homunculus);
    mesn;
    mesc l("Several books about hiding magic. Might be why the houses looked abandoned and empty but the chimney was going.");
    if (!(.@q & .hcID))
        setq3 FrostiaQuest_Homunculus, .@q|.hcID;
    close;
OnInit:
    .hcID=64;
    .distance=2;
    end;
}


023-3-2,46,28,0	script	Bookcase#MKHB3	NPC_NO_SPRITE,{
    .@q=getq3(FrostiaQuest_Homunculus);
    mesn;
    mesc l("Several books about artificial lifeforms and the man who played God.");
    if (!(.@q & .hcID))
        setq3 FrostiaQuest_Homunculus, .@q|.hcID;
    close;
OnInit:
    .hcID=128;
    .distance=2;
    end;
}

023-3-2,49,31,0	duplicate(Bookcase#MKHB3)	Bookcase#MKHB4	NPC_NO_SPRITE

023-3-2,32,28,0	script	Bookcase#MKHB5	NPC_NO_SPRITE,{
    .@q=getq3(FrostiaQuest_Homunculus);
    mesn;
    mesc l("Seems to be accounting reports and stuff. You take a few pages.");
    if (!(.@q & .hcID))
        setq3 FrostiaQuest_Homunculus, .@q|.hcID;
    close;
OnInit:
    .hcID=256;
    .distance=2;
    end;
}

023-3-2,30,31,0	duplicate(Bookcase#MKHB1)	Bookcase#MKHB6	NPC_NO_SPRITE

023-3-2,35,35,0	duplicate(Bookcase#MKHB1)	Bookcase#MKHB7	NPC_NO_SPRITE

023-3-2,43,35,0	duplicate(Bookcase#MKHB2)	Bookcase#MKHB8	NPC_NO_SPRITE

023-3-2,33,22,0	duplicate(Potions#MKHB)	Potions#MKHB1	NPC_NO_SPRITE
023-3-2,30,24,0	duplicate(Potions#MKHB)	Potions#MKHB2	NPC_NO_SPRITE
023-3-2,27,26,0	duplicate(Potions#MKHB)	Potions#MKHB3	NPC_NO_SPRITE
023-3-2,46,22,0	duplicate(Potions#MKHB)	Potions#MKHB4	NPC_NO_SPRITE
023-3-2,49,24,0	duplicate(Potions#MKHB)	Potions#MKHB5	NPC_NO_SPRITE
023-3-2,52,26,0	duplicate(Potions#MKHB)	Potions#MKHB6	NPC_NO_SPRITE


023-3-2,37,20,0	script	Wardrobe#MKHB	NPC_NO_SPRITE,{
    .@q=getq3(FrostiaQuest_Homunculus);
    mesn;
    mesc l("Inside it, seems to be several magic reagents, powders, and other stuff.");
    if (!(.@q & .hcID))
        setq3 FrostiaQuest_Homunculus, .@q|.hcID;
    close;
OnInit:
    .hcID=512;
    .distance=2;
    end;
}

023-3-2,43,20,0	duplicate(Wardrobe#MKHB)	Wardrobe#MKHB1	NPC_NO_SPRITE
023-3-2,31,21,0	duplicate(Wardrobe#MKHB)	Wardrobe#MKHB2	NPC_NO_SPRITE
023-3-2,28,23,0	duplicate(Wardrobe#MKHB)	Wardrobe#MKHB3	NPC_NO_SPRITE
023-3-2,25,25,0	duplicate(Wardrobe#MKHB)	Wardrobe#MKHB4	NPC_NO_SPRITE
023-3-2,48,21,0	duplicate(Wardrobe#MKHB)	Wardrobe#MKHB5	NPC_NO_SPRITE
023-3-2,51,23,0	duplicate(Wardrobe#MKHB)	Wardrobe#MKHB6	NPC_NO_SPRITE
023-3-2,54,25,0	duplicate(Wardrobe#MKHB)	Wardrobe#MKHB7	NPC_NO_SPRITE

023-3-2,51,37,0	script	Barrels#MKHB	NPC_NO_SPRITE,{
    .@q=getq3(FrostiaQuest_Homunculus);
    mesn;
    mesc l("These barrels are sealed and heavy. It's impossible to know what's inside. There's a marking on them, you copy them somewhere.");
    if (!(.@q & .hcID))
        setq3 FrostiaQuest_Homunculus, .@q|.hcID;
    close;
OnInit:
    .hcID=1024;
    .distance=2;
    end;
}

023-3-2,45,41,0	duplicate(Barrels#MKHB)	Barrels#MKHB1	NPC_NO_SPRITE
023-3-2,30,40,0	duplicate(Barrels#MKHB)	Barrels#MKHB2	NPC_NO_SPRITE
023-3-2,25,34,0	duplicate(Barrels#MKHB)	Barrels#MKHB3	NPC_NO_SPRITE

023-3-2,38,26,0	script	Alchemy Set#MKHB	NPC_NO_SPRITE,{
    .@q=getq3(FrostiaQuest_Homunculus);
    mesn;
    mesc l("Hey look, an alchemy set. Not your area of expertise, but you take a few samples.");
    if (!(.@q & .hcID))
        setq3 FrostiaQuest_Homunculus, .@q|.hcID;
    close;
OnInit:
    .hcID=2048;
    .distance=2;
    end;
}