Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_npc_hermit_Step_0

(view raw script w/o annotations or w/e)
1
event_inherited()
2
if (global.sworks_flag[31] == 1 || global.sworks_flag[31] == 2)
3
{
4
    if (npc_flag < 5)
5
        npc_flag = 5
6
}
7
if (interact && waiter == 0)
8
    waiter = 1
9
if (waiter == 1)
10
{
11
    scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
12
    is_talking = 1
13
    switch npc_flag
14
    {
15
        case 0:
16
            with (msg)
17
            {
18
                ch_msg = 2
19
                ch[1] = "Correct"
20
                ch[2] = "No, I am"
21
                portrait = false
22
                sndfnt = 99
23
                message[0] = "* Oh my! You startled me!"
24
                message[1] = "* I know my eyes aren't what they#  used to be but..."
25
                message[2] = "* ...You aren't a machine,#  correct?"
26
                if (outcome == 1)
27
                {
28
                    message[3] = "* I can't believe it. Another#  monster in the Steamworks? "
29
                    message[4] = "* Thought I was the only one."
30
                    message[5] = "* I'm not incredibly social but#  you're welcome to rest up here."
31
                    other.npc_flag = 1
32
                    other.waiter = 0
33
                }
34
                if (outcome == 2)
35
                {
36
                    message[3] = "* Hm? You look nothing like the#  others."
37
                    message[4] = "* Don't pull my leg now. At my#  age, it might break off."
38
                    other.npc_flag = 1
39
                    other.waiter = 0
40
                }
41
            }
42
            break
43
        case 1:
44
            with (msg)
45
            {
46
                portrait = false
47
                sndfnt = 99
48
                message[0] = "* This facility used to be the#  epicenter for innovation back#  in the day."
49
                message[1] = "* In my prime I was a chemist.#  A pretty good one too."
50
                message[2] = "* That is... until they let#  everyone go."
51
                message[3] = "* Said there were too many cooks#  in the kitchen, wanted to focus#  in."
52
                message[4] = "* Couldn't let my passion go that#  easily so I hid away when they#  locked up. "
53
                message[5] = "* Now I have the freedom to#  experiment whenever and however#  I please."
54
                message[6] = "* Though... no one is around to#  witness my efforts."
55
            }
56
            npc_flag = 2
57
            waiter = 0
58
            break
59
        case 2:
60
            with (msg)
61
            {
62
                portrait = false
63
                sndfnt = 99
64
                message[0] = "* Personally, I blame the#  shutdown on the robotics#  project, unruly things."
65
                message[1] = "* I thought I was rid of their#  antics until an hour or so ago."
66
                message[2] = "* The facility powered up and#  they all began to roam like#  zombies back from the dead."
67
                message[3] = "* I hid here in the meantime.#  Those heaps of metal are mighty#  unpredictable."
68
            }
69
            npc_flag = 3
70
            waiter = 0
71
            break
72
        case 3:
73
            with (msg)
74
            {
75
                portrait = false
76
                sndfnt = 99
77
                message[0] = "* I'm guessing it was you, right?#  The one who turned the#  generator back on?"
78
                message[1] = "* I must thank you, it isn't#  ideal to live in the dark."
79
                message[2] = "* Many times I have attempted the#  journey but the obstacles are#  far too numerous."
80
                message[3] = "* No need to worry, though. Life#  has been just fine."
81
                message[4] = "* Aside from the reserves left#  behind, those white plants are#  quite edible."
82
                message[5] = "* Couldn't run out of food if I#  wanted to."
83
            }
84
            npc_flag = 4
85
            waiter = 0
86
            break
87
        case 4:
88
            with (msg)
89
            {
90
                portrait = false
91
                sndfnt = 99
92
                message[0] = "* On your way out, feel free to#  use any equipment you like."
93
                message[1] = "* While I prefer working alone..."
94
                message[2] = "* ...I can't deny that science#  is best accomplished as a#  collaborative effort."
95
                message[3] = "* I'm going to wait here until#  the robots disperse but I wish#  you luck on your travels!"
96
            }
97
            waiter = 0
98
            break
99
        case 5:
100
            with (msg)
101
            {
102
                portrait = false
103
                sndfnt = 99
104
                message[0] = "* What a day, what a day."
105
                message[1] = "* It seems those wily bots have#  finally calmed themselves."
106
                message[2] = "* Thank goodness too, my hideout#  was getting awfully cramped!"
107
            }
108
            waiter = 0
109
            npc_flag = 6
110
            break
111
        case 6:
112
            with (msg)
113
            {
114
                portrait = false
115
                sndfnt = 99
116
                message[0] = "* Since the power was turned on,#  all of the equipment functions#  again!"
117
                message[1] = "* That means I'm free to conduct#  experiments without#  limitations!"
118
                message[2] = "* It has been some time since I#  operated that computer over#  there."
119
                message[3] = "* I had forgotten that they#  programmed a game into the#  mixing process."
120
                message[4] = "* Was that really necessary?"
121
                message[5] = "* My ancient eyes can barely#  keep up!"
122
            }
123
            waiter = 0
124
            npc_flag = 7
125
            break
126
        case 7:
127
            with (msg)
128
            {
129
                portrait = false
130
                sndfnt = 99
131
                message[0] = "* I apologize for cutting our#  talk short but there is so much#  to do now."
132
                message[1] = "* You'll just have to wait until#  after the tests."
133
            }
134
            waiter = 0
135
            break
136
    }
137
138
}