-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathBattlestar Galactica (Williams 1980) Mod v1.02F.vbs
2110 lines (1873 loc) · 85.7 KB
/
Battlestar Galactica (Williams 1980) Mod v1.02F.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
' Scorpion Williams 1980
' Allknowing2012 - PF, plastics from internet
' IPDB for switches and VP9 table
' Script segments from various tables and authors
' 1.0b - hide the backglass lights when no int desktop mode
' 1.0c - thanks to Wolis who also reached out with some code/setting ideas (unreleased)
' 2.0 - big graphix updates by Thalamus and Hauntfreaks. Flashers and multiball bug fix
' 2.1 - added flipper and ball shadows from Hauntfreaks Cartoons, PMD Sounds
' 2.1a - remove lane switch pulse - also tweak one rubber so it doesnt alwayus exit to the right :-)
Option Explicit
Randomize
' Thalamus 2018-11-01 : Improved directional sounds
' !! NOTE : Table not verified yet !!
' 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 VolPo = 1 ' Rubber posts volume.
Const VolPi = 1 ' Rubber pins volume.
Const VolTarg = 1 ' Targets volume.
Const VolSpin = 1.5 ' Spinners volume.
Const VolFlip = 1 ' Flipper volume.
'**********************************************************
'******** OPTIONS *******************************
'**********************************************************
Dim BallShadows: Ballshadows=1 '****************** set to 1 to turn on Ball shadows
Dim FlipperShadows: FlipperShadows=1 '*********** set to 1 to turn on Flipper shadows
If Table.ShowDT = False then
light64.visible=False
light57.visible=False
light58.visible=False
light59.visible=False
light60.visible=False
light50.visible=False
light51.visible=False
light52.visible=False
light53.visible=False
SideWood.visible=False
Topwood.visible=False
Flasherpic1.visible=True
End If
On Error Resume Next
ExecuteGlobal GetTextFile("controller.vbs")
If Err Then MsgBox "Can't open controller.vbs"
On Error Goto 0
Const cGameName = "scrpn_l1"
Dim xx
Dim dtl,dtC1,dtC2,dtR,bsSaucer,bsSaucer2,bsTrough
Dim BIP,aa,bb,cc,dd,ee,ff
'**********************************************
'Fluppers Flashers
Dim FlashLevel1, FlashLevel2, FlashLevel3, FlashLevel4, FlashLevel5, FlashLevel6, FlashLevel7, FlashLevel8, FlashLevel9, FlashLevel10
FlasherLight1.IntensityScale = 0
FlasherLight2.IntensityScale = 0
FlasherLight3.IntensityScale = 0
FlasherLight4.IntensityScale = 0
FlasherLight5.IntensityScale = 0
FlasherLight6.IntensityScale = 0
FlasherLight7.IntensityScale = 0
FlasherLight8.IntensityScale = 0
FlasherLight9.IntensityScale = 0
FlasherLight10.IntensityScale = 0
'*** white flasher ***
Sub FlasherFlash1_Timer()
dim flashx3, matdim
If not FlasherFlash1.TimerEnabled Then
FlasherFlash1.TimerEnabled = True
FlasherFlash1.visible = 1
FlasherLit1.visible = 1
End If
flashx3 = FlashLevel1 * FlashLevel1 * FlashLevel1
Flasherflash1.opacity = 1000 * flashx3
FlasherLit1.BlendDisableLighting = 10 * flashx3
Flasherbase1.BlendDisableLighting = flashx3
FlasherLight1.IntensityScale = flashx3
matdim = Round(10 * FlashLevel1)
FlasherLit1.material = "domelit" & matdim
FlashLevel1 = FlashLevel1 * 0.85 - 0.01
If FlashLevel1 < 0.15 Then
FlasherLit1.visible = 0
Else
FlasherLit1.visible = 1
end If
If FlashLevel1 < 0 Then
FlasherFlash1.TimerEnabled = False
FlasherFlash1.visible = 0
End If
End Sub
'*** white flasher ***
Sub FlasherFlash2_Timer()
dim flashx3, matdim
If not FlasherFlash2.TimerEnabled Then
FlasherFlash2.TimerEnabled = True
FlasherFlash2.visible = 1
FlasherLit2.visible = 1
End If
flashx3 = FlashLevel2 * FlashLevel2 * FlashLevel2
Flasherflash2.opacity = 1000 * flashx3
FlasherLit2.BlendDisableLighting = 10 * flashx3
Flasherbase2.BlendDisableLighting = flashx3
FlasherLight2.IntensityScale = flashx3
matdim = Round(10 * FlashLevel2)
FlasherLit2.material = "domelit" & matdim
FlashLevel2 = FlashLevel2 * 0.85 - 0.01
If FlashLevel2 < 0.15 Then
FlasherLit2.visible = 0
Else
FlasherLit2.visible = 1
end If
If FlashLevel2 < 0 Then
FlasherFlash2.TimerEnabled = False
FlasherFlash2.visible = 0
End If
End Sub
'*** white flasher ***
Sub FlasherFlash3_Timer()
dim flashx3, matdim
If not FlasherFlash3.TimerEnabled Then
FlasherFlash3.TimerEnabled = True
FlasherFlash3.visible = 1
FlasherLit3.visible = 1
End If
flashx3 = FlashLevel3 * FlashLevel3 * FlashLevel3
Flasherflash3.opacity = 1000 * flashx3
FlasherLit3.BlendDisableLighting = 10 * flashx3
Flasherbase3.BlendDisableLighting = flashx3
FlasherLight3.IntensityScale = flashx3
matdim = Round(10 * FlashLevel3)
FlasherLit3.material = "domelit" & matdim
FlashLevel3 = FlashLevel3 * 0.85 - 0.01
If FlashLevel3 < 0.15 Then
FlasherLit3.visible = 0
Else
FlasherLit3.visible = 1
end If
If FlashLevel3 < 0 Then
FlasherFlash3.TimerEnabled = False
FlasherFlash3.visible = 0
End If
End Sub
'*** white flasher ***
Sub FlasherFlash4_Timer()
dim flashx3, matdim
If not FlasherFlash4.TimerEnabled Then
FlasherFlash4.TimerEnabled = True
FlasherFlash4.visible = 1
FlasherLit4.visible = 1
End If
flashx3 = FlashLevel4 * FlashLevel4 * FlashLevel4
Flasherflash4.opacity = 1000 * flashx3
FlasherLit4.BlendDisableLighting = 10 * flashx3
Flasherbase4.BlendDisableLighting = flashx3
FlasherLight4.IntensityScale = flashx3
matdim = Round(10 * FlashLevel4)
FlasherLit4.material = "domelit" & matdim
FlashLevel4 = FlashLevel4 * 0.85 - 0.01
If FlashLevel4 < 0.15 Then
FlasherLit4.visible = 0
Else
FlasherLit4.visible = 1
end If
If FlashLevel4 < 0 Then
FlasherFlash4.TimerEnabled = False
FlasherFlash4.visible = 0
End If
End Sub
'*** white flasher ***
Sub FlasherFlash5_Timer()
dim flashx3, matdim
If not FlasherFlash5.TimerEnabled Then
FlasherFlash5.TimerEnabled = True
FlasherFlash5.visible = 1
FlasherLit5.visible = 1
End If
flashx3 = FlashLevel5 * FlashLevel5 * FlashLevel5
Flasherflash5.opacity = 1000 * flashx3
FlasherLit5.BlendDisableLighting = 10 * flashx3
Flasherbase5.BlendDisableLighting = flashx3
FlasherLight5.IntensityScale = flashx3
matdim = Round(10 * FlashLevel5)
FlasherLit5.material = "domelit" & matdim
FlashLevel5 = FlashLevel5 * 0.85 - 0.01
If FlashLevel5 < 0.15 Then
FlasherLit5.visible = 0
Else
FlasherLit5.visible = 1
end If
If FlashLevel5 < 0 Then
FlasherFlash5.TimerEnabled = False
FlasherFlash5.visible = 0
End If
End Sub
'*** white flasher ***
Sub FlasherFlash6_Timer()
dim flashx3, matdim
If not FlasherFlash6.TimerEnabled Then
FlasherFlash6.TimerEnabled = True
FlasherFlash6.visible = 1
FlasherLit6.visible = 1
End If
flashx3 = FlashLevel6 * FlashLevel6 * FlashLevel6
Flasherflash6.opacity = 1000 * flashx3
FlasherLit6.BlendDisableLighting = 10 * flashx3
Flasherbase6.BlendDisableLighting = flashx3
FlasherLight6.IntensityScale = flashx3
matdim = Round(10 * FlashLevel6)
FlasherLit6.material = "domelit" & matdim
FlashLevel6 = FlashLevel6 * 0.85 - 0.01
If FlashLevel6 < 0.15 Then
FlasherLit6.visible = 0
Else
FlasherLit6.visible = 1
end If
If FlashLevel6 < 0 Then
FlasherFlash6.TimerEnabled = False
FlasherFlash6.visible = 0
End If
End Sub
'*** blue flasher ***
Sub FlasherFlash7_Timer()
dim flashx3, matdim
If not Flasherflash7.TimerEnabled Then
Flasherflash7.TimerEnabled = True
Flasherflash7.visible = 1
Flasherlit7.visible = 1
End If
flashx3 = FlashLevel7 * FlashLevel7 * FlashLevel7
Flasherflash7.opacity = 8000 * flashx3
Flasherlit7.BlendDisableLighting = 10 * flashx3
Flasherbase7.BlendDisableLighting = flashx3
Flasherlight7.IntensityScale = flashx3
matdim = Round(10 * FlashLevel7)
Flasherlit7.material = "domelit" & matdim
FlashLevel7 = FlashLevel7 * 0.85 - 0.01
If FlashLevel7 < 0.15 Then
Flasherlit7.visible = 0
Else
Flasherlit7.visible = 1
end If
If FlashLevel7 < 0 Then
Flasherflash7.TimerEnabled = False
Flasherflash7.visible = 0
End If
End Sub
'*** white flasher ***
Sub FlasherFlash8_Timer()
dim flashx3, matdim
If not FlasherFlash8.TimerEnabled Then
FlasherFlash8.TimerEnabled = True
FlasherFlash8.visible = 1
FlasherLit8.visible = 1
End If
flashx3 = FlashLevel8 * FlashLevel8 * FlashLevel8
Flasherflash8.opacity = 1000 * flashx3
FlasherLit8.BlendDisableLighting = 10 * flashx3
Flasherbase8.BlendDisableLighting = flashx3
FlasherLight8.IntensityScale = flashx3
matdim = Round(10 * FlashLevel8)
FlasherLit8.material = "domelit" & matdim
FlashLevel8 = FlashLevel8 * 0.85 - 0.01
If FlashLevel8 < 0.15 Then
FlasherLit8.visible = 0
Else
FlasherLit8.visible = 1
end If
If FlashLevel8 < 0 Then
FlasherFlash8.TimerEnabled = False
FlasherFlash8.visible = 0
End If
End Sub
'*** Red flasher ***
Sub FlasherFlash9_Timer()
dim flashx3, matdim
If not Flasherflash9.TimerEnabled Then
Flasherflash9.TimerEnabled = True
Flasherflash9.visible = 1
Flasherlit9.visible = 1
End If
flashx3 = FlashLevel9 * FlashLevel9 * FlashLevel9
Flasherflash9.opacity = 1500 * flashx3
Flasherlit9.BlendDisableLighting = 10 * flashx3
Flasherbase9.BlendDisableLighting = flashx3
Flasherlight9.IntensityScale = flashx3
matdim = Round(10 * FlashLevel9)
Flasherlit9.material = "domelit" & matdim
FlashLevel9 = FlashLevel9 * 0.9 - 0.01
If FlashLevel9 < 0.15 Then
Flasherlit9.visible = 0
Else
Flasherlit9.visible = 1
end If
If FlashLevel9 < 0 Then
Flasherflash9.TimerEnabled = False
Flasherflash9.visible = 0
End If
End Sub
'*** white flasher ***
Sub FlasherFlash10_Timer()
dim flashx3, matdim
If not FlasherFlash10.TimerEnabled Then
FlasherFlash10.TimerEnabled = True
FlasherFlash10.visible = 1
FlasherLit10.visible = 1
End If
flashx3 = FlashLevel10 * FlashLevel10 * FlashLevel10
Flasherflash10.opacity = 1000 * flashx3
FlasherLit10.BlendDisableLighting = 10 * flashx3
Flasherbase10.BlendDisableLighting = flashx3
FlasherLight10.IntensityScale = flashx3
matdim = Round(10 * FlashLevel10)
FlasherLit10.material = "domelit" & matdim
FlashLevel10 = FlashLevel10 * 0.85 - 0.01
If FlashLevel10 < 0.15 Then
FlasherLit10.visible = 0
Else
FlasherLit10.visible = 1
end If
If FlashLevel10 < 0 Then
FlasherFlash10.TimerEnabled = False
FlasherFlash10.visible = 0
End If
End Sub
'**********************************************
'STAT's Modified Change Team script
Dim TotalBump, BumpNow, TotalBumpb, Bumpnowb, TotalBumpc, Bumpnowc, TotalBumpd, Bumpnowd
TotalBumpd = 2
Sub Change8Bump
BumpNowd = BumpNowd + 1
If BumpNowd > 1 Then
WallApron.image = "scorpion-apron-"&BumpNowd
WallApronLower.image = "scorpion-apron-"&BumpNowd
Else
WallApron.image = "scorpion-apron"
WallApronLower.image = "scorpion-apron"
End If
If BumpNowd = TotalBumpd Then BumpNowd = 0
End Sub
TotalBumpc = 6
Sub Change6Bump
BumpNowc = BumpNowc + 1
If BumpNowc > 1 Then
Target1.image = "DropTarget-scorpion-"&BumpNowc
Target2.image = "DropTarget-scorpion-"&BumpNowc
Target3.image = "DropTarget-scorpion-"&BumpNowc
Target4.image = "DropTarget-scorpion-"&BumpNowc
Target5.image = "DropTarget-scorpion-"&BumpNowc
Target6.image = "DropTarget-scorpion-"&BumpNowc
Target7.image = "DropTarget-scorpion-"&BumpNowc
Target8.image = "DropTarget-scorpion-"&BumpNowc
Target9.image = "DropTarget-scorpion-"&BumpNowc
Target10.image = "DropTarget-scorpion-"&BumpNowc
Target11.image = "DropTarget-scorpion-"&BumpNowc
Else
Target1.image = "DropTarget-scorpion"
Target2.image = "DropTarget-scorpion"
Target3.image = "DropTarget-scorpion"
Target4.image = "DropTarget-scorpion"
Target5.image = "DropTarget-scorpion"
Target6.image = "DropTarget-scorpion"
Target7.image = "DropTarget-scorpion"
Target8.image = "DropTarget-scorpion"
Target9.image = "DropTarget-scorpion"
Target10.image = "DropTarget-scorpion"
Target11.image = "DropTarget-scorpion"
End If
If BumpNowc = TotalBumpc Then BumpNowc = 0
End Sub
TotalBump = 10
Sub Change4Bump
BumpNow = BumpNow + 1
If BumpNow > 1 Then
PL3.image = "scorpion-bumpercap-"&BumpNow
PL2.image = "scorpion-bumpercap-"&BumpNow
PL1.image = "scorpion-bumpercap-"&BumpNow
Else
PL3.image = "scorpion-bumpercap"
PL2.image = "scorpion-bumpercap"
PL1.image = "scorpion-bumpercap"
End If
If BumpNow = TotalBump Then BumpNow = 0
End Sub
TotalBumpb = 18
Sub Change2Bump
BumpNowb = BumpNowb + 1
If BumpNowb = 1 Then
Flasherpic1.visible = 0:Flasherpic2.visible = 1:Flasherpic3.visible = 0:Flasherpic4.visible = 0:Flasherpic5.visible = 0:Flasherpic6.visible = 0
Flasherpic7.visible = 0:Flasherpic8.visible = 0:Flasherpic9.visible = 0:Flasherpic10.visible = 0:Flasherpic11.visible = 0:Flasherpic12.visible = 0
Flasherpic13.visible = 0:Flasherpic14.visible = 0:Flasherpic15.visible = 0:Flasherpic16.visible = 0:Flasherpic17.visible = 0:Flasherpic18.visible = 0
End If
If BumpNowb = 2 Then
Flasherpic1.visible = 0:Flasherpic2.visible = 0:Flasherpic3.visible = 1:Flasherpic4.visible = 0:Flasherpic5.visible = 0:Flasherpic6.visible = 0
Flasherpic7.visible = 0:Flasherpic8.visible = 0:Flasherpic9.visible = 0:Flasherpic10.visible = 0:Flasherpic11.visible = 0:Flasherpic12.visible = 0
Flasherpic13.visible = 0:Flasherpic14.visible = 0:Flasherpic15.visible = 0:Flasherpic16.visible = 0:Flasherpic17.visible = 0:Flasherpic18.visible = 0
End If
If BumpNowb = 3 Then
Flasherpic1.visible = 0:Flasherpic2.visible = 0:Flasherpic3.visible = 0:Flasherpic4.visible = 1:Flasherpic5.visible = 0:Flasherpic6.visible = 0
Flasherpic7.visible = 0:Flasherpic8.visible = 0:Flasherpic9.visible = 0:Flasherpic10.visible = 0:Flasherpic11.visible = 0:Flasherpic12.visible = 0
Flasherpic13.visible = 0:Flasherpic14.visible = 0:Flasherpic15.visible = 0:Flasherpic16.visible = 0:Flasherpic17.visible = 0:Flasherpic18.visible = 0
End If
If BumpNowb = 4 Then
Flasherpic1.visible = 0:Flasherpic2.visible = 0:Flasherpic3.visible = 0:Flasherpic4.visible = 0:Flasherpic5.visible = 1:Flasherpic6.visible = 0
Flasherpic7.visible = 0:Flasherpic8.visible = 0:Flasherpic9.visible = 0:Flasherpic10.visible = 0:Flasherpic11.visible = 0:Flasherpic12.visible = 0
Flasherpic13.visible = 0:Flasherpic14.visible = 0:Flasherpic15.visible = 0:Flasherpic16.visible = 0:Flasherpic17.visible = 0:Flasherpic18.visible = 0
End If
If BumpNowb = 5 Then
Flasherpic1.visible = 0:Flasherpic2.visible = 0:Flasherpic3.visible = 0:Flasherpic4.visible = 0:Flasherpic5.visible = 0:Flasherpic6.visible = 1
Flasherpic7.visible = 0:Flasherpic8.visible = 0:Flasherpic9.visible = 0:Flasherpic10.visible = 0:Flasherpic11.visible = 0:Flasherpic12.visible = 0
Flasherpic13.visible = 0:Flasherpic14.visible = 0:Flasherpic15.visible = 0:Flasherpic16.visible = 0:Flasherpic17.visible = 0:Flasherpic18.visible = 0
End If
If BumpNowb = 6 Then
Flasherpic1.visible = 0:Flasherpic2.visible = 0:Flasherpic3.visible = 0:Flasherpic4.visible = 0:Flasherpic5.visible = 0:Flasherpic6.visible = 0
Flasherpic7.visible = 1:Flasherpic8.visible = 0:Flasherpic9.visible = 0:Flasherpic10.visible = 0:Flasherpic11.visible = 0:Flasherpic12.visible = 0
Flasherpic13.visible = 0:Flasherpic14.visible = 0:Flasherpic15.visible = 0:Flasherpic16.visible = 0:Flasherpic17.visible = 0:Flasherpic18.visible = 0
End If
If BumpNowb = 7 Then
Flasherpic1.visible = 0:Flasherpic2.visible = 0:Flasherpic3.visible = 0:Flasherpic4.visible = 0:Flasherpic5.visible = 0:Flasherpic6.visible = 0
Flasherpic7.visible = 0:Flasherpic8.visible = 1:Flasherpic9.visible = 0:Flasherpic10.visible = 0:Flasherpic11.visible = 0:Flasherpic12.visible = 0
Flasherpic13.visible = 0:Flasherpic14.visible = 0:Flasherpic15.visible = 0:Flasherpic16.visible = 0:Flasherpic17.visible = 0:Flasherpic18.visible = 0
End If
If BumpNowb = 8 Then
Flasherpic1.visible = 0:Flasherpic2.visible = 0:Flasherpic3.visible = 0:Flasherpic4.visible = 0:Flasherpic5.visible = 0:Flasherpic6.visible = 0
Flasherpic7.visible = 0:Flasherpic8.visible = 0:Flasherpic9.visible = 1:Flasherpic10.visible = 0:Flasherpic11.visible = 0:Flasherpic12.visible = 0
Flasherpic13.visible = 0:Flasherpic14.visible = 0:Flasherpic15.visible = 0:Flasherpic16.visible = 0:Flasherpic17.visible = 0:Flasherpic18.visible = 0
End If
If BumpNowb = 9 Then
Flasherpic1.visible = 0:Flasherpic2.visible = 0:Flasherpic3.visible = 0:Flasherpic4.visible = 0:Flasherpic5.visible = 0:Flasherpic6.visible = 0
Flasherpic7.visible = 0:Flasherpic8.visible = 0:Flasherpic9.visible = 0:Flasherpic10.visible = 1:Flasherpic11.visible = 0:Flasherpic12.visible = 0
Flasherpic13.visible = 0:Flasherpic14.visible = 0:Flasherpic15.visible = 0:Flasherpic16.visible = 0:Flasherpic17.visible = 0:Flasherpic18.visible = 0
End If
If BumpNowb = 10 Then
Flasherpic1.visible = 0:Flasherpic2.visible = 0:Flasherpic3.visible = 0:Flasherpic4.visible = 0:Flasherpic5.visible = 0:Flasherpic6.visible = 0
Flasherpic7.visible = 0:Flasherpic8.visible = 0:Flasherpic9.visible = 0:Flasherpic10.visible = 0:Flasherpic11.visible = 1:Flasherpic12.visible = 0
Flasherpic13.visible = 0:Flasherpic14.visible = 0:Flasherpic15.visible = 0:Flasherpic16.visible = 0:Flasherpic17.visible = 0:Flasherpic18.visible = 0
End If
If BumpNowb = 11 Then
Flasherpic1.visible = 0:Flasherpic2.visible = 0:Flasherpic3.visible = 0:Flasherpic4.visible = 0:Flasherpic5.visible = 0:Flasherpic6.visible = 0
Flasherpic7.visible = 0:Flasherpic8.visible = 0:Flasherpic9.visible = 0:Flasherpic10.visible = 0:Flasherpic11.visible = 0:Flasherpic12.visible = 1
Flasherpic13.visible = 0:Flasherpic14.visible = 0:Flasherpic15.visible = 0:Flasherpic16.visible = 0:Flasherpic17.visible = 0:Flasherpic18.visible = 0
End If
If BumpNowb = 12 Then
Flasherpic1.visible = 0:Flasherpic2.visible = 0:Flasherpic3.visible = 0:Flasherpic4.visible = 0:Flasherpic5.visible = 0:Flasherpic6.visible = 0
Flasherpic7.visible = 0:Flasherpic8.visible = 0:Flasherpic9.visible = 0:Flasherpic10.visible = 0:Flasherpic11.visible = 0:Flasherpic12.visible = 0
Flasherpic13.visible = 1:Flasherpic14.visible = 0:Flasherpic15.visible = 0:Flasherpic16.visible = 0:Flasherpic17.visible = 0:Flasherpic18.visible = 0
End If
If BumpNowb = 13 Then
Flasherpic1.visible = 0:Flasherpic2.visible = 0:Flasherpic3.visible = 0:Flasherpic4.visible = 0:Flasherpic5.visible = 0:Flasherpic6.visible = 0
Flasherpic7.visible = 0:Flasherpic8.visible = 0:Flasherpic9.visible = 0:Flasherpic10.visible = 0:Flasherpic11.visible = 0:Flasherpic12.visible = 0
Flasherpic13.visible = 0:Flasherpic14.visible = 1:Flasherpic15.visible = 0:Flasherpic16.visible = 0:Flasherpic17.visible = 0:Flasherpic18.visible = 0
End If
If BumpNowb = 14 Then
Flasherpic1.visible = 0:Flasherpic2.visible = 0:Flasherpic3.visible = 0:Flasherpic4.visible = 0:Flasherpic5.visible = 0:Flasherpic6.visible = 0
Flasherpic7.visible = 0:Flasherpic8.visible = 0:Flasherpic9.visible = 0:Flasherpic10.visible = 0:Flasherpic11.visible = 0:Flasherpic12.visible = 0
Flasherpic13.visible = 0:Flasherpic14.visible = 0:Flasherpic15.visible = 1:Flasherpic16.visible = 0:Flasherpic17.visible = 0:Flasherpic18.visible = 0
End If
If BumpNowb = 15 Then
Flasherpic1.visible = 0:Flasherpic2.visible = 0:Flasherpic3.visible = 0:Flasherpic4.visible = 0:Flasherpic5.visible = 0:Flasherpic6.visible = 0
Flasherpic7.visible = 0:Flasherpic8.visible = 0:Flasherpic9.visible = 0:Flasherpic10.visible = 0:Flasherpic11.visible = 0:Flasherpic12.visible = 0
Flasherpic13.visible = 0:Flasherpic14.visible = 0:Flasherpic15.visible = 0:Flasherpic16.visible = 1:Flasherpic17.visible = 0:Flasherpic18.visible = 0
End If
If BumpNowb = 16 Then
Flasherpic1.visible = 0:Flasherpic2.visible = 0:Flasherpic3.visible = 0:Flasherpic4.visible = 0:Flasherpic5.visible = 0:Flasherpic6.visible = 0
Flasherpic7.visible = 0:Flasherpic8.visible = 0:Flasherpic9.visible = 0:Flasherpic10.visible = 0:Flasherpic11.visible = 0:Flasherpic12.visible = 0
Flasherpic13.visible = 0:Flasherpic14.visible = 0:Flasherpic15.visible = 0:Flasherpic16.visible = 0:Flasherpic17.visible = 1:Flasherpic18.visible = 0
End If
If BumpNowb = 17 Then
Flasherpic1.visible = 0:Flasherpic2.visible = 0:Flasherpic3.visible = 0:Flasherpic4.visible = 0:Flasherpic5.visible = 0:Flasherpic6.visible = 0
Flasherpic7.visible = 0:Flasherpic8.visible = 0:Flasherpic9.visible = 0:Flasherpic10.visible = 0:Flasherpic11.visible = 0:Flasherpic12.visible = 0
Flasherpic13.visible = 0:Flasherpic14.visible = 0:Flasherpic15.visible = 0:Flasherpic16.visible = 0:Flasherpic17.visible = 0:Flasherpic18.visible = 1
End If
If BumpNowb = TotalBumpb Then BumpNowb = 0
If BumpNowb = 0 Then
Flasherpic1.visible = 1:Flasherpic2.visible = 0:Flasherpic3.visible = 0:Flasherpic4.visible = 0:Flasherpic5.visible = 0:Flasherpic6.visible = 0
Flasherpic7.visible = 0:Flasherpic8.visible = 0:Flasherpic9.visible = 0:Flasherpic10.visible = 0:Flasherpic11.visible = 0:Flasherpic12.visible = 0
Flasherpic13.visible = 0:Flasherpic14.visible = 0:Flasherpic15.visible = 0:Flasherpic16.visible = 0:Flasherpic17.visible = 0:Flasherpic18.visible = 0
End If
End Sub
'********************************************
' Thalamus, heavier ball please
Const BallMass = 1.5
LoadVPM "01560000", "S6.VBS", 3.36
Dim DesktopMode: DesktopMode = Table.ShowDT
Const UseSolenoids=2,UseLamps=1,UseSync=1,UseGI=0
Const SSolenoidOn="SolOn",SSolenoidOff="SolOff",SFlipperOn="FlipperUp",SFlipperOff="FlipperDown",SCoin="coin3"
Const sOutHole=1
Const sC1DTReset=2
Const sC2DTReset=3
Const sLDTReset=4
Const sRDTReset=5 ' solenoid for Top Right Targets
Const sBallRelease=6
Const sKicker1=7
Const sKicker3=8
Const sKnocker=14
Const sbuzzer=15
Const sCoinLockout=16
Const sEnable=23
SolCallback(sOutHole)="bsTrough.SolIn"
SolCallback(sKnocker)="vpmSolSound SoundFX(""knocker"",DOFKnocker),"
SolCallback(sLDTReset)="SolRaiseDropL" 'dtL.SolDropUp" ' Add a delay
SolCallback(sRDTReset)="SolRaiseDropR" 'dtR.SolDropUp" ' Add a delay
SolCallback(sBallRelease)="bsTrough.SolOut"
SolCallback(sC1DTReset)="SolRaiseDropC1" 'Add a delay
SolCallback(sC2DTReset)="SolRaiseDropC2" 'Add a delay
SolCallback(sKicker1)="bsSaucer.SolOut"
SolCallback(sKicker3)="bsSaucer2.SolOut"
SolCallback(sLRFlipper)="SolRFlipper"
SolCallback(sLLFlipper)="SolLFlipper"
'Fantasy Bumper Lights
solCallback(17)= "vpmFlasher array(Flasher1,Flasher2),"
SolCallback(18)= "vpmFlasher array(Flasher3,Flasher4),"
SolCallback(19)= "vpmFlasher array(Flasher5,Flasher6),"
SolCallback(sEnable)="GameOn"
Sub GameOn(enabled)
vpmNudge.SolGameOn(enabled)
If Enabled Then
GIOn:ee=1
Else
GIOff:ee=0:PlaySound"0BSGA19":Target4.timerinterval=34000:Target4.timerenabled=1:Target6.timerenabled=0
End If
End Sub
Sub SolLFlipper(Enabled)
If Enabled Then
PlaySoundAtVol SoundFx("fx_flipperupLeft",DOFContactors),LeftFlipper,VolFlip:LeftFlipper.RotateToEnd:LeftFlipperUpper.RotateToEnd
PlaySoundAtVol "fx_flipperupLeft",LeftFlipperUpper,VolFlip
Else
PlaySoundAtVol SoundFx("fx_flipperdown",DOFContactors),LeftFlipper,VolFlip:LeftFlipper.RotateToStart::LeftFlipperUpper.RotateToStart
PlaySoundAtVol "fx_flipperdown",LeftFlipperUpper,VolFlip
End If
End Sub
Sub SolRFlipper(Enabled)
If Enabled Then
PlaySoundAtVol SoundFx("fx_flipperupRight",DOFContactors),RightFlipper,VolFlip:RightFlipper.RotateToEnd:RightFlipperUpper.RotateToEnd
PlaySoundAtVol "fx_flipperupRight",RightFlipperUpper,VolFlip
' vpmTimer.PulseSw(17) ' Lane Switch not needed here .. called via solenoid calls
Else
PlaySoundAtVol SoundFx("fx_flipperdown",DOFContactors),RightFlipper,VolFlip:RightFlipper.RotateToStart:RightFlipperUpper.RotateToStart
PlaySoundAtVol "fx_flipperdown",RightFlipperUpper,VolFlip
End If
End Sub
Sub SolRaiseDropL(enabled)
debug.print "SolRaiseDropL"
If enabled Then
TargetResetL.interval=500
TargetResetL.enabled=True
End if
End Sub
Sub TargetResetL_Timer()
debug.print "Raise Left Targets"
TargetResetL.enabled=False
dtL.DropSol_On
End Sub
Sub SolRaiseDropR(enabled)
debug.print "SolRaiseDropR"
If enabled Then
TargetResetR.interval=500
TargetResetR.enabled=True
End if
End Sub
Sub TargetResetR_Timer()
debug.print "Raise Right Targets"
TargetResetR.enabled=False
dtR.DropSol_On
End Sub
Sub SolRaiseDropC1(enabled)
If enabled Then
TargetResetC1.interval=500
TargetResetC1.enabled=True
End if
End Sub
Sub TargetResetC1_Timer()
TargetResetC1.enabled=False
dtC1.DropSol_On
End Sub
Sub SolRaiseDropC2(enabled)
If enabled Then
TargetResetC2.interval=500
TargetResetC2.enabled=True
End if
End Sub
Sub TargetResetC2_Timer()
TargetResetC2.enabled=False
dtC2.DropSol_On
End Sub
Sub StopSounds()
StopSound"0BSG01"
StopSound"0BSG02"
StopSound"0BSG03"
StopSound"0BSG04"
StopSound"0BSG05"
StopSound"0BSG06"
StopSound"0BSG07"
StopSound"0BSG08"
StopSound"0BSG09"
StopSound"0BSG10"
StopSound"0BSG11"
StopSound"0BSG12"
StopSound"0BSG13"
StopSound"0BSG14"
StopSound"0BSG15"
StopSound"0BSG16"
StopSound"0BSG17"
StopSound"0BSG18"
StopSound"0BSG19"
StopSound"0BSG20"
StopSound"0BSG21"
StopSound"0BSG22"
StopSound"0BSG23"
StopSound"0BSG24"
StopSound"0BSG25"
StopSound"0BSG26"
StopSound"0BSG27"
StopSound"0BSG28"
StopSound"0BSG29"
StopSound"0BSG30"
StopSound"0BSG31"
StopSound"0BSG32"
StopSound"0BSG33"
StopSound"0BSG34"
StopSound"0BSG35"
StopSound"0BSG36"
StopSound"0BSG37"
StopSound"0BSG37a"
StopSound"0BSG37b"
StopSound"0BSG37c"
StopSound"0BSG37d"
StopSound"0BSG37e"
StopSound"0BSG37f"
StopSound"0BSG37g"
StopSound"0BSG37h"
StopSound"0BSG38"
StopSound"0BSG39"
StopSound"0BSG40"
StopSound"0BSG41"
StopSound"0BSG42"
StopSound"0BSG43"
StopSound"0BSG44"
StopSound"0BSG45"
StopSound"0BSG46"
StopSound"0BSG47"
StopSound"0BSG48"
StopSound"0BSG49"
StopSound"0BSG50"
StopSound"0BSG51"
StopSound"0BSG52"
StopSound"0BSG53"
StopSound"0BSG54"
StopSound"0BSG55"
StopSound"0BSG56"
StopSound"0BSG57"
StopSound"0BSG58"
StopSound"0BSG59"
StopSound"0BSG60"
StopSound"0BSG61"
StopSound"0BSG62"
StopSound"0BSG63"
StopSound"0BSG64"
StopSound"0BSG65"
StopSound"0BSG66"
StopSound"0BSGA19"
StopSound"0BGC01"
StopSound"0BGC02"
StopSound"0BGC03"
StopSound"0BGC04"
StopSound"0BGC05"
StopSound"0BGC06"
StopSound"0BGC07"
StopSound"0BGC08"
StopSound"0BGC09"
StopSound"0BGC10"
StopSound"0BGC11"
StopSound"0BGC12"
StopSound"0BGC13"
StopSound"0BGC14"
StopSound"0BGC15"
StopSound"0BGC16"
StopSound"0BGC17"
StopSound"0BGC18"
StopSound"0BGC19"
StopSound"0BGC20"
StopSound"0BGC21"
StopSound"0BGC22"
StopSound"0BGC23"
StopSound"0BGC24"
StopSound"0BGCC01"
StopSound"0BGCC02"
StopSound"0BGCC03"
StopSound"0BGCC04"
StopSound"0BGCC05"
StopSound"0BGL01"
StopSound"0BGL02"
StopSound"0BGL03"
StopSound"0BGL04"
StopSound"0BGL05"
StopSound"0BGL06"
StopSound"0BGL07"
StopSound"0BGL08"
StopSound"0BGL09"
StopSound"0BGL10"
StopSound"0BGL12"
StopSound"0BGL13"
End Sub
Sub StopMusic()
StopSound"0BGC01"
StopSound"0BGC02"
StopSound"0BGC03"
StopSound"0BGC04"
StopSound"0BGC05"
StopSound"0BGC06"
StopSound"0BGC07"
StopSound"0BGC08"
StopSound"0BGC09"
StopSound"0BGC10"
StopSound"0BGC11"
StopSound"0BGC12"
StopSound"0BGC13"
StopSound"0BGC14"
StopSound"0BGC15"
StopSound"0BGC16"
StopSound"0BGC17"
StopSound"0BGC18"
StopSound"0BGC19"
StopSound"0BGC20"
StopSound"0BGC21"
StopSound"0BGC22"
StopSound"0BGC23"
StopSound"0BGC24"
StopSound"0BGCC01"
StopSound"0BGCC02"
StopSound"0BGCC03"
StopSound"0BGCC04"
StopSound"0BGCC05"
End Sub
Sub Table_Init
vpmInit Me
On Error Resume Next
With Controller
.GameName=cGameName
.SplashInfoLine="Battlestar Galactica (Williams 1980) v1.02F" & vbNewLine & "VPX table by Allknowing2012" & vbNewLine & "Graphics and Sound Mod by Xenonph"
.HandleKeyboard=0
.ShowTitle=0
.ShowDMDOnly=1
.ShowFrame=0
.Hidden=1
.Run
'On Error Goto 0
End With
PinMAMETimer.Interval=PinMAMEInterval
PinMAMETimer.Enabled=True:PlayMusic"0BG04.mp3":Target2.timerinterval=77000:Target2.timerenabled=1
vpmNudge.TiltSwitch=swTilt
vpmNudge.Sensitivity=5
vpmNudge.TiltObj=Array(Bumper1,Bumper2,Bumper3,LeftSlingShot,RightSlingShot)
Set bsTrough=New cvpmBallStack
bsTrough.InitSw 0,9,10,0,0,0,0,0
bsTrough.InitKick BallRelease,45,6
bsTrough.InitExitSnd SoundFX("ballrelease",DOFContactors),SoundFX("drain",DOFContactors)
bsTrough.Balls=2
Set dtL=new cvpmDropTarget
dtL.InitDrop Array(target1,target2,target3),Array(25,26,27)
dtL.InitSnd SoundFX("target",DOFContactors),SoundFX("target",DOFContactors)
Set dtR=new cvpmDropTarget
dtR.InitDrop Array(target4,target5,target6),Array(28,29,30)
dtR.InitSnd SoundFX("target",DOFContactors), SoundFX("target",DOFContactors)
dtR.AllDownSw=31
dtR.LinkedTo=dtL
dtL.LinkedTo=dtR
Set dtC1=new cvpmDropTarget
dtC1.InitDrop Array(target7,target8),Array(33,34)
dtC1.InitSnd SoundFX("target",DOFContactors), SoundFX("target",DOFContactors)
if ballshadows=1 then
BallShadowUpdate.enabled=1
else
BallShadowUpdate.enabled=0
end if
if flippershadows=1 then
FlipperLSh.visible=1
FlipperRSh.visible=1
else
FlipperLSh.visible=0
FlipperRSh.visible=0
end if
Set dtC2=new cvpmDropTarget
dtC2.InitDrop Array(target9,target10,target11),Array(35,36,37)
dtC2.InitSnd SoundFX("target",DOFContactors), SoundFX("target",DOFContactors)
dtC2.AllDownSw=38
dtC2.LinkedTo=dtC1
dtC1.LinkedTo=dtC2
Set bsSaucer=New cvpmBallStack
bsSaucer.InitSaucer Kicker1,11,165,4
bsSaucer.InitExitSnd SoundFX("popper_ball",DOFContactors), SoundFX("popper_ball",DOFContactors)
bsSaucer.KickForceVar=5
Set bsSaucer2=New cvpmBallStack
bsSaucer2.InitSaucer Kicker3,12,205,4
bsSaucer2.InitExitSnd SoundFX("popper_ball",DOFContactors), SoundFX("popper_ball",DOFContactors)
bsSaucer2.KickForceVar=8.5
vpmMapLights InsertLights
GIOff
End Sub
Sub table_Paused:Controller.Pause = 1:End Sub
Sub table_unPaused:Controller.Pause = 0:End Sub
Sub table_KeyDown(ByVal keycode)
If KeyCode=LeftMagnaSave Then Change2Bump
If KeyCode=RightMagnaSave Then Change4Bump
If KeyCode=50 Then Change6Bump
If KeyCode=49 Then Change8Bump
If KeyDownHandler(keycode) Then Exit Sub
If keycode = PlungerKey Then Plunger.Pullback:playsound "plungerpull"
End Sub
Sub table_KeyUp(ByVal keycode)
If KeyCode = 6 Then
Dim s:StopMusic:Target9.timerinterval=300:Target9.timerenabled=1:Target10.timerinterval=2000:Target10.timerenabled=1
s = INT(24 * RND(1) )
Select Case s
Case 0:PlaySound"coin":PlaySound("0BGC01")
Case 1:PlaySound"coin":PlaySound("0BGC02")
Case 2:PlaySound"coin":PlaySound("0BGC03")
Case 3:PlaySound"coin":PlaySound("0BGC04")
Case 4:PlaySound"coin":PlaySound("0BGC05")
Case 5:PlaySound"coin":PlaySound("0BGC06")
Case 6:PlaySound"coin":PlaySound("0BGC07")
Case 7:PlaySound"coin":PlaySound("0BGC08")
Case 8:PlaySound"coin":PlaySound("0BGC09")
Case 9:PlaySound"coin":PlaySound("0BGC10")
Case 10:PlaySound"coin":PlaySound("0BGC11")
Case 11:PlaySound"coin":PlaySound("0BGC12")
Case 12:PlaySound"coin":PlaySound("0BGC13")
Case 13:PlaySound"coin":PlaySound("0BGC14")
Case 14:PlaySound"coin":PlaySound("0BGC15")
Case 15:PlaySound"coin":PlaySound("0BGC16")
Case 16:PlaySound"coin":PlaySound("0BGC17")
Case 17:PlaySound"coin":PlaySound("0BGC18")
Case 18:PlaySound"coin":PlaySound("0BGC19")
Case 19:PlaySound"coin":PlaySound("0BGC20")
Case 20:PlaySound"coin":PlaySound("0BGC21")
Case 21:PlaySound"coin":PlaySound("0BGC22")
Case 22:PlaySound"coin":PlaySound("0BGC23")
Case 23:PlaySound"coin":PlaySound("0BGC24")
End Select
End If
If KeyCode = 4 Then
Dim y:StopMusic:Target9.timerinterval=300:Target9.timerenabled=1:Target10.timerinterval=2000:Target10.timerenabled=1
y = INT(24 * RND(1) )
Select Case y
Case 0:PlaySound"coin":PlaySound("0BGC01")
Case 1:PlaySound"coin":PlaySound("0BGC02")
Case 2:PlaySound"coin":PlaySound("0BGC03")
Case 3:PlaySound"coin":PlaySound("0BGC04")
Case 4:PlaySound"coin":PlaySound("0BGC05")
Case 5:PlaySound"coin":PlaySound("0BGC06")
Case 6:PlaySound"coin":PlaySound("0BGC07")
Case 7:PlaySound"coin":PlaySound("0BGC08")
Case 8:PlaySound"coin":PlaySound("0BGC09")
Case 9:PlaySound"coin":PlaySound("0BGC10")
Case 10:PlaySound"coin":PlaySound("0BGC11")
Case 11:PlaySound"coin":PlaySound("0BGC12")
Case 12:PlaySound"coin":PlaySound("0BGC13")
Case 13:PlaySound"coin":PlaySound("0BGC14")
Case 14:PlaySound"coin":PlaySound("0BGC15")
Case 15:PlaySound"coin":PlaySound("0BGC16")
Case 16:PlaySound"coin":PlaySound("0BGC17")
Case 17:PlaySound"coin":PlaySound("0BGC18")
Case 18:PlaySound"coin":PlaySound("0BGC19")
Case 19:PlaySound"coin":PlaySound("0BGC20")
Case 20:PlaySound"coin":PlaySound("0BGC21")
Case 21:PlaySound"coin":PlaySound("0BGC22")
Case 22:PlaySound"coin":PlaySound("0BGC23")
Case 23:PlaySound"coin":PlaySound("0BGC24")
End Select
End If
If KeyCode = 2 Then
Dim w:StopMusic:StopSound"0BSGA19":Target1.timerenabled=0:Target2.timerenabled=0:Target3.timerenabled=0:Target4.timerenabled=0:Target6.timerenabled=0
w = INT(5 * RND(1) )
Select Case w
Case 0:PlaySound("0BGCC01")
Case 1:PlaySound("0BGCC02")
Case 2:PlaySound("0BGCC03")
Case 3:PlaySound("0BGCC04")
Case 4:PlaySound("0BGCC05")
End Select
End If
If KeyUpHandler(keycode) Then Exit Sub
If KeyCode=PlungerKey and BIP=1 Then
Dim z:StopSounds:StopSound"0BGL00":StopSound"0BGL11":PlaySound"0BGL00":PlaySound"0BGL11":Drain.timerenabled=0:Kicker1.timerenabled=0:Kicker3.timerenabled=0:sw41.timerenabled=0:sw42.timerenabled=0
z = INT(3 * RND(1) )
Select Case z
Case 0:PlayMusic"0BG01.mp3":Drain.timerinterval=57200:Drain.timerenabled=1
Case 1:PlayMusic"0BG02.mp3":Drain.timerinterval=50000:Drain.timerenabled=1
Case 2:PlayMusic"0BG03a.mp3":Drain.timerinterval=76300:Drain.timerenabled=1
End Select
End If
If keycode = PlungerKey And BIP=1 Then Plunger.Fire:PlaySoundAtVol "Plunger",plunger,1
If keycode = PlungerKey And BIP=0 Then Plunger.Fire:PlaySoundAtVol "plungerreleasefree",plunger,1
End Sub
Sub GIOn
dim bulb
for each bulb in GILights
bulb.state = LightStateOn
next