1 |
event_inherited(); |
2 |
if (interact) |
3 |
waiter = 1; |
4 |
if (waiter == 1) |
5 |
{ |
6 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
7 |
is_talking = 1; |
8 |
switch (npc_flag) |
9 |
{ |
10 |
case 0: |
11 |
with (msg) |
12 |
{ |
13 |
message[0] = "* Stick 'em up, partner! This is# a robbery!"; |
14 |
message[1] = "* (You got 20G)"; |
15 |
message[2] = "* Darn! I always get that part# wrong!"; |
16 |
if (message_current == 1) |
17 |
{ |
18 |
audio_play_sound(snd_success, 1, 0); |
19 |
global.player_gold += 20; |
20 |
other.waiter = 0; |
21 |
other.npc_flag = 1; |
22 |
} |
23 |
} |
24 |
break; |
25 |
case 1: |
26 |
with (msg) |
27 |
{ |
28 |
message[0] = "* Let me try again."; |
29 |
message[1] = "* Stick 'em up, partner! This is# another robbery!"; |
30 |
message[2] = "* ..."; |
31 |
message[3] = "* (You got 5G)"; |
32 |
message[4] = "* At least it's less than before?"; |
33 |
if (message_current == 3) |
34 |
{ |
35 |
audio_play_sound(snd_success, 1, 0); |
36 |
global.player_gold += 5; |
37 |
other.waiter = 0; |
38 |
other.npc_flag = 2; |
39 |
} |
40 |
} |
41 |
break; |
42 |
case 2: |
43 |
with (msg) |
44 |
{ |
45 |
message[0] = "* I can't risk another robbery."; |
46 |
message[1] = "* My wallet is hurtin'!"; |
47 |
} |
48 |
break; |
49 |
} |
50 |
} |
51 |
if (!global.dialogue_open && waiter == 1) |
52 |
waiter = 0; |