1 |
event_inherited(); |
2 |
if (global.dunes_flag[24] != 0 && npc_flag == 1) |
3 |
npc_flag = 4; |
4 |
if (interact && obj_pl.direction == 90 && !can_talk) |
5 |
{ |
6 |
can_talk = true; |
7 |
is_talking = 1; |
8 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
9 |
} |
10 |
if (can_talk) |
11 |
{ |
12 |
switch (npc_flag) |
13 |
{ |
14 |
case 0: |
15 |
with (msg) |
16 |
{ |
17 |
message[0] = "* STEP RIIIIGHT UP!!"; |
18 |
message[1] = "* WE GOT A BLOWOUT SALE GOING# ON!!"; |
19 |
message[2] = "* IT MAY LOOK LIKE WE'RE# ALMOST SOLD OUT BUT QUITE# THE CONTRARY!"; |
20 |
message[3] = "* WE ONLY ORDERED ONE STOCK OF# MUG!"; |
21 |
message[4] = "* IT HAS BEEN ON THIS TRUSTY# SHELF FOR THIRTEEN YEARS!"; |
22 |
message[5] = "* DEMAND IS DEPRESSINGLY LOW SO# TAKE ADVANTAGE OF THIS OFFER# NOW!!"; |
23 |
message[6] = "* ONLY 40G BUCKO!!"; |
24 |
ch_msg = 6; |
25 |
ch[1] = "Buy"; |
26 |
ch[2] = "Bye"; |
27 |
if (outcome == 1) |
28 |
{ |
29 |
message[7] = "* Wait... seriously?"; |
30 |
message[8] = "* I MEAN, YES OF COURSE!!"; |
31 |
message[9] = "* AHA!! AHAHAHA!!!"; |
32 |
message[10] = "* GO FETCH IT OFF THE SHELF AND# I'LL RING YOU UP!"; |
33 |
scr_cutscene_start(); |
34 |
other.clover_cup_cutscene = true; |
35 |
other.can_talk = false; |
36 |
} |
37 |
if (outcome == 2) |
38 |
{ |
39 |
message[7] = "* DISAPPOINTED BUT NOT SURPRISED!"; |
40 |
other.can_talk = false; |
41 |
other.npc_flag = 3; |
42 |
} |
43 |
} |
44 |
break; |
45 |
case 1: |
46 |
case 2: |
47 |
with (msg) |
48 |
message[0] = "* SINCE YOU BOUGHT THE MUG, I'LL# HAVE TO SELL THE SHELVES# THEMSELVES!!"; |
49 |
if (npc_flag == 2) |
50 |
npc_flag = 4; |
51 |
can_talk = false; |
52 |
break; |
53 |
case 3: |
54 |
with (msg) |
55 |
{ |
56 |
message[0] = "* THE SALE IS OVER!"; |
57 |
message[1] = "* YOU HAD YOUR CHANCE TO BUY THE# PREMIUM MUG BUT REFUSED!"; |
58 |
message[2] = "* LOOKS LIKE IT WON'T FIND A# HOME ANYTIME SOON!"; |
59 |
message[3] = "* SORRY, I DON'T MAKE THE RULES# TO ECONOMICS!"; |
60 |
} |
61 |
can_talk = false; |
62 |
break; |
63 |
case 4: |
64 |
with (msg) |
65 |
{ |
66 |
message[0] = "* ..."; |
67 |
message[1] = "* ..."; |
68 |
message[2] = "* THERE IS NOTHING FOR YOU# HERE."; |
69 |
message[3] = "* GOODBYE."; |
70 |
} |
71 |
can_talk = false; |
72 |
break; |
73 |
} |
74 |
} |
75 |
if (clover_cup_cutscene == true && !global.dialogue_open) |
76 |
{ |
77 |
if (global.party_member != -4 && instance_exists(global.party_member)) |
78 |
{ |
79 |
scr_follower_into_actorscr_follower_into_actorfunction scr_follower_into_actor()
{
if (global.party_member == -4)
return false;
actor_follower = instance_create(global.party_member.x, global.party_member.y, global.party_member.npc_actor);
with (global.party_member)
{
switch (sprite_index)
{
case up_sprite:
case up_sprite_idle:
case up_sprite_run:
other.actor_follower.npc_direction = "up";
other.actor_follower.sprite_index = other.actor_follower.up_sprite;
break;
case down_sprite:
case down_sprite_idle:
case down_sprite_run:
other.actor_follower.npc_direction = "down";
other.actor_follower.sprite_index = other.actor_follower.down_sprite;
break;
case left_sprite:
case left_sprite_idle:
case left_sprite_run:
other.actor_follower.npc_direction = "left";
other.actor_follower.sprite_index = other.actor_follower.left_sprite;
break;
case right_sprite:
case right_sprite_idle:
case right_sprite_run:
other.actor_follower.sprite_index = other.actor_follower.right_sprite;
break;
}
instance_destroy();
}
return true;
} (); |
80 |
actor_follower.npc_direction = "up"; |
81 |
actor_follower.end_direction = "up"; |
82 |
actor_follower.can_walk = false; |
83 |
actor_follower.x_dest[0] = 213; |
84 |
actor_follower.y_dest[0] = 110; |
85 |
actor_follower.axis_override = "x"; |
86 |
instance_destroy(global.party_member); |
87 |
} |
88 |
if (!instance_exists(obj_player_npc)) |
89 |
{ |
90 |
clover_npc = instance_create(obj_pl.x, obj_pl.y, obj_player_npc); |
91 |
clover_npc.x_dest[0] = 213; |
92 |
clover_npc.y_dest[0] = 97; |
93 |
clover_npc.axis_override = "x"; |
94 |
clover_npc.can_walk = true; |
95 |
} |
96 |
if (clover_npc.npc_arrived == true) |
97 |
{ |
98 |
clover_npc.image_alpha = 0; |
99 |
clover_npc.npc_arrived = false; |
100 |
clover_cup_cutscene = 2; |
101 |
obj_giftshop_mug.sprite_index = spr_mug_fall; |
102 |
obj_giftshop_mug.image_index = 0; |
103 |
} |
104 |
} |
105 |
if (clover_cup_cutscene == 2) |
106 |
{ |
107 |
if (floor(obj_giftshop_mug.image_index) == 20) |
108 |
{ |
109 |
if (!audio_is_playing(snd_glass_break)) |
110 |
audio_play_sound(snd_glass_break, 1, 0); |
111 |
audio_sound_gain(obj_radio.current_song, 0, 100); |
112 |
} |
113 |
if (obj_giftshop_mug.image_index >= (obj_giftshop_mug.image_number - 1)) |
114 |
{ |
115 |
obj_giftshop_mug.image_speed = 0; |
116 |
alarm[0] = 90;gml_Object_obj_miner_giftshopper_Alarm_0.gmlif (global.party_member != -4)
clover_cup_cutscene = 3;
else
global.cutscene = false;
scr_text();
with (msg)
{
message[0] = "* ...";
message[1] = "* ENJOY YOUR SHARDS OF GLASS!!";
message[2] = "* NO CHARGE ANYMORE BUDDY!";
message[3] = "* YOU BREAK IT, YOU DO NOT BUY# IT!!";
}
is_talking = 1;
npc_flag += 1;
music_reset = true;
instance_destroy(clover_npc);
obj_pl.image_alpha = 1;
obj_pl.direction = 90;
obj_pl.y += 2;
obj_giftshop_mug.sprite_index = spr_mug_broken;
obj_giftshop_mug.depth = 0; |
117 |
clover_cup_cutscene = 0; |
118 |
} |
119 |
} |
120 |
if (clover_cup_cutscene == 3) |
121 |
{ |
122 |
if (global.dialogue_open) |
123 |
exit; |
124 |
actor_follower.can_walk = true; |
125 |
if (actor_follower.npc_arrived) |
126 |
{ |
127 |
instance_create(actor_follower.x, actor_follower.y, global.party_member); |
128 |
instance_destroy(actor_follower); |
129 |
scr_cutscene_end(); |
130 |
clover_cup_cutscene = 0; |
131 |
} |
132 |
} |
133 |
if (music_reset == true) |
134 |
{ |
135 |
audio_sound_gain(obj_radio.current_song, 1, 300); |
136 |
music_reset = false; |
137 |
} |