1 |
global.item_use_hold = id; |
2 |
item_slot = global.item_slot[global.item_number_use]; |
3 |
game_mode = global.game_mode; |
4 |
item_category = "nothing"; |
5 |
item_type = "nothing"; |
6 |
item_number = 0; |
7 |
item_sound = 390; |
8 |
con_keep_previous = true; |
9 |
con_message_number = 1; |
10 |
if (game_mode == "customs") |
11 |
{ |
12 |
if (item_slot == "Hot Dog...?") |
13 |
{ |
14 |
message[0] = "* You eat the " + string(item_slot); |
15 |
message[1] = "#* Your HP was maxed out."; |
16 |
} |
17 |
} |
18 |
else if (game_mode == "yellow") |
19 |
{ |
20 |
script_execute(scr_item_use_text_yellow); |
21 |
} |
22 |
if (item_type == "weapon") |
23 |
{ |
24 |
var item_hold = global.player_weapon; |
25 |
global.player_weapon = global.item_slot[global.item_number_use]; |
26 |
global.item_slot[global.item_number_use] = item_hold; |
27 |
global.player_weapon_attack = script_execute(scr_determine_weapon_attack); |
28 |
audio_play_sound(item_sound, 20, 0); |
29 |
} |
30 |
else if (item_type == "armor") |
31 |
{ |
32 |
var item_hold = global.player_armor; |
33 |
global.player_armor = global.item_slot[global.item_number_use]; |
34 |
global.item_slot[global.item_number_use] = item_hold; |
35 |
global.player_armor_defense = script_execute(scr_determine_armor_defense); |
36 |
audio_play_sound(item_sound, 20, 0); |
37 |
} |
38 |
else if (item_type == "ammo") |
39 |
{ |
40 |
var item_hold = global.player_weapon_modifier; |
41 |
global.player_weapon_modifier = global.item_slot[global.item_number_use]; |
42 |
global.item_slot[global.item_number_use] = item_hold; |
43 |
global.player_weapon_modifier_attack = script_execute(scr_determine_weapon_modifier_attack); |
44 |
audio_play_sound(item_sound, 20, 0); |
45 |
} |
46 |
else if (item_type == "accessory") |
47 |
{ |
48 |
var item_hold = global.player_armor_modifier; |
49 |
global.player_armor_modifier = global.item_slot[global.item_number_use]; |
50 |
global.item_slot[global.item_number_use] = item_hold; |
51 |
global.player_armor_modifier_defense = script_execute(scr_determine_armor_modifier_defense); |
52 |
audio_play_sound(item_sound, 20, 0); |
53 |
} |
54 |
message_current = 0; |
55 |
message_end = array_length_1d(message) - 1; |
56 |
message_draw = ""; |
57 |
increase = global.text_speed; |
58 |
characters = 0; |
59 |
hold = 0; |
60 |
message_length = string_length(message[message_current]); |
61 |
no_loop = false; |
62 |
script_execute(scr_generate_text_counters); |