-
Notifications
You must be signed in to change notification settings - Fork 7
/
jareth.ds
1810 lines (1665 loc) · 84.6 KB
/
jareth.ds
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
DS
// Jareth's Labyrinth - A script file for Daedalus 3.5
// By Walter D. Pullen, [email protected], http://www.astrolog.org/labyrnth.htm
// This is fanfiction: Labyrinth and all Labyrinth characters are Copyright (c) Jim Henson Company
// Created: December 20, 2023 - September 11, 2024
// Variable usage:
// a: Ralph leads to the castle? (0-1)
// b: Stepped in bog? (0-1)
// c: Cleaners horizontal coordinate
// d: Dead? (0-1)
// e: In endless passageway? (0-1)
// f: Map mode (0-1)
// g: Goblins tormenting Ludo (0-4)
// h: Humongous status (0-5)
// i: Temporary index
// j: Jareth status (0-3)
// k: Right knocker turns held breath (0-3)
// l: Temporary for walls impassable (0-1)
// m-n: Coordinates
// o: Helping Hands status (0-4)
// p: Worm & endless passage column part 1 (1-255)
// q: Worm & endless passage column part 2 (135-137)
// r: Temporary for Escher room availability
// s: Secret wall panel strength (0-3)
// t: Time left in seconds (0-46800)
// u: Debug mode (0-1)
// v-z: Temporary variables
// Custom variable prefixes:
// F: Macro (function for user command)
// K: Color
// M: Bitmap (texture that gets displayed)
// S: Setting (user visible)
// T: Setting (chat timing)
// V: Macro (event)
// Bitmap usage:
// -1: Mono = Where objects are, Color = Color of objects
// -2: Color = Color of ground marking
// -3: Mono = Where semitransparency is, Color = Map index
// 0: Color = Wall side textures
// 1: Mono = Where variable height walls are, Color = Variable wall heights
// 2: Color = Ground elevations
// 3: Color = Wall top textures
// 4: Color = Ground textures
// 5: Color = Ground elevation textures
// 6: Color = Map
// Sections: outside (Hoggle/Worm), brick (Alph & Ralph/Oubliette), hedge (Ludo/Knockers), forest (Fireys/Bog), plains (Junk Lady), city (Humongous/Goblins), castle (Escher/Jareth)
If Lt Version 3500 {Message 'This script requires Daedalus 3.5 or later to run.' Halt}
fRedrawWhenBitmapEdited False ResetProgram WindowTitle "- Jareth's Labyrinth" True nHorizontalScroll 8 nVerticalScroll 8 fHideMenu True fHideScrollbars True fSkipMessageDisplay True
SetString 0 "1 FHelp FStart FChat FAction FClimbU FClimbD FRest FMap FMark FUnmark FLookU FLookD FLook FUp FDown FLeft FRight FUp2 FDown2 FLeft2 FRight2 FRise FLower VInside VEdge VMove VMoved VFollow VMouseL VMouseR VMouseV Wait Wait1 Wait2 Facing Climb Clean Switch Tunnel Humo EschW EschW2 EschC ChatH ChatW ChatA ChatHH ChatB IntP ChatWM ChatN ChatL ChatKL ChatKR ChatKR2 IntKR ChatF ChatD ChatHU IntHU ChatJL ChatJ Day0 Day1 Day2 Day3 Day4 Day5 Day6 " // Macros
AppendString 0 "20 MBrick MBrick2 MBrickX MBrickY MBrickZ MObel MObel2 MHedge MHedgeX MHedgeY MHedgeZ MArch MWood MWoodX MWoodY MWoodZ MDoor MDoor2 MTree MTree2 MWall MWall2 MWallX MWallY MHogg MFairy MWorm MAlph MRalph MHand MDeath MBench MBench2 MWarn +8 MBegg MBegg2 MClean MPanel MBars MWise MNipp MLudo MLudo1 MKnockL MKnockR MKnockR2 MFire MDidy MJunk MJunk2 MSlee MHumo +3 MHumo2 +3 MHumo3 +3 MGobl MJare MLadder MLadder2 MBog MArrow +4 MEsch +16 MEschX MEschY MEschW +16 MEschW2 +12 MEschE +2" // Bitmaps
AppendString 0 "10 ZWarn +8" // Strings
AppendString 0 "27 KSky +6 KGrd +6 KMtn +6 KCld +6 KFog +6 Day SMist XPrev YPrev TChatH TChatW TChatA TChatHH TChatB TChatWM TChatN TChatL TChatKL TChatKR TChatKR2 TIntKR TChatF TChatD TChatJL TChatJ" // Variables
DefineConst $0 If @z {Message 'Initialization failed!' Halt}
// ///////////// //
// Main Commands //
// ///////////// //
EmbedMacro %FHelp "Help Text"
Message "Welcome to Jareth's Labyrinth! :-)\n\nBefore you is a giant Maze. You have 13 hours in which to solve the Labyrinth, and face Jareth at its center.\n\nF1: Display this help text (shortcut: '?')\nF2: Restart Labyrinth from beginning (shortcut: '~')\nF3: Chat with whoever's in front of you (shortcut: 'q')\nF4: Physically interact with what's in front of you (shortcut: 'e')\n\nF5: Climb up (shortcut: 'u')\nF6: Climb down (shortcut 'j')\nF7: Rest in place (shortcut: 'z')\nF8: Toggle map view (shortcut: 'i')\n\nF9: Mark your path (shortcut: 'f')\nF10: Unmark your path (shortcut: 'v')\nF11: Tilt view down (shortcut: '[')\nF12: Tilt view up (shortcut: ']')\n\nUse arrow keys or 'w/a/s/d' keys to move and rotate.\nUse Shift+left/right arrow or 'x/c' keys to sidestep."
EmbedMacro %FStart "Restart Maze"
OpenScript2 "jareth.ds"
EmbedMacro %FChat "Chat"
If @d {$9 "You are dead and can't chat anymore." Spc @z True Return}
fRedrawWhenBitmapEdited False
$9 "There is nobody here to chat with."
*Facing
If Equ @z %MHogg {*ChatH}
If Equ @z %MFairy {$9 "Ouch, the fairy bites you!"}
If Equ @w %MWorm {*ChatW}
If Tween @w %MAlph %MRalph {*ChatA}
If And And Equ nX Sub 129 Mul @a 2 Equ nY 29 Gte @o 1 {*ChatHH}
If And Equ @v %MHand Lte nViewHeight 0 {$9 "The Helping Hands say: Would you like us to take you back up the shaft?"}
If Tween @v %MWarn Add %MWarn 7 {@v Add %ZWarn Sub @v %MWarn SetString 9 "The face in the wall says: $v"}
If Tween @v %MBegg %MBegg2 {*ChatB}
If Equ @z %MWise {*ChatWM}
If Equ @z %MNipp {*ChatN}
If Equ @z %MLudo1 {$9 "Ludo is tied hanging upside down from a tree and is too distracted to chat."}
If Equ @z %MLudo {*ChatL}
If Equ @w %MKnockL {*ChatKL}
If Equ @w %MKnockR {*ChatKR}
If Equ @w %MKnockR2 {*ChatKR2}
If Equ @z %MFire {*ChatF}
If And Equ @z %MDidy GetE @m @n {*ChatD}
If Equ @z %MJunk {*ChatJL}
If Equ @z %MSlee {$9 "The Goblin Guard is asleep and snoring, so doesn't notice you."}
If And Tween @w %MHumo Add %MHumo3 2 Get nX Dec nY {*ChatHU}
If Equ @z %MGobl {$9 "Goblin Guard says: Now we have you!"}
If And Equ @z %MJare Equ @j 1 {*ChatJ}
*Wait
If Equ @j 2 {@x 129 @y 127 SetCA 2 @x @y 2800 SetCA 1 @x @y UD 3850 3880 SetC @x @y Gray SetE @x @y Off}
fRedrawWhenBitmapEdited True n
If Equ @j 2 {fPauseTimer True @j 3 @z Mod @t 60 @y Mod Div @t 60 60 @x Mod Div @t 3600 60 Message "Congratulations, you defeated Jareth! :-) He turns into an owl and flies away. You solved Jareth's Labyrinth with @x hours, @y minutes, and @z seconds left."}
@z True
EmbedMacro %FAction "Take Action"
If @d {$9 "You are dead and can't interact anymore." Spc @z True Return}
fRedrawWhenBitmapEdited False
$9 "There is nothing here to interact with."
*Facing
If Equ @z %MHogg {$9 "Hoggle says: Hands off me jewels!"}
If Equ @z %MFairy {$9 "You shoo the fairy away." SetE @m @n Off SetY @m @n -1 0}
If Equ @w %MWorm {$9 "You have a nice cup of tea with the Worm. The teacup is quite small though!"}
If And Tween @w %MAlph %MRalph Get @x @y {IfElse Lt @TChatA 10 ($9 "You should chat with the guards first before opening a door.") ($9 "You open the door behind the guard." Set @x @y Off SetCE @x @y Black Set 127 24 Off SetCE 127 24 Black)}
If And And Equ nX Sub 129 Mul @a 2 Equ nY 29 Gte @o 1 {$9 "You can't do anything because you're being held by numerous hands!"}
If And Equ @v %MHand Lte nViewHeight 0 {$9 "The Helping Hands give you a high five."}
If Equ @v %MBench {$9 "You lift the bench up so it's against the wall. Underneath the bench is a doorknob." SetCA 5 126 33 UD 0 %MBench2}
If Equ @v %MBench2 {$9 "You open the door formed by the bench. Behind is a passageway!" SetCT 126 33 DkGray SetCA 1 126 33 UD 512 256 SetCA 2 126 33 0 SetC 125 33 LtGray}
If Tween @v %MWarn Add %MWarn 7 {$9 "The face in the wall is made out of rock, so can't be harmed."}
If Equ @v %MBegg {$9 "The beggar chuckles as you try to give him something."}
If Equ @w %MBars {$9 "The bars are firm and can't be bent or broken."}
If Equ @v %MPanel {*IntP}
If Equ @z %MWise {$9 "The Wiseman's Hat says: Talk to us if you want any help!"}
If Equ @z %MNipp {$9 "You knock the goblin's helmet visor down, and he runs off in confusion." SetE @m @n Off SetY @m @n -1 0 @g Dec @g}
If Equ @z %MLudo1 {IfElse Gt @g 0 ($9 "You can't help Ludo yet because goblins are still present.") ($9 "You untie the rope hanging Ludo from the tree, and he falls to the ground." SetY @m @n -1 %MLudo @x GetCA 1 @m @n SetCA 1 @m @n UD Sub UdU @x 50 Sub UdD @x 50)}
If Equ @z %MLudo {$9 "You give Ludo a hug, and he hugs you back so hard he almost squishes you!"}
If Equ @w %MKnockL {$9 "You use the knocker to knock on the door. It opens!" Set @x @y Off SetCE @x @y Black}
If Or Equ @w %MKnockR Equ @w %MKnockR2 {*IntKR}
If Equ @z %MFire {$9 "You grab the Firey's head and throw it! The Firey runs off to retrieve it." SetE @m @n Off SetY @m @n -1 0 If Lt @TChatF 10 (@TChatF 10)}
If And Equ @z %MDidy GetE @m @n {$9 "Sir Didymus expertly parries your clumsy attempt to attack him!"}
If Equ @z %MJunk {$9 "The Junk Lady looks happy that she's distracting you from proceeding to the castle."}
If Equ @z %MJunk2 {$9 "You clear away the pile of junk." SetE @m @n Off SetY @m @n -1 0}
If Equ @z %MSlee {$9 "You should be quiet so as to not awake the guard."}
If And And Equ nY 151 Tween nX 127 129 Equ nDir 0 {$9 "You open the gate to Goblin City." For (x) 127 129 (Set @x 150 Off SetCE @x 150 Black)}
If And And Equ nY 149 Tween nX 127 129 Equ nDir 2 {$9 "The outer gate to Goblin City is locked and can't be opened yet."}
If Tween @w %MHumo Add %MHumo3 2 {*IntHU}
If Equ @z %MGobl {$9 "Your attack bounces off the goblin guard's armor."}
If Equ @w %MDoor {$9 "You open the door to the castle." For (x) 127 129 (SetCA 1 @x 134 UD UdU GetCA 1 @x 134 3200 SetY @x 134 -1 0)}
If Or And Equ @z %MJare Equ @j 1 Equ @v %MBegg2 {$9 "Jareth raises one elegant eyebrow at your feeble attempt to attack him."}
*Wait
fRedrawWhenBitmapEdited True n
@z True
EmbedMacro %FClimbU "Climb Up"
@w 98 $9 "" @z True
If And Equ nX 129 Equ nY 81 {nDir 3 8 *Wait @z True Return}
If And Equ nX 163 Equ nY 173 {nDir 2 8 *Wait @z True Return}
If And Equ nX 127 Equ nY 145 {nDir 1 8 *Wait @z True Return}
If And Equ nX 129 Equ nY 145 {nDir 3 8 *Wait @z True Return}
If And And @e Equ nX Sub 129 Mul @a 2 Equ nY 29 {*Switch @o 2}
If Equ @o 2 {$9 "You tell the Helping Hands to take you up. The trap door closes when you reach the top." SetCA 2 nX nY 900 @o 0 @w Sub 351 nViewHeight @z False}
If And And Equ nX 129 Equ nY 51 Equ nViewHeight 0 {$9 "You climb up the ladder." While (And @e Tween @c 72 142) (*Clean) If @e (*Switch) @w 449 @z False}
If And And Tween nX 127 129 Equ nY 147 Equ nViewHeight 984 {$9 "You climb up Humongous' body to his head." @z False}
If And And Equ nX 125 Equ nY 123 Equ nViewHeight 1387 {@w 128 @z False}
*EschC If Gte @v 0 {@v Mod Div @v 10 10 If Equ @v 0 ($9 "There is no ladder above you. You fall to the floor." @w Sub 1093 nViewHeight fRedrawWhenBitmapEdited False *Climb *Wait fRedrawWhenBitmapEdited True @z True Return) If Equ @v 1 (@z False)}
If @z {$9 "You can't climb up here." Spc Return}
fRedrawWhenBitmapEdited False
*Climb
If And Equ @w 128 Equ @j 0 {@j 1 @x 129 @y 127 SetCA 2 @x @y 3880 SetCA 1 @x @y UD 4095 3880 SetC @x @y Blue SetE @x @y On SetCA 4 @x @y 0 nClippingPlane 300 Spc}
*Wait
fRedrawWhenBitmapEdited True
@z True
EmbedMacro %FClimbD "Climb Down"
@w 98 $9 "" @z True
If And Equ nX 131 Equ nY 81 {nDir 1 8 *Wait @z True Return}
If And Equ nX 163 Equ nY 175 {nDir 0 8 *Wait @z True Return}
If And Equ nX 125 Equ nY 145 {nDir 3 8 *Wait @z True Return}
If And Equ nX 131 Equ nY 145 {nDir 1 8 *Wait @z True Return}
If And Equ @o 2 Gt nViewHeight 0 {$9 "You tell the Helping Hands to take you down." @o 3 @w nViewHeight @z False}
If Equ @o 1 {$9 "A trap door opens beneath you, containing a shaft of hands." @o 2 @w Sub nViewHeight 175 @z False}
If Equ @o 4 {$9 "A trap door opens beneath you, containing a pit of deadly spikes." @o 5 @d True @w nViewHeight @z False}
If And And Equ nX 129 Equ nY 51 Equ nViewHeight 449 {$9 "You climb down the ladder." @w nViewHeight @z False}
If And And Tween nX 127 129 Equ nY 147 Equ nViewHeight 1082 {$9 "You climb down Humongous' body to his feet." @z False}
If And And Equ nX 125 Equ nY 123 Equ nViewHeight 1515 {@w 128 @z False}
*EschC If Gte @v 0 {@v Mod @v 10 If Equ @v 0 ($9 "There is no ladder below you. You fall to the floor." @w Sub nViewHeight 1093 @z False) If Equ @v 1 (@z False)}
If @z {$9 "You can't climb down here." Spc Return}
fRedrawWhenBitmapEdited False
If And Equ @w 128 Equ @j 1 {@j 0 @x 129 @y 127 SetCA 2 @x @y 2800 SetCA 1 @x @y UD 3850 3880 SetC @x @y Gray SetE @x @y Off SetCA 4 @x @y Add %MEsch 15 nClippingPlane 150 Spc}
@w Neg @w *Climb
If And And Equ nViewHeight 0 Equ nX 129 Equ nY 51 {*Switch Spc}
If Equ @o 3 {*Switch @o 0 Spc}
*Wait
fRedrawWhenBitmapEdited True
@z True
EmbedMacro %FRest "Rest in Place"
$9 "You rest in place."
*Wait
@z True
EmbedMacro %FMap "Toggle Map"
If @e {$9 "This part of the Labyrinth isn't on any map." Spc @z True Return}
@f Not @f
fRedrawWhenBitmapEdited False
SwapTexture -1 6
i
fRedrawWhenBitmapEdited True n
@z True
EmbedMacro %FMark "Mark Path"
@z GetCE nX nY If Or Equ @z Blue Equ @z Brown {$9 "You can't mark while on liquid." *Wait @z True Return}
@w Or Or Or Equ GetCE nX Dec nY Red Equ GetCE Dec nX nY Red Equ GetCE nX Inc nY Red Equ GetCE Inc nX nY Red
If And @w Rnd 0 1 {$9 "You try to mark your path with an arrow, but the brick gets flipped over." *Wait @z True Return}
@z nDir
IfElse @w
{$9 "You try to mark your path with an arrow, but the brick gets rotated." @z And Add @z Dec Mul Rnd 0 1 2 3}
{$9 "You mark your path with an arrow."}
@z Add %MArrow @z
SetCA 3 nX nY UD @z UdD GetCA 3 nX nY
SetCA 4 nX nY @z
*Wait
@z True
EmbedMacro %FUnmark "Unmark Path"
@z GetCE nX nY If Or Equ @z Blue Equ @z Brown {$9 "There are no marks on liquid." *Wait @z True Return}
$9 "You rub out any marks on your path."
SetCA 3 nX nY UD 0 UdD GetCA 3 nX nY
SetCA 4 nX nY 0
*Wait
@z True
EmbedMacro %FLookU "Look Up"
@z True
If Lte nHorizon -7000 {Return}
nHorizon Max Sub nHorizon 500 -7000
EmbedMacro %FLookD "Look Down"
@z True
If Gte nHorizon 7000 {Return}
nHorizon Min Add nHorizon 500 7000
EmbedMacro %FLook "Look Center"
$9 ""
nHorizon 0
@z True
DefineMacro %FUp "8 @z True" "Move Forward"
DefineMacro %FDown "2 @z True" "Move Backward"
DefineMacro %FLeft "4 @z True" "Rotate Left"
DefineMacro %FRight "6 @z True" "Rotate Right"
DefineMacro %FUp2 "If Or Not @f @u {*} @z True" "Follow Forward"
DefineMacro %FDown2 "If Or Not @f @u {@} @z True" "Follow Backward"
DefineMacro %FLeft2 "If Or Not @f @u {$} @z True" "Sidestep Left"
DefineMacro %FRight2 "If Or Not @f @u {^} @z True" "Sidestep Right"
DefineMacro %FRise "If @u {u} @z True" "Rise Up"
DefineMacro %FLower "If @u {d} @z True" "Lower Down"
// ////// //
// Events //
// ////// //
EmbedMacro %VInside "Inside Event"
Local 'vwxyz'
If NeqStr $9 "" {MessageInside $9 0}
If @b {MessageInside "You SMELL BAD!" -2}
If @d {MessageInside "Time Left: YOU ARE DEAD" -1 Return}
If Gte @j 2 {MessageInside "Time Left: IT'S ONLY FOREVER" -1 Return}
If Lte @t 0 {MessageInside "Time Left: NONE" -1 Return}
@v Div @t 3600 @w Mod Div @t 60 60 @y Mod @t 60
@x Mod @w 10 @w Div @w 10
@z Mod @y 10 @y Div @y 10
MessageInside "Time Left: @v:@w@x:@y@z" -1
EmbedMacro %VEdge "Edge Event"
@z True
EmbedMacro %VMove "Move Event"
If And And And And @e Equ Mod nX 20 Mod @p 20 Equ nY 235 Equ @y 233 Equ nDir 0 {nX @q *Switch 8 nEdgeBehavior 0 @z True Return}
If Or Or Equ GetCE @x @y Cyan GetE @x @y Equ @o 2 {@z True Return}
@z GetCE Div Add nX @x 2 Div Add nY @y 2
If And fWallsImpassable Or Or Or Or Or Or Equ @z Red Equ @z Green Equ @z Yellow Equ @z Maize Equ @z LtGray Equ @z Magenta Equ @z Purple {@z True Return}
If @d {$9 "You are dead and can't move anymore." Spc @z True Return}
If And And @e Equ GetC nX nY LtGray Neq GetC @x @y LtGray {@z True Return}
If And And And @e Equ nX 91 Equ nY 47 Gt GetCA 5 91 48 0 {IfElse Lt @TChatB 2 ($0 "The beggar") ($0 "Jareth") SetString 9 "$0's compelling presence holds you in place." Spc @z True Return}
If Or Or Or
And Or And Tween @x 125 131 Or Equ @y 123 Equ @y 129 And Tween @y 123 129 Or Equ @x 125 Equ @x 131 Neq nViewHeight 1402
And Equ nViewHeight 1387 Neq @x 133
And Equ @x 129 Equ @y 51
And And Equ nX 129 Equ nY 51 Equ nViewHeight 449
{@l fWallsImpassable fWallsImpassable False}
If And And And And Not @e Tween nX 127 129 Equ nY 237 Tween @x 127 129 Equ @y 235 {*Switch}
*EschC @r @v @XPrev nX @YPrev nY
$9 ""
*Wait1
@z False
EmbedMacro %VMoved "After Move Event"
fRedrawWhenBitmapEdited False
If And And @e Tween nX 127 129 Equ nY 237 {*Switch Spc}
If And And @e Or Equ nX 123 Equ nX 133 Equ nY 235 {nEdgeBehavior 0}
If And And @e Or Equ nX 121 Equ nX 135 Equ nY 235 {nEdgeBehavior 2}
If And And @e Equ nX @p Equ nY 235 {$9 "You hear a voice say: 'Allo!'" Spc}
If And And @e Lte nX 1 Equ nY 235 {nX 93 Spc}
If And And @e Gte nX 255 Equ nY 235 {nX 159 Spc}
If And And Not @e Equ nX @q Equ nY 235 {nX @p *Switch nEdgeBehavior 2 Spc}
@m Sub 129 Mul @a 2 @n 29 If And And Not @e Equ nX @m Equ nY @n {@o 1 SetCA 2 @m @n 0 *FClimbD}
@m Add 127 Mul @a 2 @n 29 If And And Not @e Equ nX @m Equ nY @n {@o 4 SetCA 2 @m @n 0 *FClimbD}
@z False
If And And @e Equ nX 123 Equ nY 33 {@z Add %ZWarn 0}
If And And @e Equ nX 119 Equ nY 33 {@z Add %ZWarn 1}
If And And @e Equ nX 115 Equ nY 35 {@z Add %ZWarn 2}
If And And @e Equ nX 111 Equ nY 37 {@z Add %ZWarn 3}
If And And @e Equ nX 107 Equ nY 37 {@z Add %ZWarn 4}
If And And @e Equ nX 103 Equ nY 39 {@z Add %ZWarn 5}
If And And @e Equ nX 99 Equ nY 41 {@z Add %ZWarn 6}
If And And @e Equ nX 95 Equ nY 41 {@z Add %ZWarn 7}
If @z {SetString 9 "A face in the wall says: $z" Spc}
If And Not @d Equ GetCA 5 Dec nX nY UD %MClean %MClean {$9 "You walk into the deadly Cleaners, which chop you into pieces!" @d True Spc}
@z False
If And And And Equ nX 125 Equ nY 45 Not @e Neq nDir 3 {nX 131 nY 53 Spc @z True}
If And And And Equ nX 123 Equ nY 51 Not @e Neq nDir 0 {nX 131 nY 45 Spc @z True}
If And And And Equ nX 129 Equ nY 53 Not @e Neq nDir 1 {nX 123 nY 45 Spc @z True}
If And And And Equ nX 131 Equ nY 47 Not @e Neq nDir 2 {nX 123 nY 53 Spc @z True}
If @z {$9 "You feel like you've been here before." Spc}
If Equ GetCE nX nY Brown {$9 "Oh no! You step in the Bog of Eternal Stench!" @b True Spc}
If And Neq GetCE nX nY Brown Or Or Or Equ GetCE nX Sub nY 2 Brown Equ GetCE Sub nX 2 nY Brown Equ GetCE nX Add nY 2 Brown Equ GetCE Add nX 2 nY Brown {$9 "Something nearby smells absolutely horrible!" Spc}
If And Lte @h 0 And Tween nX 127 129 Equ nY 149 {$9 "The outer gate slams shut behind you and locks itself!" For (x) 127 129 (Set @x 150 On SetCE @x 150 LtGray) Spc @h 1}
If And Equ @h 1 And Tween nX 125 131 Equ nY 147 {$9 "The inner gate closes in front of you, revealing a humongous guard!" For (x) 127 129 (Set @x 146 On SetCE @x 146 Maize) Spc @h 2}
If Equ GetCE nX nY Blue {$9 "Splash! You step in a pool of water." Spc}
@z Add ?: Gte nY @YPrev 2 0 Sgn Sub nX @XPrev
@v @r If Gte @v 0 {@v Mod Div @v Pow 10 Sub 5 @z 10 If Equ @v 0 ($9 "There is no ladder next to you. You fall to the floor." @w Sub 1093 nViewHeight *Climb)}
*Wait2
fWallsImpassable @l
fRedrawWhenBitmapEdited True
EmbedMacro %VFollow "Follow Event"
*Wait
@z Or Or Or Or Equ GetCE nX Dec nY DkGreen Equ GetCE Dec nX nY DkGreen Equ GetCE nX Inc nY DkGreen Equ GetCE Inc nX nY DkGreen Lte nViewHeight 0
EmbedMacro %VMouseL "Left Mouse Click"
@z Not @u
EmbedMacro %VMouseR "Right Mouse Click"
@z True
EmbedMacro %VMouseV "On Mouse Move"
@z True
// ////////////// //
// Other Routines //
// ////////////// //
EmbedMacro %Wait "Advance Time"
*Wait1
*Wait2
EmbedMacro %Wait1 "Advance Time Part 1"
fRedrawWhenBitmapEdited False
@t Sub @t 10
*Day0
MoveCloud -1 30000
fRedrawWhenBitmapEdited True
EmbedMacro %Wait2 "Advance Time Part 2"
fRedrawWhenBitmapEdited False
If And Not @d Tween @c 72 142 {*Clean}
If And Not @d Equ GetCA 5 Dec nX nY UD %MClean %MClean {$9 "The deadly Cleaners advance and chop you into pieces!" @d True}
fRedrawWhenBitmapEdited True Spc
If And And Not @d Equ @t 0 Lt @j 2 {Message "You're out of time! :-( 13 hours have passed, and you failed to solve Jareth's Labyrinth!"}
EmbedMacro %Facing "Facing Textures"
@x Add nX ?: Odd nDir Sub nDir 2 0
@y Add nY ?: Odd nDir 0 Dec nDir
@w GetCA 0 @x @y
@w ?: Lt nDir 2 UdD @w UdU @w
@m Add nX Mul Sub @x nX 2
@n Add nY Mul Sub @y nY 2
@z GetCA 0 @m @n
@z ?: Lt nDir 2 UdD @z UdU @z
@v GetCA 5 @x @y
@v ?: Lt nDir 2 UdD @v UdU @v
EmbedMacro %Climb "Climb Animation"
@v nViewHeight
For (y) 1 nUpDownFrames {nViewHeight Add @v Div Mul @y @w nUpDownFrames Spc}
EmbedMacro %Clean "Advance Cleaners"
fRedrawWhenBitmapEdited False
If EquStr $9 "" ($9 "You hear the deadly Cleaners advance!")
If Gt @c 72 (SetCA 2 @c 47 0)
SetCA 5 @c 47 0 @c Add @c 2 SetCA 2 @c 47 512
If Lt @c 144 (SetCA 5 @c 47 UD %MClean %MClean)
If GetE @c 47 (SetE @c 47 Off SetCA 1 @c 47 UD 512 256 SetC Inc @c 47 LtGray)
fRedrawWhenBitmapEdited True
EmbedMacro %Switch "Switch Environment"
If And @f Not @e {*FMap}
@z fRedrawWhenBitmapEdited fRedrawWhenBitmapEdited False
@e Not @e
For (i) 0 5 {SwapTexture Add 10 @i @i SwapMask Add 10 @i @i}
For (i) -3 -1 {SwapTexture Add 19 @i @i SwapMask Add 19 @i @i}
fRedrawWhenBitmapEdited @z
EmbedMacro %Tunnel "Make Tunnel"
Set @x @y On SetE @x @y Off SetC @x @y LtGray SetCT @x @y DkGray SetCE @x @y Black
SetCA 1 @x @y UD 512 256 SetCA 2 @x @y 0
SetCA 3 @x @y 0
EmbedMacro %Humo "Make Humongous"
Thicken2 6 = FlipHorizontal TempOr cDel
= Del Turtle "BM37,12S3T_HUMONGOUS_" Thicken Thicken cDel TempAnd
= Size 99 SizeY 0 0 CopyMask -1 @w
+ Size -99 0 1 0 Size 33 SizeY 0 0 CopyMask -1 Inc @w
+ Size -132 0 1 0 CopyMask -1 Add @w 2
EmbedMacro %EschW "Make Escher Wall"
Size 18 90 0 1 sDel
nX 0
ForStep (y) 72 0 -24 {CopyMask Add %MEsch Mod @w 100 -2 nY @y aG @w Div @w 100}
CopyMask %MEschX -2
ForStep (y) 66 18 -24 {If Mod @v 10 (nY @y aG) @v Div @v 10}
cDel Size 0 3 1 0 cDel
CopyMask -1 Add %MEschW @x
EmbedMacro %EschW2 "Make Escher Wall Between"
Size 6 90 0 1 sDel
CopyMask %MEschY -2 nX 0
ForStep (y) 72 0 -24 {If Mod @v 10 (nY @y aG) @v Div @v 10}
cDel Size 0 7 1 0 cDel
CopyMask -1 Add %MEschW2 @x
EmbedMacro %EschC "Escher Coordinates"
Local "xyz"
@x Div Sub nX 125 2
@y Div Sub nY 123 2
@z Sub 3 Div Sub nViewHeight 1093 98
IfElse And And Tween @x 0 3 Tween @y 0 3 Tween @z 0 3
{@v Var Add 27 Add Add Mul @z 16 Mul @y 4 @x}
{@v -1}
// ///////////// //
// Chat Routines //
// ///////////// //
EmbedMacro %ChatH "Chat Hoggle"
If Equ @TChatH 0 {$9 "Hoggle says: I'm Hoggle. Who are you?"}
If Equ @TChatH 1 {$9 "Hoggle says: The fairies breed as fast as I spray!"}
If Equ @TChatH 2 {$9 "Hoggle says: Do I know where the door to the Labyrinth is? Oh, maybe."}
If Equ @TChatH 3 {$9 "Hoggle says: How do you get into the Labyrinth? You gets in there... *points*" For (x) 127 129 (Set @x 236 Off SetCE @x 236 Black) For (y) 237 238 (Set 126 @y On Set 130 @y On SetCE 126 @y LtGray SetCE 130 @y LtGray)}
If Equ @TChatH 4 {$9 "Hoggle says: Now, would you go left or right? Me, I wouldn't go either way."}
If Equ @TChatH 5 {$9 "Hoggle says: Get through the Labyrinth? One thing for sure, you'll never get through the Labyrinth!"}
@TChatH Inc @TChatH
If Gte @TChatH 6 {@TChatH 4}
EmbedMacro %ChatW "Chat Worm"
If Equ @TChatW 0 {$9 "The Worm says: 'Allo!"}
If Equ @TChatW 1 {$9 "The Worm says: No, I didn't say 'Hello'. I said 'Allo', but that's close enough."}
If Equ @TChatW 2 {$9 "The Worm says: Yeah, I'm a worm, that's right."}
If Equ @TChatW 3 {$9 "The Worm says: No, I don't know the way through this Labyrinth. Who, me? No, I'm just a worm."}
If Equ @TChatW 4 {$9 "The Worm says: Come inside and meet the missus."}
If Equ @TChatW 5 {$9 "The Worm says: This passage isn't endless. It's full of openings. It's just you ain't seeing them."}
If Equ @TChatW 6 {$9 "The Worm says: There's an opening just across there. It's right in front of you."}
If Equ @TChatW 7 {$9 "The Worm says: You try walking through it, you'll see what I mean. Go on, go on, then."}
If Equ @TChatW 8 {$9 "The Worm says: Come inside and have a nice cup of tea."}
If Equ @TChatW 9 {$9 "The Worm says: Things are not always what they seem in this place. So, you can't take anything for granted."}
@TChatW Inc @TChatW
If Gte @TChatW 10 {@TChatW 5}
EmbedMacro %ChatA "Chat Alph & Ralph"
@x Equ @w %MRalph
IfElse @x {$0 "Ralph"} {$0 "Alph"}
If Equ @TChatA 0 {SetString 9 "$0 says: No, it's not fair. But that's only half of it!"}
If Equ @TChatA 1 {SetString 9 "$0 says: That's the dead end, behind you! Ah ha ha ha!" Set 127 24 On SetCE 127 24 Red}
If Equ @TChatA 2 {SetString 9 "$0 says: The only way out of here is to try one of these doors."}
If Equ @TChatA 3 {SetString 9 "$0 says: One of these doors leads to the castle at the center of the Labyrinth..."}
If Equ @TChatA 4 {SetString 9 "$0 says: And the other door leads to (ba ba ba bum) certain death! Ooooh!"}
If Equ @TChatA 5 {SetString 9 "$0 says: No, you can't ask us which door, you can only ask one of us. It's in the rules!"}
If Equ @TChatA 6 {SetString 9 "$0 says: I should warn you that one of us always tells the truth, and one of us always lies!"}
If Equ @TChatA 7 {SetString 9 "$0 says: That's a rule too. The other guard always lies!"}
If Equ @TChatA 8 {SetString 9 "$0 says: I do not lie! I tell the truth!"}
If Equ @TChatA 9 {SetString 9 "$0 says: Ooh, what a lie! He's the liar!"}
If Equ @TChatA 10 {IfElse Neq @x @a ($1 "Yes") ($1 "No") SetString 9 "You ask $0: Would the other guard tell me that this door behind you leads to the castle? $0 answers: $1."}
@TChatA Inc @TChatA
If Gte @TChatA 11 {@TChatA 10}
EmbedMacro %ChatHH "Chat Helping Hands"
If Equ @TChatHH 0 {$9 "Helping Hands say: What do you mean 'help'? We are helping! We're the Helping Hands."}
If Equ @TChatHH 1 {$9 "Helping Hands say: Would you like us to let go? Ha ha ha!"}
If Equ @TChatHH 2 {$9 "Helping Hands say: Well then, come on, which way? Up or down."}
If Equ @TChatHH 3 {$9 "Helping Hands say: Come on, we haven't got all day."}
If Equ @TChatHH 4 {$9 "Helping Hands say: Which way do you want to go, hmm? Yes, which way?"}
@TChatHH Inc @TChatHH
If Gte @TChatHH 5 {@TChatHH 2}
EmbedMacro %ChatB "Chat Beggar"
If Equ @TChatB 0 {$9 "Beggar says: Ah, what have we here?"}
If Equ @TChatB 1 {$9 "The beggar suddenly rises! It's Jareth in disguise!" SetCA 5 91 48 UD %MBegg2 0}
If Equ @TChatB 2 {$9 "Jareth says: And you, how are you enjoying my Labyrinth?"}
If Equ @TChatB 3 {$9 "You say: The Labyrinth is a 'piece of cake'."}
If Equ @TChatB 4 {$9 "Jareth says: Really, then how about upping the stakes?"}
If Equ @TChatB 5 {$9 "Jareth advances the clock by three hours. Hey, that's not fair!" @t Sub @t 10800}
If Equ @TChatB 6 {$9 "Jareth says: So the Labyrinth's a 'piece of cake'? Well let's see how you deal with this little 'slice'."}
If Equ @TChatB 7 {$9 "Jareth throws a crystal ball down the passage, then he disappears!" nDir 1 SetCA 5 91 48 0 @c 72 SetCA 5 @c 47 UD %MClean %MClean SetCA 2 91 46 256 SetC 91 45 Gray}
@TChatB Inc @TChatB
EmbedMacro %IntP "Interact Panel"
If Lte @s 0 {$9 "This wall panel seems to give a little when you press upon it." @s 1 Return}
If Equ @s 1 {$9 "This wall panel gives a lot when you push upon it." @s 2 Return}
If Equ @s 2 {$9 "The wall panel falls away when you push on it as hard as you can!" @s 3 SetCA 2 129 48 0 SetC 129 49 LtGray SetCA 2 91 46 0 SetC 91 45 LtGray}
EmbedMacro %ChatWM "Chat Wiseman"
If Equ @TChatWM 0 {$9 "Wiseman says: What can I do for you?"}
If Equ @TChatWM 1 {$9 "Wiseman says: So, you want to get to the castle?"}
If Equ @TChatWM 2 {$9 "Wiseman's Hat says: How's that for brainpower?"}
If Equ @TChatWM 3 {$9 "Wiseman says to his hat: Be quiet!"}
If Equ @TChatWM 4 {$9 "Wiseman's Hat says: Ah, nuts."}
If Equ @TChatWM 5 {$9 "Wiseman says: The way forward is sometimes the way back, and sometimes the way back is the way forward."}
If Equ @TChatWM 6 {$9 "Wiseman's Hat says: That means walk backwards down the passage to get out of this area."}
If Equ @TChatWM 7 {$9 "Wiseman's Hat says: Please leave a contribution in the little box."}
@TChatWM Inc @TChatWM
If Gte @TChatWM 8 {@TChatWM 5}
EmbedMacro %ChatN "Chat Nipper"
If Equ @TChatN 0 {$9 "The goblin with a nipper stick sadistically jabs at Ludo!"}
If Equ @TChatN 1 {$9 "The goblin with a nipper stick says: Try this for size you big hippie!"}
If Equ @TChatN 2 {$9 "The goblin with a nipper stick says: We got you now, fatso!"}
If Equ @TChatN 3 {$9 "The goblin with a nipper stick says: All together now, nippie nippie nip nip!"}
@TChatN Inc @TChatN
If Gte @TChatN 4 {@TChatN 0}
EmbedMacro %ChatL "Chat Ludo"
If Equ @TChatL 0 {$9 "Ludo says: Ludo friend!"}
If Equ @TChatL 1 {$9 "You ask Ludo if he knows how to get through the Labyrinth. Ludo says: No."}
If Equ @TChatL 2 {$9 "You wonder if anyone knows how to get through this Labyrinth... Hey, where did they come from?" SetC 127 198 LtGray SetC 129 198 LtGray SetY 127 198 1 %MKnockL SetY 129 198 1 %MKnockR}
@TChatL Inc @TChatL
If Gte @TChatL 3 {@TChatL 0}
EmbedMacro %ChatKL "Chat Knocker Left"
If Equ @TChatKL 0 {$9 "The door knocker with a ring in its ears says: What?"}
If Equ @TChatKL 1 {$9 "The door knocker with a ring in its ears says: Huh?"}
If Equ @TChatKL 2 {$9 "The door knocker with a ring in its ears says: No good, can't hear you."}
@TChatKL Inc @TChatKL
If Gte @TChatKL 3 {@TChatKL 0}
EmbedMacro %ChatKR "Chat Knocker Right"
If Equ @TChatKR 0 {$9 "The door knocker with a ring in his mouth says: Mmf!"}
If Equ @TChatKR 1 {$9 "The door knocker with a ring in his mouth mumbles incomprehensably."}
If Equ @TChatKR 2 {$9 "The door knocker can't speak since he has a ring in his mouth."}
@TChatKR Inc @TChatKR
If Gte @TChatKR 3 {@TChatKR 0}
EmbedMacro %ChatKR2 "Chat Knocker Right"
If Gt @k 0 {$9 "The door knocker takes a deep breath the moment you stop pinching his nose shut!" @k 0 Return}
If Equ @TChatKR2 0 {$9 "The door knocker says: Oh, it is so good to get that thing out!"}
If Equ @TChatKR2 1 {$9 "The door knocker says: Don't mind the other knocker, he's deaf as a post!"}
If Equ @TChatKR2 2 {$9 "The door knocker says: I'm definitely the correct door to the castle, no doubt about it!"}
If Equ @TChatKR2 3 {$9 "The door knocker says: To get through the door, knock and the door will open!"}
If Equ @TChatKR2 4 {$9 "The door knocker says: No, I don't want that ring back in my mouth!"}
If Equ @TChatKR2 5 {$9 "The door knocker closes his mouth tightly when you try to put the ring back in his mouth!"}
If Equ @TChatKR2 6 {$9 "The door knocker keeps his mouth closed tightly while breathing heavily through his nose."}
@TChatKR2 Inc @TChatKR2
If Gte @TChatKR2 7 {@TChatKR2 5}
EmbedMacro %IntKR "Interact Knocker Right"
If And Equ @w %MKnockR Lt @k 3 {$9 "You pull the ring out of the knocker's mouth." SetY 129 198 1 %MKnockR2 Return}
If And Equ @w %MKnockR2 Lte @TChatKR2 4 {$9 "You should talk with the knocker since he can speak now." Return}
If Lte @k 0 {$9 "You pinch the knocker's nose shut. He can't breathe anymore since he's keeping his mouth shut!" @k 1 Return}
If Equ @k 1 {$9 "You keep pinching the knocker's nose shut. He scowls deeply while trying to hold his breath!" @k 2 Return}
If Equ @k 2 {$9 "The knocker can't hold his breath any longer. He opens his mouth and you stuff the ring back in!" @k 3 SetY 129 198 1 %MKnockR Return}
$9 "You use the knocker to knock on the door. It opens!" Set @x @y Off SetCE @x @y Black
EmbedMacro %ChatF "Chat Firey"
If Equ @TChatF 0 {$9 "Firey lifts his head off his shoulders and says: We just have to have a good time!"}
If Equ @TChatF 1 {$9 "Firey says: We can show you a good time, and we don't charge nothing!"}
If Equ @TChatF 2 {$9 "Firey says: Get the town talking fire gang, chilly down with the fire gang!"}
If Equ @TChatF 10 {$9 "Firey says: It's against the rules to throw other people's heads! You're only allowed to throw your own head."}
If Equ @TChatF 11 {$9 "Firey says: Now we take your head off! Get a saw, it won't hurt!"}
If Equ @TChatF 12 {$9 "Firey says: Stop them somebody, stop them!"}
@TChatF Inc @TChatF
If Equ @TChatF 3 {@TChatF 0}
If Gte @TChatF 13 {@TChatF 10}
EmbedMacro %ChatD "Chat Didymus"
If Equ @TChatD 0 {$9 "Sir Didymus says: Stop! Stop, I say!"}
If Equ @TChatD 1 {$9 "Sir Didymus says: Without my permission no one may cross."}
If Equ @TChatD 2 {$9 "Sir Didymus says: Stench? Of what speaketh thou?"}
If Equ @TChatD 3 {$9 "Sir Didymus says: The air is sweet, and fragrant. And none may pass without my permission!"}
If Equ @TChatD 4 {$9 "Sir Didymus says: May you have my permission? Well, I uh... Yes."}
If Equ @TChatD 5 {$9 "Sir Didymus says: Have no fear. This bridge has lasted for a thousand years!" SetE 119 173 Off SetE 119 165 On}
If Equ @TChatD 6 {$9 "Sir Didymus says: Let us fight for the right as one!"}
If Equ @TChatD 7 {$9 "Sir Didymus says: I say, does anybody want to play a game of Scrabble?"}
@TChatD Inc @TChatD
If Gte @TChatD 8 {@TChatD 6}
EmbedMacro %ChatHU "Chat Humongous"
If Gte @h 5 {$9 "Humongous is silent because it's been deactivated." Return}
IfElse Lte nViewHeight 1023 ($9 "Humongous says in a deep booming voice from above you: WHO GOES?") ($9 "Humongous says in a deep booming voice next to you: WHO GOES?")
EmbedMacro %IntHU "Interact Humongous"
If Not Get nX Dec nY {Return}
If And Lte nViewHeight 1023 Lt @h 5 {$9 "From down here you can't do anything except tap on Humongous' knees." Return}
If Equ @h 2 {$9 "You grab Humongous' helmet and open it like a lid. Inside is a small goblin at Humongous' controls." For (x) 0 2 (SetY Add 127 @x 146 1 Add %MHumo2 @x) @h 3 Return}
If Equ @h 3 {$9 "You grab the small goblin and throw him away from Humongous' controls." For (x) 0 2 (SetY Add 127 @x 146 1 Add %MHumo3 @x) @h 4 Return}
If Equ @h 4 {$9 "You pull levers within Humongous' controls until it safely shuts down." For (x) 0 2 (SetY Add 127 @x 146 1 Add %MHumo @x) @h 5 Return}
If And Equ @h 5 Gt nViewheight 1023 {$9 "With Humongous deactivated, you no longer need to be up here." Return}
$9 "With Humongous deactivated, the gate to Goblin City opens!" For (x) 127 129 {Set @x 150 Off SetCE @x 150 Black Set @x 146 Off SetCE @x 146 Black}
EmbedMacro %ChatJL "Chat Junk Lady"
If Equ @TChatJL 0 {$9 "Junk Lady says: Why don't you look where you're going?"}
If Equ @TChatJL 1 {$9 "Junk Lady says: You can't look where you're going if you don't know where you're going!"}
If Equ @TChatJL 2 {$9 "Junk Lady says: Look here. That's what you were looking for, wasn't it my dear?"}
If Equ @TChatJL 3 {$9 "Junk Lady says: Why don't you stay here and see if there's anything else you'd like, hmm?"}
If Equ @TChatJL 4 {$9 "Junk Lady says: It's all here, everything in the world you've ever cared about is all right here!"}
If Equ @TChatJL 5 {$9 "Junk Lady says: What's a matter my dear, don't you like your toys?"}
@TChatJL Inc @TChatJL
If Gte @TChatJL 6 {@TChatJL 3}
EmbedMacro %ChatJ "Chat Jareth"
If Lte @t 0 {IfElse @b ($9 "Jareth laughs at you, that you fell in the Bog and also failed to solve his Labyrinth.") ($9 "Jareth laughs at you, that you failed to solve his Labyrinth in time.") Return}
If Equ @TChatJ 0 {$9 "Jareth says: Beware, I have been generous up until now, but I can be cruel."}
If Equ @TChatJ 1 {$9 "Jareth says: I have reordered time. I have turned the world upside down. And I have done it all for you!"}
If Equ @TChatJ 2 {$9 "You say: Through dangers untold and hardships unnumbered, I have fought my way here to the castle."}
If Equ @TChatJ 3 {$9 "Jareth says: Stop! Wait, look what I'm offering you. Your dreams!"}
If Equ @TChatJ 4 {$9 "You say: For my will is as strong as yours, and my kingdom as great!"}
If Equ @TChatJ 5 {$9 "Jareth says: Just let me rule you, and you can have everything that you want."}
If Equ @TChatJ 6 {$9 "Jareth says: Just fear me, love me, do as I say, and I will be your slave."}
If Equ @TChatJ 7 {$9 "You say: You have no power over me!" @j 2}
@TChatJ Inc @TChatJ
// ///////////// //
// Day and Night //
// ///////////// //
EmbedMacro %Day0 "Day and Night"
Local 'iz'
@i Mod Add Sub 46800 @t Mul @Day 5 Mul @Day 6
@z Mod @i @Day
Macro Add %Day1 Div @i @Day
EmbedMacro %Day1 "Midday"
fStars False
kSky @KSky
kSky2 Var Add %KSky 3
kGround @KGrd
kGround2 Var Add %KGrd 3
kMountain @KMtn
kMountain2 Var Add %KMtn 3
kCloud @KCld
kCloud2 Var Add %KCld 3
kFog Var Add %KFog 3
nFogDistance @SMist
nSunMoonY 333
EmbedMacro %Day2 "Late Day"
fStars False
kSky Blend2 @KSky Var Inc %KSky @z @Day
kSky2 Blend2 Var Add %KSky 3 Var Add %KSky 4 @z @Day
kGround Blend2 @KGrd Var Inc %KGrd @z @Day
kGround2 Blend2 Var Add %KGrd 3 Var Add %KGrd 4 @z @Day
kMountain Blend2 @KMtn Var Inc %KMtn @z @Day
kMountain2 Blend2 Var Add %KMtn 3 Var Add %KMtn 4 @z @Day
kCloud Blend2 @KCld Var Inc %KCld @z @Day
kCloud2 Blend2 Var Add %KCld 3 Var Add %KCld 4 @z @Day
kFog Blend2 Var Add %KFog 3 Var Add %KFog 4 @z @Day
nFogDistance Min ?: Not @SMist 9999 @SMist Add @KFog Div Mul Sub Var Inc %KFog @KFog @z @Day
nSunMoonY Add 333 Div Mul @z 767 @Day
EmbedMacro %Day3 "Early Night"
fStars Equ @SMist 0
kSky Blend2 Var Inc %KSky Var Add %KSky 2 @z @Day
kSky2 Blend2 Var Add %KSky 4 Var Add %KSky 5 @z @Day
kGround Blend2 Var Inc %KGrd Var Add %KGrd 2 @z @Day
kGround2 Blend2 Var Add %KGrd 4 Var Add %KGrd 5 @z @Day
kMountain Blend2 Var Inc %KMtn Var Add %KMtn 2 @z @Day
kMountain2 Blend2 Var Add %KMtn 4 Var Add %KMtn 5 @z @Day
kCloud Blend2 Var Inc %KCld Var Add %KCld 2 @z @Day
kCloud2 Blend2 Var Add %KCld 4 Var Add %KCld 5 @z @Day
kFog Blend2 Var Add %KFog 4 Var Add %KFog 5 @z @Day
nFogDistance Min ?: Not @SMist 9999 @SMist Blend2 Var Inc %KFog Var Add %KFog 2 @z @Day
nSunMoonY Sub 1100 Div Mul @z 767 @Day
nStarCount Div Mul @z 768 @Day
EmbedMacro %Day4 "Midnight"
fStars Equ @SMist 0
kSky Var Add %KSky 2
kSky2 Var Add %KSky 5
kGround Var Add %KGrd 2
kGround2 Var Add %KGrd 5
kMountain Var Add %KMtn 2
kMountain2 Var Add %KMtn 5
kCloud Var Add %KCld 2
kCloud2 Var Add %KCld 5
kFog Var Add %KFog 5
nFogDistance Min ?: Not @SMist 9999 @SMist Var Add %KFog 2
nSunMoonY 333
nStarCount 768
EmbedMacro %Day5 "Late Night"
fStars Equ @SMist 0
kSky Blend2 Var Add %KSky 2 Var Inc %KSky @z @Day
kSky2 Blend2 Var Add %KSky 5 Var Add %KSky 4 @z @Day
kGround Blend2 Var Add %KGrd 2 Var Inc %KGrd @z @Day
kGround2 Blend2 Var Add %KGrd 5 Var Add %KGrd 4 @z @Day
kMountain Blend2 Var Add %KMtn 2 Var Inc %KMtn @z @Day
kMountain2 Blend2 Var Add %KMtn 5 Var Add %KMtn 4 @z @Day
kCloud Blend2 Var Add %KCld 2 Var Inc %KCld @z @Day
kCloud2 Blend2 Var Add %KCld 5 Var Add %KCld 4 @z @Day
kFog Blend2 Var Add %KFog 5 Var Add %KFog 4 @z @Day
nFogDistance Min ?: Not @SMist 9999 @SMist Blend2 Var Add %KFog 2 Var Inc %KFog @z @Day
nSunMoonY Add 333 Div Mul @z 767 @Day
nStarCount Sub 768 Div Mul @z 768 @Day
EmbedMacro %Day6 "Early Day"
fStars False
kSky Blend2 Var Inc %KSky @KSky @z @Day
kSky2 Blend2 Var Add %KSky 4 Var Add %KSky 3 @z @Day
kGround Blend2 Var Inc %KGrd @KGrd @z @Day
kGround2 Blend2 Var Add %KGrd 4 Var Add %KGrd 3 @z @Day
kMountain Blend2 Var Inc %KMtn @KMtn @z @Day
kMountain2 Blend2 Var Add %KMtn 4 Var Add %KMtn 3 @z @Day
kCloud Blend2 Var Inc %KCld @KCld @z @Day
kCloud2 Blend2 Var Add %KCld 4 Var Add %KCld 3 @z @Day
kFog Blend2 Var Add %KFog 4 Var Add %KFog 3 @z @Day
nFogDistance Min ?: Not @SMist 9999 @SMist Add Var Inc %KFog Div Mul Sub @KFog Var Inc %KFog @z @Day
nSunMoonY Sub 1100 Div Mul @z 767 @Day
// //////////////////////// //
// Initial Setup (Textures) //
// //////////////////////// //
Embed // Bricks
Size 16 32 0 1
Turtle "BM0,0R15D15L15DNR15D15R15"
= FlipHorizontal _
Zoom 2 1 0 2
nX 16 nY 0 aG
Zoom 6 9 0 2
Size SizeX Dec SizeY 0 0 Size 0 -1 1 0
cDel CopyMask -1 %MBrick =
Size 64 SizeY 0 0
CopyMask -1 %MBrick2
cDel Size 0 179 1 0
Turtle "BM0,178M+16,-163E16LF16M+16,+163L62M+16,-163E15LF15M+16,+163UL63"
cDel CopyMask -1 %MObel
Size 64 64 0 1
Turtle "BM31,0D31NL31NR32D32" Thicken
cDel CopyMask -1 %MObel2
+ Size SizeX 78 0 0
CopyMask -1 %MBrickX
Transpose
CopyMask -1 %MBrickY
Size SizeX 64 0 0 Transpose
CopyMask -1 %MBrickZ
Embed // Hedges
Size 300 412 0 1
For (i) 1 1375 {
@x Rnd 0 Dec SizeX @y Rnd 0 Sub SizeY 2
SetString 0 "BM@x,@yD" Turtle $0
}
cDel
= Size 300 300 0 0 CopyMask -1 %MHedge
+ Size 100 300 0 0 CopyMask -1 %MHedgeY
+ Size 300 100 0 0 CopyMask -1 %MHedgeX
+ Size 100 100 0 0 CopyMask -1 %MHedgeZ
+ Size 100 412 0 0 CopyMask -1 %MArch
Embed // Wood walls
Size 50 300 0 1
Turtle "BM0,0D299BR49U299"
Zoom 6 1 0 2
For (i) 1 1000 {
@x Rnd 0 Dec SizeX @y Rnd 0 Sub SizeY 5
SetString 0 "BM@x,@yD5" Turtle $0
}
cDel
Size 300 300 0 0 CopyMask -1 %MWood
Size 100 300 0 0 CopyMask -1 %MWoodY
= Transpose CopyMask -1 %MWoodX
+ Size 100 100 0 0 CopyMask -1 %MWoodZ
Embed // Wood door
CopyMask %MWood -1
Size 150 149 0 0 Size 0 1 1 0 cDel Size 0 150 1 0 cDel
CopyMask -1 %MDoor
CopyMask %MWoodY -1
Size 50 149 0 0 Size 0 1 1 0 cDel Size 0 169 1 0 cDel
CopyMask -1 %MDoor2
Embed // Tree side
Size 100 300 0 1
nX 45 nY 0 nX2 52 nY2 299 2ndBlock
For (i) 0 9 {
nX 0 nY Add 45 Mul @i 20
nX2 45 nY2 Mul @i 20
2ndLine
nX 97 nX2 53
nY2 Inc nY2
2ndLine
}
Thicken Thicken cDel
For (i) 1 200 {
@x Rnd 46 53 @y Rnd 0 Dec SizeY
SetString 0 "BM@x,@yS1D" Turtle $0
}
@y SizeY @j 1
For (i) 1 7 {
@x Add 37 @i
SetString 0 "C0BM@x,@yU@j" Turtle $0
@x Sub 62 @i
SetString 0 "BM@x,@yU@jC1" Turtle $0
@j Mul @j 2
}
For (i) 1 5000 {
@x Rnd 0 Dec SizeX @y Rnd 0 Sub SizeY 3
If Neq Get @x @y Get @x Add @y 2
(SetString 0 "C0BM@x,@yD2" Turtle $0)
}
CopyMask -1 %MTree
Embed // Tree top
Size 100 100 0 1
nX 45 nY 0 nX2 52 nY2 99 2ndBlock
nX 0 nY 45 nX2 99 nY2 52 2ndBlock
nY 0 nX2 97 nY2 97 2ndLine
nX 97 nX2 0 2ndLine
Thicken Thicken cDel
For (i) 1 33 {
@x Rnd 46 53 @y Rnd 0 Dec SizeY
SetString 0 "C1BM@x,@yS1D" Turtle $0
@x Rnd 0 Dec SizeX @y Rnd 46 53
SetString 0 "BM@x,@yR" Turtle $0
}
CopyMask -1 %MTree2
EmbedDB // Stone wall
DB
192 192 1
e@Ag"_e"_c0Q
e0i]f]c(A
e'i9f9c$
|12
e(i]fYc$
e(Ag"_e"Yc$
e(zpYc$
|
e(Aa`h0Qa"Yc$
e(b?h(AbYc$
e'b-h$c9c$
|
e0b=h$c=c(A
e@Aa]h$c?c0Q
v]h$c@r
|
b`e]h$c?b@A
b?e=h$c=b0
b-e-h$c9b'
|17
b-e/h(Ab]b/
b-e0h0Qa"_b?
b-e0zp_
|
b-e0c(Yc$]e?
b-e/c$Qc"Ye/
b-e-c"AdQe'
|2
b-e/c$AdQe'
b-e0c(AdQe'
b-e0qAdQe'
|
b-e0c(AdQe'
b-e/c$AdQe'
b-e-c"AdQe'
|7
b?e=c"AdQe(
b`e]c"AdQe(A
v]c"AdQe(n
|
a`f]c"AdQe(A
a?f=c"AdQe(
a-f-c"AdQe'
|7
a-f-c"Qc"Qe'
a-f-c"Yc$Qe'
a-f-c"rQe'
|
a-f-c"Yc$Qe'
a-f-c"Qc"Qe'
a-f-c"AdQe'
|6
a/f?c$AdQe'
a0f`c(AdQe'
a0yAdQe'
|
a0b"_f(AdQe'
a/c]f$AdQe'
a-c9f"AdQe'
|
a=c9f"AdYe0
a]c9f"Ad]e@A
n]c9f"Adv
|
a]c9f"Ad]
a=c9f"AdY
a-c9f"AdQ
|18
a=c9f"Qc"Y
a]c9f"Yc$]
n]c9f"zn
|
a]c9f"Y!(Ye0Q
a=c9f"Q!$Qe(A
a-c9f"A!"Ae$
|17
a?c]f$Q!$Ae$A
a`b"_f(Y!(Ae$Q
zqAe$q
|
c0Qd"_d(Ae$Q!@A
c(Ae]d$Ae$A!0
c$f9d"Ae$a'
|9
c$f9d"Qe(A!/
c$f9d"Ye0Q!?
c$f9d"v_
|
c$f9d"Yc`c?
c$f9d"Qc?c/
c$f9d"Ac-c'
|13
c(Ae]d$Qc?c0
c0Qd"_d(Yc`c@A
Embed // Stone wall
cDel fNoCornerHopping False SmoothZoom SmoothZoom
= Size 576 SizeY 0 0 CopyMask -1 %MWall
+ Size -576 0 1 0 CopyMask -1 %MWall2
+ Size 576 58 0 0 = FlipVertical Size 0 58 1 0 nX 0 nY 0 aG CopyMask -1 %MWallX
Transpose CopyMask -1 %MWallY
Embed // Hoggle
Size 222 294 0 1
Turtle "BM110,2S9BD5OF4NU2NDOD4BU7BLLBFD0BRGDODBDL2BF2L4G4D3RNR2DNDRNDRNDURNU2DNR4D3FD2R2U2NEBD2D2NL2D3L4UOAOBU2"
Thicken2 6 = FlipHorizontal TempOr cDel
= Del Turtle "BM59,12S3T1T_HOGGLE_" Thicken Thicken cDel TempAnd
CopyMask -1 %MHogg
Embed // Fairy
Size 222 294 0 1
Turtle "BM110,2S9BD7NHOFODOFDND6H6OFDF7G5DODE4DNODD7L2"
Thicken2 6 = FlipHorizontal TempOr cDel
= Del Turtle "BM68,12S3T_FAIRY_" Thicken Thicken cDel TempAnd
CopyMask -1 %MFairy
Embed // Worm
Size 222 294 0 1
Turtle "BM110,2S9BR3BD16NM-1,-4NM+1,-4OF2NH3NG3D4R2NR2ND3BL2OE2L4OF2OD2R6OB4U6NF3NE3OH2BD4NOGOBBUD0BL2D0"
Thicken2 6 cDel
= Del Turtle "BM77,12S3T_WORM_" Thicken Thicken cDel TempAnd
CopyMask -1 %MWorm
Embed // Alph
Size 222 294 0 1
Turtle "BM110,2S9BD5D2G2NR2DND2M-2,+1M+2,+1DR2BUNLBUD0BHD0BRBD3L3GHOFODRD2NRDNRD3LG2R3DR4BL2DND2M-2,+1M+2,+1DNF2R2BHD0BED0BUNLBUBL3G2D6L3OARU5E2"
Thicken2 6 = FlipHorizontal TempOr cDel
= Del Turtle "BM77,12S3T_ALPH_" Thicken Thicken cDel TempAnd
CopyMask -1 %MAlph
Embed // Ralph
Del Turtle "BM68,12S3T_RALPH_" Thicken Thicken cDel TempAnd
CopyMask -1 %MRalph
Embed // Helping Hands
Size 222 50 0 1
Turtle "BM110,29S4BL2ND3L2HL5DNR2L4DNR4LDRNR4DR2NR3DR7ER2"
Thicken Thicken = FlipHorizontal TempOr cDel
= Del Turtle "BM68,0S3T_HANDS_" Thicken Thicken cDel TempAnd
Zoom 1 8 0 2
CopyMask -1 %MHand
Embed // Certain Death
Size 222 50 0 1
Turtle "BM110,25S9G2H2G2H2G2H2BR12F2E2F2E2F2E2"
Thicken2 6 cDel
= Del Turtle "BM68,0S3T_DEATH_" Thicken Thicken cDel TempAnd
Zoom 1 8 0 2
CopyMask -1 %MDeath
Embed // Oubliette bench
Size 222 294 0 1
Turtle "BM110,2S9BD32L12U12R12"
Thicken2 6 = FlipHorizontal TempOr cDel
= Del Turtle "BM68,12S3T_BENCH_" Thicken Thicken cDel TempAnd
Size 0 293 1 0
CopyMask -1 %MBench
Embed // Oubliette door
Size 222 294 0 1
Turtle "BM110,2S9BD12L6D20R12U10BL2OHOFODOBBR2U10L6"
Thicken2 6 cDel
= Del Turtle "BM77,12S3T_DOOR_" Thicken Thicken cDel TempAnd
Size 0 293 1 0
CopyMask -1 %MBench2
Embed // Phony Warning
Size 222 294 0 1
Turtle "BM110,2S9BD5L6G2D20F2R6BU4L4E2R2BU3L3M+1,-5BU2L2NUL2U3R4D3"
Thicken2 6 = FlipHorizontal TempOr cDel
= Del Turtle "BM50,12S3T_WARNING_" Thicken Thicken cDel TempAnd