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() //gml_Script_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_startscr_cutscene_startfunction scr_cutscene_start() //gml_Script_scr_cutscene_start
{
global.cutscene = true
obj_pl.state = gml_Script_scr_frozen_state
obj_pl.image_index = 0
obj_pl.image_speed = 0
} () |
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 |
} |
76 |
if (clover_cup_cutscene == true && (!global.dialogue_open)) |
77 |
{ |
78 |
if (global.party_member != noone && instance_exists(global.party_member)) |
79 |
{ |
80 |
scr_follower_into_actorscr_follower_into_actorfunction scr_follower_into_actor() //gml_Script_scr_follower_into_actor
{
if (global.party_member == noone)
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;
} () |
81 |
actor_follower.npc_direction = "up" |
82 |
actor_follower.end_direction = "up" |
83 |
actor_follower.can_walk = false |
84 |
actor_follower.x_dest[0] = 213 |
85 |
actor_follower.y_dest[0] = 110 |
86 |
actor_follower.axis_override = "x" |
87 |
instance_destroy(global.party_member) |
88 |
} |
89 |
if (!instance_exists(obj_player_npc)) |
90 |
{ |
91 |
clover_npc = instance_create(obj_pl.x, obj_pl.y, obj_player_npc) |
92 |
clover_npc.x_dest[0] = 213 |
93 |
clover_npc.y_dest[0] = 97 |
94 |
clover_npc.axis_override = "x" |
95 |
clover_npc.can_walk = true |
96 |
} |
97 |
if (clover_npc.npc_arrived == true) |
98 |
{ |
99 |
clover_npc.image_alpha = 0 |
100 |
clover_npc.npc_arrived = false |
101 |
clover_cup_cutscene = 2 |
102 |
obj_giftshop_mug.sprite_index = spr_mug_fall |
103 |
obj_giftshop_mug.image_index = 0 |
104 |
} |
105 |
} |
106 |
if (clover_cup_cutscene == 2) |
107 |
{ |
108 |
if (floor(obj_giftshop_mug.image_index) == 20) |
109 |
{ |
110 |
if (!audio_is_playing(snd_glass_break)) |
111 |
audio_play_sound(snd_glass_break, 1, 0) |
112 |
audio_sound_gain(obj_radio.current_song, 0, 100) |
113 |
} |
114 |
if (obj_giftshop_mug.image_index >= (obj_giftshop_mug.image_number - 1)) |
115 |
{ |
116 |
obj_giftshop_mug.image_speed = 0 |
117 |
alarm[0] = 90alarm[0]if (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 |
118 |
clover_cup_cutscene = 0 |
119 |
} |
120 |
} |
121 |
if (clover_cup_cutscene == 3) |
122 |
{ |
123 |
if global.dialogue_open |
124 |
return; |
125 |
actor_follower.can_walk = true |
126 |
if actor_follower.npc_arrived |
127 |
{ |
128 |
instance_create(actor_follower.x, actor_follower.y, global.party_member) |
129 |
instance_destroy(actor_follower) |
130 |
scr_cutscene_end() |
131 |
clover_cup_cutscene = 0 |
132 |
} |
133 |
} |
134 |
if (music_reset == true) |
135 |
{ |
136 |
audio_sound_gain(obj_radio.current_song, 1, 300) |
137 |
music_reset = false |
138 |
} |