Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_miner_stable_Step_0

(view raw script w/o annotations or w/e)
1
event_inherited()
2
if interact
3
{
4
    scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
5
    is_talking = 1
6
    switch npc_flag
7
    {
8
        case 0:
9
            with (msg)
10
            {
11
                portrait = false
12
                sndfnt = 99
13
                message[0] = "* I just ADORE mining!!"
14
                message[1] = "* Mine mine mine mine mine mine#  day and night!!"
15
                message[2] = "* Gonna find a whole buncha...#  SPARKLY GEmS!!"
16
            }
17
            npc_flag++
18
            break
19
        case 1:
20
            with (msg)
21
            {
22
                portrait = false
23
                sndfnt = 99
24
                message[0] = "* Do not doubt my work ethic for#  one sEcond!!"
25
                message[1] = "* I work HARD and am nOT on thin#  ice with the Foreman!!"
26
                message[2] = "* I am on the thickest ice of all#  tIME!!"
27
            }
28
            npc_flag++
29
            break
30
        case 2:
31
            with (msg)
32
            {
33
                portrait = false
34
                sndfnt = 99
35
                message[0] = "* Mining mining mining!!"
36
                message[1] = "* ..."
37
                message[2] = "* Okay, I can't handle this!!"
38
                message[3] = "* I'm on my fourteenth warning!!#  FOURTEENTH!!"
39
                message[4] = "* I've heard rumors that the#  Foreman has a \"sixteen strikes,#  you're out\" policy!!"
40
                message[5] = "* Couldn't he lighten up a#  little??"
41
            }
42
            npc_flag++
43
            break
44
        case 3:
45
            with (msg)
46
            {
47
                portrait = false
48
                sndfnt = 99
49
                message[0] = "* HahA!! This is fun!!"
50
            }
51
            break
52
    }
53
54
}
55
if (!is_talking)
56
{
57
    sprite_index = spr_miner_stable
58
    image_speed = 0.4
59
    if (floor(image_index == 0) || ceil(image_index) == 6)
60
    {
61
        if point_in_rectangle(x, y, __view_get((0 << 0), 0), __view_get((1 << 0), 0), ((__view_get((0 << 0), 0)) + (__view_get((2 << 0), 0))), ((__view_get((1 << 0), 0)) + (__view_get((3 << 0), 0))))
62
        {
63
            if ((!audio_is_playing(snd_pickaxe_ding)) && (!audio_is_playing(snd_pickaxe_ding2)))
64
                audio_play_sound(choose(268, 269), 1, 0)
65
        }
66
    }
67
}
68
else
69
{
70
    if (npc_flag == 3 && obj_dialogue.message_current > 1 && obj_dialogue.message_current < 5)
71
        sprite_index = spr_miner_unstable
72
    else
73
        sprite_index = spr_miner_stable_talk
74
    image_speed = 0.4
75
}