1 |
script_execute(scr_controls_text); |
2 |
if (key_revert_pressed) |
3 |
{ |
4 |
characters = message_length; |
5 |
message_draw = string_copy(message[message_current], 0, characters); |
6 |
} |
7 |
if (characters < message_length) |
8 |
{ |
9 |
if (counter == 0) |
10 |
{ |
11 |
script_execute(scr_text_increase); |
12 |
script_execute(scr_talking_text); |
13 |
} |
14 |
else |
15 |
{ |
16 |
can_talk = false; |
17 |
} |
18 |
} |
19 |
else if (characters == message_length) |
20 |
{ |
21 |
can_talk = false; |
22 |
if (message_current == (con_message_number - 1) && no_loop == false && item_category == "consumable") |
23 |
{ |
24 |
alarm[0] = 20;gml_Object_obj_dialogue_battle_action_selected_item_Alarm_0.gmlvar item_slot = global.item_slot[global.item_number_use];
var game_mode = global.game_mode;
if (game_mode == "customs")
{
if (item_slot == "Hot Dog...?")
{
global.current_hp_self += global.max_hp_self;
if (global.current_hp_self > global.max_hp_self)
global.current_hp_self = global.max_hp_self;
audio_play_sound(snd_borfborf, 20, false);
}
}
else if (game_mode == "yellow")
{
if (item_type == "healing")
{
if (global.current_hp_self <= global.max_hp_self)
{
global.current_hp_self += item_number;
if (global.current_hp_self > global.max_hp_self)
global.current_hp_self = global.max_hp_self;
}
}
else if (item_type == "protection")
{
global.current_pp_self += item_number;
if (global.current_pp_self > global.max_pp_self)
global.current_pp_self = global.max_pp_self;
}
else if (item_type == "speed")
{
global.current_sp_self += item_number;
if (global.current_sp_self > global.max_sp_self)
global.current_sp_self = global.max_sp_self;
}
else if (item_type == "restore")
{
global.current_rp_self += item_number;
if (global.current_rp_self > global.max_rp_self)
global.current_rp_self = global.max_rp_self;
instance_create(0, 0, obj_cactus_damager);
}
audio_play_sound(item_sound, 20, false);
}
message_current += 1;
message_length = string_length(message[message_current]);
characters = 0;
message_draw = ""; |
25 |
if (global.route == 3) |
26 |
alarm[0] = 1;gml_Object_obj_dialogue_battle_action_selected_item_Alarm_0.gmlvar item_slot = global.item_slot[global.item_number_use];
var game_mode = global.game_mode;
if (game_mode == "customs")
{
if (item_slot == "Hot Dog...?")
{
global.current_hp_self += global.max_hp_self;
if (global.current_hp_self > global.max_hp_self)
global.current_hp_self = global.max_hp_self;
audio_play_sound(snd_borfborf, 20, false);
}
}
else if (game_mode == "yellow")
{
if (item_type == "healing")
{
if (global.current_hp_self <= global.max_hp_self)
{
global.current_hp_self += item_number;
if (global.current_hp_self > global.max_hp_self)
global.current_hp_self = global.max_hp_self;
}
}
else if (item_type == "protection")
{
global.current_pp_self += item_number;
if (global.current_pp_self > global.max_pp_self)
global.current_pp_self = global.max_pp_self;
}
else if (item_type == "speed")
{
global.current_sp_self += item_number;
if (global.current_sp_self > global.max_sp_self)
global.current_sp_self = global.max_sp_self;
}
else if (item_type == "restore")
{
global.current_rp_self += item_number;
if (global.current_rp_self > global.max_rp_self)
global.current_rp_self = global.max_rp_self;
instance_create(0, 0, obj_cactus_damager);
}
audio_play_sound(item_sound, 20, false);
}
message_current += 1;
message_length = string_length(message[message_current]);
characters = 0;
message_draw = ""; |
27 |
no_loop = true; |
28 |
} |
29 |
else if (key_select_pressed) |
30 |
{ |
31 |
var case_end = false; |
32 |
if (message_current < message_end && !(message_current == (con_message_number - 1) && item_category == "consumable")) |
33 |
{ |
34 |
message_current += 1; |
35 |
message_length = string_length(message[message_current]); |
36 |
characters = 0; |
37 |
message_draw = ""; |
38 |
} |
39 |
else if (message_current == message_end) |
40 |
{ |
41 |
if (item_category == "consumable") |
42 |
{ |
43 |
for (i = global.item_number_use; i < 8; i += 1) |
44 |
global.item_slot[i] = global.item_slot[i + 1]; |
45 |
global.item_slot[8] = "Nothing"; |
46 |
} |
47 |
case_end = true; |
48 |
} |
49 |
if (case_end == true) |
50 |
{ |
51 |
global.no_hit_count += 1; |
52 |
if (global.enemy_count >= 2) |
53 |
global.no_hit_count_2 += 1; |
54 |
if (global.enemy_count >= 3) |
55 |
global.no_hit_count_3 += 1; |
56 |
scr_determine_special_effect_enemy("Item"); |
57 |
global.important_cutscene = script_execute(scr_determine_important_cutscene_attacking); |
58 |
global.can_attack = script_execute(scr_determine_can_attack_attacking); |
59 |
if (global.important_cutscene == false && global.can_attack == true) |
60 |
global.enemy_attacking = true; |
61 |
if (global.can_attack == false) |
62 |
{ |
63 |
with (obj_dialogue_box_battle) |
64 |
no_loop_can_attack = false; |
65 |
} |
66 |
instance_destroy(); |
67 |
} |
68 |
} |
69 |
} |
70 |
script_execute(scr_text_counter); |