Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_dw_fcastle_cafe_Other_12

related scripts: Create_0Draw_0Other_11Other_12 Other_13Other_15Step_0Step_1Step_2

(view raw script w/o annotations or w/e)
1
with (vendingmachine)
2
{
3
    if (myinteract == 3 && global.interact == 0 && !d_ex())
4
    {
5
        myinteract = 4;
6
        global.interact = 1;
7
        global.msc = -99;
8
        global.choice = -1;
9
        global.choicemsg[0] = stringsetloc(
#Buy
"#Buy", "obj_dw_fcastle_cafe_slash_Other_12_gml_15_0"
);
10
        global.choicemsg[1] = stringsetloc(
#Do not
"#Do not", "obj_dw_fcastle_cafe_slash_Other_12_gml_16_0"
);
11
        global.choicemsg[2] = stringset("");
12
        global.choicemsg[3] = stringset("");
13
        
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; if (global.darkzone == 1) global.typer = 89; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("no_name");
14
        msgsetloc(0, 
* (Drink dispenser.Delay 11 It only accepts tickets and Flowery Dollars.)Wait for input
"* (Drink dispenser^1. It only accepts tickets and Flowery Dollars.)/", "obj_dw_fcastle_cafe_slash_Other_12_gml_21_0"
);
15
        msgnext("\\C2 ");
16
        d = d_make();
17
    }
18
    if (myinteract == 4 && global.choice != -1)
19
    {
20
        k_d();
21
        if (global.choice == 0)
22
            myinteract = 5;
23
        else
24
            myinteract = 99;
25
    }
26
    if (myinteract == 5 && !d_ex())
27
    {
28
        myinteract = 99;
29
        with (instance_create(0, 0, obj_shop_vending))
30
        {
31
            default_text = stringsetloc(
* (It's a soda machine.\nThat you insert\nmoney into.\nSomewhere.)
"* (It's a soda machine.\nThat you insert\nmoney into.\nSomewhere.)", "obj_dw_fcastle_cafe_slash_Other_12_gml_45_0"
);
32
            menu_list = [new vending_menu_option(stringsetloc(
Buy
"Buy", "obj_dw_fcastle_cafe_slash_Other_12_gml_48_0"
), 1), new vending_menu_option(stringsetloc(
Dispense
"Dispense", "obj_dw_fcastle_cafe_slash_Other_12_gml_49_0"
), 10), new vending_menu_option(stringsetloc(
Talk
"Talk", "obj_dw_fcastle_cafe_slash_Other_12_gml_50_0"
), 4, "talk", 1), new vending_menu_option(stringsetloc(
Exit
"Exit", "obj_dw_fcastle_cafe_slash_Other_12_gml_51_0"
), 99)];
33
            if (
scr_flag_get
scr_flag_get

function
scr_flag_get(arg0)
{ return global.flag[arg0]; } function scr_flag_name_get(arg0) { var v = global.flagname[arg0]; return is_undefined(v) ? "*unknown flag*" : v; } function scr_flag_get_ext(arg0, arg1, arg2 = 1) { if (arg1 < 0)
scr_flag_get(arg0);
else return scr_get_bitmask_value(global.flag[arg0], arg1, arg2); }
(1850)
> 0 &&
scr_flag_get
scr_flag_get

function
scr_flag_get(arg0)
{ return global.flag[arg0]; } function scr_flag_name_get(arg0) { var v = global.flagname[arg0]; return is_undefined(v) ? "*unknown flag*" : v; } function scr_flag_get_ext(arg0, arg1, arg2 = 1) { if (arg1 < 0)
scr_flag_get(arg0);
else return scr_get_bitmask_value(global.flag[arg0], arg1, arg2); }
(1879)
== 0)
34
            {
35
                other.myinteract = 98;
36
                menu_list[2] = new vending_menu_option(stringsetloc(
FreeDrink
"FreeDrink", "obj_dw_fcastle_cafe_slash_Other_12_gml_57_0"
), 4, "drink", 2);
37
            }
38
            reset_list();
39
            item_list = 
scr_shop_fcastle_items
scr_shop_fcastle_items

function
scr_shop_fcastle_items()
{ var item_list = []; item_list = [new vending_item(67, "item", 30, [1777, 1]), new vending_item(68, "item", 30, [1778, 1]), new vending_item(69, "item", 30, [1779, 1]), new vending_item(70, "item", 30, [1800, 1])]; var secret_unlocked = (
scr_flag_get(1777)
+
scr_flag_get(1778)
+
scr_flag_get(1779)
+
scr_flag_get(1800)
) >= 4;
if (secret_unlocked) { if (
scr_flag_get(1801)
== 0)
item_list = [new vending_event(stringsetloc(
My Secret
"My Secret", "scr_shop_fcastle_items_slash_scr_shop_fcastle_items_gml_17_0"
), stringsetloc(
KEY#The "key"#to ideal#happiness
"KEY#The \"key\"#to ideal#happiness", "scr_shop_fcastle_items_slash_scr_shop_fcastle_items_gml_17_1"
), 10)];
else item_list = [new vending_item(67, "item", 30), new vending_item(68, "item", 30), new vending_item(69, "item", 30), new vending_item(70, "item", 30)]; } return item_list; }
();
40
            fillBuyList();
41
            array_push(customMenuTalkFlags, ["talk", function()
42
            {
43
                if (
scr_flag_get
scr_flag_get

function
scr_flag_get(arg0)
{ return global.flag[arg0]; } function scr_flag_name_get(arg0) { var v = global.flagname[arg0]; return is_undefined(v) ? "*unknown flag*" : v; } function scr_flag_get_ext(arg0, arg1, arg2 = 1) { if (arg1 < 0)
scr_flag_get(arg0);
else return scr_get_bitmask_value(global.flag[arg0], arg1, arg2); }
(1776)
== 0)
44
                {
45
                    
scr_flag_set
scr_flag_set

function
scr_flag_set(arg0, arg1)
{ global.flag[arg0] = arg1; } function scr_flag_set_ext(arg0, arg1, arg2, arg3 = 1) { if (arg1 < 0)
scr_flag_set(arg0, arg2);
else global.flag[arg0] = scr_set_bitmask_value(global.flag[arg0], arg1, arg2, arg3); }
(1776, 1)
;
46
                    
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; if (global.darkzone == 1) global.typer = 89; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("ralsei");
47
                    msgsetloc(0, 
Face K* So far,Delay 11 talking to machines doesn't do anything...Wait for input
"\\EK* So far^1, talking to machines doesn't do anything.../", "obj_dw_fcastle_cafe_slash_Other_12_gml_75_0"
);
48
                    
scr_anyface_next
scr_anyface_next

function
scr_anyface_next(arg0, arg1)
{ global.msgno++;
scr_anyface(arg0, global.msgno, arg1);
}
("flowery", "2");
49
                    msgnextloc(
Face 2\V0* That's because you don't believe in yourself.Wait for input
"\\E2\\V0* That's because you don't believe in yourself./", "obj_dw_fcastle_cafe_slash_Other_12_gml_77_0"
);
50
                    
scr_anyface_next
scr_anyface_next

function
scr_anyface_next(arg0, arg1)
{ global.msgno++;
scr_anyface(arg0, global.msgno, arg1);
}
("ralsei", "E");
51
                    msgnextloc(
Face E* Huh?Delay 11 Flowery!?Delay 11 Wh-where are you?Wait for input
"\\EE* Huh^1? Flowery!^1? Wh-where are you?/", "obj_dw_fcastle_cafe_slash_Other_12_gml_79_0"
);
52
                    
scr_anyface_next
scr_anyface_next

function
scr_anyface_next(arg0, arg1)
{ global.msgno++;
scr_anyface(arg0, global.msgno, arg1);
}
("flowery", "3");
53
                    msgnextloc(
Face 3\VM* I'm not here.Delay 11 I'm just a voice-activated recording.Wait for input
"\\E3\\VM* I'm not here^1. I'm just a voice-activated recording./", "obj_dw_fcastle_cafe_slash_Other_12_gml_81_0"
);
54
                    msgnextloc(
Face 2\Vv* Also,Delay 11 I predicted what you were going to say.Wait for input
"\\E2\\Vv* Also^1, I predicted what you were going to say./", "obj_dw_fcastle_cafe_slash_Other_12_gml_82_0"
);
55
                    
scr_anyface_next
scr_anyface_next

function
scr_anyface_next(arg0, arg1)
{ global.msgno++;
scr_anyface(arg0, global.msgno, arg1);
}
("ralsei", "n");
56
                    msgnextloc(
Face n* ...Wait for input
"\\En* .../", "obj_dw_fcastle_cafe_slash_Other_12_gml_84_0"
);
57
                    
scr_anyface_next
scr_anyface_next

function
scr_anyface_next(arg0, arg1)
{ global.msgno++;
scr_anyface(arg0, global.msgno, arg1);
}
("flowery", "3");
58
                    msgnextloc(
Face 3\VY* W-wait.Delay 11 You really mean it?Delay 11 You...Delay 11 like my style?Wait for input
"\\E3\\VY* W-wait^1. You really mean it^1? You..^1. like my style?/", "obj_dw_fcastle_cafe_slash_Other_12_gml_86_0"
);
59
                    
scr_anyface_next
scr_anyface_next

function
scr_anyface_next(arg0, arg1)
{ global.msgno++;
scr_anyface(arg0, global.msgno, arg1);
}
("ralsei", "p");
60
                    msgnextloc(
Face p* WHEN WOULD I SAY THAT!?Wait for inputClose Message
"\\Ep* WHEN WOULD I SAY THAT!?/%", "obj_dw_fcastle_cafe_slash_Other_12_gml_88_0"
);
61
                }
62
                else
63
                {
64
                    var small_text = stringsetloc(
End recording...
"End recording...", "obj_dw_fcastle_cafe_slash_Other_12_gml_91_0"
);
65
                    
scr_smallface
scr_smallface

function
scr_smallface(arg0, arg1, arg2, arg3, arg4, arg5)
{
scr_smallface_reset(arg0);
global.smsprite[arg0] = spr_face_susie_alt; if (is_string(arg1)) { if (arg1 == "susie") global.smsprite[arg0] = spr_face_susie_alt; if (arg1 == "ralsei") global.smsprite[arg0] = spr_face_r_nohat; if (arg1 == "ralsei" && global.flag[1311]) global.smsprite[arg0] = spr_face_r_dark; if (arg1 == "lancer") global.smsprite[arg0] = spr_face_l0; if (arg1 == "noelle") global.smsprite[arg0] = spr_face_n_matome; if (arg1 == "noelle_cropped") global.smsprite[arg0] = spr_face_n_matome_cropped; if (arg1 == "queen") global.smsprite[arg0] =
scr_84_get_sprite("spr_face_queen");
if (arg1 == "rouxls") global.smsprite[arg0] = spr_face_rurus; if (arg1 == "berdly") global.smsprite[arg0] = spr_face_berdly_dark; if (arg1 == "rudy") global.smsprite[arg0] = spr_face_rudy; if (arg1 == "flowery") global.smsprite[arg0] = spr_face_flowery; if (arg1 == "toriel") global.smsprite[arg0] = spr_face_t0; if (arg1 == "opuppet") { global.smsprite[arg0] = spr_miniface_orange; global.smcolor[arg0] = c_orange; global.smshake[arg0] = 1; } if (arg1 == "sans") global.smsprite[arg0] = asset_get_index("spr_face_sans" + string(arg2)); var flower_list = ["orange", "aqua", "green", "seth", "blue", "yellow"]; for (var i = 0; i < array_length(flower_list); i++) { if (arg1 != flower_list[i]) continue; global.smsprite[arg0] = spr_empty; break; } if (arg1 == "orange") global.smcolor[arg0] = #FFAC87; if (arg1 == "aqua") global.smcolor[arg0] = #84F9FF; if (arg1 == "green") global.smcolor[arg0] = #AEFFBC; if (arg1 == "seth") global.smcolor[arg0] = #E2A8FC; if (arg1 == "blue") global.smcolor[arg0] = #86A7FF; if (arg1 == "yellow") global.smcolor[arg0] = #FFF8A1; if (arg1 == "none" || arg1 == "empty") global.smsprite[arg0] = spr_empty; } else { global.smsprite[arg0] = arg1; if (arg1 == 0) global.smsprite[arg0] = spr_empty; } global.smimage[arg0] = arg2; if (is_string(arg3)) { if (global.fighting == 1) { if (arg3 == "left") global.smxx[arg0] = 60; if (arg3 == "leftmid") global.smxx[arg0] = 160; if (arg3 == "mid" || arg3 == "middle") global.smxx[arg0] = 260; if (arg3 == "rightmid") global.smxx[arg0] = 360; if (arg3 == "right") global.smxx[arg0] = 460; } else { if (arg3 == "left") global.smxx[arg0] = 70; if (arg3 == "leftmid") global.smxx[arg0] = 160; if (arg3 == "mid" || arg3 == "middle") global.smxx[arg0] = 260; if (arg3 == "rightmid") global.smxx[arg0] = 360; if (arg3 == "right") global.smxx[arg0] = 400; } } else { global.smxx[arg0] = arg3; } ...
(0, "flowery", 0, "right", "bottom", small_text);
66
                    
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; if (global.darkzone == 1) global.typer = 89; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("flowery");
67
                    msgsetloc(0, 
Face 7\VV* Heh.Delay 11 You really know how to make someone...Wait for input
"\\E7\\VV* Heh^1. You really know how to make someone.../", "obj_dw_fcastle_cafe_slash_Other_12_gml_95_0"
);
68
                    msgnextloc(
Face 3\VN* ...Delay 11 feel special,Delay 11 don't you,Delay 11 Raly?Wait for input
"\\E3\\VN* ..^1. feel special^1, don't you^1, Raly?/", "obj_dw_fcastle_cafe_slash_Other_12_gml_96_0"
);
69
                    
scr_anyface_next
scr_anyface_next

function
scr_anyface_next(arg0, arg1)
{ global.msgno++;
scr_anyface(arg0, global.msgno, arg1);
}
("ralsei", "p");
70
                    msgnextloc(
Face p* I'M JUST STANDING HERE!!!Mini text 0 Wait for inputClose Message
"\\Ep* I'M JUST STANDING HERE!!!\\f0/%", "obj_dw_fcastle_cafe_slash_Other_12_gml_98_0"
);
71
                }
72
            }]);
73
        }
74
    }
75
    if (myinteract == 99 && !i_ex(obj_shop_vending) && !d_ex())
76
    {
77
        myinteract = 0;
78
        global.interact = 0;
79
    }
80
}