Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_text_use_item_selection_pause_screen_overworld_Alarm_0

(view raw script w/o annotations or w/e)
1
var item_slot = global.item_slot[global.item_pause_screen_number]
2
var game_mode = global.game_mode
3
if (game_mode == "customs")
4
{
5
    if (item_slot == "Hot Dog...?")
6
    {
7
        global.current_hp_self += global.max_hp_self
8
        if (global.current_hp_self > global.max_hp_self)
9
            global.current_hp_self = global.max_hp_self
10
        audio_play_sound(snd_borfborf, 20, false)
11
    }
12
}
13
else if (game_mode == "yellow")
14
{
15
    if (item_type == "healing")
16
    {
17
        if (global.current_hp_self > global.max_hp_self)
18
            return;
19
        global.current_hp_self += item_number
20
        if (global.current_hp_self > global.max_hp_self)
21
            global.current_hp_self = global.max_hp_self
22
    }
23
    else if (item_type == "protection")
24
    {
25
        global.current_pp_self += item_number
26
        if (global.current_pp_self > global.max_pp_self)
27
            global.current_pp_self = global.max_pp_self
28
    }
29
    else if (item_type == "speed")
30
    {
31
        global.current_sp_self += item_number
32
        if (global.current_sp_self > global.max_sp_self)
33
            global.current_sp_self = global.max_sp_self
34
    }
35
    audio_play_sound(item_sound, 20, false)
36
}
37
message_current += 1
38
message_length = string_length(message[message_current])
39
characters = 0
40
message_draw = ""