-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathBlack Hole (Gottlieb 1981) vpx 1.1.vbs
3338 lines (2777 loc) · 103 KB
/
Black Hole (Gottlieb 1981) vpx 1.1.vbs
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
'==============================================================================================='
' '
' BlackHole '
' Gottlieb (1981) '
' http://www.ipdb.org/machine.cgi?id=307 '
' '
' Created by: cyberpez '
' '
'==============================================================================================='
Option Explicit
Randomize
' Thalamus 2018-12-18 : Added FFv2
' Thalamus - added vpminit me to _init for cvpmflips / Fastflip
Dim LightHalo_ON, BlackLights_on, LowerBlacklights_on, RedGravityTunnel, RomSet, cGameName, UpperFlipperColor, LowerFlipperColor, UpperPeg, LowerPeg, LeftDrain, LouderRoll, GIbuzz, WhooshSound, NightMod, CaptiveLight, GIColorMod, GIColorModLower, BallRadius, BallMass, BlackLightApron, Language, NumOfBalls, ReplayOption, BlackLightMultiball,BallMod, BlackLightPlastics, TubeGlow, WindowFoam, CustomCards, UltraBrightBumpers
'***************************************************************************'
'***************************************************************************'
' OPTIONS
'***************************************************************************'
'***************************************************************************'
'Lighting
GIColorMod = 1 ' 0=standard GI 1=Blacklight LED's (HauntFreaks special)
GIColorModLower = 2 ' 0=standard GI 1=Blue 2=Blue/Purple
RedGravityTunnel = 1 ' Set to 1 to changes gravity tunnel GI to red
CaptiveLight = 1 ' 0=off 1=Blue 2=Orange 3=Green 4=Purple 5=Red 6=White 7=Yellow
TubeGlow = 1 ' 0=off 1=on Re-Entry tube glows blue when in use
UltraBrightBumpers = 2 ' 0=Normal lit Bumper Caps 1 = Ultra Bright LED caps 2 = Ultra Bright Blue LED caps
'Blacklights, those planets and astroids SCREAM blacklights
BlackLights_on = 0 ' Set to 1 to turn on blacklights for the upper playfield (Stars, Planets, and Astroids don't fade with GI)
LowerBlacklights_on = 0 ' Set to 1 to turn blacklighs on for the lower playfield (Star don't fade with GI)
BlackLightApron = 0 ' Set to 1 to add blightlight glow to Apron
BlackLightPlastics = 0 ' 0 = Normal Clear plastics 1 = blacklight blue "clear plastics"
'BlackLight Multi-ball - Overrides other blacklight settings.. Blacklights turn on during multiball
BlackLightMultiball = 1
'Flipper Colors
UpperFlipperColor = 1 ' 0=Red 1=Black 2=Yellow 3=Blue
LowerFlipperColor = 1 ' 0=Red 1=Black 2=Yellow 3=Blue
'BallMod
BallMod = 0 ' 0=Normal Balls 1=Marbled balls
'Instruction Cards (only changes instruction cards, not actual options)
CustomCards = 0 ' 0=normal Cards 1=Custom instuction cards
Language = 1 ' 1=English 2=French 3=German
NumOfBalls = 0 ' 0=3ball game 1=5 ball game
ReplayOption = 1 ' 0=No replays for beating high score 1=3 replays for beating high score
'Cheaters
UpperPeg = 1 ' Set to 1 to add a post below the upper flippers
LowerPeg = 1 ' Set to 1 to add a post below the lower flippers
LeftDrain = 2 ' 1=Single Post on left drain 2=Double Post on Left Drain 3=Rubber around the whole lot.
'Sounds
GIbuzz = 1 ' Buzz sound when Lower GI turns on. (Sampled from youtube video)
WhooshSound = 1 ' Wind\Whoosh sound while on lower playfield that is not emulated by rom. (Sampled from youtube video)
'Ball Rolling sounds
LouderRoll = 0 ' 0=normal ball rolling sounds 1=a bit louder ball rolling sounds
'Other Mods
WindowFoam = 0 ' 0=black 1=blue
'Ball Size and Weight
BallRadius = 25
BallMass = 1.7
'*****************************
'Rom Version Selector
'*****************************
'1 "blckhole" ' Gottlieb Rev.1 - blckhole
'2 "blkhole2" ' Gottlieb Rev.2 - blkhole2
'3 "bhol_ltd" ' Gottlieb Limitied Edition - bhol_ltd working????? acts CRAZY
'4 "blkholea" ' Gottlieb Sound Only - blkholea
'5 "blkhole7" ' Gottlieb 7-digit - blkhole7
'6 "blkhol7s" ' Gottlieb Sound Only 7-digit - blkhol7s
RomSet = 5
' Added/Updated "Positional Sound Playback Functions" and "Supporting Ball & Sound Functions"
' Fastflip didn't work with useSOlnnoid=2, no table sounds
' Thalamus 2018-08-09 : Improved directional sounds
' !! NOTE : Table not verified yet !!
' Please import sample ballrelease2, it is referenced but not in the
' table
' Options
' Volume devided by - lower gets higher sound
Const VolDiv = 2000 ' Lower number, louder ballrolling/collition sound
Const VolCol = 10 ' Ball collition divider ( voldiv/volcol )
' The rest of the values are multipliers
'
' .5 = lower volume
' 1.5 = higher volume
Const VolBump = 2 ' Bumpers volume.
Const VolGates = 1 ' Gates volume.
Const VolMetal = 1 ' Metals volume.
Const VolRH = 1 ' Rubber hits volume.
Const VolPi = 1 ' Rubber pins volume.
Const VolTarg = 1 ' Targets volume.
Const VolKick = 1 ' Kicker volume.
Const VolSpin = 1.5 ' Spinners volume.
Const VolFlip = 1 ' Flipper volume.
'***************************************************************************'
'***************************************************************************'
' End Of OPTIONS
'***************************************************************************'
'***************************************************************************'
'options not used anymore, please don't edit.
NightMod = 0 ' 0 = day 1 = night
LightHalo_ON = 1 ' Set to 0 to turn off light halos
On Error Resume Next
ExecuteGlobal GetTextFile("controller.vbs")
If Err Then MsgBox "You need the controller.vbs in order to run this table, available in the vp10 package"
On Error Goto 0
LoadVPM "00990300", "sys80.VBS", 2.33
' Thalamus - for Fast Flip v2
' NoUpperRightFlipper
' NoUpperLeftFlipper
'****************************************
'Check the selected ROM version
'****************************************
If RomSet = 1 then cGameName="blckhole":DisplayTimer6.Enabled = true End If
If RomSet = 2 then cGameName="blkhole2":DisplayTimer6.Enabled = true End If
If RomSet = 3 then cGameName="bhol_ltd":DisplayTimer6.Enabled = true End If
If RomSet = 4 then cGameName="blkholea":DisplayTimer6.Enabled = true End If
If RomSet = 5 then cGameName="blkhole7":DisplayTimer7.Enabled = true End If
If RomSet = 6 then cGameName="blkhol7s":DisplayTimer7.Enabled = true End If
'********************
'Standard definitions
'********************
Const cCredits="Black Hole",UseSolenoids=2,UseLamps=0,UseGI=1,UseSync=1
Const SSolenoidOn="solenoid",SSolenoidOff="soloff",SFlipperOn="FlipperUp",SFlipperOff="FlipperDown",sCoin="coin"
'******************************************************
' TABLE INIT
'******************************************************
Dim bsTrough,bsSaucer,dtBlack,dtHole,dtLLeft,dtLRight
Dim f,g,h,i,j
Dim cBall1,cBall2,cBall3
Sub BlackHole_Init()
vpmInit Me
On Error Resume Next
With Controller
.GameName=cGameName
If Err Then MsgBox "Can't start Game" & cGameName & vbNewLine & Err.Description:Exit Sub
.SplashInfoLine=cCredits
.HandleMechanics=0
.ShowDMDOnly=1
.ShowFrame=0
.ShowTitle=0
.Run
If Err Then MsgBox Err.Description
On Error Goto 0
End With
'************ Main Timer init ********************
PinMAMETimer.Interval=PinMAMEInterval
PinMAMETimer.Enabled=1
'************ Nudging **************************
vpmNudge.TiltSwitch=26
vpmNudge.Sensitivity=3
vpmNudge.TiltObj = Array(Bumper1,Bumper2,Bumper3,Bumper4,Bumper5,Bumper6,Sling1,Sling2,Sling3,Sling8)
CheckSolenoid 16,0 ' Initialize Upper Playfield Relay
controller.switch(25) = true
StartLampTimer
CheckBlackLights
CheckFlipperColors
CheckCheaters
CheckDayOrNight
SetCaptiveLightColor
CheckGIColorMod
CheckInstructionCards
SetWindowsFoam
Set cBall1 = Kicker1.CreateSizedBallWithMass(BallRadius, BallMass)
Set cBall2 = Kicker2.CreateSizedBallWithMass(BallRadius, BallMass)
Set cBall3 = Kicker3.CreateSizedBallWithMass(BallRadius, BallMass)
If BallMod = 1 Then
cBall1.Image = "Chrome_Ball_29"
cBall1.FrontDecal = "BlackHole_Ball1"
cBall2.Image = "Chrome_Ball_30"
cBall2.FrontDecal = "BlackHole_Ball2"
cBall3.Image = "Chrome_Ball_29"
cBall3.FrontDecal = "BlackHole_Ball3"
End If
End Sub
'******************************************************
' SOLENOIDS
'******************************************************
Const sSaucer=12
Const sRT=13
Const sKnocker=8
Const sGate=17
Const sCLo=18
Const sEnable=19
const sdtLeftLower = 5
const sdtRightLower = 6
const sdtRightUpper = 1
const sdtLeftUpper = 2
const sOutHole = 9
SolCallBack(sSaucer)="bsSaucer.SolOut"
SolCallback(sKnocker)="vpmSolSound SoundFX(""knocker"",DOFKnocker),"
SolCallback(sGate)="vpmSolDiverter Flipper1,True,"
SolCallback(sEnable)="vpmNudge.SolGameOn"
SolCallback(42) = "bsLKick.SolOut"
solcallback(sdtLeftUpper)="BlackTargetsUp"
solcallback(sdtRightLower)="WhiteTargetsUp"
solcallback(sdtRightUpper)="HoleTargetsUp"
solcallback(sdtLeftLower)="YellowTargetsUp"
SolCallback(sLRFlipper) = "SolRFlipper"
SolCallback(sLLFlipper) = "SolLFlipper"
SolCallback(sOutHole) = "SolOuthole"
'********************
' Black Hole used lamps to activate solenoids, CheckSolenoid is called when lamps are changed and looks for those assigned to solenoid actions
'********************
Sub CheckSolenoid(lnum,lstate)
Select Case lnum
Case 8:
If lstate = 1 then ' Lower Playfield Trough Gate
sw53.kick 60, 5
controller.Switch(53) = 0
End If
Case 12: ' Lower Playfield kicker
If lstate = 1 then
sw42.kick -30,4
controller.Switch(42) = 0
SoundFX "kicker",DOFContactors
If controller.Lamp(17) Then
If BlackLightMultiball = 1 then
StartBlackLightMultiball
End If
End If
End If
Case 13: ' Upper Playfield kicker
If lstate = 1 then
sw05.kickZ 175,10,0,5
controller.Switch(5) = 0
SoundFX "kicker",DOFContactors
sw05.timerenabled = true
End If
Case 14: ' Lower Playfield Tube Kicker
If lstate = 1 then
sw43.kick 180,40,0.5
controller.Switch(43) = 0
SoundFX "kicker",DOFContactors
End If
Case 15: ' Shooter Lane Ball Release
If lstate = 1 then
ReleaseBall
End If
Case 16: ' Upper Playfield Relay
if lstate = 0 then
SetUpperGI(1)
Setflash 101, 1
SetLamp 101, 1
BlackHole.ColorGradeImage = "ColorGrade_on"
Else
SetUpperGI(0)
Setflash 101, 0
SetLamp 101, 0
BlackHole.ColorGradeImage = "ColorGrade_off"
End If
Case 17: ' Lower Playfield Relay
if lstate = 1 then
SetLowerGIOn
LowerGIBuzz.enabled = True
Woosh.enabled = True
else
SetLowerGIOff
LowerGIBuzz.enabled = False
LowerGIBuzzStep = 0
Woosh.enabled = false
StopSound "Woosh"
WooshStep = 0
end if
Case 18: ' Re-Entry Tube Gate
if lstate = 1 then
Flipper1.rotatetoEnd
SetLamp 138, 1
SetFlash 138, 1
SetLamp 139, 0
SetFlash 139, 0
else
Flipper1.rotatetoStart
SetLamp 138, 0
SetFlash 138, 0
SetLamp 139, 1
SetFlash 139, 1
end if
End Select
End Sub
'******************************************************
' LOWER PLAYFIELD TROUGH & KICKER
'******************************************************
Sub LowerStage_Hit():If Controller.Switch(53) = 0 Then LowerStage.kick 60, 5:End If:End Sub
Sub sw53_Hit():Controller.Switch(53)=1:End Sub
Sub sw53_UnHit():If LowerStage.BallCntOver = 1 Then LowerStage.kick 60, 5:End If:End Sub
Sub sw42_Hit():playsoundAtVol "kicker_enter",sw42,VolKick:controller.Switch(42)=1:End Sub
Sub sw43_Hit():playsoundAtVol "kicker_enter",sw43,VolKick:controller.Switch(43)=1:SetLamp 123, 1:End Sub
Sub ReEnrtyTubeExit_hit():SetLamp 123, 0:End Sub
'******************************************************
' UPPER PLAYFIELD TROUGH
'******************************************************
Sub Kicker6_Hit():UpdateTrough:End Sub
Sub Kicker5_Hit():UpdateTrough:End Sub
Sub Kicker4_Hit():UpdateTrough:End Sub
Sub Kicker3_Hit():Controller.Switch(25) = 1:UpdateTrough:End Sub
Sub Kicker3_UnHit():Controller.Switch(25) = 0:End Sub
Sub Kicker2_Hit()
UpdateTrough
If kicker1.BallCntOver = 1 Then
If blacklightmultiball = 1 then
StopBlackLightMultiball
End If
End If
End Sub
Sub Kicker1_Hit():UpdateTrough:End Sub
Sub UpdateTrough()
UpdateTroughTimer.Interval = 300
UpdateTroughTimer.Enabled = 1
End Sub
Sub UpdateTroughTimer_Timer()
If kicker1.BallCntOver = 0 Then kicker2.kick 70,10
If kicker2.BallCntOver = 0 Then kicker3.kick 70,10
If kicker3.BallCntOver = 0 Then kicker4.kick 70,10
If kicker4.BallCntOver = 0 Then kicker5.kick 70,10
If kicker5.BallCntOver = 0 Then kicker6.kick 70,10
Me.Enabled = 0
End Sub
'******************************************************
' DRAIN & RELEASE
'******************************************************
Sub Drain_Hit()
PlaySoundAtVol "drain", Drain, 1
Controller.Switch(15) = 1
End Sub
Sub SolOuthole(enabled)
If enabled Then
Drain.kick 70,10
' PlaySound SoundFX(SSolenoidOn,DOFContactors)
PlaySound SoundFX("",DOFContactors)
PlaySoundAtVol "solenoid", Drain, VolKick
controller.switch(15) = false
End If
End Sub
Sub ReleaseBall
' PlaySound SoundFX("BallRelease2",DOFContactors)
PlaySound SoundFX("",DOFContactors)
PlaySoundAtVol "BallRelease2", Kicker1, VolKick
Kicker1.Kick 70,5
UpdateTrough
End Sub
'******************************************************
' UPPER PLAYFIELD KICKER
'******************************************************
Sub sw05_Hit():playsoundAtVol "kicker_enter",sw05,VolKick:controller.Switch(5)=1:End Sub
dim sw05Step
Sub sw05_Timer()
Select Case sw05Step
Case 0: TWKicker.transY = 2
Case 1: TWKicker.transY = 5
Case 2: TWKicker.transY = 5
Case 3: TWKicker.transY = 2
Case 4: TWKicker.transY = 0:Me.TimerEnabled = 0:sw05Step = 0
End Select
sw05Step = sw05Step + 1
End Sub
'******************************************************
' FLIPPERS
'******************************************************
Sub SolLFlipper(Enabled)
If Enabled Then
PlaySoundAtVol SoundFx("FlipperUp",DOFFlippers), LeftFlipper, VolFlip
PlaySoundAtVol "FlipperUp", LeftFlipper2, VolFlip
if Controller.Lamp(16) = 0 Then
LeftFlipper.RotateToEnd
LeftFlipper2.RotateToEnd
Else
LeftFlipper.RotateToStart
LeftFlipper2.RotateToStart
End If
If Controller.Lamp(17) Then
FlipperLL.RotateToEnd
Else
FlipperLL.RotateToStart
End If
Else
PlaySoundAtVol SoundFx("FlipperDown",DOFFlippers), LeftFlipper, VolFlip
PlaySoundAtVol "FlipperDown", LeftFlipper2 ,VolFlip
LeftFlipper.RotateToStart
LeftFlipper2.RotateToStart
FlipperLL.RotateToStart
End If
End Sub
Sub SolRFlipper(Enabled)
If Enabled Then
PlaySoundAtVol SoundFx("FlipperUp",DOFFlippers), RightFlipper, VolFlip
PlaySoundAtVol "FlipperUp", RightFlipper2, VolFlip
if Controller.Lamp(16) = 0 Then
RightFlipper.RotateToEnd
RightFlipper2.RotateToEnd
Else
RightFlipper.RotateToStart
RightFlipper2.RotateToStart
End If
If Controller.Lamp(17) Then
FlipperLR.RotateToEnd
Else
FlipperLR.RotateToStart
End If
Else
PlaySoundAtVol SoundFx("FlipperDown",DOFFlippers), RightFlipper, VolFlip
PlaySoundAtVol "FlipperDown", RightFlipper2, VolFlip
RightFlipper.RotateToStart
RightFlipper2.RotateToStart
FlipperLR.RotateToStart
End If
End Sub
'******************************************************
' KEYS
'******************************************************
Sub BlackHole_KeyUp(ByVal KeyCode)
If vpmKeyUp(KeyCode) Then Exit Sub
If KeyCode=PlungerKey Then PlaySoundAtVol"Plunger",Plunger,1:Plunger.Fire
End Sub
Sub BlackHole_KeyDown(ByVal KeyCode)
If vpmKeyDown(KeyCode) Then Exit Sub
If KeyCode=PlungerKey Then PlaySoundAtVol"PullbackPlunger",Plunger,1:Plunger.Pullback
'''''''''''''''''''''''''''
'' Test Keys
'''''''''''''''''''''''''''
If keycode = 20 then ''''''''''''''''''''T Key used for testing
End If
If keycode = 21 then ''''''''''''''''''''Y Key used for testing
'UpperPF.TopMaterial = "PlayfieldInvisible"
'UpperPF2.TopMaterial = "PlayfieldInvisible"
'ShadowB.TopMaterial = "PlayfieldInvisible"
'ShadowL.TopMaterial = "PlayfieldInvisible"
'ShadowA.TopMaterial = "PlayfieldInvisible"
'ShadowC.TopMaterial = "PlayfieldInvisible"
'ShadowK.TopMaterial = "PlayfieldInvisible"
'ShadowH.TopMaterial = "PlayfieldInvisible"
'ShadowO.TopMaterial = "PlayfieldInvisible"
'ShadowL2.TopMaterial = "PlayfieldInvisible"
'ShadowE.TopMaterial = "PlayfieldInvisible"
End If
If keycode = 22 then ''''''''''''''''''''U Key used for testing
'UpperPF.TopMaterial = "Playfield"
'UpperPF2.TopMaterial = "Playfield"
'ShadowB.TopMaterial = "Playfield"
'ShadowL.TopMaterial = "Playfield"
'ShadowA.TopMaterial = "Playfield"
'ShadowC.TopMaterial = "Playfield"
'ShadowK.TopMaterial = "Playfield"
'ShadowH.TopMaterial = "Playfield"
'ShadowO.TopMaterial = "Playfield"
'ShadowL2.TopMaterial = "Playfield"
'ShadowE.TopMaterial = "Playfield"
' testkick.enabled = true
' testkick.CreateBall
' testkick.kick 340,30
'' testkick.kick 15,60
' testkick.enabled = false
End If
End Sub
Sub Gate_TopLeft_Hit:vpmTimer.PulseSw(24):End Sub ' OK! switch 0
Sub Spinner1_Spin:vpmTimer.PulseSw (16):End Sub
'Confirmed Lights
Set Lights(3)=L3
Set Lights(4)=L4
Set Lights(5)=L5
Set Lights(7)=L7
Set Lights(19)=L19a
Set Lights(20)=L20a
Set Lights(21)=L21
Set Lights(22)=L22
Set Lights(23)=L23
Set Lights(24)=L24
Set Lights(25)=L25
Set Lights(26)=L26
Set Lights(27)=L27
Set Lights(28)=L28
Set Lights(29)=L29
Set Lights(30)=L30
Set Lights(31)=L31
Set Lights(32)=L32
Set Lights(33)=L33
Set Lights(34)=L34
Set Lights(35)=L35
Set Lights(36)=L36
Set Lights(37)=L37
Set Lights(38)=L38
Set Lights(39)=L39c
Set Lights(40)=L40
Set Lights(41)=L41
Set Lights(42)=L42
Set Lights(43)=L43
Set Lights(44)=L44
Set Lights(45)=L45
Set Lights(46)=L46
Set Lights(48)=L48
Set Lights(49)=L49
Set Lights(50)=L50
Set Lights(51)=L51
Set Lights(138)=L39b
Set Lights(139)=L39c
'Turns blacklights on or off
Sub CheckBlackLights()
If BlackLightMultiball = 1 Then
Blacklights.visible = False
Blacklights_LP.visible = False
Blacklight_apron.visible = False
Else
If BlackLights_on = 1 then
Blacklights.visible = true
Else
Blacklights.visible = false
End If
If LowerBlacklights_on = 1 then
Blacklights_LP.visible = true
Else
Blacklights_LP.visible = false
End If
If BlackLightApron = 1 Then
Blacklight_apron.visible = True
Else
Blacklight_apron.visible = false
End If
If BlackLightPlastics = 1 Then
pUpperPlasticB.DisableLighting = True
pUpperPlasticB.material = "AcrylicBLBlue"
pLeftPlasticsB.DisableLighting = True
pLeftPlasticsB.material = "AcrylicBLBlue"
pRightPlasticsB.DisableLighting = True
pRightPlasticsB.material = "AcrylicBLBlue"
pLPFplasticsB.DisableLighting = True
pLPFplasticsB.material = "AcrylicBLBlue"
Else
pUpperPlasticB.DisableLighting = False
pUpperPlasticB.material = "AcrylicClear"
pLeftPlasticsB.DisableLighting = False
pLeftPlasticsB.material = "AcrylicClear"
pRightPlasticsB.DisableLighting = False
pRightPlasticsB.material = "AcrylicClear"
pLPFplasticsB.DisableLighting = False
pLPFplasticsB.material = "AcrylicClear"
End If
End If
End Sub
Sub StartBlackLightMultiball()
Blacklights.visible = true
Blacklights_LP.visible = true
Blacklight_apron.visible = True
gi1.color = rgb(0,0,128)
gi1.colorfull = rgb(181,106,255)
gi2.color = rgb(0,0,128)
gi2.colorfull = rgb(181,106,255)
gi3.color = rgb(0,0,128)
gi3.colorfull = rgb(181,106,255)
gi4.color = rgb(0,0,128)
gi4.colorfull = rgb(181,106,255)
gi5.color = rgb(0,0,128)
gi5.colorfull = rgb(181,106,255)
gi6.color = rgb(0,0,128)
gi6.colorfull = rgb(181,106,255)
gi7.color = rgb(0,0,128)
gi7.colorfull = rgb(181,106,255)
gi8.color = rgb(0,0,128)
gi8.colorfull = rgb(181,106,255)
gi9.color = rgb(0,0,128)
gi9.colorfull = rgb(181,106,255)
gi10.color = rgb(0,0,128)
gi10.colorfull = rgb(181,106,255)
gi11.color = rgb(0,0,128)
gi11.colorfull = rgb(181,106,255)
If RedGravityTunnel = 1 then
gi12.color = rgb(255,0,0)
gi13.color = rgb(255,0,0)
gi12.colorfull = rgb(255,0,0)
gi13.colorfull = rgb(255,0,0)
Else
gi12.color = rgb(0,0,128)
gi12.colorfull = rgb(181,106,255)
gi13.color = rgb(0,0,128)
gi13.colorfull = rgb(181,106,255)
End If
gi14.color = rgb(0,0,128)
gi14.colorfull = rgb(181,106,255)
gi15.color = rgb(0,0,128)
gi15.colorfull = rgb(181,106,255)
gi16.color = rgb(0,0,128)
gi16.colorfull = rgb(181,106,255)
gi17.color = rgb(0,0,128)
gi17.colorfull = rgb(181,106,255)
lgi1.ImageA = "haloBL"
lgi2.ImageA = "haloBL"
lgi3.ImageA = "haloBL"
lgi4.ImageA = "haloBL"
Flasher20.ImageA = "haloBL"
Flasher21.ImageA = "haloBL"
Flasher22.ImageA = "haloBL"
Flasher23.ImageA = "haloBL"
Flasher24.ImageA = "haloBL"
Flasher25.ImageA = "haloBL"
Flasher26.ImageA = "haloBL"
Flasher27.ImageA = "haloBL"
End Sub
Sub StopBlackLightMultiball()
Blacklights.visible = False
Blacklights_LP.visible = False
Blacklight_apron.visible = False
gi1.color = rgb(255,255,255)
gi1.colorfull = rgb(255,255,255)
gi2.color = rgb(255,255,255)
gi2.colorfull = rgb(255,255,255)
gi3.color = rgb(255,255,255)
gi3.colorfull = rgb(255,255,255)
gi4.color = rgb(255,255,255)
gi4.colorfull = rgb(255,255,255)
gi5.color = rgb(255,255,255)
gi5.colorfull = rgb(255,255,255)
gi6.color = rgb(255,255,255)
gi6.colorfull = rgb(255,255,255)
gi7.color = rgb(255,255,255)
gi7.colorfull = rgb(255,255,255)
gi8.color = rgb(255,255,255)
gi8.colorfull = rgb(255,255,255)
gi9.color = rgb(255,255,255)
gi9.colorfull = rgb(255,255,255)
gi10.color = rgb(255,255,255)
gi10.colorfull = rgb(255,255,255)
gi11.color = rgb(255,255,255)
gi11.colorfull = rgb(255,255,255)
If RedGravityTunnel = 1 then
gi12.color = rgb(255,0,0)
gi13.color = rgb(255,0,0)
gi12.colorfull = rgb(255,0,0)
gi13.colorfull = rgb(255,0,0)
Else
gi12.color = rgb(255,255,255)
gi12.colorfull = rgb(255,255,255)
gi13.color = rgb(255,255,255)
gi13.colorfull = rgb(255,255,255)
End If
gi14.color = rgb(255,255,255)
gi14.colorfull = rgb(255,255,255)
gi15.color = rgb(255,255,255)
gi15.colorfull = rgb(255,255,255)
gi16.color = rgb(255,255,255)
gi16.colorfull = rgb(255,255,255)
gi17.color = rgb(255,255,255)
gi17.colorfull = rgb(255,255,255)
lgi1.ImageA = "GIWhite"
lgi2.ImageA = "GIWhite"
lgi3.ImageA = "GIWhite"
lgi4.ImageA = "GIWhite"
Flasher20.ImageA = "GIWhite"
Flasher21.ImageA = "GIWhite"
Flasher22.ImageA = "GIWhite"
Flasher23.ImageA = "GIWhite"
Flasher24.ImageA = "GIWhite"
Flasher25.ImageA = "GIWhite"
Flasher26.ImageA = "GIWhite"
Flasher27.ImageA = "GIWhite"
End Sub
'Check Day or Night
Sub CheckDayOrNight()
If NightMod = 1 then
Primitive10.image = "metal_rotated_night"
Primitive8.image = "metal_night"
Primitive7.image = "metal_night"
Primitive9.image = "metal_rotated_night"
Screw7.image = "screw_hex_night"
Screw6.image = "screw_hex_night"
Screw3.image = "screw_hex_night"
Screw9.image = "screw_hex_night"
Screw10.image = "screw_hex_night"
Screw4.image = "screw_hex_night"
Screw8.image = "screw_hex_night"
Screw5.image = "screw_hex_night"
Screw1.image = "screw_hex_night"
Screw2.image = "screw_hex_night"
Else
Primitive10.image = "metal_rotated"
Primitive8.image = "metal"
Primitive7.image = "metal"
Primitive9.image = "metal_rotated"
Screw7.image = "screw_hex"
Screw6.image = "screw_hex"
Screw3.image = "screw_hex"
Screw9.image = "screw_hex"
Screw10.image = "screw_hex"
Screw4.image = "screw_hex"
Screw8.image = "screw_hex"
Screw5.image = "screw_hex"
Screw1.image = "screw_hex"
Screw2.image = "screw_hex"
End If
End Sub
Sub SetCaptiveLightColor()
If CaptiveLight = 1 then LCaptiveLight.Color = rgb(0,255,255):LCaptiveLight.Color = rgb(0,255,255):CaptiveLightHalo.imageA = "haloBlue" End If 'blue
If CaptiveLight = 2 then LCaptiveLight.Color = rgb(255,128,0):LCaptiveLight.Color = rgb(255,128,0):CaptiveLightHalo.imageA = "halo Orange" End If 'orange
If CaptiveLight = 3 then LCaptiveLight.Color = rgb(0,255,0):LCaptiveLight.Color = rgb(0,255,0):CaptiveLightHalo.imageA = "haloGreen" End If 'green
If CaptiveLight = 4 then LCaptiveLight.Color = rgb(136,17,255):LCaptiveLight.Color = rgb(136,17,255):CaptiveLightHalo.imageA = "haloPurple" End If 'purple
If CaptiveLight = 5 then LCaptiveLight.Color = rgb(255,0,0):LCaptiveLight.Color = rgb(255,0,0):CaptiveLightHalo.imageA = "haloRed" End If 'red
If CaptiveLight = 6 then LCaptiveLight.Color = rgb(255,255,255):LCaptiveLight.Color = rgb(255,255,128):CaptiveLightHalo.imageA = "haloWhite" End If 'white
If CaptiveLight = 7 then LCaptiveLight.Color = rgb(255,255,0):LCaptiveLight.Color = rgb(255,255,0):CaptiveLightHalo.imageA = "haloYellow" End If 'yellow
End Sub
' Changes Flipper Colors
Sub CheckFlipperColors()
If UpperFlipperColor = 0 then
PLeftFlipper.image = "flipper_red_left"
PLeftFlipper2.image = "flipper_red_left"
PRightFlipper.image = "flipper_red_right"
PRightFlipper2.image = "flipper_red_right"
End If
If UpperFlipperColor = 1 then
PLeftFlipper.image = "flipper_black_left"
PLeftFlipper2.image = "flipper_black_left"
PRightFlipper.image = "flipper_black_right"
PRightFlipper2.image = "flipper_black_right"
End If
If UpperFlipperColor = 2 then
PLeftFlipper.image = "flipper_Yellow_left"
PLeftFlipper2.image = "flipper_Yellow_left"
PRightFlipper.image = "flipper_Yellow_right"
PRightFlipper2.image = "flipper_Yellow_right"
End If
If UpperFlipperColor = 3 then
PLeftFlipper.image = "flipper_Blue_left"
PLeftFlipper2.image = "flipper_Blue_left"
PRightFlipper.image = "flipper_Blue_right"
PRightFlipper2.image = "flipper_Blue_right"
End If
If LowerFlipperColor = 0 then
PLeftFlipperLL.image = "flipper_red_left"
PLeftFlipperLR.image = "flipper_red_right"
End If
If LowerFlipperColor = 1 then
PLeftFlipperLL.image = "flipper_black_left"
PLeftFlipperLR.image = "flipper_black_right"
End If
If LowerFlipperColor = 2 then
PLeftFlipperLL.image = "flipper_Yellow_left"
PLeftFlipperLR.image = "flipper_Yellow_right"
End If
If LowerFlipperColor = 3 then
PLeftFlipperLL.image = "flipper_Blue_left"
PLeftFlipperLR.image = "flipper_Blue_right"
End If
End Sub
' Cheaters
Sub CheckCheaters()
If UpperPeg = 1 then
Primitive41.Visible = true
Rubber35.Collidable = true
Rubber35.Visible = True
Else
Primitive41.Visible = False
Rubber35.Collidable = False
Rubber35.Visible = False
End If
If LowerPeg = 1 then
PegMetalT2.Visible = true
Rubber36.Collidable = true
Rubber36.Visible = True
Else
PegMetalT2.Visible = False
Rubber36.Collidable = False
Rubber36.Visible = False
End If
If LeftDrain = 1 then
Rubber41.visible = True
Rubber40.visible = true
Rubber42.visible = false
LeftDrainRubber3a.visible = False
LeftDrainRubber3a.collidable = False
wLeftDrainC.isdropped = true
wLeftDrainB.isdropped = true
Screw8.visible = false
PegPlasticT8Twin3.visible = false
PegPlasticT8.visible = true
End If
If LeftDrain = 2 then
Rubber41.visible = True
Rubber40.visible = false
Rubber42.visible = true
LeftDrainRubber3a.visible = False
LeftDrainRubber3a.collidable = False
wLeftDrainC.isdropped = true
wLeftDrainB.isdropped = true
Screw8.visible = true
PegPlasticT8Twin3.visible = true
PegPlasticT8.visible = false
End If
If LeftDrain = 3 then
Rubber41.visible = false
Rubber40.visible = false
Rubber42.visible = false
LeftDrainRubber3a.visible = true
LeftDrainRubber3a.collidable = true
wLeftDrainC.isdropped = false
wLeftDrainB.isdropped = false
Screw8.visible = true
PegPlasticT8Twin3.visible = true
PegPlasticT8.visible = false
End If
End Sub
Dim LowerGIBuzzStep
Sub LowerGIBuzz_timer()
Select Case LowerGIBuzzStep
Case 1: If GIbuzz = 1 then PlaySound "LowerGIon" End If
Case 2:
Case 3:
Case 4: LowerGIBuzzStep = 2
End Select
LowerGIBuzzStep = LowerGIBuzzStep + 1
End Sub
Dim WooshStep
Sub Woosh_timer()
Select Case WooshStep
Case 1:
Case 2:
Case 3: If WhooshSound = 1 then PlaySound "Woosh" End If
Case 4:
Case 5:
Case 6:
Case 7:
Case 8:WooshStep = 0
End Select
WooshStep = WooshStep + 1
End Sub
''''''''''''''''''''''''''''''''''''
'''''''''' GI ColorMod
''''''''''''''''''''''''''''''''''''
Sub CheckGIColorMod()
If BlackLightMultiball = 0 then
If GIColorMod = 0 then
gi1.color = rgb(255,255,255)
gi1.colorfull = rgb(255,255,255)
gi2.color = rgb(255,255,255)
gi2.colorfull = rgb(255,255,255)
gi3.color = rgb(255,255,255)
gi3.colorfull = rgb(255,255,255)
gi4.color = rgb(255,255,255)
gi4.colorfull = rgb(255,255,255)
gi5.color = rgb(255,255,255)
gi5.colorfull = rgb(255,255,255)
gi6.color = rgb(255,255,255)
gi6.colorfull = rgb(255,255,255)
gi7.color = rgb(255,255,255)
gi7.colorfull = rgb(255,255,255)
gi8.color = rgb(255,255,255)
gi8.colorfull = rgb(255,255,255)
gi9.color = rgb(255,255,255)
gi9.colorfull = rgb(255,255,255)
gi10.color = rgb(255,255,255)
gi10.colorfull = rgb(255,255,255)
gi11.color = rgb(255,255,255)
gi11.colorfull = rgb(255,255,255)
If RedGravityTunnel = 1 then
gi12.color = rgb(255,0,0)
gi13.color = rgb(255,0,0)
gi12.colorfull = rgb(255,0,0)
gi13.colorfull = rgb(255,0,0)
Else
gi12.color = rgb(255,255,255)
gi12.colorfull = rgb(255,255,255)
gi13.color = rgb(255,255,255)