Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_b3bs_cheaterpippins_Step_0

(view raw script w/o annotations or w/e)
1
if (!init)
2
{
3
    with (obj_board_shopwriter)
4
        active = true;
5
    init = 1;
6
}
7
with (obj_mainchara_board)
8
    camera = true;
9
if (dcon == 0)
10
{
11
    if (button.pressed)
12
    {
13
        global.interact = 1;
14
        dcon = 1;
15
        dtimer = 0;
16
        dispcount = 15;
17
        disprate = 1;
18
        dice.sprite_index = spr_board_die_nocheat;
19
        dattempt++;
20
        if (dattempt > 6)
21
            dattempt = 1;
22
        global.flag[1088 cheated_dice_val] = dattempt;
23
        if (i_ex(pwriter1))
24
            pwriter1.active = false;
25
    }
26
}
27
if (dcon == 1)
28
{
29
    dtimer++;
30
    if (dtimer > disprate)
31
    {
32
        dtimer = 0;
33
        disprate++;
34
        dispcount--;
35
        if (dispcount > 0)
36
        {
37
            snd_stop(snd_metalhit);
38
            snd_play(snd_metalhit);
39
            var newnumb = irandom(5);
40
            if (dice.image_index != newnumb)
41
                dice.image_index = newnumb;
42
            else
43
                dice.image_index += 1;
44
        }
45
        else
46
        {
47
            dtimer = 0;
48
            dcon++;
49
        }
50
    }
51
}
52
if (dcon == 2)
53
{
54
    if (dattempt == 1)
55
    {
56
        dtimer++;
57
        if (dtimer == 1)
58
        {
59
            snd_stop(snd_metalhit);
60
            snd_play(snd_metalhit);
61
            dice.sprite_index = spr_board_die_nocheat;
62
            dice.image_index = 4;
63
            if (i_ex(pwriter1))
64
            {
65
                pwriter1.timer = 0;
66
                pwriter1.texttimer = 0;
67
                pwriter1.shopstring = stringsetloc(
TOO BAD!#TRY AGAIN!
"TOO BAD!#TRY AGAIN!", "obj_b3bs_cheaterpippins_slash_Step_0_gml_75_0"
);
68
                pwriter1.active = true;
69
            }
70
            snd_play(snd_error);
71
        }
72
        if (dtimer == 15)
73
            dcon = 3;
74
    }
75
    if (dattempt == 2)
76
    {
77
        dtimer++;
78
        if (dtimer == 1)
79
        {
80
            snd_stop(snd_metalhit);
81
            snd_play(snd_metalhit);
82
            dice.sprite_index = spr_board_die_nocheat;
83
            dice.image_index = 0;
84
            if (i_ex(pwriter1))
85
            {
86
                pwriter1.timer = 0;
87
                pwriter1.texttimer = 0;
88
                pwriter1.shopstring = stringsetloc(
SO CLOSE!#1'S ALMOST 2!
"SO CLOSE!#1'S ALMOST 2!", "obj_b3bs_cheaterpippins_slash_Step_0_gml_98_0"
);
89
                pwriter1.active = true;
90
            }
91
            snd_play(snd_error);
92
        }
93
        if (dtimer == 15)
94
            dcon = 3;
95
    }
96
    if (dattempt == 3)
97
    {
98
        dtimer++;
99
        if (dtimer == 1)
100
        {
101
            snd_stop(snd_metalhit);
102
            snd_play(snd_metalhit);
103
            dice.sprite_index = spr_board_die_7;
104
            if (i_ex(pwriter1))
105
            {
106
                pwriter1.timer = 0;
107
                pwriter1.texttimer = 0;
108
                pwriter1.shopstring = stringsetloc(
UNLUCKY SEVEN.#HOW'D THAT#GET THERE?
"UNLUCKY SEVEN.#HOW'D THAT#GET THERE?", "obj_b3bs_cheaterpippins_slash_Step_0_gml_117_0"
);
109
                pwriter1.active = true;
110
            }
111
            snd_play(snd_error);
112
        }
113
        if (dtimer == 15)
114
            dcon = 3;
115
    }
116
    if (dattempt == 4)
117
    {
118
        dtimer++;
119
        if (dtimer == 1)
120
        {
121
            snd_stop(snd_metalhit);
122
            snd_play(snd_metalhit);
123
            dice.sprite_index = spr_board_die_roman3;
124
            if (i_ex(pwriter1))
125
            {
126
                pwriter1.timer = 0;
127
                pwriter1.texttimer = 0;
128
                pwriter1.shopstring = stringsetloc(
STILL NOT EVEN.#CLOSE!
"STILL NOT EVEN.#CLOSE!", "obj_b3bs_cheaterpippins_slash_Step_0_gml_138_0"
);
129
                pwriter1.active = true;
130
            }
131
            snd_play(snd_error);
132
        }
133
        if (dtimer == 15)
134
            dcon = 3;
135
    }
136
    if (dattempt == 5)
137
    {
138
        dtimer++;
139
        if (dtimer == 1)
140
        {
141
            snd_stop(snd_metalhit);
142
            snd_play(snd_metalhit);
143
            dice.sprite_index = spr_board_die_half;
144
            if (i_ex(pwriter1))
145
            {
146
                pwriter1.timer = 0;
147
                pwriter1.texttimer = 0;
148
                pwriter1.shopstring = stringsetloc(
CLOSER!#ALMOST GOT IT!
"CLOSER!#ALMOST GOT IT!", "obj_b3bs_cheaterpippins_slash_Step_0_gml_159_0"
);
149
                pwriter1.active = true;
150
            }
151
            snd_play(snd_error);
152
        }
153
        if (dtimer == 15)
154
            dcon = 3;
155
    }
156
    if (dattempt == 6)
157
    {
158
        dtimer++;
159
        if (dtimer == 1)
160
        {
161
            snd_stop(snd_metalhit);
162
            snd_play(snd_metalhit);
163
            dice.sprite_index = spr_board_die_9;
164
            dice.image_index = 0;
165
        }
166
        var dietime = 8;
167
        if (dtimer == 30)
168
        {
169
            with (dice)
170
                
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("image_index", 0, 8, dietime);
171
        }
172
        if (dtimer == (dietime + 30))
173
        {
174
            if (i_ex(pwriter1))
175
            {
176
                pwriter1.timer = 0;
177
                pwriter1.texttimer = 0;
178
                pwriter1.shopstring = stringsetloc(
UPSIDE DOWN 9!#SO CLOSE!
"UPSIDE DOWN 9!#SO CLOSE!", "obj_b3bs_cheaterpippins_slash_Step_0_gml_189_0"
);
179
                pwriter1.active = true;
180
            }
181
            snd_play(snd_error);
182
        }
183
        if (dtimer == (15 + dietime + 30 + 2))
184
            dcon = 3;
185
    }
186
}
187
if (dcon == 3)
188
{
189
    global.interact = 0;
190
    dcon = 4;
191
    dtimer = 0;
192
}
193
if (dcon == 4 && !button.pressed)
194
    dcon = 0;
