1 |
function scr_item_usescr_item_usefunction scr_item_use(arg0, arg1)
{
var item = arg0;
var i = arg1;
var use_msg;
use_msg[0] = "nothing";
var item_type = 1;
var heal_value = 0;
var pp_value = 0;
var sp_value = 0;
var rp_value = 0;
var def_value = 0;
var atk_value = 0;
switch (item)
{
case "Lemonade":
heal_value = 7;
item_type = 1;
use_msg[0] = "* (You drink the Lemonade.)";
use_msg[1] = "* (It's very sour.)";
break;
case "Candy Corn":
use_msg[0] = "* (You eat the Candy Corn.)";
use_msg[1] = "* (You now know why it was# discarded.)";
heal_value = 9;
item_type = 1;
break;
case "G. Pear":
pp_value = 2;
item_type = 1;
use_msg[0] = "* (You eat the Golden Pear.)";
use_msg[1] = "* (The immense flavor hugs your# tastebuds.)";
use_msg[2] = "* ( Overall... Not bad.)";
break;
case "Corn Dog":
heal_value = 12;
item_type = 1;
use_msg[0] = "* (You scarf down the Corn Dog.)";
use_msg[1] = "* (You can't help but feel bad# for doing it.)";
break;
case "Patch":
use_msg[0] = "* (You are unable to sew the# Patch back on your hat.)";
item_type = 0;
break;
case "Feather":
item_type = 3;
def_value = 2;
use_msg[0] = "* (You stick the feather into# your hat.)";
use_msg[1] = "* (It gives you a proud feeling.)";
break;
case "G. Bandana":
item_type = 3;
def_value = 12;
use_msg[0] = "* (With a shimmer, you tie the# Golden Bandana around your# neck.)";
use_msg[1] = "* (You feel like you can take on# anything now.)";
break;
case "Pebble Ammo":
item_type = 2;
atk_value = 3;
use_msg[0] = "* (You load the pebbles into your# gun.)";
use_msg[1] = "* (It feels a little heavier# now.)";
break;
case "Silver Ammo":
item_type = 2;
atk_value = 2;
use_msg[0] = "* (You load the Silver Ammo# into your gun.)";
use_msg[1] = "* (The pellets shimmer# in the light.)";
break;
case "Rubber Ammo":
item_type = 2;
atk_value = 0;
use_msg[0] = "* (You load the rubber ammo into# your weapon.)";
break;
case "Glass Ammo":
item_type = 2;
atk_value = 5;
use_msg[0] = "* (You cautiously load the Glass# into your gun.)";
use_msg[1] = "* (Phew! No cuts!)";
break;
case "Flint":
item_type = 2;
atk_value = 9;
use_msg[0] = "* (You load the Flint# into your gun.)";
use_msg[1] = "* (Might start some fire# with this one!)";
break;
case "Sponge Cake":
heal_value = 14;
item_type = 1;
use_msg[0] = "* (You lick the frosting off of# the sponge.)";
use_msg[1] = "* (Your mouth feels squeaky# clean!)";
break;
case "Hndw Coffee":
heal_value = 14;
item_type = 1;
use_msg[0] = "* (You brave the hot Honeydew# Coffee.)";
use_msg[1] = "* (You can feel your taste buds# burning off.)";
break;
case "Adult Soda":
heal_value = 18;
item_type = 1;
use_msg[0] = "* (You take a sip out of# the adult soda.)";
... (arg0, arg1) |
2 |
{ |
3 |
var item = arg0; |
4 |
var i = arg1; |
5 |
var use_msg; |
6 |
use_msg[0] = "nothing"; |
7 |
var item_type = 1; |
8 |
var heal_value = 0; |
9 |
var pp_value = 0; |
10 |
var sp_value = 0; |
11 |
var rp_value = 0; |
12 |
var def_value = 0; |
13 |
var atk_value = 0; |
14 |
switch (item) |
15 |
{ |
16 |
case "Lemonade": |
17 |
heal_value = 7; |
18 |
item_type = 1; |
19 |
use_msg[0] = "* (You drink the Lemonade.)"; |
20 |
use_msg[1] = "* (It's very sour.)"; |
21 |
break; |
22 |
case "Candy Corn": |
23 |
use_msg[0] = "* (You eat the Candy Corn.)"; |
24 |
use_msg[1] = "* (You now know why it was# discarded.)"; |
25 |
heal_value = 9; |
26 |
item_type = 1; |
27 |
break; |
28 |
case "G. Pear": |
29 |
pp_value = 2; |
30 |
item_type = 1; |
31 |
use_msg[0] = "* (You eat the Golden Pear.)"; |
32 |
use_msg[1] = "* (The immense flavor hugs your# tastebuds.)"; |
33 |
use_msg[2] = "* ( Overall... Not bad.)"; |
34 |
break; |
35 |
case "Corn Dog": |
36 |
heal_value = 12; |
37 |
item_type = 1; |
38 |
use_msg[0] = "* (You scarf down the Corn Dog.)"; |
39 |
use_msg[1] = "* (You can't help but feel bad# for doing it.)"; |
40 |
break; |
41 |
case "Patch": |
42 |
use_msg[0] = "* (You are unable to sew the# Patch back on your hat.)"; |
43 |
item_type = 0; |
44 |
break; |
45 |
case "Feather": |
46 |
item_type = 3; |
47 |
def_value = 2; |
48 |
use_msg[0] = "* (You stick the feather into# your hat.)"; |
49 |
use_msg[1] = "* (It gives you a proud feeling.)"; |
50 |
break; |
51 |
case "G. Bandana": |
52 |
item_type = 3; |
53 |
def_value = 12; |
54 |
use_msg[0] = "* (With a shimmer, you tie the# Golden Bandana around your# neck.)"; |
55 |
use_msg[1] = "* (You feel like you can take on# anything now.)"; |
56 |
break; |
57 |
case "Pebble Ammo": |
58 |
item_type = 2; |
59 |
atk_value = 3; |
60 |
use_msg[0] = "* (You load the pebbles into your# gun.)"; |
61 |
use_msg[1] = "* (It feels a little heavier# now.)"; |
62 |
break; |
63 |
case "Silver Ammo": |
64 |
item_type = 2; |
65 |
atk_value = 2; |
66 |
use_msg[0] = "* (You load the Silver Ammo# into your gun.)"; |
67 |
use_msg[1] = "* (The pellets shimmer# in the light.)"; |
68 |
break; |
69 |
case "Rubber Ammo": |
70 |
item_type = 2; |
71 |
atk_value = 0; |
72 |
use_msg[0] = "* (You load the rubber ammo into# your weapon.)"; |
73 |
break; |
74 |
case "Glass Ammo": |
75 |
item_type = 2; |
76 |
atk_value = 5; |
77 |
use_msg[0] = "* (You cautiously load the Glass# into your gun.)"; |
78 |
use_msg[1] = "* (Phew! No cuts!)"; |
79 |
break; |
80 |
case "Flint": |
81 |
item_type = 2; |
82 |
atk_value = 9; |
83 |
use_msg[0] = "* (You load the Flint# into your gun.)"; |
84 |
use_msg[1] = "* (Might start some fire# with this one!)"; |
85 |
break; |
86 |
case "Sponge Cake": |
87 |
heal_value = 14; |
88 |
item_type = 1; |
89 |
use_msg[0] = "* (You lick the frosting off of# the sponge.)"; |
90 |
use_msg[1] = "* (Your mouth feels squeaky# clean!)"; |
91 |
break; |
92 |
case "Hndw Coffee": |
93 |
heal_value = 14; |
94 |
item_type = 1; |
95 |
use_msg[0] = "* (You brave the hot Honeydew# Coffee.)"; |
96 |
use_msg[1] = "* (You can feel your taste buds# burning off.)"; |
97 |
break; |
98 |
case "Adult Soda": |
99 |
heal_value = 18; |
100 |
item_type = 1; |
101 |
use_msg[0] = "* (You take a sip out of# the adult soda.)"; |
102 |
use_msg[1] = "* (...)"; |
103 |
use_msg[2] = "* (Tastes like water.)"; |
104 |
break; |
105 |
case "Hndw Pancake": |
106 |
heal_value = 16; |
107 |
item_type = 1; |
108 |
use_msg[0] = "* (You eat the pancake.)"; |
109 |
use_msg[1] = "* (The syrup is very sweet!)"; |
110 |
break; |
111 |
case "G.B. Bear": |
112 |
heal_value = 20; |
113 |
item_type = 1; |
114 |
use_msg[0] = "* (You eat the cookie.)"; |
115 |
use_msg[1] = "* (It feels like it is watching# you eat it.)"; |
116 |
break; |
117 |
case "Hot Pop": |
118 |
heal_value = 14; |
119 |
item_type = 1; |
120 |
use_msg[0] = "* (You eat the Hot Chocolate Pop.)"; |
121 |
use_msg[1] = "* (It has the distinct flavor of# something that was once hot.)"; |
122 |
break; |
123 |
case "Lukewarm Pop": |
124 |
heal_value = 8; |
125 |
item_type = 1; |
126 |
use_msg[0] = "* (You eat the Lukewarm Chocolate# Pop.)"; |
127 |
use_msg[1] = "* (It has the distinct flavor of# something that was once hot# then left to sit for too long.)"; |
128 |
use_msg[2] = "* (It isn't great.)"; |
129 |
break; |
130 |
case "Cold Pop": |
131 |
heal_value = 12; |
132 |
item_type = 1; |
133 |
use_msg[0] = "* (You eat the Cold Chocolate Pop.)"; |
134 |
use_msg[1] = "* (It has the distinct flavor only# possessed by truly cold things.)"; |
135 |
break; |
136 |
case "G. Coffee": |
137 |
sp_value = 3; |
138 |
item_type = 1; |
139 |
use_msg[0] = "* (You chug the Half N' Half# Golden Coffee.)"; |
140 |
use_msg[1] = "* (It tastes like... regular# coffee.)"; |
141 |
break; |
142 |
case "G. Cactus": |
143 |
rp_value = 3; |
144 |
item_type = 1; |
145 |
use_msg[0] = "* (You take a huge bite out# of the cactus.)"; |
146 |
use_msg[1] = "* (...)"; |
147 |
use_msg[2] = "* (It bites back.)"; |
148 |
break; |
149 |
case "Packing Peanuts": |
150 |
heal_value = 10; |
151 |
item_type = 1; |
152 |
use_msg[0] = "* (You eat the Packing Peanuts.)"; |
153 |
use_msg[1] = "* (Aside from the taste, texture,# and potential health risk,# they're not that bad.)"; |
154 |
break; |
155 |
case "Trail Mix": |
156 |
heal_value = 13; |
157 |
item_type = 1; |
158 |
use_msg[0] = "* (You down the bag of Trail Mix.)"; |
159 |
use_msg[1] = "* (All you taste are dried# grapes.)"; |
160 |
break; |
161 |
case "Ice Tea": |
162 |
heal_value = 20; |
163 |
item_type = 1; |
164 |
use_msg[0] = "* (You drink the glass of tea.# It's very watered down.)"; |
165 |
break; |
166 |
case "Green Tea": |
167 |
heal_value = 21; |
168 |
item_type = 1; |
169 |
use_msg[0] = "* (You drink the Green Tea.# Tastes toxic.)"; |
170 |
break; |
171 |
case "Sea Tea": |
172 |
sp_value = 1; |
173 |
item_type = 1; |
174 |
use_msg[0] = "* (You drink the Sea Tea. Your# SOUL speed increases!)"; |
175 |
break; |
176 |
case "Fruitcake": |
177 |
heal_value = 25; |
178 |
item_type = 1; |
179 |
use_msg[0] = "* (You scarf down the Fruitcake.# The Swealterstones burn your# throat!)"; |
180 |
break; |
181 |
case "Spider Donut": |
182 |
heal_value = 12; |
183 |
item_type = 1; |
184 |
use_msg[0] = "* (Don't worry, spider didn't.)"; |
185 |
break; |
186 |
case "Icewater": |
187 |
heal_value = 15; |
188 |
item_type = 1; |
189 |
use_msg[0] = "* (You drink the Icewater.# Definitely has a taste but you# can't describe it.)"; |
190 |
break; |
191 |
case "Oasis Latte": |
192 |
heal_value = 25; |
193 |
item_type = 1; |
194 |
use_msg[0] = "* * (You drink the Latte...)"; |
195 |
break; |
196 |
case "Cnm. Cookie": |
197 |
heal_value = 35; |
198 |
item_type = 1; |
199 |
use_msg[0] = "* (You eat the cookie...)"; |
200 |
break; |
201 |
case "Root Beer": |
202 |
heal_value = 18; |
203 |
item_type = 1; |
204 |
use_msg[0] = "* (You down the Root Beer. The# carbonation tingles!)"; |
205 |
break; |
206 |
case "Feisty Slider": |
207 |
heal_value = 30; |
208 |
item_type = 1; |
209 |
use_msg[0] = "* (You eat the Feisty Slider.# Much like the team, its flavor# is... ambitious.)"; |
210 |
break; |
211 |
case "Gunpowder": |
212 |
heal_value = clamp(global.max_hp_self - global.current_hp_self, 0, 999); |
213 |
item_type = 1; |
214 |
use_msg[0] = "* (You put the gunpowder in your# mouth and nearly choke to# death.) "; |
215 |
break; |
216 |
case "Moss Salad": |
217 |
use_msg[0] = "* (You brace yourself and eat# the Moss Salad.)"; |
218 |
use_msg[1] = "* (The texture can only be# described as \"insolation# esque.\")"; |
219 |
heal_value = 17; |
220 |
item_type = 1; |
221 |
break; |
222 |
case "Grassy Fries": |
223 |
use_msg[0] = "* (You plug your nose and down# the Grassy Fries.)"; |
224 |
use_msg[1] = "* (Is this what life has really# come to?)"; |
225 |
heal_value = 14; |
226 |
item_type = 1; |
227 |
break; |
228 |
case "Flower Stew": |
229 |
use_msg[0] = "* (You make sure Flowey isn't# watching before trying it.)"; |
230 |
use_msg[1] = "* (Mmm... chunky...)"; |
231 |
heal_value = 20; |
232 |
item_type = 1; |
233 |
break; |
234 |
case "Gravity Granola": |
235 |
use_msg[0] = "* (You snack on the Gravity# Granola.)"; |
236 |
use_msg[1] = "* (You can really taste all 9.8# meters!)"; |
237 |
heal_value = 30; |
238 |
item_type = 1; |
239 |
break; |
240 |
case "Dihydrogen Monoxide": |
241 |
use_msg[0] = "* (You drink the H2O. Kinda# tastes like window cleaner...)"; |
242 |
heal_value = 20; |
243 |
item_type = 1; |
244 |
break; |
245 |
case "Popato Chisps": |
246 |
use_msg[0] = "* (You eat the Popato Chisps.# The crunch is deafening.)"; |
247 |
heal_value = 13; |
248 |
item_type = 1; |
249 |
break; |
250 |
case "Beef Jerky": |
251 |
use_msg[0] = "* (You scarf down the Beef# Jerky.)"; |
252 |
use_msg[1] = "* (What a classic flavor.)"; |
253 |
heal_value = 16; |
254 |
item_type = 1; |
255 |
break; |
256 |
case "Cake": |
257 |
use_msg[0] = "* (You enjoy several slices of# cake.)"; |
258 |
use_msg[1] = "* (Delicious!)"; |
259 |
heal_value = 30; |
260 |
item_type = 1; |
261 |
break; |
262 |
case "Floral Cupcake": |
263 |
use_msg[0] = "* (You enjoy the Floral# Cupcake.)"; |
264 |
use_msg[1] = "* (What a rich flavor!)"; |
265 |
heal_value = 50; |
266 |
item_type = 1; |
267 |
break; |
268 |
case "Monster Candy": |
269 |
use_msg[0] = "* (You eat the Monster Candy.)"; |
270 |
use_msg[1] = "* (The taste is faintly# familiar...)"; |
271 |
heal_value = 10; |
272 |
item_type = 1; |
273 |
break; |
274 |
case "Monster Candy+": |
275 |
use_msg[0] = "* (You pop the Monster Candy+ in# your mouth.)"; |
276 |
use_msg[1] = "* (The overwhelming sweetness is# at war with your taste buds.)"; |
277 |
heal_value = 15; |
278 |
item_type = 1; |
279 |
break; |
280 |
case "C-B Strudel": |
281 |
use_msg[0] = "* (You savor the C-B Strudel.)"; |
282 |
use_msg[1] = "* (The taste is strangely# familiar...)"; |
283 |
heal_value = 30; |
284 |
item_type = 1; |
285 |
break; |
286 |
case "Hot Dog": |
287 |
use_msg[0] = "* (You scarf down the 'dog.)"; |
288 |
use_msg[1] = "* (Mmm, hits the spot!)"; |
289 |
heal_value = 20; |
290 |
item_type = 1; |
291 |
break; |
292 |
case "Corn Chowder": |
293 |
use_msg[0] = "* (You nervously drink the Corn# Chowder.)"; |
294 |
use_msg[1] = "* (...Could've been worse.)"; |
295 |
heal_value = 15; |
296 |
item_type = 1; |
297 |
break; |
298 |
case "Wild Revolver": |
299 |
item_type = 4; |
300 |
use_msg[0] = "* (You equipped the# " + string(item) + ".)"; |
301 |
break; |
302 |
case "Toy Gun": |
303 |
item_type = 4; |
304 |
use_msg[0] = "* (You equipped the " + string(item) + ".)"; |
305 |
break; |
306 |
case "Ice Pellets": |
307 |
item_type = 2; |
308 |
atk_value = 6; |
309 |
use_msg[0] = "* (You load the Ice Pellet Ammo.)"; |
310 |
use_msg[1] = "* (Your gun is now cold to the# touch.)"; |
311 |
break; |
312 |
case "Cff Bean Ammo": |
313 |
item_type = 2; |
314 |
atk_value = 4; |
315 |
use_msg[0] = "* (You load the Coffee Beans.)"; |
316 |
use_msg[1] = "* (Your gun now smells delightful.)"; |
317 |
break; |
318 |
case "Super Ammo": |
319 |
item_type = 2; |
320 |
atk_value = 15; |
321 |
use_msg[0] = "* (You load the Super Ammo.)"; |
322 |
use_msg[1] = "* (Your gun now feels lighter# than your conscience.)"; |
323 |
break; |
324 |
case "Nails": |
325 |
item_type = 2; |
326 |
atk_value = 10; |
327 |
use_msg[0] = "* (You load the Nails# into your gun.)"; |
328 |
break; |
329 |
case "Friendliness Pellets": |
330 |
item_type = 2; |
331 |
atk_value = 11; |
332 |
use_msg[0] = "* (You load the Friendliness# Pellets into your gun.)"; |
333 |
break; |
334 |
case "Honeydew Pin": |
335 |
item_type = 3; |
336 |
def_value = 5; |
337 |
use_msg[0] = "* (You pin the Honeydew pin# to your hat.)"; |
338 |
break; |
339 |
case "Band Merch Pin": |
340 |
item_type = 3; |
341 |
def_value = 5; |
342 |
use_msg[0] = "* (You pin the Merch Pin to your# hat.)"; |
343 |
break; |
344 |
case "Steel Buckle": |
345 |
item_type = 3; |
346 |
def_value = 7; |
347 |
use_msg[0] = "* (You attach the Steel Buckle# to your belt.)"; |
348 |
use_msg[1] = "* (Your pants feel sturdier than# ever!)"; |
349 |
break; |
350 |
case "Safety Jacket": |
351 |
item_type = 3; |
352 |
def_value = 6; |
353 |
use_msg[0] = "* (You don the stunning# highlighter yellow jacket.)"; |
354 |
use_msg[1] = "* (You're all ready to take care# of business!)"; |
355 |
break; |
356 |
case "Fancy Holster": |
357 |
item_type = 3; |
358 |
def_value = 7; |
359 |
use_msg[0] = "* (You proudly equip the Fancy# Holster.)"; |
360 |
use_msg[1] = "* (You're ready for anything# now!)"; |
361 |
break; |
362 |
case "Golden Scarf": |
363 |
item_type = 3; |
364 |
def_value = 25; |
365 |
use_msg[0] = "* (You put the Golden Scarf on.#* Your tremendous taste for fashion# makes monsters go easy on you.)"; |
366 |
break; |
367 |
case "Safety Goggles": |
368 |
item_type = 3; |
369 |
def_value = 8; |
370 |
use_msg[0] = "* (You wrap the Safety Goggles# around your hat.)"; |
371 |
use_msg[1] = "* (It looks like it has eyes# now.)"; |
372 |
break; |
373 |
case "Delta Rune Patch": |
374 |
item_type = 3; |
375 |
def_value = 10; |
376 |
use_msg[0] = "* (You attach the Patch to your# vest and begin to feel# something.)"; |
377 |
use_msg[1] = "* (The unwavering hopes and# dreams of Monsterkind.)"; |
378 |
break; |
379 |
case "Silver Scarf": |
380 |
item_type = 3; |
381 |
def_value = 6; |
382 |
use_msg[0] = "* (You wrap the Silver Scarf# around your neck.)"; |
383 |
use_msg[1] = "* (So cozy!)"; |
384 |
break; |
385 |
case "Missing Poster": |
386 |
case "Necklace": |
387 |
item_type = 0; |
388 |
use_msg[0] = "* (You cannot use this item.)"; |
389 |
break; |
390 |
case "Lukewarm Coffee": |
391 |
item_type = 0; |
392 |
use_msg[0] = "* Better not drink it."; |
393 |
use_msg[1] = "* (You could get hotter coffee# elsewhere.)"; |
394 |
break; |
395 |
case "Soggy Mitten": |
396 |
case "Pickaxe": |
397 |
item_type = 0; |
398 |
use_msg[0] = "* (You can't think of a possible# use for it.)"; |
399 |
break; |
400 |
case "Matches": |
401 |
item_type = 0; |
402 |
use_msg[0] = "* (You aren't sure how to safely# start a fire with these.)"; |
403 |
use_msg[1] = "* (They'd probably work in an# emergency.)"; |
404 |
break; |
405 |
case "Snowdin Map": |
406 |
item_type = 0; |
407 |
use_msg[0] = "* (It's accuracy seems# compromised.)"; |
408 |
use_msg[1] = "* (You aren't sure how to use# it.)"; |
409 |
break; |
410 |
case "Videotape": |
411 |
item_type = 0; |
412 |
use_msg[0] = "* (You can't think of a use for# this.)"; |
413 |
break; |
414 |
case "H. Acid": |
415 |
item_type = 0; |
416 |
instance_create_depth(0, 0, -100, obj_steamworks_05_acid_ending); |
417 |
instance_destroy(); |
418 |
break; |
419 |
} |
420 |
if (item_type == 1) |
421 |
{ |
422 |
global.item_slot[i] = "Nothing"; |
423 |
if (heal_value > 0) |
424 |
{ |
425 |
global.current_hp_self += heal_value; |
426 |
global.current_hp_self = clamp(global.current_hp_self, 0, global.max_hp_self); |
427 |
audio_play_sound(snd_heal, 1, 0); |
428 |
} |
429 |
else if (pp_value > 0) |
430 |
{ |
431 |
global.current_pp_self += pp_value; |
432 |
global.current_pp_self = clamp(global.current_pp_self, 0, global.max_pp_self); |
433 |
audio_play_sound(snd_fanpear, 1, 0); |
434 |
} |
435 |
else if (sp_value > 0) |
436 |
{ |
437 |
global.current_sp_self += sp_value; |
438 |
global.current_sp_self = clamp(global.current_sp_self, 0, global.max_sp_self); |
439 |
if (arg0 == "Sea Tea") |
440 |
{ |
441 |
global.current_hp_self += 10; |
442 |
global.current_hp_self = clamp(global.current_hp_self, 0, global.max_hp_self); |
443 |
} |
444 |
audio_play_sound(snd_fanpear, 1, 0); |
445 |
} |
446 |
else if (rp_value > 0) |
447 |
{ |
448 |
global.current_rp_self += rp_value; |
449 |
instance_create(0, 0, obj_cactus_damager); |
450 |
scr_screenshakescr_screenshakefunction scr_screenshake(arg0, arg1)
{
if (instance_exists(obj_screenshake_player))
exit;
with (instance_create(__view_get(e__VW.Object, 0).x, __view_get(e__VW.Object, 0).y, obj_screenshake_player))
{alarm[0]
intensity = arg1;
}
}
enum e__VW
{
XView,
YView,
WView,
HView,
Angle,
HBorder,
VBorder,
HSpeed,
VSpeed,
Object,
Visible,
XPort,
YPort,
WPort,
HPort,
Camera,
SurfaceID
} (12, 6); |
451 |
} |
452 |
if (use_msg[0] != "nothing") |
453 |
{ |
454 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
455 |
with (msg) |
456 |
{ |
457 |
var msg_number = array_length_1d(use_msg); |
458 |
if (global.route == 3) |
459 |
{ |
460 |
msg_number = 0; |
461 |
} |
462 |
else |
463 |
{ |
464 |
for (i = 0; i < msg_number; i++) |
465 |
message[i] = use_msg[i]; |
466 |
} |
467 |
if (heal_value > 0) |
468 |
{ |
469 |
message[msg_number] = "* Healed " + string(heal_value) + " HP!"; |
470 |
if (global.current_hp_self >= global.max_hp_self) |
471 |
message[msg_number] = "* HP maxed out."; |
472 |
} |
473 |
else if (pp_value > 0) |
474 |
{ |
475 |
message[msg_number] = "* You gained " + string(pp_value) + " PP!"; |
476 |
if (global.current_pp_self >= global.max_pp_self) |
477 |
message[msg_number] = "* PP maxed out."; |
478 |
} |
479 |
else if (sp_value > 0) |
480 |
{ |
481 |
message[msg_number] = "* You gained " + string(sp_value) + " SP!"; |
482 |
if (global.current_sp_self >= global.max_sp_self) |
483 |
message[msg_number] = "* SP maxed out."; |
484 |
} |
485 |
else if (rp_value > 0) |
486 |
{ |
487 |
message[msg_number] = "* You will heal for " + string(rp_value) + "# turns!"; |
488 |
if (global.current_rp_self >= global.max_rp_self) |
489 |
message[msg_number] = "* RP maxed out."; |
490 |
} |
491 |
} |
492 |
} |
493 |
} |
494 |
if (item_type == 2) |
495 |
{ |
496 |
global.item_slot[i] = global.player_weapon_modifier; |
497 |
global.player_weapon_modifier = item; |
498 |
audio_play_sound(snd_equip_armor, 1, 0); |
499 |
global.player_weapon_modifier_attack = script_execute(scr_determine_weapon_modifier_attack); |
500 |
} |
501 |
if (item_type == 3) |
502 |
{ |
503 |
global.item_slot[i] = global.player_armor_modifier; |
504 |
global.player_armor_modifier = item; |
505 |
audio_play_sound(snd_equip_armor, 1, 0); |
506 |
global.player_armor_modifier_defense = script_execute(scr_determine_armor_modifier_defense); |
507 |
} |
508 |
if (item_type == 4) |
509 |
{ |
510 |
global.item_slot[i] = global.player_weapon; |
511 |
global.player_weapon = item; |
512 |
global.player_weapon_attack = script_execute(scr_determine_weapon_attack); |
513 |
audio_play_sound(snd_equip_armor, 1, 0); |
514 |
} |
515 |
if (item_type != 1) |
516 |
{ |
517 |
if (use_msg[0] != "nothing") |
518 |
{ |
519 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
520 |
with (msg) |
521 |
{ |
522 |
var msg_number = array_length_1d(use_msg); |
523 |
for (i = 0; i < msg_number; i++) |
524 |
message[i] = use_msg[i]; |
525 |
} |
526 |
} |
527 |
} |
528 |
if (item_type != 0) |
529 |
{ |
530 |
for (var n = 1; n < 8; n++) |
531 |
{ |
532 |
if (global.item_slot[n] == "Nothing" && global.item_slot[n + 1] != "Nothing") |
533 |
{ |
534 |
global.item_slot[n] = global.item_slot[n + 1]; |
535 |
global.item_slot[n + 1] = "Nothing"; |
536 |
n = 1; |
537 |
} |
538 |
} |
539 |
} |
540 |
} |