| 1 |
for (var i = 0; i <= (array_length_1d(timer) - 1); i++) |
| 2 |
{ |
| 3 |
if (timer[i] > 0) |
| 4 |
{ |
| 5 |
timer[i]--; |
| 6 |
} |
| 7 |
else if (timer[i] != -1) |
| 8 |
{ |
| 9 |
if (i == 0) |
| 10 |
{ |
| 11 |
with (msg) |
| 12 |
{ |
| 13 |
if (message_current == 1) |
| 14 |
{ |
| 15 |
instance_destroy(); |
| 16 |
} |
| 17 |
else |
| 18 |
{ |
| 19 |
message_current += 1; |
| 20 |
cutoff = 0; |
| 21 |
other.timer[0] = 60; |
| 22 |
exit; |
| 23 |
} |
| 24 |
} |
| 25 |
} |
| 26 |
if (i == 1) |
| 27 |
audio_play_sound(snd_mo_throw, 20, 0); |
| 28 |
if (i == 2) |
| 29 |
path_start(pt_mo_kiosk, 2, path_action_stop, false); |
| 30 |
if (i == 3) |
| 31 |
waiter = 9; |
| 32 |
if (i == 4) |
| 33 |
{ |
| 34 |
waiter = 7; |
| 35 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
| 36 |
with (msg) |
| 37 |
{ |
| 38 |
portrait = false; |
| 39 |
message[0] = "* Much as I'd love to keep# sellin' pops, I'm all out!"; |
| 40 |
message[1] = "* Until next time!"; |
| 41 |
} |
| 42 |
} |
| 43 |
timer[i] = -1; |
| 44 |
} |
| 45 |
} |
| 46 |
if (path_speed != 0) |
| 47 |
{ |
| 48 |
image_speed = 0.2; |
| 49 |
switch (direction div 90) |
| 50 |
{ |
| 51 |
case 0: |
| 52 |
sprite_index = spr_mo_right_yellow; |
| 53 |
break; |
| 54 |
case 1: |
| 55 |
sprite_index = spr_mo_up_yellow; |
| 56 |
break; |
| 57 |
case 2: |
| 58 |
sprite_index = spr_mo_left_yellow; |
| 59 |
break; |
| 60 |
case 3: |
| 61 |
sprite_index = spr_mo_down_yellow; |
| 62 |
break; |
| 63 |
} |
| 64 |
} |
| 65 |
if (instance_exists(obj_dialogue)) |
| 66 |
{ |
| 67 |
if (obj_dialogue.cutoff == string_length(obj_dialogue.message[obj_dialogue.message_current])) |
| 68 |
{ |
| 69 |
image_speed = 0; |
| 70 |
image_index = 0; |
| 71 |
} |
| 72 |
else |
| 73 |
{ |
| 74 |
image_speed = 0.2; |
| 75 |
} |
| 76 |
} |
| 77 |
depth = 10; |
| 78 |
if (global.extra_flag[1] == 1 && global.extra_flag[2] == 1 && global.extra_flag[3] == 1) |
| 79 |
global.snowdin_flag[5] = 2; |
| 80 |
if (scr_interactscr_interactfunction scr_interact()
{
if (distance_to_object(obj_pl) < 20 && obj_pl.state == scr_normal_state)
{
var pl_dir = obj_pl.direction;
var pl_x = 0;
var pl_y = 0;
var check_distance_x = 0;
var check_distance_y = 0;
switch (pl_dir)
{
case 0:
pl_x = obj_pl.bbox_right;
pl_y = obj_pl.bbox_top + 1;
check_distance_x = 20;
break;
case 180:
pl_x = obj_pl.bbox_left;
pl_y = obj_pl.bbox_top + 1;
check_distance_x = -20;
break;
case 90:
pl_x = obj_pl.x;
pl_y = obj_pl.bbox_top;
check_distance_y = -20;
break;
case 270:
pl_x = obj_pl.x;
pl_y = obj_pl.bbox_bottom;
check_distance_y = 20;
break;
}
if (collision_line_first(pl_x, pl_y, pl_x + check_distance_x, pl_y + check_distance_y, id, false, false))
return true;
}
} () && keyboard_multicheck_pressed(0) && waiter == 0) |
| 81 |
{ |
| 82 |
waiter = 5; |
| 83 |
scr_cutscene_start(); |
| 84 |
} |
| 85 |
if (slide == 1) |
| 86 |
{ |
| 87 |
slide = 2; |
| 88 |
hsp = -4.8; |
| 89 |
} |
| 90 |
if (slide == 2) |
| 91 |
{ |
| 92 |
if (hsp < 0) |
| 93 |
{ |
| 94 |
hsp += 0.1; |
| 95 |
} |
| 96 |
else |
| 97 |
{ |
| 98 |
sprite_index = spr_mo_kick_yellow; |
| 99 |
image_speed = 0.33; |
| 100 |
if (floor(image_index) == 3) |
| 101 |
{ |
| 102 |
obj_snowdin_09_mo_stool.slide = 1; |
| 103 |
slide = 3; |
| 104 |
} |
| 105 |
} |
| 106 |
} |
| 107 |
x += hsp; |
| 108 |
if (waiter == 1) |
| 109 |
{ |
| 110 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
| 111 |
with (msg) |
| 112 |
{ |
| 113 |
portrait = false; |
| 114 |
position = 0; |
| 115 |
color = true; |
| 116 |
col_modif[0] = make_color_rgb(72, 132, 212); |
| 117 |
message[0] = "* Bam!"; |
| 118 |
message[1] = "* Who am I? Nobody of note. Ya# know."; |
| 119 |
message[2] = "* JUST THE BEST DARN SALESMAN# EVER!"; |
| 120 |
message[3] = "* WAM! I'm Mo!"; |
| 121 |
message_col[3][0] = " Mo "; |
| 122 |
message[4] = "* Anyways..."; |
| 123 |
message[5] = "* The fact that you tried to get# your mitts on this mug could# only mean one thing."; |
| 124 |
message[6] = "* You're looking for a delicious# little something to hit the# spot, right?"; |
| 125 |
message[7] = "* Of course! I know your type!"; |
| 126 |
message[8] = "* So, you want this here# beverage?"; |
| 127 |
ch_msg = 8; |
| 128 |
ch[1] = "Yes"; |
| 129 |
ch[2] = "No"; |
| 130 |
if (outcome == 1 && message_current == 8) |
| 131 |
{ |
| 132 |
message[9] = "* No you don't!"; |
| 133 |
other.waiter = 2; |
| 134 |
} |
| 135 |
if (outcome == 2 && message_current == 8) |
| 136 |
{ |
| 137 |
message[9] = "* Of course not."; |
| 138 |
message[10] = "* You and I, we're on the same# page here."; |
| 139 |
message[11] = "* This thing? Gross. No one wants# that."; |
| 140 |
other.waiter = 2; |
| 141 |
} |
| 142 |
} |
| 143 |
} |
| 144 |
if (waiter == 2 && !instance_exists(obj_dialogue)) |
| 145 |
{ |
| 146 |
sprite_index = spr_mo_pour2_yellow; |
| 147 |
image_speed = 0.35; |
| 148 |
timer[1] = 10; |
| 149 |
waiter = -1; |
| 150 |
} |
| 151 |
if (waiter == 3) |
| 152 |
{ |
| 153 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
| 154 |
with (msg) |
| 155 |
{ |
| 156 |
portrait = false; |
| 157 |
position = 0; |
| 158 |
message[0] = "* Liquids? So last season!"; |
| 159 |
message[1] = "* Solids? PAH! Season before!"; |
| 160 |
message[2] = "* You want to be fresh and# revolutionary? I got the latest# thing!"; |
| 161 |
message[3] = "* Solids that USED to be liquids!"; |
| 162 |
message[4] = "* ...And, ya know, haven't been# sitting out in the forest for# three weeks."; |
| 163 |
message[5] = "* I have invented the next big# thing here!"; |
| 164 |
message[6] = "* For the incredibly low price of# 15G, you can have your very own# Hot Chocolate Pop!"; |
| 165 |
message[7] = "* It was once boring old hot# chocolate, but now it's frozen# to the perfect temperature!"; |
| 166 |
message[8] = "* Have I piqued your interest# yet?"; |
| 167 |
ch_msg = 8; |
| 168 |
ch[1] = "I'm Sold"; |
| 169 |
ch[2] = "No Thanks"; |
| 170 |
if (outcome == 1 && message_current == 8) |
| 171 |
{ |
| 172 |
message[9] = "* I knew you would be! Dang, I'm# good!"; |
| 173 |
message[10] = "* Let's get down to business."; |
| 174 |
other.waiter = 4; |
| 175 |
} |
| 176 |
if (outcome == 2 && message_current == 8) |
| 177 |
{ |
| 178 |
message[9] = "* You sure you don't want one?"; |
| 179 |
message[10] = "* You have to keep up with the# times, pal! Here, I have an# idea."; |
| 180 |
message[11] = "* I'll let you look at them for# free. Call it a 'holiday# special.'"; |
| 181 |
message[12] = "* I don't get a lot of shipments,# so I only have one of each."; |
| 182 |
message[13] = "* Let's get down to business."; |
| 183 |
other.waiter = 4; |
| 184 |
} |
| 185 |
} |
| 186 |
} |
| 187 |
if (waiter == 4 && !instance_exists(obj_dialogue)) |
| 188 |
{ |
| 189 |
sprite_index = spr_mo_snap_yellow; |
| 190 |
image_speed = 0.35; |
| 191 |
audio_play_sound(snd_mo_snap, 20, 0); |
| 192 |
waiter = 5; |
| 193 |
} |
| 194 |
if (waiter == 5 && path_position == 1) |
| 195 |
{ |
| 196 |
path_speed = 0; |
| 197 |
sprite_index = spr_mo_down_talk_yellow; |
| 198 |
image_index = 0; |
| 199 |
image_speed = 0; |
| 200 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
| 201 |
with (msg) |
| 202 |
{ |
| 203 |
dialogue_is_minishop = true; |
| 204 |
portrait = false; |
| 205 |
position = 0; |
| 206 |
ch_msg = 0; |
| 207 |
ch[1] = "Hot Pop"; |
| 208 |
ch[2] = "Lukewarm Pop"; |
| 209 |
ch[3] = "Cold Pop"; |
| 210 |
ch[4] = "Cancel"; |
| 211 |
if (global.extra_flag[1] == true) |
| 212 |
ch[1] = "-SOLD OUT-"; |
| 213 |
if (global.extra_flag[2] == true) |
| 214 |
ch[2] = "-SOLD OUT-"; |
| 215 |
if (global.extra_flag[3] == true) |
| 216 |
ch[3] = "-SOLD OUT-"; |
| 217 |
message[0] = "* Here's what I got. (15 G)"; |
| 218 |
if (global.snowdin_flag[5] == 1) |
| 219 |
{ |
| 220 |
ch_msg = 2; |
| 221 |
message[0] = "* Couldn't stay away?"; |
| 222 |
message[1] = "* Well-BAM-Take your pick."; |
| 223 |
message[2] = "* Here's what I got. (15 G)"; |
| 224 |
} |
| 225 |
switch (outcome) |
| 226 |
{ |
| 227 |
case 1: |
| 228 |
case 2: |
| 229 |
case 3: |
| 230 |
message = 0; |
| 231 |
cutoff = 0; |
| 232 |
message_current = 0; |
| 233 |
ch_msg = -1; |
| 234 |
if (global.extra_flag[outcome] == false) |
| 235 |
{ |
| 236 |
if (global.player_gold >= 15 && scr_inventory_check_space()) |
| 237 |
{ |
| 238 |
message[1] = "* Great choice."; |
| 239 |
message[2] = "* You enjoy that Pop, buddy."; |
| 240 |
if (outcome == 1) |
| 241 |
scr_itemscr_itemfunction scr_item(arg0)
{
nm = arg0;
for (var i = 1; i <= 8; i++)
{
if (global.item_slot[i] == "Nothing")
{
global.item_slot[i] = nm;
return true;
break;
}
else if (i == 8)
{
return false;
}
}
} ("Hot Pop"); |
| 242 |
if (outcome == 2) |
| 243 |
scr_itemscr_itemfunction scr_item(arg0)
{
nm = arg0;
for (var i = 1; i <= 8; i++)
{
if (global.item_slot[i] == "Nothing")
{
global.item_slot[i] = nm;
return true;
break;
}
else if (i == 8)
{
return false;
}
}
} ("Lukewarm Pop"); |
| 244 |
if (outcome == 3) |
| 245 |
scr_itemscr_itemfunction scr_item(arg0)
{
nm = arg0;
for (var i = 1; i <= 8; i++)
{
if (global.item_slot[i] == "Nothing")
{
global.item_slot[i] = nm;
return true;
break;
}
else if (i == 8)
{
return false;
}
}
} ("Cold Pop"); |
| 246 |
audio_play_sound(snd_shop_purchase, 1, 0); |
| 247 |
global.player_gold -= 15; |
| 248 |
global.extra_flag[outcome] = true; |
| 249 |
} |
| 250 |
else if (global.player_gold < 15) |
| 251 |
{ |
| 252 |
message[1] = "* Sorry, buddy. I'm gonna# need more G than that."; |
| 253 |
} |
| 254 |
else if (!scr_inventory_check_space()) |
| 255 |
{ |
| 256 |
message[1] = "* Uh-oh, looks like you've got no# space for this item."; |
| 257 |
message[2] = "* Come back when you've made some# more room."; |
| 258 |
} |
| 259 |
} |
| 260 |
else |
| 261 |
{ |
| 262 |
message[1] = "* What a popular item! I wish I# could sell you more, but I'm# fresh out."; |
| 263 |
} |
| 264 |
other.waiter = 6; |
| 265 |
break; |
| 266 |
case 4: |
| 267 |
message = 0; |
| 268 |
cutoff = 0; |
| 269 |
message_current = 0; |
| 270 |
ch_msg = -1; |
| 271 |
message[1] = "* Hey, what are ya doing there!"; |
| 272 |
message[2] = "* That ain't no Pop!"; |
| 273 |
message[3] = "* You leavin' me? Not interested# in my wares?"; |
| 274 |
message[4] = "* Do I not have your favorite# temperature?"; |
| 275 |
message[5] = "* Oh, I see. You need some time# to think about it."; |
| 276 |
message[6] = "* Well, I'll always be here for# your gol-"; |
| 277 |
message[7] = "* ...Business."; |
| 278 |
message[8] = "* I said business."; |
| 279 |
other.waiter = 6; |
| 280 |
} |
| 281 |
} |
| 282 |
} |
| 283 |
if (waiter == 6 && !instance_exists(obj_dialogue)) |
| 284 |
{ |
| 285 |
if (global.snowdin_flag[5] == 2) |
| 286 |
{ |
| 287 |
if (timer[4] == -1) |
| 288 |
timer[4] = 30; |
| 289 |
exit; |
| 290 |
} |
| 291 |
if (scr_camera_movescr_camera_movefunction scr_camera_move(arg0, arg1, arg2)
{
if (!instance_exists(obj_camera))
{
instance_create(__view_get(e__VW.Object, 0).x, __view_get(e__VW.Object, 0).y, obj_camera);
__view_set(e__VW.Object, 0, obj_camera);
}
else
{
obj_camera.x = __view_get(e__VW.Object, 0).x;
obj_camera.y = __view_get(e__VW.Object, 0).y;
__view_set(e__VW.Object, 0, obj_camera);
}
obj_camera.move = true;
obj_camera.xx = arg0;
obj_camera.yy = arg1;
obj_camera.spd = arg2;
if (abs(arg0 - obj_camera.x) <= arg2 && abs(arg1 - obj_camera.y) <= arg2)
return true;
else
return false;
}
enum e__VW
{
XView,
YView,
WView,
HView,
Angle,
HBorder,
VBorder,
HSpeed,
VSpeed,
Object,
Visible,
XPort,
YPort,
WPort,
HPort,
Camera,
SurfaceID
} (obj_pl.x, obj_pl.y, 2)) |
| 292 |
{ |
| 293 |
waiter = 0; |
| 294 |
__view_set(e__VW.Object, 0, obj_pl); |
| 295 |
global.snowdin_flag[5] = 1; |
| 296 |
scr_cutscene_end(); |
| 297 |
} |
| 298 |
} |
| 299 |
if (waiter == 7 && !instance_exists(obj_dialogue)) |
| 300 |
{ |
| 301 |
sprite_index = spr_mo_snap_yellow; |
| 302 |
image_index = 0; |
| 303 |
image_speed = 0.35; |
| 304 |
timer[3] = 50; |
| 305 |
waiter = 8; |
| 306 |
} |
| 307 |
if (waiter == 9) |
| 308 |
{ |
| 309 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
| 310 |
with (msg) |
| 311 |
{ |
| 312 |
portrait = false; |
| 313 |
position = 0; |
| 314 |
message[0] = "* Mo out!"; |
| 315 |
} |
| 316 |
waiter = 10; |
| 317 |
} |
| 318 |
if (waiter == 10 && !instance_exists(obj_dialogue)) |
| 319 |
{ |
| 320 |
vspeed = -2; |
| 321 |
sprite_index = spr_mo_up_yellow; |
| 322 |
image_speed = 0.35; |
| 323 |
if (y < -20) |
| 324 |
{ |
| 325 |
global.snowdin_flag[5] = 2; |
| 326 |
scr_radio_restart(); |
| 327 |
scr_cutscene_end(); |
| 328 |
instance_destroy(); |
| 329 |
} |
| 330 |
} |
| 331 |
if (global.snowdin_flag[5] == 1) |
| 332 |
{ |
| 333 |
solid = true; |
| 334 |
depth = -y; |
| 335 |
} |
| 336 |
|
| 337 |
enum e__VW |
| 338 |
{ |
| 339 |
XView, |
| 340 |
YView, |
| 341 |
WView, |
| 342 |
HView, |
| 343 |
Angle, |
| 344 |
HBorder, |
| 345 |
VBorder, |
| 346 |
HSpeed, |
| 347 |
VSpeed, |
| 348 |
Object, |
| 349 |
Visible, |
| 350 |
XPort, |
| 351 |
YPort, |
| 352 |
WPort, |
| 353 |
HPort, |
| 354 |
Camera, |
| 355 |
SurfaceID |
| 356 |
} |