| 1 |
event_inherited(); |
| 2 |
var dialogue_type = 1; |
| 3 |
if (global.dunes_flag[4] >= 1) |
| 4 |
dialogue_type = 2; |
| 5 |
if (global.dunes_flag[4] >= 2 || (npc_flag < 3 && scr_item_exists_check("Pickaxe"))) |
| 6 |
npc_flag = 6; |
| 7 |
if (dialogue_type == 1) |
| 8 |
{ |
| 9 |
if (interact) |
| 10 |
{ |
| 11 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
| 12 |
switch (npc_flag) |
| 13 |
{ |
| 14 |
case 0: |
| 15 |
is_talking = 1; |
| 16 |
with (msg) |
| 17 |
{ |
| 18 |
portrait = false; |
| 19 |
sndfnt = 99; |
| 20 |
message[0] = "* Haven't seen you around the# mines, friend!"; |
| 21 |
message[1] = "* Welcome to the greatest place# in the Underground!"; |
| 22 |
message[2] = "* I love it here!"; |
| 23 |
message[3] = "* Everyone is so nice and works# hard; we're a real family!"; |
| 24 |
} |
| 25 |
npc_flag = 1; |
| 26 |
break; |
| 27 |
case 1: |
| 28 |
is_talking = 1; |
| 29 |
with (msg) |
| 30 |
{ |
| 31 |
portrait = false; |
| 32 |
sndfnt = 99; |
| 33 |
message[0] = "* I like these mines so much that# I never leave!"; |
| 34 |
message[1] = "* Everyone tells me to go home# but I find the cold, rocky# floor very comfortable!"; |
| 35 |
message[2] = "* And no, they do not pay me for# overtime!"; |
| 36 |
} |
| 37 |
npc_flag = 2; |
| 38 |
break; |
| 39 |
case 2: |
| 40 |
case 6: |
| 41 |
is_talking = 0; |
| 42 |
with (msg) |
| 43 |
{ |
| 44 |
portrait = false; |
| 45 |
sndfnt = 99; |
| 46 |
message[0] = "* (Whistling)"; |
| 47 |
} |
| 48 |
break; |
| 49 |
} |
| 50 |
} |
| 51 |
} |
| 52 |
if (dialogue_type == 2) |
| 53 |
{ |
| 54 |
if (interact) |
| 55 |
{ |
| 56 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
| 57 |
is_talking = 1; |
| 58 |
if (npc_flag <= 2) |
| 59 |
{ |
| 60 |
scene = 1; |
| 61 |
} |
| 62 |
else if (npc_flag == 3) |
| 63 |
{ |
| 64 |
with (msg) |
| 65 |
{ |
| 66 |
message[0] = "* Don't worry about returning my# pickaxe!"; |
| 67 |
message[1] = "* I'll just mine with my hands!"; |
| 68 |
} |
| 69 |
} |
| 70 |
else if (npc_flag == 4) |
| 71 |
{ |
| 72 |
with (msg) |
| 73 |
{ |
| 74 |
if (!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;
}
}
} ("Pickaxe")) |
| 75 |
{ |
| 76 |
message[0] = "* Empty your some of your# belongings and come back!"; |
| 77 |
} |
| 78 |
else |
| 79 |
{ |
| 80 |
other.npc_flag = 3; |
| 81 |
other.sprite_index = spr_miner_uwu; |
| 82 |
message[0] = "* (Obtained Pickaxe!)"; |
| 83 |
} |
| 84 |
} |
| 85 |
} |
| 86 |
else if (npc_flag == 5) |
| 87 |
{ |
| 88 |
with (msg) |
| 89 |
{ |
| 90 |
message[0] = "* There's gotta be another way# you can fix the elevator!"; |
| 91 |
other.npc_flag = 6; |
| 92 |
} |
| 93 |
} |
| 94 |
else if (npc_flag == 6) |
| 95 |
{ |
| 96 |
is_talking = 0; |
| 97 |
with (msg) |
| 98 |
message[0] = "* (Whistling)"; |
| 99 |
} |
| 100 |
} |
| 101 |
if (scene > 0) |
| 102 |
{ |
| 103 |
switch (scene) |
| 104 |
{ |
| 105 |
case 1: |
| 106 |
with (msg) |
| 107 |
{ |
| 108 |
message[0] = "* What can I do you for, friend?"; |
| 109 |
ch_msg = 0; |
| 110 |
ch[1] = "Elevator"; |
| 111 |
ch[2] = "Nothing"; |
| 112 |
if (outcome == 1) |
| 113 |
{ |
| 114 |
message_reset = true; |
| 115 |
other.scene++; |
| 116 |
} |
| 117 |
if (outcome == 2) |
| 118 |
{ |
| 119 |
message[1] = "* Holler if you need something!"; |
| 120 |
other.scene = 0; |
| 121 |
} |
| 122 |
} |
| 123 |
break; |
| 124 |
case 2: |
| 125 |
with (msg) |
| 126 |
{ |
| 127 |
message[0] = "* Oh fiddlesticks!"; |
| 128 |
message[1] = "* I've seen a few pickles in my# day and this is certainly one# of them!"; |
| 129 |
message[2] = "* Tell you what, I'll give you my# trusty pickaxe here, if you..."; |
| 130 |
message[3] = "* Win a monster trivia game!!"; |
| 131 |
message[4] = "* Oooh boy, this will be fun!"; |
| 132 |
message[5] = "* All you have to do is answer# these three questions correctly!"; |
| 133 |
message[6] = "* You only get one try so do your# best!"; |
| 134 |
message[7] = "* Question one!"; |
| 135 |
message[8] = "* Who is the current Royal# Scientist?"; |
| 136 |
message[9] = "* Choose the correct name!"; |
| 137 |
ch_msg = 9; |
| 138 |
ch[1] = "ASGORE"; |
| 139 |
ch[2] = "Alphys"; |
| 140 |
ch[3] = "Dr. Science"; |
| 141 |
if (message_current == 3 && !audio_is_playing(mus_gemstone_fever)) |
| 142 |
{ |
| 143 |
audio_sound_gain(obj_radio.current_song, 0, 300); |
| 144 |
audio_play_sound(mus_gemstone_fever, 1, 1); |
| 145 |
} |
| 146 |
if (outcome == 2) |
| 147 |
{ |
| 148 |
audio_play_sound(snd_success, 1, 0); |
| 149 |
message_reset = true; |
| 150 |
other.scene++; |
| 151 |
} |
| 152 |
else if (outcome != 0) |
| 153 |
{ |
| 154 |
message_reset = true; |
| 155 |
other.scene = 6; |
| 156 |
} |
| 157 |
} |
| 158 |
break; |
| 159 |
case 3: |
| 160 |
with (msg) |
| 161 |
{ |
| 162 |
message[0] = "* Correct!"; |
| 163 |
message[1] = "* Question two!"; |
| 164 |
message[2] = "* What is most monster food made# out of?"; |
| 165 |
message[3] = "* Only one answer is correct!"; |
| 166 |
ch_msg = 3; |
| 167 |
ch[1] = "Magic"; |
| 168 |
ch[2] = "Ingredients"; |
| 169 |
ch[3] = "Snails"; |
| 170 |
if (outcome == 1) |
| 171 |
{ |
| 172 |
audio_play_sound(snd_success, 1, 0); |
| 173 |
message_reset = true; |
| 174 |
other.scene++; |
| 175 |
} |
| 176 |
else if (outcome != 0) |
| 177 |
{ |
| 178 |
message_reset = true; |
| 179 |
other.scene = 6; |
| 180 |
} |
| 181 |
} |
| 182 |
break; |
| 183 |
case 4: |
| 184 |
with (msg) |
| 185 |
{ |
| 186 |
message[0] = "* Good job!"; |
| 187 |
message[1] = "* Final question!"; |
| 188 |
message[2] = "* How many more SOULs does ASGORE# need to shatter the barrier?"; |
| 189 |
message[3] = "* Pick the number of SOULs!"; |
| 190 |
ch_msg = 3; |
| 191 |
ch[1] = "1"; |
| 192 |
ch[2] = "2"; |
| 193 |
ch[3] = "3"; |
| 194 |
if (outcome == 2) |
| 195 |
{ |
| 196 |
audio_play_sound(snd_success, 1, 0); |
| 197 |
message_reset = true; |
| 198 |
other.scene++; |
| 199 |
} |
| 200 |
else if (outcome != 0) |
| 201 |
{ |
| 202 |
message_reset = true; |
| 203 |
other.scene = 6; |
| 204 |
} |
| 205 |
} |
| 206 |
break; |
| 207 |
case 5: |
| 208 |
with (msg) |
| 209 |
{ |
| 210 |
message[0] = "* Congratulations!"; |
| 211 |
message[1] = "* You really know your stuff!"; |
| 212 |
message[2] = "* Here's my pick as promised!"; |
| 213 |
message[3] = "* (Obtained Pickaxe!)"; |
| 214 |
if (message_current == 3 && !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;
}
}
} ("Pickaxe")) |
| 215 |
{ |
| 216 |
message[3] = "* Aww! Looks like my pick would# only weigh you down."; |
| 217 |
message[4] = "* Empty your some of your# belongings and come back!"; |
| 218 |
other.npc_flag = 4; |
| 219 |
other.scene = 0; |
| 220 |
audio_sound_gain(obj_radio.current_song, 1, 600); |
| 221 |
scr_audio_fade_outscr_audio_fade_outfunction scr_audio_fade_out(arg0, arg1)
{
var snd = arg0;
var fade_len = arg1;
if (!audio_is_playing(snd))
return false;
audio_sound_gain(snd, 0, fade_len);
if (instance_exists(obj_audio_fade_helper))
{
with (obj_audio_fade_helper)
{
if (audio_to_fade == snd)
return false;
}
}
with (instance_create(0, 0, obj_audio_fade_helper))
audio_to_fade = snd;
} (186, 300); |
| 222 |
} |
| 223 |
else if (message_current == 3) |
| 224 |
{ |
| 225 |
other.npc_flag = 3; |
| 226 |
other.is_talking = false; |
| 227 |
other.scene = 0; |
| 228 |
other.sprite_index = spr_miner_uwu; |
| 229 |
audio_sound_gain(obj_radio.current_song, 1, 600); |
| 230 |
scr_audio_fade_outscr_audio_fade_outfunction scr_audio_fade_out(arg0, arg1)
{
var snd = arg0;
var fade_len = arg1;
if (!audio_is_playing(snd))
return false;
audio_sound_gain(snd, 0, fade_len);
if (instance_exists(obj_audio_fade_helper))
{
with (obj_audio_fade_helper)
{
if (audio_to_fade == snd)
return false;
}
}
with (instance_create(0, 0, obj_audio_fade_helper))
audio_to_fade = snd;
} (186, 300); |
| 231 |
} |
| 232 |
} |
| 233 |
break; |
| 234 |
case 6: |
| 235 |
with (msg) |
| 236 |
{ |
| 237 |
message[0] = "* I'm sorry, that was not correct!"; |
| 238 |
message[1] = "* I'm sure you tried your best,# though!"; |
| 239 |
} |
| 240 |
npc_flag = 5; |
| 241 |
scene = 0; |
| 242 |
audio_sound_gain(obj_radio.current_song, 1, 600); |
| 243 |
scr_audio_fade_outscr_audio_fade_outfunction scr_audio_fade_out(arg0, arg1)
{
var snd = arg0;
var fade_len = arg1;
if (!audio_is_playing(snd))
return false;
audio_sound_gain(snd, 0, fade_len);
if (instance_exists(obj_audio_fade_helper))
{
with (obj_audio_fade_helper)
{
if (audio_to_fade == snd)
return false;
}
}
with (instance_create(0, 0, obj_audio_fade_helper))
audio_to_fade = snd;
} (186, 300); |
| 244 |
break; |
| 245 |
} |
| 246 |
} |
| 247 |
} |
| 248 |
if (is_talking) |
| 249 |
{ |
| 250 |
if (sprite_index == spr_miner_uwu) |
| 251 |
sprite_index = spr_miner_uwu_talk; |
| 252 |
if (sprite_index == spr_miner_uwu_pickaxe) |
| 253 |
sprite_index = spr_miner_uwu_pickaxe_talk; |
| 254 |
image_speed = 0.2; |
| 255 |
} |
| 256 |
else |
| 257 |
{ |
| 258 |
if (sprite_index == spr_miner_uwu_talk) |
| 259 |
sprite_index = spr_miner_uwu; |
| 260 |
if (sprite_index == spr_miner_uwu_pickaxe_talk) |
| 261 |
sprite_index = spr_miner_uwu_pickaxe; |
| 262 |
image_speed = 0; |
| 263 |
} |