1 |
event_inherited() |
2 |
if (interact && waiter == 0) |
3 |
{ |
4 |
waiter = 1 |
5 |
is_talking = true |
6 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
7 |
} |
8 |
if (waiter == 1) |
9 |
{ |
10 |
switch npc_flag |
11 |
{ |
12 |
case 0: |
13 |
with (msg) |
14 |
{ |
15 |
portrait = false |
16 |
sndfnt = 99 |
17 |
message[0] = "* Wow. It's colder today than# usual, huh?" |
18 |
message[1] = "* If I wasn't extremely lazy, I'd# go to the Honeydew Resort and# get some hot coffee." |
19 |
} |
20 |
npc_flag = 1 |
21 |
waiter = 2 |
22 |
break |
23 |
case 1: |
24 |
if (scr_item_exists_checkscr_item_exists_checkfunction scr_item_exists_check(argument0) //gml_Script_scr_item_exists_check
{
var i = 1
while (i <= 8)
{
if (global.item_slot[i] == argument0)
return true;
else
{
if (i == 8)
return false;
i += 1
continue
}
}
} ("Hndw Coffee") == true) |
25 |
{ |
26 |
with (msg) |
27 |
{ |
28 |
portrait = false |
29 |
sndfnt = 99 |
30 |
message[0] = "* (You take out the cup of# coffee.)" |
31 |
message[1] = "* For me? How can I ever thank# you!" |
32 |
message[2] = "* Here, I found this in the snow.# It was probably out there for# ages." |
33 |
message[3] = "* (You got a Soggy Mitten.)" |
34 |
if (message_current == 0) |
35 |
other.is_talking = false |
36 |
else |
37 |
other.is_talking = true |
38 |
if (message_current == 3) |
39 |
{ |
40 |
scr_item_removescr_item_removefunction scr_item_remove(argument0) //gml_Script_scr_item_remove
{
i = 1
while (i <= 8)
{
if (global.item_slot[i] == argument0)
{
while (i < 8)
{
global.item_slot[i] = global.item_slot[(i + 1)]
i += 1
}
global.item_slot[8] = "Nothing"
return true;
}
else
{
if (i == 8)
return false;
i += 1
continue
}
}
} ("Hndw Coffee") |
41 |
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
}
}
} ("Soggy Mitten") |
42 |
other.is_talking = false |
43 |
other.npc_flag = 2 |
44 |
other.waiter = 2 |
45 |
other.sprite_index = spr_martha_coffee_snowdin_yellow |
46 |
} |
47 |
} |
48 |
} |
49 |
else |
50 |
{ |
51 |
with (msg) |
52 |
{ |
53 |
portrait = false |
54 |
sndfnt = 99 |
55 |
message[0] = "* Wow. It's colder today than# usual, huh?" |
56 |
message[1] = "* If I wasn't extremely lazy, I'd# go to the Honeydew Resort and# get some hot coffee." |
57 |
} |
58 |
waiter = 2 |
59 |
} |
60 |
break |
61 |
case 2: |
62 |
with (msg) |
63 |
{ |
64 |
portrait = false |
65 |
sndfnt = 99 |
66 |
message[0] = "* The coffee is a little hot." |
67 |
message[1] = "* I'm going to let it cool down.# I'm not crazy, ya know." |
68 |
message[2] = "* In the meantime, I'll get to# making a campfire so I don't# freeze." |
69 |
} |
70 |
npc_flag = 3 |
71 |
waiter = 2 |
72 |
break |
73 |
case 3: |
74 |
if (scr_item_exists_checkscr_item_exists_checkfunction scr_item_exists_check(argument0) //gml_Script_scr_item_exists_check
{
var i = 1
while (i <= 8)
{
if (global.item_slot[i] == argument0)
return true;
else
{
if (i == 8)
return false;
i += 1
continue
}
}
} ("Matches") == true) |
75 |
{ |
76 |
with (msg) |
77 |
{ |
78 |
portrait = false |
79 |
sndfnt = 99 |
80 |
message[0] = "* (You take out the matches.)" |
81 |
message[1] = "* Are those matches? Can I have# them?" |
82 |
ch_msg = 1 |
83 |
ch[1] = "Yes" |
84 |
ch[2] = "No" |
85 |
if (message_current == 0 || message_current == 6) |
86 |
other.is_talking = false |
87 |
else |
88 |
other.is_talking = true |
89 |
if (outcome == 1) |
90 |
{ |
91 |
message[2] = "* You're a lifesaver! I really# need help with this fire!" |
92 |
message[3] = "* I, uh... I don't really have# anything else to give you." |
93 |
message[4] = "* Here, take your coffee back, I# guess." |
94 |
message[5] = "* It got cold while I was working# anyway." |
95 |
message[6] = "* (You got a cup of lukewarm# coffee.)" |
96 |
} |
97 |
if (message_current == 6) |
98 |
{ |
99 |
other.sprite_index = spr_martha_snowdin_yellow |
100 |
scr_item_removescr_item_removefunction scr_item_remove(argument0) //gml_Script_scr_item_remove
{
i = 1
while (i <= 8)
{
if (global.item_slot[i] == argument0)
{
while (i < 8)
{
global.item_slot[i] = global.item_slot[(i + 1)]
i += 1
}
global.item_slot[8] = "Nothing"
return true;
}
else
{
if (i == 8)
return false;
i += 1
continue
}
}
} ("Matches") |
101 |
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
}
}
} ("Lukewarm Coffee") |
102 |
other.npc_flag = 4 |
103 |
other.is_talking = false |
104 |
other.waiter = 2 |
105 |
} |
106 |
if (outcome == 2) |
107 |
{ |
108 |
message[2] = "* Awww... I really thought they# were matches..." |
109 |
other.waiter = 2 |
110 |
} |
111 |
} |
112 |
} |
113 |
else |
114 |
{ |
115 |
with (msg) |
116 |
{ |
117 |
portrait = false |
118 |
sndfnt = 99 |
119 |
message[0] = "* The coffee is a little hot." |
120 |
message[1] = "* I'm going to let it cool down.# I'm not crazy, ya know." |
121 |
message[2] = "* In the meantime, I'll get to# making a campfire so I don't# freeze." |
122 |
other.waiter = 2 |
123 |
} |
124 |
} |
125 |
break |
126 |
case 4: |
127 |
with (msg) |
128 |
{ |
129 |
portrait = false |
130 |
sndfnt = 99 |
131 |
message[0] = "* Why am I still standing here,# idle?" |
132 |
message[1] = "* I've frozen. I cannot move my# body anymore." |
133 |
message[2] = "* Don't worry, this is nature's# way of letting me be lazy." |
134 |
} |
135 |
waiter = 2 |
136 |
break |
137 |
} |
138 |
|
139 |
} |
140 |
if (waiter == 2 && (!instance_exists(obj_dialogue))) |
141 |
{ |
142 |
waiter = 0 |
143 |
is_talking = false |
144 |
} |