1 |
if (global.flag[17 Dalv fate] == 1) |
2 |
{ |
3 |
if ((keyboard_multicheck_pressed(0) && scr_interactscr_interactfunction scr_interact()
{
if (distance_to_object(obj_pl) < 20 && obj_pl.state == scr_normal_state)
{
var pl_dir = obj_pl.direction;
var pl_x = 0;
var pl_y = 0;
var check_distance_x = 0;
var check_distance_y = 0;
switch (pl_dir)
{
case 0:
pl_x = obj_pl.bbox_right;
pl_y = obj_pl.bbox_top + 1;
check_distance_x = 20;
break;
case 180:
pl_x = obj_pl.bbox_left;
pl_y = obj_pl.bbox_top + 1;
check_distance_x = -20;
break;
case 90:
pl_x = obj_pl.x;
pl_y = obj_pl.bbox_top;
check_distance_y = -20;
break;
case 270:
pl_x = obj_pl.x;
pl_y = obj_pl.bbox_bottom;
check_distance_y = 20;
break;
}
if (collision_line_first(pl_x, pl_y, pl_x + check_distance_x, pl_y + check_distance_y, id, false, false))
return true;
}
} () == true) && waiter == 0 && !instance_exists(obj_dialogue)) |
4 |
waiter = 1; |
5 |
if (waiter == 1) |
6 |
{ |
7 |
scr_cutscene_start(); |
8 |
if (global.interaction_count_mini_fridge == 0) |
9 |
{ |
10 |
obj_dalv2.destination_x_dalv = obj_pl.x + 40; |
11 |
obj_dalv2.destination_y_dalv = obj_pl.y; |
12 |
} |
13 |
else |
14 |
{ |
15 |
obj_dalv2.destination_x_dalv = obj_dalv2.default_x_dalvshouse; |
16 |
obj_dalv2.destination_y_dalv = obj_dalv2.default_y_dalvshouse; |
17 |
} |
18 |
if (obj_dalv2.x == obj_dalv2.destination_x_dalv && obj_dalv2.y == obj_dalv2.destination_y_dalv) |
19 |
waiter++; |
20 |
} |
21 |
if (waiter == 2) |
22 |
{ |
23 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
24 |
with (msg) |
25 |
{ |
26 |
if (global.interaction_count_mini_fridge == 0) |
27 |
{ |
28 |
if (!instance_exists(obj_dialoguebox_dummy)) |
29 |
instance_create(0, 0, obj_dialoguebox_dummy); |
30 |
portrait = true; |
31 |
sndfnt = 100; |
32 |
message[0] = "* I don't exactly have a# huge selection of food."; |
33 |
message[1] = "* I don't get out much... "; |
34 |
message[2] = "* Oh wait! I have some# leftovers you can take# with you."; |
35 |
message[3] = "* I hope you like it! I# made it for my birthday."; |
36 |
message[4] = "* Sponge Cake is my# favorite!"; |
37 |
prt[0] = 1763; |
38 |
prt[1] = 1780; |
39 |
prt[2] = 1769; |
40 |
prt[3] = 1769; |
41 |
prt[4] = 1773; |
42 |
} |
43 |
else |
44 |
{ |
45 |
portrait = true; |
46 |
sndfnt = 100; |
47 |
message[0] = "* ..."; |
48 |
prt[0] = 1780; |
49 |
} |
50 |
} |
51 |
waiter++; |
52 |
} |
53 |
if (waiter == 3 && !instance_exists(obj_dialogue)) |
54 |
{ |
55 |
if (global.interaction_count_mini_fridge == 0) |
56 |
{ |
57 |
global.interaction_count_mini_fridge++; |
58 |
waiter++; |
59 |
} |
60 |
else |
61 |
{ |
62 |
waiter = 7; |
63 |
} |
64 |
} |
65 |
if (waiter == 4) |
66 |
{ |
67 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
68 |
with (msg) |
69 |
{ |
70 |
portrait = false; |
71 |
sndfnt = 99; |
72 |
message[0] = "* (It's a sponge covered in# frosting.)"; |
73 |
message[1] = "* (Take it?)"; |
74 |
if (outcome == 1 && message_current == 1) |
75 |
{ |
76 |
with (obj_fridge) |
77 |
response = "yes"; |
78 |
obj_fridge.image_index = 1; |
79 |
obj_fridge.waiter = 5; |
80 |
} |
81 |
else if (outcome == 2 && message_current == 1) |
82 |
{ |
83 |
with (obj_fridge) |
84 |
response = "no"; |
85 |
obj_fridge.waiter = 5; |
86 |
} |
87 |
if ((message_current + 1) == 1) |
88 |
{ |
89 |
ch_msg = 1; |
90 |
ch[1] = "Yes"; |
91 |
ch[2] = "No"; |
92 |
} |
93 |
} |
94 |
} |
95 |
if (waiter == 5 && !instance_exists(obj_dialogue)) |
96 |
waiter++; |
97 |
if (waiter == 6) |
98 |
{ |
99 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
100 |
with (msg) |
101 |
{ |
102 |
if (obj_fridge.response == "yes") |
103 |
{ |
104 |
talker[0] = -4; |
105 |
sndfnt_array[0] = 391; |
106 |
sndfnt_array[1] = 434; |
107 |
sndfnt_array[2] = 434; |
108 |
sndfnt_array[3] = 434; |
109 |
message[0] = "* (You got the Sponge Cake!)"; |
110 |
message[1] = "* ..."; |
111 |
message[2] = "* Sorry I didn't invite# you, it was last week."; |
112 |
message[3] = "* You can come next year!"; |
113 |
prt[1] = 1755; |
114 |
prt[2] = 1763; |
115 |
prt[3] = 1769; |
116 |
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;
}
}
} ("Sponge Cake"); |
117 |
with (obj_fridge) |
118 |
waiter++; |
119 |
} |
120 |
else if (obj_fridge.response == "no") |
121 |
{ |
122 |
portrait = true; |
123 |
sndfnt = 100; |
124 |
message[0] = "* No?"; |
125 |
message[1] = "* Alright then."; |
126 |
message[2] = "* More for me I suppose."; |
127 |
prt[0] = 1755; |
128 |
prt[1] = 1755; |
129 |
prt[2] = 1776; |
130 |
with (obj_fridge) |
131 |
waiter++; |
132 |
} |
133 |
} |
134 |
} |
135 |
if (waiter >= 7 && waiter <= 8 && !instance_exists(obj_dialogue)) |
136 |
{ |
137 |
response = "nothing"; |
138 |
obj_fridge.image_index = 0; |
139 |
obj_dalv2.destination_x_dalv = obj_dalv2.default_x_dalvshouse; |
140 |
obj_dalv2.destination_y_dalv = obj_dalv2.default_y_dalvshouse; |
141 |
if (obj_dalv2.x == obj_dalv2.default_x_dalvshouse && obj_dalv2.y == obj_dalv2.default_y_dalvshouse) |
142 |
waiter++; |
143 |
with (obj_dialoguebox_dummy) |
144 |
instance_destroy(); |
145 |
} |
146 |
if (waiter == 9) |
147 |
{ |
148 |
global.cutscene = false; |
149 |
waiter = 0; |
150 |
obj_pl.alarm[0] = 1; |
151 |
} |
152 |
} |
153 |
else if (global.flag[17 Dalv fate] != 1 && global.route != 3) |
154 |
{ |
155 |
if ((keyboard_multicheck_pressed(0) && scr_interactscr_interactfunction scr_interact()
{
if (distance_to_object(obj_pl) < 20 && obj_pl.state == scr_normal_state)
{
var pl_dir = obj_pl.direction;
var pl_x = 0;
var pl_y = 0;
var check_distance_x = 0;
var check_distance_y = 0;
switch (pl_dir)
{
case 0:
pl_x = obj_pl.bbox_right;
pl_y = obj_pl.bbox_top + 1;
check_distance_x = 20;
break;
case 180:
pl_x = obj_pl.bbox_left;
pl_y = obj_pl.bbox_top + 1;
check_distance_x = -20;
break;
case 90:
pl_x = obj_pl.x;
pl_y = obj_pl.bbox_top;
check_distance_y = -20;
break;
case 270:
pl_x = obj_pl.x;
pl_y = obj_pl.bbox_bottom;
check_distance_y = 20;
break;
}
if (collision_line_first(pl_x, pl_y, pl_x + check_distance_x, pl_y + check_distance_y, id, false, false))
return true;
}
} () == true) && (waiter == 0 && !instance_exists(obj_dialogue))) |
156 |
waiter = 1; |
157 |
if (waiter == 1) |
158 |
{ |
159 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
160 |
with (msg) |
161 |
{ |
162 |
portrait = false; |
163 |
sndfnt = 99; |
164 |
message[0] = "* (It's a mini fridge.)"; |
165 |
message[1] = "* (It's mostly empty.)"; |
166 |
obj_fridge.waiter = 2; |
167 |
} |
168 |
} |
169 |
if (waiter == 2 && !instance_exists(obj_dialogue)) |
170 |
{ |
171 |
global.cutscene = false; |
172 |
waiter = 0; |
173 |
obj_pl.alarm[0] = 1; |
174 |
} |
175 |
} |
176 |
else if (global.route == 3) |
177 |
{ |
178 |
if ((keyboard_multicheck_pressed(0) && scr_interactscr_interactfunction scr_interact()
{
if (distance_to_object(obj_pl) < 20 && obj_pl.state == scr_normal_state)
{
var pl_dir = obj_pl.direction;
var pl_x = 0;
var pl_y = 0;
var check_distance_x = 0;
var check_distance_y = 0;
switch (pl_dir)
{
case 0:
pl_x = obj_pl.bbox_right;
pl_y = obj_pl.bbox_top + 1;
check_distance_x = 20;
break;
case 180:
pl_x = obj_pl.bbox_left;
pl_y = obj_pl.bbox_top + 1;
check_distance_x = -20;
break;
case 90:
pl_x = obj_pl.x;
pl_y = obj_pl.bbox_top;
check_distance_y = -20;
break;
case 270:
pl_x = obj_pl.x;
pl_y = obj_pl.bbox_bottom;
check_distance_y = 20;
break;
}
if (collision_line_first(pl_x, pl_y, pl_x + check_distance_x, pl_y + check_distance_y, id, false, false))
return true;
}
} () == true) && (waiter == 0 && !instance_exists(obj_dialogue))) |
179 |
waiter = 1; |
180 |
if (waiter == 1) |
181 |
{ |
182 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
183 |
with (msg) |
184 |
{ |
185 |
portrait = false; |
186 |
sndfnt = 99; |
187 |
message[0] = "* (A cheap mini fridge.)"; |
188 |
message[1] = "* (Nothing inside looks remotely# edible.)"; |
189 |
obj_fridge.waiter = 2; |
190 |
} |
191 |
} |
192 |
if (waiter == 2 && !instance_exists(obj_dialogue)) |
193 |
{ |
194 |
global.cutscene = false; |
195 |
waiter = 0; |
196 |
obj_pl.alarm[0] = 1; |
197 |
} |
198 |
} |