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
324
|
//Author: tux9th
//This is the continuation of Astral Magic Level 2.
//This uses the QUEST_MAGIC2 variable Nibble 4.
//Quest States:
// @pauline_state 1: Got Magic, started to talk to her about Magic.
// @pauline_state 2: Finished Talking to her about new Astral Spells, learnt invocations.
// @pauline_state 3: Told her the correct ingredients to the Mouboo summon spell.
// @pauline_state 4: Told her the correct ingredients to the Pinkie summon spell.
//
//Variables:
// @pauline_ingredient1$ First ingredient input.
// @pauline_ingredient2$ Second ingredient input.
// @pauline_REWARD amount of XP gained for telling her ingredients for each spell.
001-2,77,78,0|script|Pauline|208
{
//Bitmasking
// QUEST_MAGIC2 - Nibble4
set @Pauline_MASK, NIBBLE_4_MASK;
set @Pauline_SHIFT, NIBBLE_4_SHIFT;
set @pauline_state, ((QUEST_MAGIC2 & @Pauline_MASK) >> @Pauline_SHIFT);
//Bitmasks END
set @pauline_REWARD, 10000;
if (@pauline_state == 4) goto L_MoreMagic;
if (@pauline_state == 3) goto L_KnowIngredientsPinkie;
if (@pauline_state == 2) goto L_Ingredients;
if (@pauline_state == 1) goto L_Back;
if (getskilllv(SKILL_MAGIC_ASTRAL) > 0)
goto L_Magic;
mes "[Pauline]";
mes "\"I've mastered several schools of magic and fought the Yeti in Kaizei.\"";
next;
mes "\"The path of magic is a long and difficult one.\"";
goto L_Close;
L_Magic:
mes "[Pauline]";
mes "\"Ah. I see you are skilled in the Art of Astral Magic.\"";
mes "\"Who taught you?\"";
menu
"I learnt it myself!", L_Next,
"Sagatha is my teacher.", L_Sagatha,
"You must be mistaken.", L_Close;
L_Next:
mes "\"You did? Not bad. I guess then there is nothing I can teach you. Or are you interested in sharing knowledge?\"";
menu
"Yes, please.", L_Spells,
"No, thanks.", L_Close;
L_Sagatha:
mes "[Pauline]";
mes "\"Ah, that Witch!\"";
mes "\"Very well.\"";
next;
mes "\"Do you want me to teach you things Sagatha doesn't know yet?\"";
next;
menu
"Yes.", L_Spells,
"No.", L_Close;
L_Back:
mes "[Pauline]";
mes "\"So, you're back. Are you ready to share knowledge now?\"";
menu
"Yes.", L_Spells,
"No.", L_Close;
L_Spells:
set @pauline_state, 1;
callsub S_Update_Mask;
mes "[Pauline]";
mes "\"Okay.\"";
mes "\"Not long ago I discovered some new caves near Tulimshar. In an abandond chamber I found some paintings on the wall.\"";
next;
mes "\"They weren't typical for this region, so I examined them closely. I found some invocations I have never heard before.\"";
mes "\"I thought that they would fit better into the Woodland area. I could only decipher two invocations so far. Those are two spells used to summon creatures.\"";
next;
mes "\"One was for summoning Mouboos and the other one was for summoning Pinkies.\"";
mes "\"Have you ever heared about those?\"";
next;
menu
"Yes. I thought you had something new to tell. [Walk Away]", L_Close,
"No, tell me more.", L_Next1;
L_Next1:
mes "[Pauline]";
mes "\"Well I could only read the invocations. So I don't exactly know what kind of ingredients you are going to need.\"";
mes "\"The first one for the mouboo was " + get(.invocation$, "smmouboo") + " and the one for the pinkie was " + get(.invocation$, "smpinkie") +".\"";
next;
mes "\"For the pinkie spell my suggestion is to try similar ingredients to the other Astral spells. Try a root and some item typical for pinkies.\"";
mes "\"The mouboo spell might be more complicated. From what I could translate, one of the spell components is crafted by magic.\"";
next;
mes "\"When you find the right ingredients, come back and bring them to me to try those spells out.\"";
next;
mes "\"Goodbye.\"";
set @pauline_state, 2;
callsub S_Update_Mask;
next;
mes "##1WARNING: Summoning spells DO NOT work inside towns.##0";
goto L_Close;
L_Ingredients:
mes "[Pauline]";
mes "\"Hello, have you found out what ingredients to use yet?\"";
menu
"Yes.", L_KnowIngredientsMouboo,
"No.", L_Next2;
L_Next2:
mes "\"Okay. Come back as soon as you know.\"";
goto L_Close;
L_KnowIngredientsMouboo:
mes "\"Did you bring them?\"";
menu
"Yes." , L_Next3,
"No.", L_ComeBackLater;
L_Next3:
cleararray @items$, "", getarraysize(@items$);
cleararray @item_names$, "", getarraysize(@item_names$);
setarray @items$, "AlizarinHerb", "GambogeHerb", "SilkCocoon", "PinkAntenna", "InsectSlime", "InsectLeg", "GrassSeeds", "ReedBundle", "RoastedAcorn", "Candy", "Milk", "BottleOfWater", "BirdLeg", "Steak", "Root", "RawLog", "Beer", "CactusDrink", "MoubooFigurine", "Acorn", "Iten", "WarpedLog";
setarray @item_names$, "Alizarin Herb", "Gamboge Herb", "Silk Cocoon", "Pink Antenna", "Insect Slime", "Insect Leg", "Grass Seeds", "Reed Bundle", "Roasted Acorn", "Candy", "Milk", "Bottle of Water", "Bird Leg", "Steak", "Root", "Raw Log", "Beer", "Cactus Drink", "Mouboo Figurine", "Acorn", "Iten", "Warped Log";
mes "\"Then tell me the ingredients for the mouboo summoning spell and give them to me. Start with the first ingredient and then tell me the second one separately.\"";
next;
callfunc "DynamicItemMenu$";
set @pauline_ingredient1$, @item$;
mes "Next ingredient.";
callfunc "DynamicItemMenu$";
set @pauline_ingredient2$, @item$;
if (@pauline_ingredient1$ == "")
goto L_Wrong;
if (@pauline_ingredient2$ == "")
goto L_Wrong;
if (countitem(@pauline_ingredient1$) < 1)
goto L_NotEnough;
if (countitem(@pauline_ingredient2$) < 1)
goto L_NotEnough;
mes "\"Do you want to give me these items?\"";
menu
"No.", L_ComeBackLater,
"Yes.", L_Next4;
L_Next4:
delitem @pauline_ingredient1$, 1;
delitem @pauline_ingredient2$, 1;
mes "\"Okay let me try this.\"";
if (@pauline_ingredient1$ == "Root")
goto L_Pass1Mouboo;
if (@pauline_ingredient1$ == "MoubooFigurine")
goto L_Pass2Mouboo;
goto L_DidNotWorkMouboo;
L_DidNotWorkMouboo:
mes "The Witch takes " + @pauline_ingredient1$ + " and " + @pauline_ingredient2$ + " and puts them together calling " + get(.invocation$, "summon-mouboo") + ".";
mes "Nothing happens.";
mes "[Pauline]";
mes "\"It seems you did not tell me the correct ingredients. Come back when you find the correct ones.\"";
goto L_Close;
L_Pass1Mouboo:
if (@pauline_ingredient2$ == "MoubooFigurine")
goto L_TrySpellMouboo;
goto L_DidNotWorkMouboo;
L_Pass2Mouboo:
if (@pauline_ingredient2$ == "Root")
goto L_TrySpellMouboo;
goto L_DidNotWorkMouboo;
L_TrySpellMouboo:
mes "The Witch takes " + @pauline_ingredient1$ + " and " + @pauline_ingredient2$ + " and puts them together calling " + get(.invocation$, "summon-mouboo") + ".";
monster "001-1", 55,68, "", 1028, 1;
mes "[Pauline]";
mes "\"It worked!\"";
set @pauline_state, 3;
callsub S_Update_Mask;
getexp @pauline_REWARD, 0;
goto L_Close;
L_KnowIngredientsPinkie:
cleararray @items$, "", getarraysize(@items$);
cleararray @item_names$, "", getarraysize(@item_names$);
setarray @items$, "AlizarinHerb", "GambogeHerb", "SilkCocoon", "PinkAntenna", "InsectSlime", "InsectLeg", "GrassSeeds", "ReedBundle", "RoastedAcorn", "Candy", "Milk", "BottleOfWater", "BirdLeg", "Steak", "Root", "RawLog", "Beer", "CactusDrink", "MoubooFigurine", "Acorn", "Iten", "WarpedLog";
setarray @item_names$, "Alizarin Herb", "Gamboge Herb", "Silk Cocoon", "Pink Antenna", "Insect Slime", "Insect Leg", "Grass Seeds", "Reed Bundle", "Roasted Acorn", "Candy", "Milk", "Bottle of Water", "Bird Leg", "Steak", "Root", "Raw Log", "Beer", "Cactus Drink", "Mouboo Figurine", "Acorn", "Iten", "Warped Log";
mes "[Pauline]";
mes "\"Now give me the ingredients for the pinkie spell.\"";
next;
callfunc "DynamicItemMenu$";
set @pauline_ingredient1$, @item$;
mes "Next ingredient.";
callfunc "DynamicItemMenu$";
set @pauline_ingredient2$, @item$;
if (@pauline_ingredient1$ == "")
goto L_Wrong;
if (@pauline_ingredient2$ == "")
goto L_Wrong;
if (countitem(@pauline_ingredient1$) < 1)
goto L_NotEnough;
if (countitem(@pauline_ingredient2$) < 1)
goto L_NotEnough;
mes "\"Do you want to give me these items?\"";
menu
"No.", L_ComeBackLater,
"Yes.", L_Next5;
L_Next5:
delitem @pauline_ingredient1$, 1;
delitem @pauline_ingredient2$, 1;
mes "\"Okay, let me try this.\"";
if (@pauline_ingredient1$ == "Root")
goto L_Pass1Pinkie;
if (@pauline_ingredient1$ == "PinkAntenna")
goto L_Pass2Pinkie;
goto L_DidNotWorkPinkie;
L_DidNotWorkPinkie:
mes "The Witch takes " + @pauline_ingredient1$ + " and " + @pauline_ingredient2$ + " and puts them together calling " + get(.invocation$, "summon-pinkie") + ".";
mes "Nothing happens.";
mes "[Pauline]";
mes "\"It seems you did not tell me the correct ingredients. Come back when you find the correct ones.\"";
goto L_Close;
L_Pass1Pinkie:
if (@pauline_ingredient2$ == "PinkAntenna")
goto L_TrySpellPinkie;
goto L_DidNotWorkPinkie;
L_Pass2Pinkie:
if (@pauline_ingredient2$ == "Root")
goto L_TrySpellPinkie;
goto L_DidNotWorkPinkie;
L_TrySpellPinkie:
mes "The Witch takes " + @pauline_ingredient1$ + " and " + @pauline_ingredient2$ + " and puts them together calling " + get(.invocation$, "summon-pinkie") + ".";
monster "001-1", 54,68, "", 1018, 1;
mes "[Pauline]";
mes "\"It worked!\"";
set @pauline_state, 4;
callsub S_Update_Mask;
getexp @pauline_REWARD, 0;
goto L_Close;
L_MoreMagic:
mes "[Pauline]";
mes "\"Thanks for telling me the ingredients. As soon as I find out more about those wall paintings I will let you know.\"";
goto L_Close;
L_Wrong:
mes "The Witch looks at you and snorts.";
mes "[Pauline]";
mes "\"You told me the wrong ingredients. Come back as soon as you know the correct ones.\"";
goto L_Close;
L_NotEnough:
mes "[Pauline]";
mes "\"Hey, you don't have this with you!\"";
mes "\"Come back when you have the right ingredients.\"";
goto L_Close;
L_ComeBackLater:
mes "[Pauline]";
mes "\"Then come back later.\"";
goto L_Close;
L_Close:
set @pauline_ingredient1$, "";
set @pauline_ingredient2$, "";
cleararray @items$, "", getarraysize(@items$);
cleararray @item_names$, "", getarraysize(@item_names$);
set @pauline_state, 0;
set @pauline_REWARD, 0;
close;
//Bitmasks
S_Update_Mask:
set QUEST_MAGIC2, (QUEST_MAGIC2 & ~(@Pauline_MASK)) | (@pauline_state << @Pauline_SHIFT);
return;
OnInit:
set .IS_MAGIC, 1;
end;
}
001-2,79,74,0|script|PaulineDebug|208
{
//load Bitmasks;
set @Pauline_MASK, NIBBLE_4_MASK;
set @Pauline_SHIFT, NIBBLE_4_SHIFT;
set @pauline_state, ((QUEST_MAGIC2 & @Pauline_MASK) >> @Pauline_SHIFT);
mes "Reset Quest State";
mes @pauline_state;
menu
"Yes.", L_Next,
"No.", L_Close;
L_Next:
set @pauline_state, 0;
callsub S_Update_Mask;
mes "Done";
close;
L_Close:
set @pauline_state, 0;
close;
S_Update_Mask:
set QUEST_MAGIC2, (QUEST_MAGIC2 & ~(@Pauline_MASK)) | (@pauline_state << @Pauline_SHIFT);
return;
OnInit:
if (!debug)
disablenpc "PaulineDebug";
end;
}
|