Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_npc_rephil_break_4_Step_0

(view raw script w/o annotations or w/e)
1
event_inherited()
2
var rephil_col = make_color_rgb(211, 231, 221)
3
depth = (-room_height)
4
if interact
5
{
6
    is_talking = 1
7
    waiter = 1
8
    global.cutscene = true
9
}
10
if (waiter == 0)
11
{
12
    if (sprite_index != spr_rephil_turn_overworld_yellow)
13
    {
14
        sprite_index = spr_rephil_turn_overworld_yellow
15
        image_index = 4
16
    }
17
    if (image_index <= 2)
18
    {
19
        image_index = 2
20
        image_speed = 0
21
    }
22
    else
23
        image_speed = -0.2
24
}
25
if (waiter > 0)
26
{
27
    if (waiter == 1)
28
    {
29
        if (image_index >= 4)
30
        {
31
            sprite_index = spr_rephil_overworld_yellow
32
            image_speed = 0
33
            waiter = 2
34
        }
35
        else
36
            image_speed = 0.2
37
        return;
38
    }
39
    scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
40
    switch npc_flag
41
    {
42
        case 0:
43
            with (msg)
44
            {
45
                talker[0] = other.object_index
46
                color = true
47
                col_modif[0] = rephil_col
48
                message[0] = "* 'Ey, would ya' look at that! If#  it ain't our fresh recruit."
49
                message[1] = "* How's it goin' kid, you givin'#  the shufflers a good name out#  'ere?"
50
                message[2] = "* Ya' know, it's tough being a#  world renowned gang leader."
51
                message[3] = "* I gotta run 'round the#  Underground every now 'n then."
52
                message[4] = "* Make sure we're being properly#  represented, ya' know?"
53
                message[5] = "* Ya' ain't gettin' respect like#  us by lazin' around, kid."
54
                for (var i = 0; i < array_length(message); i++)
55
                    message_col[i][0] = message[i]
56
            }
57
            break
58
        case 1:
59
            with (msg)
60
            {
61
                talker[0] = other.object_index
62
                color = true
63
                col_modif[0] = rephil_col
64
                message[0] = "* 'Ey kid. 'Ave you seen a#  certain associate 'round?"
65
                message[1] = "* A fancy lil' fella. Wears a#  nice suit 'n a stubby hat. "
66
                message[2] = "* We've got some matters to#  discuss with 'em."
67
                for (i = 0; i < array_length(message); i++)
68
                    message_col[i][0] = message[i]
69
            }
70
            break
71
        case 2:
72
            with (msg)
73
            {
74
                talker[0] = other.object_index
75
                color = true
76
                col_modif[0] = rephil_col
77
                message[0] = "* This town 'ere's pretty nice.#  Though, I'm not fond of#  the local gang."
78
                message[1] = "* They think they're the hot#  stuff but they've got nothin'#  on The Shufflers!"
79
                for (i = 0; i < array_length(message); i++)
80
                    message_col[i][0] = message[i]
81
            }
82
            break
83
    }
84
85
    if (!global.dialogue_open)
86
    {
87
        waiter = 0
88
        global.cutscene = false
89
        if (npc_flag < 2)
90
            npc_flag++
91
    }
92
}