1 |
event_inherited(); |
2 |
if (live_call()) |
3 |
return global.live_result; |
4 |
var actor_martlet = object_index; |
5 |
if (global.dunes_flag_ext[4] == 0) |
6 |
{ |
7 |
switch (scene) |
8 |
{ |
9 |
case 0: |
10 |
if (obj_pl.x > 160) |
11 |
cutscene_advance(); |
12 |
break; |
13 |
case 1: |
14 |
scr_cutscene_start(); |
15 |
cutscene_npc_direction(actor_martlet, "left"); |
16 |
break; |
17 |
case 2: |
18 |
cutscene_dialogue(); |
19 |
with (msg) |
20 |
{ |
21 |
talker[0] = actor_martlet; |
22 |
message[0] = "* Clover!"; |
23 |
message[1] = "* I knew I could count on# you!"; |
24 |
message[2] = "* So, me getting out of# here..."; |
25 |
message[3] = "* Any luck?"; |
26 |
prt[0] = 333; |
27 |
prt[1] = 318; |
28 |
prt[2] = 320; |
29 |
prt[3] = 320; |
30 |
ch_msg = 3; |
31 |
ch[1] = "Soon"; |
32 |
ch[2] = "No, sorry"; |
33 |
if (outcome == 1) |
34 |
{ |
35 |
message[4] = "* Let's hope!"; |
36 |
message[5] = "* Thanks for being# positive. This is super# ridiculous."; |
37 |
message[6] = "* Anyway..."; |
38 |
prt[4] = 317; |
39 |
prt[5] = 320; |
40 |
prt[6] = 321; |
41 |
} |
42 |
if (outcome == 2) |
43 |
{ |
44 |
message[4] = "* It's OK. I knew it would# be difficult."; |
45 |
message[5] = "* This is infuriating."; |
46 |
message[6] = "* Anyway..."; |
47 |
prt[4] = 317; |
48 |
prt[5] = 315; |
49 |
prt[6] = 321; |
50 |
} |
51 |
} |
52 |
break; |
53 |
case 3: |
54 |
cutscene_npc_direction(actor_martlet, "down"); |
55 |
global.dunes_flag_ext[4] += 1; |
56 |
interact = true; |
57 |
waiter = 1; |
58 |
scene = 0; |
59 |
break; |
60 |
} |
61 |
} |
62 |
else if (scene > 0) |
63 |
{ |
64 |
switch (scene) |
65 |
{ |
66 |
case 1: |
67 |
cutscene_dialogue(); |
68 |
with (msg) |
69 |
{ |
70 |
talker[0] = actor_martlet; |
71 |
message[0] = "* I've been wondering how# this situation will# affect my job."; |
72 |
message[1] = "* Oh, that's right! I# still have my handbook!"; |
73 |
prt[0] = 317; |
74 |
prt[1] = 333; |
75 |
} |
76 |
break; |
77 |
case 2: |
78 |
cutscene_npc_action_sprite(object_index, 874, 0.3, true, 0); |
79 |
break; |
80 |
case 3: |
81 |
cutscene_dialogue(); |
82 |
with (msg) |
83 |
{ |
84 |
talker[0] = actor_martlet; |
85 |
message[0] = "* Let's see here..."; |
86 |
message[1] = "* \"In case of injury,# illness, imprisonment,# loss of this handbook..."; |
87 |
message[2] = "* Or another misfortune# rendering you unable to# perform your duties..."; |
88 |
message[3] = "* Please report to the# leader of the Royal# Guard immediately."; |
89 |
message[4] = "* Failure to do so...\""; |
90 |
message[5] = "* ..."; |
91 |
message[6] = "* Oh..."; |
92 |
prt[0] = 334; |
93 |
prt[1] = 324; |
94 |
prt[2] = 324; |
95 |
prt[3] = 323; |
96 |
prt[4] = 330; |
97 |
prt[5] = 330; |
98 |
prt[6] = 332; |
99 |
} |
100 |
break; |
101 |
case 4: |
102 |
cutscene_npc_action_sprite_reverse(object_index, 874, 0.3, false); |
103 |
break; |
104 |
case 5: |
105 |
cutscene_dialogue(); |
106 |
with (msg) |
107 |
{ |
108 |
talker[0] = actor_martlet; |
109 |
message[0] = "* Let's just say the# book wasn't very# helpful."; |
110 |
prt[0] = 323; |
111 |
} |
112 |
break; |
113 |
case 6: |
114 |
martlet_second_cutscene = false; |
115 |
npc_flag = 6; |
116 |
scene = 0; |
117 |
scr_cutscene_end(); |
118 |
break; |
119 |
} |
120 |
} |
121 |
if (interact && waiter == 0) |
122 |
waiter = 1; |
123 |
if (waiter == 1) |
124 |
{ |
125 |
if (global.dunes_flag[20] == 1) |
126 |
{ |
127 |
if (npc_flag == 0) |
128 |
{ |
129 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
130 |
with (msg) |
131 |
{ |
132 |
talker[0] = actor_martlet; |
133 |
message[0] = "* That \"sheriff\" North# Star? Was it?"; |
134 |
message[1] = "* What a jerk!"; |
135 |
message[2] = "* I tried to fight for# you, I really did."; |
136 |
message[3] = "* His hooligans were too# strong and tossed me in# here."; |
137 |
message[4] = "* Knowing that, I don't# think force will do much# good."; |
138 |
message[5] = "* There's gotta be a# level-headed monster# around here."; |
139 |
message[6] = "* One that knows this is# unjust and will free me."; |
140 |
message[7] = "* When that time comes# I'll... I'll..."; |
141 |
message[8] = "* Who am I kidding? I# couldn't press charges# or ANYTHING!"; |
142 |
message[9] = "* I talk big but we're# cornered."; |
143 |
message[10] = "* ASGORE or another guard# finding out about you# would be the end."; |
144 |
message[11] = "* Sigh..."; |
145 |
message[12] = "* Well, North Star seems# pretty enthusiastic# about all of this."; |
146 |
message[13] = "* Maybe by playing along,# you can gain his favor# and set me free!"; |
147 |
message[14] = "* I don't know... just# play it cool for now. "; |
148 |
message[15] = "* I'll be here... "; |
149 |
message[16] = "* Ugh. What a day."; |
150 |
prt[0] = 308; |
151 |
prt[1] = 308; |
152 |
prt[2] = 317; |
153 |
prt[3] = 329; |
154 |
prt[4] = 317; |
155 |
prt[5] = 317; |
156 |
prt[6] = 321; |
157 |
prt[7] = 309; |
158 |
prt[8] = 329; |
159 |
prt[9] = 317; |
160 |
prt[10] = 317; |
161 |
prt[11] = 329; |
162 |
prt[12] = 338; |
163 |
prt[13] = 321; |
164 |
prt[14] = 338; |
165 |
prt[15] = 321; |
166 |
prt[16] = 336; |
167 |
} |
168 |
npc_flag = 1; |
169 |
} |
170 |
else if (npc_flag == 1) |
171 |
{ |
172 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
173 |
with (msg) |
174 |
{ |
175 |
talker[0] = actor_martlet; |
176 |
message[0] = "* We'll make it through# this, Clover. I know it!"; |
177 |
prt[0] = 320; |
178 |
} |
179 |
} |
180 |
} |
181 |
if (global.dunes_flag[20] == 3) |
182 |
{ |
183 |
if (npc_flag < 2) |
184 |
npc_flag = 2; |
185 |
if (npc_flag == 2) |
186 |
{ |
187 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
188 |
with (msg) |
189 |
{ |
190 |
talker[0] = actor_martlet; |
191 |
message[0] = "* It's so boring in here."; |
192 |
message[1] = "* Could they at least give# me something to do?"; |
193 |
message[2] = "* All I have is# brainstorming puzzle# ideas in my head."; |
194 |
message[3] = "* I recently had an idea# for a third molten rock# puzzle, so that's fun!"; |
195 |
message[4] = "* ...Okay, it isn't fun."; |
196 |
message[5] = "* What is interesting is# the noise I heard a# little while ago."; |
197 |
message[6] = "* I heard a loud SNAP! -# Which awoke me from a# nap."; |
198 |
message[7] = "* Before I realized what# had happened, the other# prisoner was gone."; |
199 |
message[8] = "* I tried to talk to them# when I first arrived but# got no answers."; |
200 |
message[9] = "* So now not only am I in# jail, I have no cellmate# to talk to."; |
201 |
message[10] = "* All in all, this day is# going fantastic for me."; |
202 |
prt[0] = 336; |
203 |
prt[1] = 338; |
204 |
prt[2] = 336; |
205 |
prt[3] = 318; |
206 |
prt[4] = 317; |
207 |
prt[5] = 321; |
208 |
prt[6] = 324; |
209 |
prt[7] = 321; |
210 |
prt[8] = 321; |
211 |
prt[9] = 329; |
212 |
prt[10] = 336; |
213 |
} |
214 |
npc_flag = 3; |
215 |
} |
216 |
else if (npc_flag == 3) |
217 |
{ |
218 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
219 |
with (msg) |
220 |
{ |
221 |
talker[0] = actor_martlet; |
222 |
message[0] = "* (By the way, I'm aware# of this \"Moray\"# character.)"; |
223 |
message[1] = "* (So far they seem nice,# so I'm gonna roll with# it.)"; |
224 |
message[2] = "* Ahem! No thanks, Clover,# I have food!"; |
225 |
message[3] = "* ..."; |
226 |
prt[0] = 321; |
227 |
prt[1] = 328; |
228 |
prt[2] = 312; |
229 |
prt[3] = 337; |
230 |
} |
231 |
npc_flag = 4; |
232 |
} |
233 |
else if (npc_flag == 4) |
234 |
{ |
235 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
236 |
with (msg) |
237 |
{ |
238 |
talker[0] = actor_martlet; |
239 |
message[0] = "* Give me enough time and# I'll think of a fourth# molten rock puzzle!"; |
240 |
message[1] = "* At this rate, half of# Snowdin will be molten# rock puzzles!"; |
241 |
prt[0] = 313; |
242 |
prt[1] = 313; |
243 |
} |
244 |
} |
245 |
} |
246 |
if (global.dunes_flag[20] == 5) |
247 |
{ |
248 |
if (npc_flag < 5) |
249 |
npc_flag = 5; |
250 |
if (npc_flag == 5) |
251 |
{ |
252 |
scr_cutscene_start(); |
253 |
scene = 1; |
254 |
} |
255 |
else if (npc_flag == 6) |
256 |
{ |
257 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
258 |
with (msg) |
259 |
{ |
260 |
talker[0] = actor_martlet; |
261 |
message[0] = "* On the bright side,"; |
262 |
message[1] = "* I now have some# not-so-light reading# material!"; |
263 |
message[2] = "* Gotta get cracking!"; |
264 |
prt[0] = 328; |
265 |
prt[1] = 312; |
266 |
prt[2] = 328; |
267 |
} |
268 |
npc_flag = 7; |
269 |
} |
270 |
else if (npc_flag == 7) |
271 |
{ |
272 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
273 |
with (msg) |
274 |
{ |
275 |
talker[0] = actor_martlet; |
276 |
message[0] = "* Keep at it, Clover,# cause I'm not going# anywhere."; |
277 |
prt[0] = 317; |
278 |
} |
279 |
} |
280 |
} |
281 |
if (global.dunes_flag[20] == 7) |
282 |
{ |
283 |
if (npc_flag < 8) |
284 |
npc_flag = 8; |
285 |
if (npc_flag == 8) |
286 |
{ |
287 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
288 |
with (msg) |
289 |
{ |
290 |
talker[0] = actor_martlet; |
291 |
message[0] = "* I managed to doze off# for a moment earlier."; |
292 |
message[1] = "* I had a dream I was back# at my Snowdin post! "; |
293 |
message[2] = "* ...Dozing off."; |
294 |
message[3] = "* Don't get me wrong, I'm# not a lazy bird!"; |
295 |
message[4] = "* Being a Royal Guard is# no easy task!"; |
296 |
message[5] = "* Calibrating puzzles,# writing status reports,# guarding outposts..."; |
297 |
message[6] = "* Getting yelled at by an# old lady for ruining the# Snowdin bridge..."; |
298 |
message[7] = "* Whoops, I'm trailing off# again."; |
299 |
message[8] = "* I really need to get out# soon, at this rate I'll# start talking to myself."; |
300 |
message[9] = "* ..."; |
301 |
message[10] = "* More than usual, anyway."; |
302 |
prt[0] = 321; |
303 |
prt[1] = 318; |
304 |
prt[2] = 320; |
305 |
prt[3] = 333; |
306 |
prt[4] = 322; |
307 |
prt[5] = 338; |
308 |
prt[6] = 323; |
309 |
prt[7] = 333; |
310 |
prt[8] = 336; |
311 |
prt[9] = 338; |
312 |
prt[10] = 320; |
313 |
} |
314 |
npc_flag = 9; |
315 |
} |
316 |
else if (npc_flag == 9) |
317 |
{ |
318 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
319 |
with (msg) |
320 |
{ |
321 |
talker[0] = actor_martlet; |
322 |
message[0] = "* You've gotta hurry# Clover, please!"; |
323 |
message[1] = "* At this rate, I'm gonna# have to start eating# moss off the walls!"; |
324 |
prt[0] = 329; |
325 |
prt[1] = 322; |
326 |
} |
327 |
} |
328 |
} |
329 |
if (global.dunes_flag[20] == 9) |
330 |
{ |
331 |
if (npc_flag < 10) |
332 |
npc_flag = 10; |
333 |
if (npc_flag == 10) |
334 |
{ |
335 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
336 |
with (msg) |
337 |
{ |
338 |
talker[0] = actor_martlet; |
339 |
message[0] = "* I kinda... Overheard# what happened# outside..."; |
340 |
message[1] = "* Ugh. I know I shouldn't# feel this way but..."; |
341 |
message[2] = "* Maybe you should go# after the sheriff,# Clover."; |
342 |
message[3] = "* I know he did some mean# stuff, but he's out# there all alone now."; |
343 |
message[4] = "* You've gained his trust# so maybe you could sort# out the situation?"; |
344 |
message[5] = "* ..."; |
345 |
message[6] = "* And uh... We still# need him to let me out# of here... of course..."; |
346 |
prt[0] = 322; |
347 |
prt[1] = 329; |
348 |
prt[2] = 329; |
349 |
prt[3] = 317; |
350 |
prt[4] = 320; |
351 |
prt[5] = 329; |
352 |
prt[6] = 320; |
353 |
} |
354 |
npc_flag = 11; |
355 |
} |
356 |
else if (npc_flag == 11) |
357 |
{ |
358 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
359 |
with (msg) |
360 |
{ |
361 |
talker[0] = actor_martlet; |
362 |
message[0] = "* You can do this Clover!"; |
363 |
message[1] = "* If you could convince# this bird-brain, you can# get through to him!"; |
364 |
prt[0] = 313; |
365 |
prt[1] = 313; |
366 |
} |
367 |
} |
368 |
} |
369 |
waiter = 2; |
370 |
} |
371 |
if (waiter == 2 && !instance_exists(obj_dialogue) && scene == 0) |
372 |
{ |
373 |
waiter = 0; |
374 |
global.cutscene = false; |
375 |
} |
376 |
if (ds_map_find_value(global.npc_map, npc_id) != npc_flag) |
377 |
ds_map_replace(global.npc_map, npc_id, npc_flag); |