195
if (dcon == 20)
196
{
197
    if (i_ex(pwriter1))
198
    {
199
        pwriter1.timer = 0;
200
        pwriter1.texttimer = 0;
201
        pwriter1.active = true;
202
    }
203
    dcon = 21;
204
}
205
if (dcon == 21)
206
{
207
    if (pwriter1.textcomplete == true)
208
    {
209
        dcon = 0;
210
        dtimer = 0;
211
    }
212
    if (!i_ex(pwriter1))
213
    {
214
        dcon = 0;
215
        dtimer = 0;
216
    }
217
}
218
if (dcon == 40)
219
{
220
    dtimer++;
221
    if (dtimer == 1)
222
        global.interact = 1;
223
    if (dtimer == 15)
224
    {
225
        global.flag[1098 cheater_pip_left] = 1;
226
        with (obj_npc_room)
227
        {
228
            if (sprite_index == spr_npc_pippins)
229
                sprite_index = spr_npc_pippins_sad;
230
        }
231
        
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 == "tenna") { global.typer = 80; if (global.fighting == 1) global.typer = 81; } 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 (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; ...
("pippins");
232
        msgsetloc(0, 
* What the -- what are you doing photoing us!?Wait for input
"* What the -- what are you doing photoing us!?/", "obj_b3bs_cheaterpippins_slash_Step_0_gml_253_0"
);
233
        msgnextloc(
* We're innocent!Delay 11 Ahh,Delay 11 let's get out of here!Wait for inputClose Message
"* We're innocent^1! Ahh^1, let's get out of here!/%", "obj_b3bs_cheaterpippins_slash_Step_0_gml_254_0"
);
234
        d_make();
235
        dtimer = 0;
236
        dcon++;
237
    }
238
}
239
if (dcon == 41 && !d_ex())
240
{
241
    dtimer++;
242
    if (dtimer == 1)
243
    {
244
        with (bpip1)
245
        {
246
            snd_play(snd_board_splash);
247
            instance_create(x, y, obj_board_smokepuff);
248
            instance_destroy();
249
        }
250
        with (pippins1)
251
        {
252
            
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("x", x, -120, 22, 2, "out");
253
            
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("y", y, 208, 22);
254
        }
255
        with (pippins2)
256
        {
257
            
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("x", x, 720, 18, 2, "out");
258
            
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("y", y, 152, 22, -1, "in");
259
            
scr_doom
scr_doom

function
scr_doom(arg0, arg1)
{ with (instance_create_depth(0, 0, 0, obj_doom)) { alarm[0] target = arg0; } }
(id, 23);
260
        }
261
        with (pippins3)
262
            
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("x", x, room_width + 100, 18, 2, "out");
263
    }
264
    if (dtimer == 15)
265
    {
266
        global.interact = 0;
267
        dcon++;
268
    }
269
}