1 |
event_inherited(); |
2 |
if (live_call()) |
3 |
return global.live_result; |
4 |
if (waiter == 0) |
5 |
{ |
6 |
if (interact) |
7 |
waiter = 1; |
8 |
} |
9 |
if (waiter == 1) |
10 |
{ |
11 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
12 |
if (npc_flag == 0) |
13 |
{ |
14 |
with (msg) |
15 |
{ |
16 |
message[0] = "* (You find 60G in the trash can.)"; |
17 |
message[1] = "* (Take it?)"; |
18 |
ch_msg = 1; |
19 |
ch[1] = "Yes"; |
20 |
ch[2] = "No"; |
21 |
if (outcome == 1) |
22 |
{ |
23 |
message[2] = "* (You got 60G!)"; |
24 |
audio_play_sound(snd_success, 1, 0); |
25 |
global.player_gold += 60; |
26 |
other.npc_flag += 1; |
27 |
other.waiter = 0; |
28 |
} |
29 |
if (outcome == 2) |
30 |
{ |
31 |
global.dialogue_open = false; |
32 |
other.waiter = 0; |
33 |
} |
34 |
} |
35 |
} |
36 |
else if (npc_flag == 1) |
37 |
{ |
38 |
msg.message[0] = "* (Only trash left.)"; |
39 |
waiter = 0; |
40 |
} |
41 |
} |