Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_adventurer_female_Step_0

(view raw script w/o annotations or w/e)
1
var geno_snowdin = false;
2
if (global.geno_complete[2])
3
    geno_snowdin = true;
4
if (scr_interact
scr_interact

function scr_interact() { if (distance_to_object(obj_pl) < 20 && obj_pl.state == scr_normal_state) { var pl_dir = obj_pl.direction; var pl_x = 0; var pl_y = 0; var check_distance_x = 0; var check_distance_y = 0; switch (pl_dir) { case 0: pl_x = obj_pl.bbox_right; pl_y = obj_pl.bbox_top + 1; check_distance_x = 20; break; case 180: pl_x = obj_pl.bbox_left; pl_y = obj_pl.bbox_top + 1; check_distance_x = -20; break; case 90: pl_x = obj_pl.x; pl_y = obj_pl.bbox_top; check_distance_y = -20; break; case 270: pl_x = obj_pl.x; pl_y = obj_pl.bbox_bottom; check_distance_y = 20; break; } if (collision_line_first(pl_x, pl_y, pl_x + check_distance_x, pl_y + check_distance_y, id, false, false)) return true; } }
() && keyboard_multicheck_pressed(0))
5
{
6
    scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
7
    is_talking = true;
8
    waiter = 1;
9
}
10
if (waiter == 1)
11
{
12
    with (msg)
13
    {
14
        portrait = false;
15
        sndfnt = 99;
16
        if (global.route == 3 && geno_snowdin == false)
17
        {
18
            message[0] = "* The atmosphere seems colder#  than expected around here.";
19
            message[1] = "* Maybe this trip wasn't a good#  idea...";
20
        }
21
        else
22
        {
23
            switch (global.snowdin_flag[1])
24
            {
25
                case 0:
26
                    message[0] = "* Hello friend!";
27
                    message[1] = "* My husband and I have been#  exploring the Underground.";
28
                    message[2] = "* Many secrets lie throughout#  these lands.";
29
                    message[3] = "* It makes for a great and exotic#  honeymoon.";
30
                    message[4] = "* ...";
31
                    message[5] = "* Unfortunately, we're a bit lost#  at the moment.";
32
                    message[6] = "* He says he knows where we are,#  but I think he's just#  embarrassed.";
33
                    message[7] = "* Any idea where we could#  get a map?";
34
                    global.snowdin_flag[1] = 1;
35
                    other.waiter = 0;
36
                    break;
37
                case 1:
38
                    if (scr_item_exists_check
scr_item_exists_check

function scr_item_exists_check(arg0) { for (var i = 1; i <= 8; i += 1) { if (global.item_slot[i] == arg0) { return true; exit; break; } else if (i == 8) { return false; } } }
("Snowdin Map"))
39
                    {
40
                        if (message_current == 0 || message_current == 10)
41
                            other.is_talking = false;
42
                        if (message_current == 1)
43
                            other.is_talking = true;
44
                        if (message_current == 10)
45
                        {
46
                            scr_item_remove
scr_item_remove

function scr_item_remove(arg0) { for (i = 1; i <= 8; i += 1) { if (global.item_slot[i] == arg0) { while (i < 8) { global.item_slot[i] = global.item_slot[i + 1]; i += 1; } global.item_slot[8] = "Nothing"; return true; break; } else if (i == 8) { return false; } } }
("Snowdin Map");
47
                            scr_item
scr_item

function scr_item(arg0) { nm = arg0; for (var i = 1; i <= 8; i++) { if (global.item_slot[i] == "Nothing") { global.item_slot[i] = nm; return true; break; } else if (i == 8) { return false; } } }
("Matches");
48
                            global.snowdin_flag[1] = 2;
49
                            other.is_talking = false;
50
                            other.waiter = 0;
51
                        }
52
                        message[0] = "* (You take out the map.)";
53
                        message[1] = "* A map? Splendid! ";
54
                        message[2] = "* Did you make this just#  for us?";
55
                        message[3] = "* I wish I had something#  as heartfelt to give#  in return...";
56
                        message[4] = "* Would you like some#  extra matches?";
57
                        message[5] = "* I've been holding onto them in#  case we needed a fire.";
58
                        message[6] = "* We won't need one anymore.";
59
                        message[7] = "* Our love will keep us warm!";
60
                        message[8] = "* Sorry, that's a little#  cliche, isn't it.";
61
                        message[9] = "* Well, I wish you the best.#  Don't use all those#  matches in one place. ";
62
                        message[10] = "* (Received some Matches!)";
63
                    }
64
                    else
65
                    {
66
                        message[0] = "* Next stop on our trip is#  supposed to be Waterfall.";
67
                        message[1] = "* I hear there are glittering#  stones in the ceiling.";
68
                        message[2] = "* It should be breath-taking#  and romantic.";
69
                        message[3] = "* ...If we ever find it, that#  is...";
70
                    }
71
                    break;
72
                case 2:
73
                    message[0] = "* This blocked off cave looks#  absolutely stunning.";
74
                    message[1] = "* I hope they clear the#  way soon. I can't wait#  to get moving again.";
75
                    break;
76
            }
77
        }
78
    }
79
}
80
if (instance_exists(obj_dialogue) && is_talking == true)
81
{
82
    if (obj_dialogue.cutoff == string_length(obj_dialogue.message[obj_dialogue.message_current]))
83
    {
84
        image_speed = 0;
85
        image_index = 0;
86
    }
87
    else
88
    {
89
        image_speed = 0.2;
90
    }
91
}
92
else
93
{
94
    is_talking = false;
95
}
96
if (!global.dialogue_open && waiter == 1)
97
    waiter = 0;