Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_item_use

(view raw script w/o annotations or w/e)
1
var use_msg;
2
function scr_item_use
scr_item_use

var use_msg; function scr_item_use(argument0, argument1) //gml_Script_scr_item_use { var item = argument0 var i = argument1 use_msg[0] = "nothing" var item_type = 1 var heal_value = 0 var pp_value = 0 var sp_value = 0 var rp_value = 0 var def_value = 0 var atk_value = 0 switch item { case "Lemonade": heal_value = 7 item_type = 1 use_msg[0] = "* (You drink the Lemonade.)" use_msg[1] = "* (It's very sour.)" break case "Candy Corn": use_msg[0] = "* (You eat the Candy Corn.)" use_msg[1] = "* (You now know why it was# discarded.)" heal_value = 9 item_type = 1 break case "G. Pear": pp_value = 2 item_type = 1 use_msg[0] = "* (You eat the Golden Pear.)" use_msg[1] = "* (The immense flavor hugs your# tastebuds.)" use_msg[2] = "* ( Overall... Not bad.)" break case "Corn Dog": heal_value = 12 item_type = 1 use_msg[0] = "* (You scarf down the Corn Dog.)" use_msg[1] = "* (You can't help but feel bad# for doing it.)" break case "Patch": use_msg[0] = "* (You are unable to sew the# Patch back on your hat.)" item_type = 0 break case "Feather": item_type = 3 def_value = 2 use_msg[0] = "* (You stick the feather into# your hat.)" use_msg[1] = "* (It gives you a proud feeling.)" break case "G. Bandana": item_type = 3 def_value = 12 use_msg[0] = "* (With a shimmer, you tie the# Golden Bandana around your# neck.)" use_msg[1] = "* (You feel like you can take on# anything now.)" break case "Pebble Ammo": item_type = 2 atk_value = 3 use_msg[0] = "* (You load the pebbles into your# gun.)" use_msg[1] = "* (It feels a little heavier# now.)" break case "Silver Ammo": item_type = 2 atk_value = 2 use_msg[0] = "* (You load the Silver Ammo# into your gun.)" use_msg[1] = "* (The pellets shimmer# in the light.)" break case "Rubber Ammo": item_type = 2 atk_value = 0 use_msg[0] = "* (You load the rubber ammo into# your weapon.)" break case "Glass Ammo": item_type = 2 atk_value = 5 use_msg[0] = "* (You cautiously load the Glass# into your gun.)" use_msg[1] = "* (Phew! No cuts!)" break case "Flint": item_type = 2 atk_value = 9 use_msg[0] = "* (You load the Flint# into your gun.)" use_msg[1] = "* (Might start some fire# with this one!)" break case "Sponge Cake": heal_value = 14 item_type = 1 use_msg[0] = "* (You lick the frosting off of# the sponge.)" use_msg[1] = "* (Your mouth feels squeaky# clean!)" break case "Hndw Coffee": heal_value = 14 item_type = 1 use_msg[0] = "* (You brave the hot Honeydew# Coffee.)" use_msg[1] = "* (You can feel your taste buds# burning off.)" break case "Adult Soda": heal_value = 18 item_type = 1 use_msg[0] = "* (You take a sip out of# the adult soda.)" ...
(argument0, argument1) //gml_Script_scr_item_use
3
{
4
    var item = argument0
5
    var i = argument1
6
    use_msg[0] = "nothing"
7
    var item_type = 1
8
    var heal_value = 0
9
    var pp_value = 0
10
    var sp_value = 0
11
    var rp_value = 0
12
    var def_value = 0
13
    var atk_value = 0
14
    switch item
15
    {
16
        case "Lemonade":
17
            heal_value = 7
18
            item_type = 1
19
            use_msg[0] = "* (You drink the Lemonade.)"
20
            use_msg[1] = "* (It's very sour.)"
21
            break
22
        case "Candy Corn":
23
            use_msg[0] = "* (You eat the Candy Corn.)"
24
            use_msg[1] = "* (You now know why it was#  discarded.)"
25
            heal_value = 9
26
            item_type = 1
27
            break
28
        case "G. Pear":
29
            pp_value = 2
30
            item_type = 1
31
            use_msg[0] = "* (You eat the Golden Pear.)"
32
            use_msg[1] = "* (The immense flavor hugs your#  tastebuds.)"
33
            use_msg[2] = "* ( Overall... Not bad.)"
34
            break
35
        case "Corn Dog":
36
            heal_value = 12
37
            item_type = 1
38
            use_msg[0] = "* (You scarf down the Corn Dog.)"
39
            use_msg[1] = "* (You can't help but feel bad#  for doing it.)"
40
            break
41
        case "Patch":
42
            use_msg[0] = "* (You are unable to sew the#  Patch back on your hat.)"
43
            item_type = 0
44
            break
45
        case "Feather":
46
            item_type = 3
47
            def_value = 2
48
            use_msg[0] = "* (You stick the feather into#  your hat.)"
49
            use_msg[1] = "* (It gives you a proud feeling.)"
50
            break
51
        case "G. Bandana":
52
            item_type = 3
53
            def_value = 12
54
            use_msg[0] = "* (With a shimmer, you tie the#  Golden Bandana around your#  neck.)"
55
            use_msg[1] = "* (You feel like you can take on#  anything now.)"
56
            break
57
        case "Pebble Ammo":
58
            item_type = 2
59
            atk_value = 3
60
            use_msg[0] = "* (You load the pebbles into your#  gun.)"
61
            use_msg[1] = "* (It feels a little heavier#  now.)"
62
            break
63
        case "Silver Ammo":
64
            item_type = 2
65
            atk_value = 2
66
            use_msg[0] = "* (You load the Silver Ammo#  into your gun.)"
67
            use_msg[1] = "* (The pellets shimmer#  in the light.)"
68
            break
69
        case "Rubber Ammo":
70
            item_type = 2
71
            atk_value = 0
72
            use_msg[0] = "* (You load the rubber ammo into#  your weapon.)"
73
            break
74
        case "Glass Ammo":
75
            item_type = 2
76
            atk_value = 5
77
            use_msg[0] = "* (You cautiously load the Glass#  into your gun.)"
78
            use_msg[1] = "* (Phew! No cuts!)"
79
            break
80
        case "Flint":
81
            item_type = 2
82
            atk_value = 9
83
            use_msg[0] = "* (You load the Flint#  into your gun.)"
84
            use_msg[1] = "* (Might start some fire#   with this one!)"
85
            break
86
        case "Sponge Cake":
87
            heal_value = 14
88
            item_type = 1
89
            use_msg[0] = "* (You lick the frosting off of#  the sponge.)"
90
            use_msg[1] = "* (Your mouth feels squeaky#  clean!)"
91
            break
92
        case "Hndw Coffee":
93
            heal_value = 14
94
            item_type = 1
95
            use_msg[0] = "* (You brave the hot Honeydew#  Coffee.)"
96
            use_msg[1] = "* (You can feel your taste buds#  burning off.)"
97
            break
98
        case "Adult Soda":
99
            heal_value = 18
100
            item_type = 1
101
            use_msg[0] = "* (You take a sip out of#  the adult soda.)"
102
            use_msg[1] = "* (...)"
103
            use_msg[2] = "* (Tastes like water.)"
104
            break
105
        case "Hndw Pancake":
106
            heal_value = 16
107
            item_type = 1
108
            use_msg[0] = "* (You eat the pancake.)"
109
            use_msg[1] = "* (The syrup is very sweet!)"
110
            break
111
        case "G.B. Bear":
112
            heal_value = 20
113
            item_type = 1
114
            use_msg[0] = "* (You eat the cookie.)"
115
            use_msg[1] = "* (It feels like it is watching#  you eat it.)"
116
            break
117
        case "Hot Pop":
118
            heal_value = 14
119
            item_type = 1
120
            use_msg[0] = "* (You eat the Hot Chocolate Pop.)"
121
            use_msg[1] = "* (It has the distinct flavor of#  something that was once hot.)"
122
            break
123
        case "Lukewarm Pop":
124
            heal_value = 8
125
            item_type = 1
126
            use_msg[0] = "* (You eat the Lukewarm Chocolate#  Pop.)"
127
            use_msg[1] = "* (It has the distinct flavor of#  something that was once hot#  then left to sit for too long.)"
128
            use_msg[2] = "* (It isn't great.)"
129
            break
130
        case "Cold Pop":
131
            heal_value = 12
132
            item_type = 1
133
            use_msg[0] = "* (You eat the Cold Chocolate Pop.)"
134
            use_msg[1] = "* (It has the distinct flavor only#  possessed by truly cold things.)"
135
            break
136
        case "G. Coffee":
137
            sp_value = 3
138
            item_type = 1
139
            use_msg[0] = "* (You chug the Half N' Half#  Golden Coffee.)"
140
            use_msg[1] = "* (It tastes like... regular#  coffee.)"
141
            break
142
        case "G. Cactus":
143
            rp_value = 3
144
            item_type = 1
145
            use_msg[0] = "* (You take a huge bite out#  of the cactus.)"
146
            use_msg[1] = "* (...)"
147
            use_msg[2] = "* (It bites back.)"
148
            break
149
        case "Packing Peanuts":
150
            heal_value = 10
151
            item_type = 1
152
            use_msg[0] = "* (You eat the Packing Peanuts.)"
153
            use_msg[1] = "* (Aside from the taste, texture,#  and potential health risk,#  they're not that bad.)"
154
            break
155
        case "Trail Mix":
156
            heal_value = 13
157
            item_type = 1
158
            use_msg[0] = "* (You down the bag of Trail Mix.)"
159
            use_msg[1] = "* (All you taste are dried#  grapes.)"
160
            break
161
        case "Ice Tea":
162
            heal_value = 20
163
            item_type = 1
164
            use_msg[0] = "* (You drink the glass of tea.#  It's very watered down.)"
165
            break
166
        case "Green Tea":
167
            heal_value = 21
168
            item_type = 1
169
            use_msg[0] = "* (You drink the Green Tea.#  Tastes toxic.)"
170
            break
171
        case "Sea Tea":
172
            sp_value = 1
173
            item_type = 1
174
            use_msg[0] = "* (You drink the Sea Tea. Your#  SOUL speed increases!)"
175
            break
176
        case "Fruitcake":
177
            heal_value = 25
178
            item_type = 1
179
            use_msg[0] = "* (You scarf down the Fruitcake.#  The Swealterstones burn your#  throat!)"
180
            break
181
        case "Spider Donut":
182
            heal_value = 12
183
            item_type = 1
184
            use_msg[0] = "* (Don't worry, spider didn't.)"
185
            break
186
        case "Icewater":
187
            heal_value = 15
188
            item_type = 1
189
            use_msg[0] = "* (You drink the Icewater.#  Definitely has a taste but you#  can't describe it.)"
190
            break
191
        case "Oasis Latte":
192
            heal_value = 25
193
            item_type = 1
194
            use_msg[0] = "* * (You drink the Latte...)"
195
            break
196
        case "Cnm. Cookie":
197
            heal_value = 35
198
            item_type = 1
199
            use_msg[0] = "* (You eat the cookie...)"
200
            break
201
        case "Root Beer":
202
            heal_value = 18
203
            item_type = 1
204
            use_msg[0] = "* (You down the Root Beer. The#  carbonation tingles!)"
205
            break
206
        case "Feisty Slider":
207
            heal_value = 30
208
            item_type = 1
209
            use_msg[0] = "* (You eat the Feisty Slider.#  Much like the team, its flavor#  is... ambitious.)"
210
            break
211
        case "Gunpowder":
212
            heal_value = clamp((global.max_hp_self - global.current_hp_self), 0, 999)
213
            item_type = 1
214
            use_msg[0] = "* (You put the gunpowder in your#  mouth and nearly choke to#  death.) "
215
            break
216
        case "Moss Salad":
217
            use_msg[0] = "* (You brace yourself and eat#  the Moss Salad.)"
218
            use_msg[1] = "* (The texture can only be#  described as \"insolation#  esque.\")"
219
            heal_value = 17
220
            item_type = 1
221
            break
222
        case "Grassy Fries":
223
            use_msg[0] = "* (You plug your nose and down#  the Grassy Fries.)"
224
            use_msg[1] = "* (Is this what life has really#  come to?)"
225
            heal_value = 14
226
            item_type = 1
227
            break
228
        case "Flower Stew":
229
            use_msg[0] = "* (You make sure Flowey isn't#  watching before trying it.)"
230
            use_msg[1] = "* (Mmm... chunky...)"
231
            heal_value = 20
232
            item_type = 1
233
            break
234
        case "Gravity Granola":
235
            use_msg[0] = "* (You snack on the Gravity#  Granola.)"
236
            use_msg[1] = "* (You can really taste all 9.8#  meters!)"
237
            heal_value = 30
238
            item_type = 1
239
            break
240
        case "Dihydrogen Monoxide":
241
            use_msg[0] = "* (You drink the H2O. Kinda#  tastes like window cleaner...)"
242
            heal_value = 20
243
            item_type = 1
244
            break
245
        case "Popato Chisps":
246
            use_msg[0] = "* (You eat the Popato Chisps.#  The crunch is deafening.)"
247
            heal_value = 13
248
            item_type = 1
249
            break
250
        case "Beef Jerky":
251
            use_msg[0] = "* (You scarf down the Beef#  Jerky.)"
252
            use_msg[1] = "* (What a classic flavor.)"
253
            heal_value = 16
254
            item_type = 1
255
            break
256
        case "Cake":
257
            use_msg[0] = "* (You enjoy several slices of#  cake.)"
258
            use_msg[1] = "* (Delicious!)"
259
            heal_value = 30
260
            item_type = 1
261
            break
262
        case "Floral Cupcake":
263
            use_msg[0] = "* (You enjoy the Floral#  Cupcake.)"
264
            use_msg[1] = "* (What a rich flavor!)"
265
            heal_value = 50
266
            item_type = 1
267
            break
268
        case "Monster Candy":
269
            use_msg[0] = "* (You eat the Monster Candy.)"
270
            use_msg[1] = "* (The taste is faintly#  familiar...)"
271
            heal_value = 10
272
            item_type = 1
273
            break
274
        case "Monster Candy+":
275
            use_msg[0] = "* (You pop the Monster Candy+ in#  your mouth.)"
276
            use_msg[1] = "* (The overwhelming sweetness is#  at war with your taste buds.)"
277
            heal_value = 15
278
            item_type = 1
279
            break
280
        case "C-B Strudel":
281
            use_msg[0] = "* (You savor the C-B Strudel.)"
282
            use_msg[1] = "* (The taste is strangely#  familiar...)"
283
            heal_value = 30
284
            item_type = 1
285
            break
286
        case "Hot Dog":
287
            use_msg[0] = "* (You scarf down the 'dog.)"
288
            use_msg[1] = "* (Mmm, hits the spot!)"
289
            heal_value = 20
290
            item_type = 1
291
            break
292
        case "Corn Chowder":
293
            use_msg[0] = "* (You nervously drink the Corn#  Chowder.)"
294
            use_msg[1] = "* (...Could've been worse.)"
295
            heal_value = 15
296
            item_type = 1
297
            break
298
        case "Wild Revolver":
299
            item_type = 4
300
            use_msg[0] = "* (You equipped the#  " + string(item) + ".)"
301
            break
302
        case "Toy Gun":
303
            item_type = 4
304
            use_msg[0] = "* (You equipped the " + string(item) + ".)"
305
            break
306
        case "Ice Pellets":
307
            item_type = 2
308
            atk_value = 6
309
            use_msg[0] = "* (You load the Ice Pellet Ammo.)"
310
            use_msg[1] = "* (Your gun is now cold to the#  touch.)"
311
            break
312
        case "Cff Bean Ammo":
313
            item_type = 2
314
            atk_value = 4
315
            use_msg[0] = "* (You load the Coffee Beans.)"
316
            use_msg[1] = "* (Your gun now smells delightful.)"
317
            break
318
        case "Super Ammo":
319
            item_type = 2
320
            atk_value = 15
321
            use_msg[0] = "* (You load the Super Ammo.)"
322
            use_msg[1] = "* (Your gun now feels lighter#  than your conscience.)"
323
            break
324
        case "Nails":
325
            item_type = 2
326
            atk_value = 10
327
            use_msg[0] = "* (You load the Nails#  into your gun.)"
328
            break
329
        case "Friendliness Pellets":
330
            item_type = 2
331
            atk_value = 11
332
            use_msg[0] = "* (You load the Friendliness#  Pellets into your gun.)"
333
            break
334
        case "Honeydew Pin":
335
            item_type = 3
336
            def_value = 5
337
            use_msg[0] = "* (You pin the Honeydew pin#  to your hat.)"
338
            break
339
        case "Band Merch Pin":
340
            item_type = 3
341
            def_value = 5
342
            use_msg[0] = "* (You pin the Merch Pin to your#  hat.)"
343
            break
344
        case "Steel Buckle":
345
            item_type = 3
346
            def_value = 7
347
            use_msg[0] = "* (You attach the Steel Buckle#  to your belt.)"
348
            use_msg[1] = "* (Your pants feel sturdier than#  ever!)"
349
            break
350
        case "Safety Jacket":
351
            item_type = 3
352
            def_value = 6
353
            use_msg[0] = "* (You don the stunning#  highlighter yellow jacket.)"
354
            use_msg[1] = "* (You're all ready to take care#  of business!)"
355
            break
356
        case "Fancy Holster":
357
            item_type = 3
358
            def_value = 7
359
            use_msg[0] = "* (You proudly equip the Fancy#  Holster.)"
360
            use_msg[1] = "* (You're ready for anything#  now!)"
361
            break
362
        case "Golden Scarf":
363
            item_type = 3
364
            def_value = 25
365
            use_msg[0] = "* (You put the Golden Scarf on.#* Your tremendous taste for fashion#  makes monsters go easy on you.)"
366
            break
367
        case "Safety Goggles":
368
            item_type = 3
369
            def_value = 8
370
            use_msg[0] = "* (You wrap the Safety Goggles#  around your hat.)"
371
            use_msg[1] = "* (It looks like it has eyes#  now.)"
372
            break
373
        case "Delta Rune Patch":
374
            item_type = 3
375
            def_value = 10
376
            use_msg[0] = "* (You attach the Patch to your#  vest and begin to feel#  something.)"
377
            use_msg[1] = "* (The unwavering hopes and#  dreams of Monsterkind.)"
378
            break
379
        case "Silver Scarf":
380
            item_type = 3
381
            def_value = 6
382
            use_msg[0] = "* (You wrap the Silver Scarf#  around your neck.)"
383
            use_msg[1] = "* (So cozy!)"
384
            break
385
        case "Missing Poster":
386
        case "Necklace":
387
            item_type = 0
388
            use_msg[0] = "* (You cannot use this item.)"
389
            break
390
        case "Lukewarm Coffee":
391
            item_type = 0
392
            use_msg[0] = "* Better not drink it."
393
            use_msg[1] = "* (You could get hotter coffee#  elsewhere.)"
394
            break
395
        case "Soggy Mitten":
396
        case "Pickaxe":
397
            item_type = 0
398
            use_msg[0] = "* (You can't think of a possible#  use for it.)"
399
            break
400
        case "Matches":
401
            item_type = 0
402
            use_msg[0] = "* (You aren't sure how to safely#  start a fire with these.)"
403
            use_msg[1] = "* (They'd probably work in an#  emergency.)"
404
            break
405
        case "Snowdin Map":
406
            item_type = 0
407
            use_msg[0] = "* (It's accuracy seems#  compromised.)"
408
            use_msg[1] = "* (You aren't sure how to use#  it.)"
409
            break
410
        case "Videotape":
411
            item_type = 0
412
            use_msg[0] = "* (You can't think of a use for#  this.)"
413
            break
414
        case "H. Acid":
415
            item_type = 0
416
            instance_create_depth(0, 0, -100, obj_steamworks_05_acid_ending)
417
            instance_destroy()
418
            break
419
    }
420
421
    if (item_type == 1)
422
    {
423
        global.item_slot[i] = "Nothing"
424
        if (heal_value > 0)
425
        {
426
            global.current_hp_self += heal_value
427
            global.current_hp_self = clamp(global.current_hp_self, 0, global.max_hp_self)
428
            audio_play_sound(snd_heal, 1, 0)
429
        }
430
        else if (pp_value > 0)
431
        {
432
            global.current_pp_self += pp_value
433
            global.current_pp_self = clamp(global.current_pp_self, 0, global.max_pp_self)
434
            audio_play_sound(snd_fanpear, 1, 0)
435
        }
436
        else if (sp_value > 0)
437
        {
438
            global.current_sp_self += sp_value
439
            global.current_sp_self = clamp(global.current_sp_self, 0, global.max_sp_self)
440
            if (argument0 == "Sea Tea")
441
            {
442
                global.current_hp_self += 10
443
                global.current_hp_self = clamp(global.current_hp_self, 0, global.max_hp_self)
444
            }
445
            audio_play_sound(snd_fanpear, 1, 0)
446
        }
447
        else if (rp_value > 0)
448
        {
449
            global.current_rp_self += rp_value
450
            instance_create(0, 0, obj_cactus_damager)
451
            scr_screenshake
scr_screenshake

function scr_screenshake(argument0, argument1) //gml_Script_scr_screenshake { if instance_exists(obj_screenshake_player) return; with (instance_create(__view_get((9 << 0), 0).x, __view_get((9 << 0), 0).y, obj_screenshake_player)) { alarm[0] intensity = argument1 } }
(12, 6)
452
        }
453
        if (use_msg[0] != "nothing")
454
        {
455
            scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
456
            with (msg)
457
            {
458
                var msg_number = array_length_1d(use_msg)
459
                if (global.route == 3)
460
                    msg_number = 0
461
                else
462
                {
463
                    for (i = 0; i < msg_number; i++)
464
                        message[i] = use_msg[i]
465
                }
466
                if (heal_value > 0)
467
                {
468
                    message[msg_number] = "* Healed " + string(heal_value) + " HP!"
469
                    if (global.current_hp_self >= global.max_hp_self)
470
                        message[msg_number] = "* HP maxed out."
471
                }
472
                else if (pp_value > 0)
473
                {
474
                    message[msg_number] = "* You gained " + string(pp_value) + " PP!"
475
                    if (global.current_pp_self >= global.max_pp_self)
476
                        message[msg_number] = "* PP maxed out."
477
                }
478
                else if (sp_value > 0)
479
                {
480
                    message[msg_number] = "* You gained " + string(sp_value) + " SP!"
481
                    if (global.current_sp_self >= global.max_sp_self)
482
                        message[msg_number] = "* SP maxed out."
483
                }
484
                else if (rp_value > 0)
485
                {
486
                    message[msg_number] = "* You will heal for " + string(rp_value) + "#  turns!"
487
                    if (global.current_rp_self >= global.max_rp_self)
488
                        message[msg_number] = "* RP maxed out."
489
                }
490
            }
491
        }
492
    }
493
    if (item_type == 2)
494
    {
495
        global.item_slot[i] = global.player_weapon_modifier
496
        global.player_weapon_modifier = item
497
        audio_play_sound(snd_equip_armor, 1, 0)
498
        global.player_weapon_modifier_attack = script_execute(gml_Script_scr_determine_weapon_modifier_attack)
499
    }
500
    if (item_type == 3)
501
    {
502
        global.item_slot[i] = global.player_armor_modifier
503
        global.player_armor_modifier = item
504
        audio_play_sound(snd_equip_armor, 1, 0)
505
        global.player_armor_modifier_defense = script_execute(gml_Script_scr_determine_armor_modifier_defense)
506
    }
507
    if (item_type == 4)
508
    {
509
        global.item_slot[i] = global.player_weapon
510
        global.player_weapon = item
511
        global.player_weapon_attack = script_execute(gml_Script_scr_determine_weapon_attack)
512
        audio_play_sound(snd_equip_armor, 1, 0)
513
    }
514
    if (item_type != 1)
515
    {
516
        if (use_msg[0] != "nothing")
517
        {
518
            scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
519
            with (msg)
520
            {
521
                msg_number = array_length_1d(use_msg)
522
                for (i = 0; i < msg_number; i++)
523
                    message[i] = use_msg[i]
524
            }
525
        }
526
    }
527
    if (item_type != 0)
528
    {
529
        for (var n = 1; n < 8; n++)
530
        {
531
            if (global.item_slot[n] == "Nothing" && global.item_slot[(n + 1)] != "Nothing")
532
            {
533
                global.item_slot[n] = global.item_slot[(n + 1)]
534
                global.item_slot[(n + 1)] = "Nothing"
535
                n = 1
536
            }
537
        }
538
    }
539
}