1 |
event_inherited() |
2 |
if interact |
3 |
waiter = 1 |
4 |
if waiter |
5 |
{ |
6 |
if (npc_flag == 0) |
7 |
{ |
8 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
9 |
with (msg) |
10 |
{ |
11 |
sndfnt_array[0] = 391 |
12 |
ch_msg = 1 |
13 |
ch[1] = "Yes" |
14 |
ch[2] = "No" |
15 |
message[0] = "* (You open the refrigerator and# find some leftover corn# chowder.)" |
16 |
message[1] = "* (Take it?)" |
17 |
if (outcome == 1) |
18 |
{ |
19 |
if (global.party_member != -4) |
20 |
{ |
21 |
sndfnt_array[2] = 102 |
22 |
message[2] = "* You that hungry?" |
23 |
message[3] = "* Um, alright then. " |
24 |
message[4] = "* I suppose she won't# miss it... right?" |
25 |
prt[2] = 311 |
26 |
prt[3] = 324 |
27 |
prt[4] = 321 |
28 |
sndfnt_array[5] = 391 |
29 |
} |
30 |
if scr_itemscr_itemfunction scr_item(argument0) //gml_Script_scr_item
{
nm = argument0
var i = 1
while (i <= 8)
{
if (global.item_slot[i] == "Nothing")
{
global.item_slot[i] = nm
return true;
}
else
{
if (i == 8)
return false;
i++
continue
}
}
} ("Corn Chowder") |
31 |
{ |
32 |
if (global.party_member != -4) |
33 |
var msg_number = 5 |
34 |
else |
35 |
msg_number = 2 |
36 |
message[msg_number] = "* (You got some Corn Chowder!)" |
37 |
other.item_check = 1 |
38 |
} |
39 |
else |
40 |
{ |
41 |
if (global.party_member != -4) |
42 |
msg_number = 5 |
43 |
else |
44 |
msg_number = 2 |
45 |
message[msg_number] = "* (Not enough space.)" |
46 |
other.item_check = -1 |
47 |
} |
48 |
} |
49 |
else if (outcome == 2) |
50 |
other.waiter = 0 |
51 |
if (message_current == 5 && other.item_check != 0) |
52 |
{ |
53 |
if (other.item_check == 1) |
54 |
other.npc_flag = 1 |
55 |
else |
56 |
audio_play_sound(snd_fail, 1, 0) |
57 |
other.item_check = 0 |
58 |
other.waiter = 0 |
59 |
} |
60 |
} |
61 |
} |
62 |
else |
63 |
{ |
64 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
65 |
with (msg) |
66 |
message[0] = "* (Nothing inside the# refrigerator seems useful.)" |
67 |
waiter = 0 |
68 |
} |
69 |
} |