Ok, don't know if there is more than one version of the table out there, but this is the code I re-did for the VP9x copy I have:
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' F U L L
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' by recreativos franco
' 1977
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'
Visual Pinball 9.15 recreation
FS B2S V.1.0.0
' by starman
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'THANKS to...
'...'Herweh' for directB2S -
'...'popotte' for images -
'...'akiles50000', 'juan' and 'santy14' for images -
'...'koadic' for the flipper decal routine
'...'Rascal' for ballspeed -
'...'JPSalas' and 'PD' for fading lights -
'...everyone in the
VP forums for their shared knowledge and experiences.
'Without you this table wouldn't exist in this way!
'KEYS:
'~~~~~
'HOLD Left Flipper key -> step-by-step-menu (rules, status, awards, toggle chimes on / off ( game over -> holding period 0,5 second / during game holding period 3 seconds ! )
'HOLD Right Flipper key -> toggle for 3 or 5 balls ( holding period 0,5 second ) - only if game is over!
'See "full_rules¬es" text file in your table folder for more detailed info.
Option Explicit
Dim Scores(4)
Dim FiveKFlag
ExecuteGlobal GetTextFile("core.vbs")
ExecuteGlobal GetTextFile("b2s.vbs")
Dim Controller
Sub LoadController()
Set Controller = CreateObject("
B2S.Server")
Controller.B2SName = "Full" ' *****!!!!This must match the name of your directb2s file!!!!
Controller.Run()
End Sub
Randomize
'Startshake
Dim TableName
Dim x, y, i, z
Dim AC, BS, BVar, KVar, BRoll, BallSpeed, Speedx, Speedy, FinalSpeed
Dim PCount, PTime, plungerIM
Dim Ddown, NAC, BOW
Dim RingAni(3)
Dim Score, Players, Currentplayer, PU, Points, sTsd, sTsd2, Bells, tMenu
Dim BIP, aBall, Balls, maxBalls, BallMode
Dim Credits, GameCount, swPlunger
Dim EB, Rep1, Rep2
Dim GameOver, GameInProgress, Started, Tilt, OldTilt, NewTilt, TiltSwing
Dim HighScore3, HighScore5, PreScore
Dim Score1000K, Score100K, Score10K, ScoreK, Score100, Score10, ScoreUnit
Dim Credits100K, Credits10K, CreditsK, Credits100, Credits10, CreditsUnit
Dim Matchnumber, Matchnumber100K, Matchnumber10K, MatchnumberK, Matchnumber100, Matchnumber10, MatchnumberUnit
Dim h3s, h3s1000K, h3s100K, h3s10k, h3sK, h3s100, h3s10, h3sUnit
Dim h5s, h5s1000K, h5s100K, h5s10k, h5sK, h5s100, h5s10, h5sUnit
Dim PreScore1000K, PreScore100K, PreScore10K, PreScoreK, PreScore100, PreScore10, PreScoreUnit
Dim MagnetOn, Cup, mHole
Dim Msg(11)
Dim LFOn, RFOn
Sub Table_Init()
LoadController
TableName = "Full"
On Error Resume Next
LoadData()
Set mLockMagnet = New Magnet
mLockMagnet.InitMagnet TriggerLMag, 7
mLockMagnet.MagnetOn
Set mLockMagnet2 = New Magnet
mLockMagnet2.InitMagnet TriggerRMag, 7
mLockMagnet2.MagnetOn
' Impulse Plunger
Const IMPowerSetting = 58
Const IMTime = 0.8
Set plungerIM = New cvpmImpulseP
With plungerIM
.InitImpulseP swplunger, IMPowerSetting, IMTime
.Random 0.0
.InitExitSnd "", ""
.CreateEvents "plungerIM"
End With
Started = False : GameOver = True : controller.B2SSetData 35, 1
Ddown = False
Score = 0
BIP = 0 : maxBalls = True : UpdateBIP
Tilt = False : NewTilt = 0 : OldTilt = 0 : TiltSwing = 0 : controller.B2SSetData 33, 0
If GameCount = 0 Then
Bells = 1 : BallMode = 3 : LightBalls.State = 1' : Updatehs
End If
If BallMode = 3 Then Balls = 3 : LightBalls.State = 1
If BallMode = 5 Then Balls = 5 : LightBalls.State = 0
UpdateBalls
EB = False
sTsd = 0 : sTsd2 = 0
tMenu = 0 : BOW = 0 : AC = 0
UpdatePreScore : UpdateMatch : UpdateCredits : Updatehs' : UpdateBalls : Updatehs
AllLampsOff
For Each x In BRings : x.IsDropped = True : Next
TargetAB.IsDropped = True : TargetBB.IsDropped = True
TargetCB.IsDropped = True
WireLaneB.WidthBottom = 0 : WireLaneB.WidthTop = 0 : LightWireLane.State = Abs(LightWireLane.State -1)
TimerFade.Enabled = True
TimerWait.Enabled = True
PlaySound ""
End Sub
Sub Table_Init2()
Started = False : GameOver = True : controller.B2SSetData 35, 1
Ddown = False
BIP = 0 : maxBalls = True : UpdateBIP
Tilt = False : NewTilt = 0 : OldTilt = 0 : TiltSwing = 0 : controller.B2SSetData 33, 0
If GameCount = 0 Then
Bells = 1 : BallMode = 3 : LightBalls.State = 1' : Updatehs
End If
If BallMode = 3 Then Balls = 3 : LightBalls.State = 1
If BallMode = 5 Then Balls = 5 : LightBalls.State = 0
UpdateBalls
EB = False
sTsd = 0 : sTsd2 = 0
tMenu = 0 : BOW = 0 : AC = 0
UpdateMatch : UpdateCredits : Updatehs' : UpdateBalls : Updatehs
AllLampsOff
For Each x In BRings : x.IsDropped = True : Next
TargetAB.IsDropped = True : TargetBB.IsDropped = True
TargetCB.IsDropped = True
WireLaneB.WidthBottom = 0 : WireLaneB.WidthTop = 0 : LightWireLane.State = Abs(LightWireLane.State -1)
TimerFade.Enabled = True
TimerWait.Enabled = True
PlaySound ""
End Sub
Sub ResetDrops()
For Each x In BRings : x.IsDropped = True : Next
TargetAB.IsDropped = True : TargetBB.IsDropped = True
TargetCB.IsDropped = True
WireLaneB.WidthBottom = 0 : WireLaneB.WidthTop = 0 : LightWireLane.State = Abs(LightWireLane.State -1)
End Sub
Sub Table_KeyDown(ByVal keycode)
If Keycode = StartGameKey And Credits > 0 And maxBalls = True Then
If Started = False Then
Credits = Credits - 1 : UpdateCredits : Started = True' : CreditReel.SetValue Credits
If GameOver = True Then
GameOver = False : controller.B2SSetData 35,0' : GameOverReel.SetValue 0
BIP = 0 : UpdateBIP
MatchNumber = 000 : UpdateMatch
Score = 0 : Score1.ResetToZero
Rep1 = False : Rep2 = False
GameCount = GameCount + 1 : TextGC.Text = GameCount
Controller.B2SSetScorePlayer1 0
KickerRelease.TimerInterval = 2000 : KickerRelease.TimerEnabled = True
TimerBall.Enabled = True
TimerWait.Enabled = False
If BallMode = 3 Then Playsound"initialize3B" Else Playsound"initialize5B"
' AllLampsOff' : ABCOn
End If
End If
End If
If Keycode = AddCreditKey And Credits < 25 And TimerCoin.Enabled = False Then Playsound"Coin" : TimerCoin.Enabled = True
If keycode = PlungerKey Then
Plunger.PullBack' : Pcount = 0 : PTimer.Enabled = True
PlungerIM.Pullback : Pcount = 0 : PTimer.Enabled = 1
Playsound"Pull"
End If
If keycode = LeftFlipperKey Then
TimerMenuA.Enabled = True
If GameOver = True Then TimerMenuA.Interval = 500 : Else TimerMenuA.Interval = 3000
If GameOver = False And Tilt = False Then
LeftFlipper.RotateToEnd
LFOn = 1
FLUPLight.State = 1
PlaySound "FUpFL" : Stopsound"Fliptric" : Playsound"Fliptric",-1
End If
End If
If keycode = RightFlipperKey Then
If GameOver = True Then TimerMenuB.Enabled = True
If GameOver = False And Tilt = False Then
RightFlipper.RotateToEnd
RFOn = 1
FRUPLight.State = 1
PlaySound "FUp" : Stopsound"Fliptric" : Playsound"Fliptric",-1
End If
End If
If keycode = LeftTiltKey Then Nudge 15, 2.2 : TiltCheck()
If keycode = RightTiltKey Then Nudge 345, 2.2 : TiltCheck()
If keycode = CenterTiltKey Then Nudge 0, 2 : TiltCheck()
End Sub
Sub Table_KeyUp(ByVal keycode)
If keycode = PlungerKey Then Plunger.Fire:PTimer.Enabled = 0:Pcount = 0:PTimer2.Enabled = 1 : Stopsound"Pull" : Playsound"PRelease"
If keycode = LeftFlipperKey Then
LeftFlipper.RotateToStart
FLUPLight.TimerEnabled = 1'.State = 0
If GameOver = False Then Playsound"FDownFL" : Stopsound"Fliptric" : Else Stopsound"Fliptric"
End If
If keycode = RightFlipperKey Then
RightFlipper.RotateToStart
FRUPLight.TimerEnabled = 1'.State = 0
If GameOver = False Then Playsound"FDown" : Stopsound"Fliptric" : Else Stopsound"Fliptric"
End If
TimerMenuA.Enabled = False : TimerMenuB.Enabled = False
' Stopsound"Fliptric"
End Sub
Sub TimerCoin_Timer
Credits = Credits + 1 : UpdateCredits
Playsound"AddCredit"
Me.Enabled = False
End Sub
Sub TimerMenuA_Timer
Menu()
Me.Enabled = False
End Sub
Sub TimerMenuB_Timer
BallMenu()
Me.Enabled = False
End Sub
Sub TimerText_Timer
TextNAC.Text = ""
Me. Enabled = False
End Sub
Sub Menu()
tMenu = tMenu + 1
If tMenu = 5 Then tMenu = 1
Select Case tMenu
Case 1:
' Rules
Msg(0)=""
Msg(1)="* Lanes A, B, C and target A, B, C -> lights respective bumpers and increasing its score"
Msg(2)="* Complete A+B+C -> lights Extra Ball on exit"
Msg(3)="* "
Msg(4)="* Making all green pins -> lights SPECIAL (left kicker) for replay"
Msg(5)="* Making all red pins -> lights SPECIAL (right kicker) for replay"
Msg(6)="* When reaching certain score -> SPECIAL"
Msg(7)="* "
Msg(8)="* KEYS:"
Msg(9)="* ' HOLD LEFT FLIPPER ' -> this menu --- 1.Rules - 2. Status - 3.Awardinfo - 4.Chimes on / off"
Msg(10)="* ' HOLD RIGHT FLIPPER ' -> TOGGLE for 3 or 5 Balls / only possible if the game is over"
Msg(11)="" & CHR(13)
For x=1 To 11 : Msg(0) = Msg(0) + Msg(x) &Chr(13) : Next
Msgbox Msg(0),,"FULL (Recreativos Franco 1977) - V1.0.0 *** Rules ***"
Case 2:
' Status
MsgBox " Interflip, 'FULL', 1977" & vbCrLf & " Visual Pinball Version 9.15, August, 2013" & vbCrLf & " by starman" & vbCrLf & " The original pinball machine is ..." & vbCrLf & "FULL./ Recreativos Franco, Spain, December 1977, 1 player" & vbCrLf & " Model number: unknown Production run: unknown" & vbCrLf & " Pinball Table Designed by: unknown" & vbCrLf & " Art by: unknown" & vbCrLf &" " & vbCrLf & " High Score (3 Balls): " & HighScore3 & vbCrLf & " High Score (5 Balls): " & HighScore5 & vbCrLf & " " & vbCrLf & " Score: " & Score ,0,"FULL by Recreativos Franco (1977) >>> Game Info <<<"
Case 3:
' ReplayInfo
MsgBox " REPLAY AWARDS: " & vbCrLf & " 3-ball-game " & vbCrLf & " 1 replay for each score of: 500,000" & vbCrLf & " 1 replay for each score of: 700,000" & vbCrLf & " 5-ball-game " & vbCrLf & " 1 replay for each score of: 700,000" & vbCrLf & " 1 replay for each score of: 900,000",0,"Full by Recreativos Franco, Spain (1977) >>> Replay Info <<<"
Case 4:
If Bells = 1 Then
Bells = 0 : Stopsound"ChimesON" : Playsound"ChimesOFF"
MsgBox " * CHIMES OFF * ",0,"Full by Recreativos Franco, Spain (1977) >>> Ball Info <<<"
Else
Bells = 1 : Stopsound"ChimesOFF" : Playsound"ChimesON"
MsgBox " * CHIMES ON * ",0,"Full by Recreativos Franco, Spain (1977) >>> Ball Info <<<"
End If
End Select
End Sub
Sub BallMenu()
If GameOver = True Then
If BallMode = 5 Then
BallMode = 3 : Balls = 3 : LightBalls.State = 1 : Stopsound"Balls5" : Playsound"Balls3"
MsgBox " * 3-BALLS-MODE * ",0,"Full by Recreativos Franco, Spain (1977) >>> Ball Info <<<"
Else
BallMode = 5 : Balls = 5 : LightBalls.State = 0 : Stopsound"Balls3" : Playsound"Balls5"
MsgBox " * 5-BALLS-MODE * ",0,"Full by Recreativos Franco, Spain (1977) >>> Ball Info <<<"
End If
SaveValue TableName, "BallMode", BallMode
Playsound"Switch"
updatehs
Else
MsgBox " Changing amount of Balls is only available during *GAME OVER*",0,"Full by Recreativos Franco, Spain (1977) >>> Ball Info <<<"
End If
TextBalls.Text = BallMode
End Sub
'--------------------------------------------------------------------------------------------------------'
'----- Magnet -------------------------------------------------------------------------------------------'
'--------------------------------------------------------------------------------------------------------'
Dim mLockMagnet
Sub TriggerLMag_Hit() : mLockMagnet.AddBall ActiveBall : End Sub
Sub TriggerLMag_UnHit() : mLockMagnet.RemoveBall ActiveBall : End Sub
Sub TriggerLMag_Timer() : mLockMagnet.update : End Sub
Class Magnet
Private cBalls, cTrigger, LMagnetOn
Public cX, cY, Strength, Size, GrabCenter
Private Sub Class_Initialize
Size = 1 : Strength = 0
Set cBalls = CreateObject("Scripting.Dictionary")
End Sub
Public Sub InitMagnet(aTrigger, aStrength)
cX = aTrigger.X : cY = aTrigger.Y : Size = aTrigger.Radius
Set cTrigger = aTrigger
Strength = aStrength : GrabCenter = aStrength > 10
End Sub
Public Sub MagnetOn : LMagnetOn = True : End Sub
Public Sub MagnetOff : LMagnetOn = False :End Sub
Public Sub AddBall( aBall ) : cBalls.Add aBall,0 : End Sub
Public Sub RemoveBall( aBall ) : cBalls.Remove(aBall) : End Sub
Public Property Get Balls : Balls = cBalls.Keys : End Property
Public Sub Update
Dim obj
If LMagnetOn Then
For Each obj In cBalls.Keys : AttractBall obj : Next
End If
End Sub
Public Sub AttractBall(aBall)
Dim dX, dY, dist, force, ratio
dX = aBall.X - cX : dY = aBall.Y - cY : dist = Sqr(dX*dX + dY*dY)
If dist > Size Or dist < 1 Then Exit Sub
If GrabCenter And dist < 20 Then
aBall.VelX = 0 : aBall.VelY = 0 : aBall.X = cX : aBall.Y = cY
Else
ratio = dist / (1.5*Size)
force = Strength * exp(-0.2/ratio)/(ratio*ratio*56) * 1.1
aBall.VelX = (aBall.VelX - dX * force / dist) * 0.985
aBall.VelY = (aBall.VelY - dY * force / dist) * 0.985
End if
End Sub
End Class
Dim mLockMagnet2
Sub TriggerRMag_Hit() : mLockMagnet2.AddBall ActiveBall : End Sub
Sub TriggerRMag_UnHit() : mLockMagnet2.RemoveBall ActiveBall : End Sub
Sub TriggerRMag_Timer() : mLockMagnet2.update : End Sub
Class Magnet2
Private cBalls, cTrigger, RMagnetOn
Public cX, cY, Strength, Size, GrabCenter
Private Sub Class_Initialize
Size = 1 : Strength = 0
Set cBalls = CreateObject("Scripting.Dictionary")
End Sub
Public Sub InitMagnet(aTrigger, aStrength)
cX = aTrigger.X : cY = aTrigger.Y : Size = aTrigger.Radius
Set cTrigger = aTrigger
Strength = aStrength : GrabCenter = aStrength > 10
End Sub
Public Sub MagnetOn : RMagnetOn = True : End Sub
Public Sub MagnetOff : RMagnetOn = False :End Sub
Public Sub AddBall( aBall ) : cBalls.Add aBall,0 : End Sub
Public Sub RemoveBall( aBall ) : cBalls.Remove(aBall) : End Sub
Public Property Get Balls : Balls = cBalls.Keys : End Property
Public Sub Update
Dim obj
If RMagnetOn Then
For Each obj In cBalls.Keys : AttractBall obj : Next
End If
End Sub
Public Sub AttractBall(aBall)
Dim dX, dY, dist, force, ratio
dX = aBall.X - cX : dY = aBall.Y - cY : dist = Sqr(dX*dX + dY*dY)
If dist > Size Or dist < 1 Then Exit Sub
If GrabCenter And dist < 20 Then
aBall.VelX = 0 : aBall.VelY = 0 : aBall.X = cX : aBall.Y = cY
Else
ratio = dist / (1.5*Size)
force = Strength * exp(-0.2/ratio)/(ratio*ratio*56) * 1.1
aBall.VelX = (aBall.VelX - dX * force / dist) * 0.985
aBall.VelY = (aBall.VelY - dY * force / dist) * 0.985
End if
End Sub
End Class
'~~~~~~~~~~~~~~~~~~~~ Plunger animation ~~~~~~~~~~~~~~~~~~~
'~~~~~~~~~~~~~~~~~~~~ Thanks to jpsalas ~~~~~~~~~~~~~~~~~~~~~~
Dim PTop, PBottom, PTopY, PBottomY, PBottom2, PBottomY2, PBottom3, PBottomY3
Set PTop = P1.CreateBall : PTop.Image = "plA" : PTopY = PTop.Y
Set PBottom = P2.CreateBall : PBottom.Image = "plB" : PBottomY = PBottom.Y
Set PBottom2 = P3.CreateBall : PBottom2.Image = "plC" : PBottomY2 = PBottom2.Y
Set PBottom3 = P4.CreateBall : PBottom3.Image = "plC" : PBottomY3 = PBottom3.Y
Sub PTimer_Timer
If Pcount < 14 Then
Pcount = Pcount + 1
PTop.Y = PTop.Y + Pcount
PBottom.Y = PBottom.Y + Pcount
PBottom2.Y = PBottom2.Y + Pcount
PBottom3.Y = PBottom3.Y + Pcount
Else
Me.Enabled = 0
End If
End Sub
Sub PTimer2_Timer
Select Case Pcount
Case 0:PTop.Y = PTopY : PBottom.Y = PBottomY : PBottom2.Y = PBottomY2 : PBottom3.Y = PBottomY3
Case 1:PTop.Y = PTop.Y + 6 : PBottom.Y = PBottom.Y + 6 : PBottom2.Y = PBottom2.Y + 6
Case 2:PTop.Y = PTop.Y + 6 : PBottom.Y = PBottom.Y + 6 : PBottom2.Y = PBottom2.Y + 6 : PBottom3.Y = PBottom3.Y + 6
Case 3:PTop.Y = PTopY : PBottom.Y = PBottomY : PBottom3.Y = PBottomY3
Case 4:Me.Enabled = 0
End Select
Pcount = Pcount + 1
End Sub
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub TimerFlRot_Timer
LFPrim.RotAndTra2=LeftFlipper.CurrentAngle
RFPrim.RotAndTra2=RightFlipper.CurrentAngle
End Sub
Sub NoAction
End Sub
Sub TimernClose_Timer
Match() : nClose() : Playsound"Close"
Me.Enabled = False
End Sub
Sub nClose()
SaveData()
' UpdatePreScore
TimerInit.Enabled = True
End Sub
Sub SaveData()
If BallMode = 5 Then
If Score > HighScore5 Then
HighScore5 = Score
Updatehs
SaveValue TableName, "HighScore5", HighScore5
SaveValue TableName, "BallMode", BallMode
End If
Else
If Score > HighScore3 Then
HighScore3 = Score
Updatehs
SaveValue TableName, "HighScore3", HighScore3
SaveValue TableName, "BallMode", BallMode
End If
End If
PreScore = Score
SaveValue TableName, "PreScore", PreScore
SaveValue TableName, "Credits", Credits
SaveValue TableName, "MatchNumber", MatchNumber
SaveValue TableName, "Bells", Bells
SaveValue TableName, "GameCount", GameCount
TextBalls.Text = BallMode
End Sub
Sub TimerInit_Timer
Table_Init2
Me.Enabled = False
End Sub
Sub LoadData()
Dim Value
Highscore3 = h3s
Highscore5 = h5s
Value = (LoadValue(TableName,"PreScore"))
If (Value <> "") Then PreScore = CDbl(Value) End If
Value = (LoadValue(TableName,"HighScore3"))
If (Value <> "") Then HighScore3 = CDbl(Value) End If
Value = (LoadValue(TableName,"HighScore5"))
If (Value <> "") Then HighScore5 = CDbl(Value) End If
Value = (LoadValue(TableName,"Credits"))
If (Value <> "") Then Credits = CDbl(Value) End If
Value = (LoadValue(TableName,"MatchNumber"))
If (Value <> "") Then MatchNumber = CDbl(Value) End If
Value = (LoadValue(TableName,"GameCount"))
If (Value <> "") Then GameCount = CDbl(Value) End If
Value = (LoadValue(TableName,"BallMode"))
If (Value <> "") Then BallMode = CDbl(Value) End If
Value = (LoadValue(TableName,"Bells"))
If (Value <> "") Then Bells = CDbl(Value) End If
If Credits > 25 Then Credits = 25
' GameCount = 0' resets balls and chimes to origin setup
UpdateBalls
End Sub
Sub MatchDisplay()
If y = 000 Then controller.B2SSetData 34, 100' : MatchReel.SetValue (1)
If y = 100 Then controller.B2SSetData 34, 10' : MatchReel.SetValue (2)
If y = 200 Then controller.B2SSetData 34, 20' : MatchReel.SetValue (3)
If y = 300 Then controller.B2SSetData 34, 30' : MatchReel.SetValue (4)
If y = 400 Then controller.B2SSetData 34, 40' : MatchReel.SetValue (5)
If y = 500 Then controller.B2SSetData 34, 50' : MatchReel.SetValue (6)
If y = 600 Then controller.B2SSetData 34, 60' : MatchReel.SetValue (7)
If y = 700 Then controller.B2SSetData 34, 70' : MatchReel.SetValue (8)
If y = 800 Then controller.B2SSetData 34, 80' : MatchReel.SetValue (9)
If y = 900 Then controller.B2SSetData 34, 90' : MatchReel.SetValue (10)
If y =(score mod 1000) then
If Credits < 26 Then Call Credit() Else Playsound"Knocker"
End If
End Sub
Sub Match()
Randomize
y = Int(Rnd(10) * 10) * 100
MatchNumber = y
Call Matchdisplay()
Playsound"switchmatch"
End Sub
Sub Special()
If Credits < 26 Then
Call Credit()
Else
Playsound"Knocker"
End If
End Sub
Sub Credit()
If Credits < 26 Then
Credits = Credits + 1 : Playsound"Knocker" : UpdateCredits
Else
Playsound"Knocker"
End If
End Sub
Sub AddScore(Points)
If GameInProgress = False Or Tilt = True Then Exit Sub
Score = Score + Points
UpdateScore
Score1.AddValue(Points)
If Bells = 1 Then
Playsound Points
End If
CheckReplay()
End Sub
Sub TimerScoreTsd_Timer
If GameInProgress = False Or Tilt = True Then Exit Sub
Score = Score + Points
Score1.AddValue(Points)
sTsd = sTsd+1
If sTsd >5 Then sTsd = 0 : Me.Enabled = False
Select Case sTsd
Case 1: Stopsound"1000" : AddScore 1000 : UpdateScore : Me.Interval = 125
Case 2: Stopsound"1000" : AddScore 1000 : UpdateScore
Case 3: Stopsound"1000" : AddScore 1000 : UpdateScore
Case 4: Stopsound"1000" : AddScore 1000 : UpdateScore
Case 5: Stopsound"1000" : AddScore 1000 : UpdateScore : Me.Interval = 150
End Select
' If NAC = 2 Then Stopsound Points Else Playsound""' Points
CheckReplay()
End Sub
Sub TimerScoreTsd2_Timer
If GameInProgress = False Or Tilt = True Then Exit Sub
Score = Score + Points
UpdateScore
Score1.AddValue(Points)
sTsd2 = sTsd2+1
If sTsd2 >5 Then sTsd2 = 0 : Me.Enabled = False
Select Case sTsd2
Case 1: AddScore 10000 : UpdateScore : Me.Interval = 125
Case 2: AddScore 10000 : UpdateScore
Case 3: AddScore 10000 : UpdateScore
Case 4: AddScore 10000 : UpdateScore
Case 5: AddScore 10000 : UpdateScore : Me.Interval = 150
End Select
' If NAC = 2 Then Stopsound Points Else Playsound""' Points
CheckReplay()
End Sub
Sub UpdateScore
Score1.AddValue(Points)
Score1000K=Int (Score/1000000)
Score100K=Int (Score/100000)
Score10K=Int (Score/10000)
ScoreK=Int ((Score-(Score10K*10000))/1000)
Score100=Int ((Score-(Score10K*10000)-(ScoreK*1000))/100)
Score10=Int ((Score-(Score10K*10000)-(ScoreK*1000)-(Score100*100))/10)
ScoreUnit=Int (Score-(Score10K*10000)-(ScoreK*1000)-(Score100*100)-(Score10*10))
' ScoreReel01.SetValue(Score100K)
' ScoreReel02.SetValue(Score10K)
' ScoreReel03.SetValue(ScoreK)
' ScoreReel04.SetValue(Score100)
' ScoreReel05.SetValue(Score10)
' ScoreReel06.SetValue(ScoreUnit)
b2sSplitScore Score
' b2sSplitScore, Score
End Sub
Sub b2sSplitScore (Byval b2sscorevalue)
Dim B2Ssplit
Dim b2splayer:b2splayer=1 'this line locks the function to player 1
b2splayer=(b2splayer-1)*6
' b2sscorevalue=b2sscorevalue-Int(b2sscorevalue/1000000)
B2Ssplit= Int(b2sscorevalue/1000000):B2SData(b2splayer)=Chr(B2Ssplit+1):b2sscorevalue=b2sscorevalue-Int(B2Ssplit*1000000)
B2Ssplit= Int(b2sscorevalue/100000):B2SData(b2splayer)=Chr(B2Ssplit+1):b2sscorevalue=b2sscorevalue-Int(B2Ssplit*100000)
B2Ssplit= Int(b2sscorevalue/10000):B2SData(b2splayer+1)=Chr(B2Ssplit+1):b2sscorevalue=b2sscorevalue-Int(B2Ssplit*10000)
B2Ssplit= Int(b2sscorevalue/1000):B2SData(b2splayer+2)=Chr(B2Ssplit+1):b2sscorevalue=b2sscorevalue-Int(B2Ssplit*1000)
B2Ssplit= Int(b2sscorevalue/100):B2SData(b2splayer+3)=Chr(B2Ssplit+1):b2sscorevalue=b2sscorevalue-Int(B2Ssplit*100)
B2Ssplit= Int(b2sscorevalue/10):B2SData(b2splayer+4)=Chr(B2Ssplit+1):b2sscorevalue=b2sscorevalue-Int(B2Ssplit*10)
If GameInProgress = true then controller.B2SSetScorePlayer1 Score
End Sub
Sub UpdatePreScore
Score1.SetValue(PreScore)
PreScore1000K=Int (PreScore/1000000)
PreScore100K=Int (PreScore/100000)
PreScore10K=Int (PreScore/10000)
PreScoreK=Int ((PreScore-(PreScore10K*10000))/1000)
PreScore100=Int ((PreScore-(PreScore10K*10000)-(PreScoreK*1000))/100)
PreScore10=Int ((PreScore-(PreScore10K*10000)-(PreScoreK*1000)-(PreScore100*100))/10)
PreScoreUnit=Int (PreScore-(PreScore10K*10000)-(PreScoreK*1000)-(PreScore100*100)-(PreScore10*10))
' ScoreReel01.SetValue(PreScore100K)
' ScoreReel02.SetValue(PreScore10K)
' ScoreReel03.SetValue(PreScoreK)
' ScoreReel04.SetValue(PreScore100)
' ScoreReel05.SetValue(PreScore10)
' ScoreReel06.SetValue(PreScoreUnit)
b2sSplitScore Prescore
End Sub
Sub Updatehs
h3s = HighScore3
h5s = HighScore5
h3s1000K=Int (h3s/1000000)
h3s100K=Int (h3s/100000)
h3s10K=Int (h3s/10000)
h3sK=Int((h3s-(h3s10K*10000))/1000)
h3s100=Int((h3s-(h3s10K*10000)-(h3sK*1000))/100)
h3s10=Int((h3s-(h3s10K*10000)-(h3sK*1000)-(h3s100*100))/10)
h3sUnit=Int(h3s-(h3s10K*10000)-(h3sK*1000)-(h3s100*100)-(h3s10*10))
h5s1000K=Int (h5s/1000000)
h5s100K=Int (h5s/100000)
h5s10K=Int (h5s/10000)
h5sK=Int((h5s-(h5s10K*10000))/1000)
h5s100=Int((h5s-(h5s10K*10000)-(h5sK*1000))/100)
h5s10=Int((h5s-(h5s10K*10000)-(h5sK*1000)-(h5s100*100))/10)
h5sUnit=Int(h5s-(h5s10K*10000)-(h5sK*1000)-(h5s100*100)-(h5s10*10))
If BallMode = 3 Then
hsg.SetValue(h3s1000K)
hsa.SetValue(h3s100K)
hsb.SetValue(h3s10K)
hsc.SetValue(h3sK)
hsd.SetValue(h3s100)
hse.SetValue(h3s10)
hsf.SetValue(h3sUnit)
LightBalls.State = 1
Else
hsg.SetValue(h5s1000K)
hsa.SetValue(h5s100K)
hsb.SetValue(h5s10K)
hsc.SetValue(h5sK)
hsd.SetValue(h5s100)
hse.SetValue(h5s10)
hsf.SetValue(h5sUnit)
LightBalls.State = 0
End If
End Sub
Sub CheckReplay()
If BallMode = 5 Then
If Score + Points => 700000 And Rep1 = False Then Special() : Rep1 = True
If Score + Points => 900000 And Rep2 = False Then Special() : Rep2 = True
Else
If Score + Points => 500000 And Rep1 = False Then Special() : Rep1 = True
If Score + Points => 700000 And Rep2 = False Then Special() : Rep2 = True
End If
End Sub
Sub UpdateCredits
Credits10=Int((Credits-(Credits10K*10000)-(CreditsK*1000)-(Credits100*100))/10)
CreditsUnit=Int(Credits-(Credits10K*10000)-(CreditsK*1000)-(Credits100*100)-(Credits10*10))
controller.B2SSetCredits Credits
creditstext.text = credits
End Sub
Sub UpdateBIP
controller.B2SSetData 32, BIP
End Sub
Sub UpdateMatch
Matchnumber100=Int((Matchnumber-(Matchnumber10K*10000)-(MatchnumberK*1000))/100)
Matchnumber10=Int ((Matchnumber-(Matchnumber10K*10000)-(MatchnumberK*1000)-(Matchnumber100*100))/10)
MatchnumberUnit=Int (Matchnumber-(Matchnumber10K*10000)-(MatchnumberK*1000)-(Matchnumber100*100)-(Matchnumber10*10))
If Matchnumber = 000 Then controller.B2SSetData 34, 100' : MatchReel.SetValue (1)
If Matchnumber = 100 Then controller.B2SSetData 34, 10' : MatchReel.SetValue (2)
If Matchnumber = 200 Then controller.B2SSetData 34, 20' : MatchReel.SetValue (3)
If Matchnumber = 300 Then controller.B2SSetData 34, 30' : MatchReel.SetValue (4)
If Matchnumber = 400 Then controller.B2SSetData 34, 40' : MatchReel.SetValue (5)
If Matchnumber = 500 Then controller.B2SSetData 34, 50' : MatchReel.SetValue (6)
If Matchnumber = 600 Then controller.B2SSetData 34, 60' : MatchReel.SetValue (7)
If Matchnumber = 700 Then controller.B2SSetData 34, 70' : MatchReel.SetValue (8)
If Matchnumber = 800 Then controller.B2SSetData 34, 80' : MatchReel.SetValue (9)
If Matchnumber = 900 Then controller.B2SSetData 34, 90' : MatchReel.SetValue (10)
' controller.B2SSetData 9, MatchNumber'Unit
matchtext.text = Matchnumber
End Sub
Sub UpdateBalls
If BallMode = 5 Then
Balls = 5 : LightBalls.State = 0
Else
Balls = 3 : LightBalls.State = 1
End If
TextBalls.Text = BallMode
End Sub
Sub TimerTilt_Timer()
Tiltswing = (Tiltswing / 6) * 5
If Tiltswing < 0.001 Then Tiltswing = 0 : TimerTilt.Enabled = False
End Sub
Sub Tiltcheck()
TimerTilt.Enabled = True
If Newtilt = Oldtilt Then
Tiltswing = Tiltswing + 0.40 : Stopsound"NudgeA" : Stopsound"NudgeB" : Playsound"NudgeA"
Else
Tiltswing = Tiltswing + 0.25 : Stopsound"NudgeA" : Stopsound"NudgeB" : Playsound"NudgeB"
End If
Oldtilt = Newtilt
If Tiltswing > 1 And GameOver = False And Tilt = False Then
Tilt = True : controller.B2SSetData 33, 1' : TiltReel.SetValue 1
KickerL.TimerInterval = 200 : KickerL.TimerEnabled = True
KickerR.TimerInterval = 200 : KickerR.TimerEnabled = True
TableOff : Bonus = 0
Playsound"Tilt"
End If
End Sub
Sub BumpersOff
Bumper1.Force = 0 : Bumper2.Force = 0 : Bumper3.Force = 0
SetLamp 14,0 : SetLamp 15,0 : SetLamp 16,0
SetLamp 17,0 : SetLamp 18,0 : SetLamp 19,0
End Sub
Sub BumpersOn
Bumper1.Force = 10 : Bumper2.Force = 10 : Bumper3.Force = 10
End Sub
Sub TableOff
AllLampsOff : BumpersOff
Ddown = False
End Sub
Sub KickerL_Hit()
BRollOff : Stopsound"cuphit"
If Tilt = True Then KickerL.TimerInterval = 200 : Exit Sub
If Ddown = True Then
KickerL.TimerInterval = 1100
Else
KickerL.TimerInterval = 500
End If
TimerScoreTsd2.Enabled = True
mLockMagnet.MagnetOff
Me.TimerEnabled = True
End Sub
Sub KickerL_Timer()
If LampState(20) = 1 Then Special() : TargetGreenReset
KickerL.Kick 154, 9 : LightKickerL.State = 1 : LightKickerL.TimerEnabled = True
KVar = CInt(Rnd*2)
Select Case KVar
Case 0: Playsound"KickA"
Case 1: Playsound"KickB"
Case 2: Playsound"KickC"
End Select
Playsound"Kick"
Me.TimerEnabled = False
End Sub
Sub KickerR_Hit()
BRollOff : Stopsound"cuphit"
If Tilt = True Then KickerR.TimerInterval = 200 : Exit Sub
If Ddown = True Then
KickerR.TimerInterval = 1100
Else
KickerR.TimerInterval = 500
End If
TimerScoreTsd2.Enabled = True
mLockMagnet2.MagnetOff
Me.TimerEnabled = True
End Sub
Sub KickerR_Timer()
If LampState(21) = 1 Then Special() : TargetRedReset
KickerR.Kick 207, 8 : LightKickerR.State = 1 : LightKickerR.TimerEnabled = True
KVar = CInt(Rnd*2)
Select Case KVar
Case 0: Playsound"KickA"
Case 1: Playsound"KickB"
Case 2: Playsound"KickC"
End Select
Playsound"Kick"
Me.TimerEnabled = False
End Sub
Sub LightKickerL_Timer
LightKickerL.State = 0
Me.TimerEnabled = False
End Sub
Sub LightKickerR_Timer
LightKickerR.State = 0
Me.TimerEnabled = False
End Sub
Sub Drain_Hit()
BRollOff
Drain.DestroyBall
TimerNewBall.Enabled = True
' BonusCount
End Sub
Sub TimerNewBall_Timer
GameInProgress = False
Tilt = False : controller.B2SSetData 33,0
BumpersOn
If Balls = 1 And EB = False Then
GameOver = True : Playsound"Reset" : TimernClose.Enabled = True : TargetRedReset : TargetGreenReset
Else
If EB = True Then KickerRelease.TimerEnabled = True
If EB = False Then
KickerRelease.TimerEnabled = True
UpdateScore
Balls = Balls - 1 : maxBalls = False
TimerBall.Enabled = True
End If
TargetRedReset : TargetGreenReset : ABCOn
End If
Me.Enabled = False
End Sub
Sub TimerBall_Timer
If EB = False Then BIP = BIP + 1 : UpdateBIP
Me.Enabled = False
End Sub
Sub KickerRelease_Timer
Set BallSpeed = KickerRelease.CreateBall : Playsound"newball"
SpeedX = BallSpeed.velx: SpeedY = BallSpeed.vely
FinalSpeed = SQR(BallSpeed.velx * BallSpeed.velx + BallSpeed.vely * BallSpeed.vely)
ResetLights : ABCOn
If EB = True Then SetLamp 22,1
KickerRelease.Kick 85,8 : Playsound"" : GameInProgress = True : Me.TimerInterval = 1000
Me.TimerEnabled = False
End Sub
Sub ResetLights
AllLampsOff
ROReset
End Sub
Sub TimerCheck_Timer
CheckABC : CheckPins
' CheckROs
Me.Enabled = False
End Sub
Sub TargetRedReset
If TargetR1.IsDropped = True Then TargetR1.TimerEnabled = True
If TargetR2.IsDropped = True Then TargetR2.TimerEnabled = True
If TargetR3.IsDropped = True Then TargetR3.TimerEnabled = True
If TargetR4.IsDropped = True Then TargetR4.TimerEnabled = True
If TargetR5.IsDropped = True Then TargetR5.TimerEnabled = True
SetLamp 21,0
End Sub
Sub TargetR1_Timer
For Each x In Red1s : x.IsDropped = False : Next
trR1.WidthTop = 40 : trR1.WidthBottom = 40 : LightAnitrR1.State = Abs(LightAnitrR1.State -1)
TargetR1.IsDropped = False
LightMirR1.State = 0
Stopsound"ResetT" : Playsound"ResetT"
Me.TimerEnabled = False
End Sub
Sub TargetR2_Timer
For Each x In Red2s : x.IsDropped = False : Next
trR2.WidthTop = 40 : trR2.WidthBottom = 40 : LightAnitrR2.State = Abs(LightAnitrR2.State -1)
TargetR2.IsDropped = False
LightMirR2.State = 0
Stopsound"ResetT" : Playsound"ResetT"
Me.TimerEnabled = False
End Sub
Sub TargetR3_Timer
For Each x In Red3s : x.IsDropped = False : Next
trR3.WidthTop = 40 : trR3.WidthBottom = 40 : LightAnitrR3.State = Abs(LightAnitrR3.State -1)
TargetR3.IsDropped = False
LightMirR3.State = 0
Stopsound"ResetT" : Playsound"ResetT"
Me.TimerEnabled = False
End Sub
Sub TargetR4_Timer
For Each x In Red4s : x.IsDropped = False : Next
trR4.WidthTop = 40 : trR4.WidthBottom = 40 : LightAnitrR4.State = Abs(LightAnitrR4.State -1)
TargetR4.IsDropped = False
LightMirR4.State = 0
Stopsound"ResetT" : Playsound"ResetT"
Me.TimerEnabled = False
End Sub
Sub TargetR5_Timer
For Each x In Red5s : x.IsDropped = False : Next
trR5.WidthTop = 40 : trR5.WidthBottom = 40 : LightAnitrR5.State = Abs(LightAnitrR5.State -1)
TargetR5.IsDropped = False
LightMirR5.State = 0
Stopsound"ResetT" : Playsound"ResetT"
Me.TimerEnabled = False
End Sub
Sub TargetGreenReset
If TargetG1.IsDropped = True Then TargetG1.TimerEnabled = True
If TargetG2.IsDropped = True Then TargetG2.TimerEnabled = True
If TargetG3.IsDropped = True Then TargetG3.TimerEnabled = True
If TargetG4.IsDropped = True Then TargetG4.TimerEnabled = True
If TargetG5.IsDropped = True Then TargetG5.TimerEnabled = True
SetLamp 20,0
End Sub
Sub TargetG1_Timer
For Each x In Green1s : x.IsDropped = False : Next
tgR1.WidthTop = 40 : tgR1.WidthBottom = 40 : LightAnitgR1.State = Abs(LightAnitgR1.State -1)
TargetG1.IsDropped = False
LightMirG1.State = 0
Stopsound"ResetT" : Playsound"ResetT"
Me.TimerEnabled = False
End Sub
Sub TargetG2_Timer
For Each x In Green2s : x.IsDropped = False : Next
tgR2.WidthTop = 40 : tgR2.WidthBottom = 40 : LightAnitgR2.State = Abs(LightAnitgR2.State -1)
TargetG2.IsDropped = False
LightMirG2.State = 0
Stopsound"ResetT" : Playsound"ResetT"
Me.TimerEnabled = False
End Sub
Sub TargetG3_Timer
For Each x In Green3s : x.IsDropped = False : Next
tgR3.WidthTop = 40 : tgR3.WidthBottom = 40 : LightAnitgR3.State = Abs(LightAnitgR3.State -1)
TargetG3.IsDropped = False
LightMirG3.State = 0
Stopsound"ResetT" : Playsound"ResetT"
Me.TimerEnabled = False
End Sub
Sub TargetG4_Timer
For Each x In Green4s : x.IsDropped = False : Next
tgR4.WidthTop = 40 : tgR4.WidthBottom = 40 : LightAnitgR4.State = Abs(LightAnitgR4.State -1)
TargetG4.IsDropped = False
LightMirG4.State = 0
Stopsound"ResetT" : Playsound"ResetT"
Me.TimerEnabled = False
End Sub
Sub TargetG5_Timer
For Each x In Green5s : x.IsDropped = False : Next
tgR5.WidthTop = 40 : tgR5.WidthBottom = 40 : LightAnitgR5.State = Abs(LightAnitgR5.State -1)
TargetG5.IsDropped = False
LightMirG5.State = 0
Stopsound"ResetT" : Playsound"ResetT"
Me.TimerEnabled = False
End Sub
Sub FLUPLight_Timer
FLUPLight.State = 0
Me.TimerEnabled = 0
End Sub
Sub FRUPLight_Timer
FRUPLight.State = 0
Me.TimerEnabled = 0
End Sub
Sub BRollOn
BRollOff
BRoll = CInt(Rnd*6)
Select Case BRoll
Case 0: Playsound"BrollA"
Case 1: Playsound"BrollB"
Case 2: Playsound"BrollC"
Case 3: Playsound"BrollD"
Case 4: Playsound"BrollE"
Case 5: Playsound"BrollF"
Case 6: Playsound"BrollG"
End Select
End Sub
Sub BRollOff
Stopsound"BrollA" : Stopsound"BrollB" : Stopsound"BrollC" : Stopsound"BrollD" : Stopsound"BrollE" : Stopsound"BrollF" : Stopsound"BrollG" : Stopsound"Launch"
End Sub
'****************************************
' JP's Fading Lamps v4.1
VP9 Fading only
' Based on PD's Fading Lights
' SetLamp 0 is Off
' SetLamp 1 is On
' LampState(x) current state
'****************************************
Dim LampState(28)
TimerFade.Interval = 33
Sub TimerFade_Timer() : UpdateLamps : End Sub
Sub UpdateLamps
FadeL 0, LightA, LightA1
FadeL 1, LightB, LightB1
FadeL 2, LightC, LightC1
FadeL 3, LightTopA, LightTopA1
FadeL 4, LightTopB, LightTopB1
FadeL 5, LightTopC, LightTopC1
FadeL 6, LightTopLe, LightTopLe1
FadeL 7, LightTopRi, LightTopRi1
FadeL 8, LightBotA, LightBotA1
FadeL 9, LightBotB, LightBotB1
FadeL 10, LightBotC, LightBotC1
FadeL 11, LightBotD, LightBotD1
FadeL 12, LightBotE, LightBotE1
FadeL 13, LightBotF, LightBotF1
FadeL 14, LightBumper1, LightBumper11
FadeL 15, LightBumper2, LightBumper21
FadeL 16, LightBumper3, LightBumper31
FadeL 17, LightreflB1, LightreflB11
FadeL 18, LightreflB2, LightreflB21
FadeL 19, LightreflB3, LightreflB31
FadeL 20, LightSpecG, LightSpecG1
FadeL 21, LightSpecR, LightSpecR1
FadeL 22, LightEB, LightEB1
FadeL 23, LightL, LightL1
FadeL 24, LightR, LightR1
FadeL 25, LightTopAA, LightTopAA1
FadeL 26, LightTopBB, LightTopBB1
FadeL 27, LightTopCC, LightTopCC1
End Sub
Sub SetLamp(nr, value)
If value = 0 And LampState(nr) = 0 Then Exit Sub
If value = 1 And LampState(nr) = 1 Then Exit Sub
LampState(nr) = Abs(value) + 4
End Sub
Sub FadeL(nr, a, b)
Select Case LampState(nr)
Case 2:b.state = 0:LampState(nr) = 0
Case 3:b.state = 1:LampState(nr) = 2
Case 4:a.state = 0:LampState(nr) = 3
Case 5:b.state = 1:LampState(nr) = 6
Case 6:a.state = 1:LampState(nr) = 1
End Select
End Sub
Sub FadeR(nr, a)
Select Case LampState(nr)
Case 2:a.SetValue 3:LampState(nr) = 0
Case 3:a.SetValue 2:LampState(nr) = 2
Case 4:a.SetValue 1:LampState(nr) = 3
Case 5:a.SetValue 1:LampState(nr) = 6
Case 6:a.SetValue 0:LampState(nr) = 1
End Select
End Sub
Sub AllLampsOff
For x = 0 to 27
LampState(x) = 4
Next
UpdateLamps : UpdateLamps : UpdateLamps
Bumper1.State = 0 : Bumper2.State = 0 : Bumper3.State = 0
For Each x In ButOn : x.IsDropped = True : Next
For Each x In ButOff: x.IsDropped = False : Next
End Sub
Sub AllLampsOn
For x = 0 to 27
LampState(x) = 1
Next
UpdateLamps
Bumper1.State = 1 : Bumper2.State = 1 : Bumper3.State = 1
' For Each x In ButOn : x.IsDropped = False : Next
' For Each x In ButOff: x.IsDropped = True : Next
End Sub
Sub ABCOn
SetLamp 0,1 : SetLamp 1,1 : SetLamp 2,1 : SetLamp 3,1 : SetLamp 4,1 : SetLamp 5,1
' For x = 0 to 5
' LampState(x) = 1
' Next
' UpdateLamps
End Sub
Sub TimerTarget_Timer()
TargetAR.WidthTop = 46 : TargetAR.WidthBottom = 46 : TargetAR2.WidthTop = 48 : TargetAR2.WidthBottom = 48 : LightAniAR.State = Abs(LightAniAR.State -1)
TargetBR.WidthTop = 46 : TargetBR.WidthBottom = 46 : TargetBR2.WidthTop = 46 : TargetBR2.WidthBottom = 46 : LightAniBR.State = Abs(LightAniBR.State -1)
TargetCR.WidthTop = 46 : TargetCR.WidthBottom = 46 : TargetCR2.WidthTop = 48 : TargetCR2.WidthBottom = 48 : LightAniCR.State = Abs(LightAniCR.State -1)
TargetAA.IsDropped = False : TargetBA.IsDropped = False : TargetCA.IsDropped = False
TargetAB.IsDropped = True : TargetBB.IsDropped = True : TargetCB.IsDropped = True
TimerCheck.Enabled = True
Me.Enabled = False
End Sub
Sub TargetAA_Hit
BRollOff
TargetAR.WidthTop = 0 : TargetAR.WidthBottom = 0 : TargetAR2.WidthTop = 0 : TargetAR2.WidthBottom = 0 : LightAniAR.State = Abs(LightAniAR.State -1)
TargetAA.IsDropped = True : TargetAB.IsDropped = False
TimerTarget.Enabled = True
If Tilt = False Then
SetLamp 0,0
If LampState(14) = 0 Then SetLamp 14,1 : SetLamp 17,1
Stopsound"5000" : AddScore 5000
End If
End Sub
Sub TargetBA_Hit
BRollOff
TargetBR.WidthTop = 0 : TargetBR.WidthBottom = 0 : TargetBR2.WidthTop = 0 : TargetBR2.WidthBottom = 0 : LightAniBR.State = Abs(LightAniBR.State -1)
TargetBA.IsDropped = True : TargetBB.IsDropped = False
TimerTarget.Enabled = True
If Tilt = False Then
SetLamp 1,0
If LampState(15) = 0 Then SetLamp 15,1 : SetLamp 18,1
Stopsound"5000" : AddScore 5000
End If
End Sub
Sub TargetCA_Hit
BRollOff
TargetCR.WidthTop = 0 : TargetCR.WidthBottom = 0 : TargetCR2.WidthTop = 0 : TargetCR2.WidthBottom = 0 : LightAniCR.State = Abs(LightAniCR.State -1)
TargetCA.IsDropped = True : TargetCB.IsDropped = False
TimerTarget.Enabled = True
If Tilt = False Then
SetLamp 2,0
If LampState(16) = 0 Then SetLamp 16,1 : SetLamp 19,1
Stopsound"5000" : AddScore 5000
End If
End Sub
Sub ROReset
For Each x In ButOn : x.IsDropped = False : Next
For Each x In ButOff: x.IsDropped = True : Next
SetLamp 6,1 : SetLamp 7,1 : SetLamp 8,1 : SetLamp 9,1 : SetLamp 10,1 : SetLamp 11,1 : SetLamp 12,1 : SetLamp 13,1 : SetLamp 23,1 : SetLamp 24,1 : SetLamp 25,1 : SetLamp 26,1 : SetLamp 27,1
' For x = 3 to 13
' LampState(x) = 1
' Next
' UpdateLamps
End Sub
Sub TriggerL1_Hit()
BLOff.IsDropped = True : BLOn.IsDropped = True : Me.TimerEnabled = True
If Tilt = True Then Exit Sub
TimerScoreTsd2.Enabled = True
End Sub
Sub TriggerL1_Timer()
If LampState (23) = 1 Then
BLOff.IsDropped = True : BLOn.IsDropped = False
Else
BLOff.IsDropped = False : BLOn.IsDropped = True
End If
Me.TimerEnabled = False
End Sub
Sub TriggerR1_Hit()
BROff.IsDropped = True : BROn.IsDropped = True : Me.TimerEnabled = True
If Tilt = True Then Exit Sub
TimerScoreTsd2.Enabled = True
End Sub
Sub TriggerR1_Timer()
If LampState (24) = 1 Then
BROff.IsDropped = True : BROn.IsDropped = False
Else
BROff.IsDropped = False : BROn.IsDropped = True
End If
Me.TimerEnabled = False
End Sub
Sub TriggerTopA_Hit()
BRollOff : BRollOn
ATopOff.IsDropped = True : ATopOn.IsDropped = True : Me.TimerEnabled = True
If Tilt = True Then Exit Sub
SetLamp 3,0 : SetLamp 0,0
SetLamp 14,1 : SetLamp 17,1
TimerScoreTsd.Enabled = True
TimerCheck.Enabled = True
End Sub
Sub TriggerTopA_Timer()
' If LampState (3) = 1 Then
ATopOff.IsDropped = True : ATopOn.IsDropped = False
' Else
' ATopOff.IsDropped = False : ATopOn.IsDropped = True
' End If
Me.TimerEnabled = False
End Sub
Sub TriggerTopLe_Hit()
BRollOff : BRollOn
BTopLeOff.IsDropped = True : BTopLeOn.IsDropped = True : Me.TimerEnabled = True
If Tilt = True Then Exit Sub
AddScore 10000
TimerCheck.Enabled = True
End Sub
Sub TriggerTopLe_Timer()
If LampState (6) = 1 Then
BTopLeOff.IsDropped = True : BTopLeOn.IsDropped = False
Else
BTopLeOff.IsDropped = False : BTopLeOn.IsDropped = True
End If
Me.TimerEnabled = False
End Sub
Sub TriggerTopB_Hit()
BRollOff : BRollOn
BTopOff.IsDropped = True : BTopOn.IsDropped = True : Me.TimerEnabled = True
If Tilt = True Then Exit Sub
SetLamp 4,0 : SetLamp 1,0' : SetLamp 26,1
SetLamp 15,1 : SetLamp 18,1
TimerScoreTsd.Enabled = True
TimerCheck.Enabled = True
End Sub
Sub TriggerTopB_Timer()
' If LampState (4) = 1 Then
BTopOff.IsDropped = True : BTopOn.IsDropped = False
' Else
' BTopOff.IsDropped = False : BTopOn.IsDropped = True
' End If
Me.TimerEnabled = False
End Sub
Sub TriggerTopRi_Hit()
BRollOff : BRollOn
BTopRiOff.IsDropped = True : BTopRiOn.IsDropped = True : Me.TimerEnabled = True
If Tilt = True Then Exit Sub
AddScore 10000
TimerCheck.Enabled = True
End Sub
Sub TriggerTopRi_Timer()
If LampState (7) = 1 Then
BTopRiOff.IsDropped = True : BTopRiOn.IsDropped = False
Else
BTopRiOff.IsDropped = False : BTopRiOn.IsDropped = True
End If
Me.TimerEnabled = False
End Sub
Sub TriggerTopC_Hit()
BRollOff : BRollOn
CTopOff.IsDropped = True : CTopOn.IsDropped = True : Me.TimerEnabled = True
If Tilt = True Then Exit Sub
SetLamp 5,0 : SetLamp 2,0
SetLamp 16,1 : SetLamp 19,1
TimerScoreTsd.Enabled = True
TimerCheck.Enabled = True
End Sub
Sub TriggerTopC_Timer()
' If LampState (5) = 1 Then
CTopOff.IsDropped = True : CTopOn.IsDropped = False
' Else
' CTopOff.IsDropped = False : CTopOn.IsDropped = True
' End If
Me.TimerEnabled = False
End Sub
Sub TriggerBotA_Hit()
ABotOff.IsDropped = True : ABotOn.IsDropped = True : Me.TimerEnabled = True
If Tilt = True Then Exit Sub
' SetLamp 2,0 : SetLamp 21,1 : SetLamp 26,1
' SetLamp 42,1 : SetLamp 45,1
AddScore 10000
TimerCheck.Enabled = True
End Sub
Sub TriggerBotA_Timer()
If LampState (8) = 1 Then
ABotOff.IsDropped = True : ABotOn.IsDropped = False
' WT3On.IsDropped = True : WT3Off.IsDropped = False
Else
ABotOff.IsDropped = False : ABotOn.IsDropped = True
' WT3On.IsDropped = False : WT3Off.IsDropped = True
End If
Me.TimerEnabled = False
End Sub
Sub TriggerBotB_Hit()
BBotOff.IsDropped = True : BBotOn.IsDropped = True : Me.TimerEnabled = True
If Tilt = True Then Exit Sub
' SetLamp 0,0 : SetLamp 22,1
' SetLamp 41,1 : SetLamp 44,1
AddScore 10000
TimerCheck.Enabled = True
End Sub
Sub TriggerBotB_Timer()
If LampState (9) = 1 Then
BBotOff.IsDropped = True : BBotOn.IsDropped = False
' WT1On.IsDropped = True : WT1Off.IsDRopped = False
Else
BBotOff.IsDropped = False : BBotOn.IsDropped = True
' WT1On.IsDropped = False : WT1Off.IsDRopped = True
End If
Me.TimerEnabled = False
End Sub
Sub TriggerBotC_Hit()
CBotOff.IsDropped = True : CBotOn.IsDropped = True : Me.TimerEnabled = True
If Tilt = True Then Exit Sub
' SetLamp 1,0 : SetLamp 23,1
AddScore 10000
TimerCheck.Enabled = True
End Sub
Sub TriggerBotC_Timer()
If LampState (10) = 1 Then
CBotOff.IsDropped = True : CBotOn.IsDropped = False
' WT2On.IsDropped = True : WT2Off.IsDropped = False
Else
CBotOff.IsDropped = False : CBotOn.IsDropped = True
' WT2On.IsDropped = False : WT2Off.IsDropped = True
End If
Me.TimerEnabled = False
End Sub
Sub TriggerBotD_Hit()
DBotOff.IsDropped = True : DBotOn.IsDropped = True : Me.TimerEnabled = True
If Tilt = True Then Exit Sub
' SetLamp 3,0 : SetLamp 24,1
AddScore 10000
TimerCheck.Enabled = True
End Sub
Sub TriggerBotD_Timer()
If LampState (11) = 1 Then
DBotOff.IsDropped = True : DBotOn.IsDropped = False
' WT4On.IsDropped = True : WT4Off.IsDropped = False
Else
DBotOff.IsDropped = False : DBotOn.IsDropped = True
' WT4On.IsDropped = False : WT4Off.IsDropped = True
End If
Me.TimerEnabled = False
End Sub
Sub TriggerBotE_Hit()
EBotOff.IsDropped = True : EBotOn.IsDropped = True : Me.TimerEnabled = True
If Tilt = True Then Exit Sub
' SetLamp 4,0 : SetLamp 25,1
' SetLamp 43,1 : SetLamp 46,1
AddScore 10000
TimerCheck.Enabled = True
End Sub
Sub TriggerBotE_Timer()
If LampState (12) = 1 Then
EBotOff.IsDropped = True : EBotOn.IsDropped = False
' WT5On.IsDropped = True : WT5Off.IsDropped = False
Else
EBotOff.IsDropped = False : EBotOn.IsDropped = True
' WT5On.IsDropped = False : WT5Off.IsDropped = True
End If
Me.TimerEnabled = False
End Sub
Sub TriggerBotF_Hit()
FBotOff.IsDropped = True : FBotOn.IsDropped = True : Me.TimerEnabled = True
If Tilt = True Then Exit Sub
' SetLamp 2,0 : SetLamp 21,1 : SetLamp 26,1
' SetLamp 42,1 : SetLamp 45,1
AddScore 10000
TimerCheck.Enabled = True
End Sub
Sub TriggerBotF_Timer()
If LampState (13) = 1 Then
FBotOff.IsDropped = True : FBotOn.IsDropped = False
' WT3On.IsDropped = True : WT3Off.IsDropped = False
Else
FBotOff.IsDropped = False : FBotOn.IsDropped = True
' WT3On.IsDropped = False : WT3Off.IsDropped = True
End If
Me.TimerEnabled = False
End Sub
Sub Bumper1_Hit
BRollOff
If GameInProgress = False Or Tilt = True Then Exit Sub
RingAni(1) = 0 : For Each x In BRings : x.IsDropped = True : Next
If LampState(14) = 1 Then AddScore 10000 : Else : AddScore 100
Me.TimerEnabled = True
End Sub
Sub Bumper2_Hit
BRollOff
If GameInProgress = False Or Tilt = True Then Exit Sub
RingAni(2) = 0 : For Each x In BRings : x.IsDropped = True : Next
If LampState(15) = 1 Then AddScore 10000 : Else : AddScore 100
Me.TimerEnabled = True
End Sub
Sub Bumper3_Hit
BRollOff
If GameInProgress = False Or Tilt = True Then Exit Sub
RingAni(3) = 0 : For Each x In BRings : x.IsDropped = True : Next
If LampState(16) = 1 Then AddScore 10000 : Else : AddScore 100
Me.TimerEnabled = True
End Sub
Sub Bumper1_Timer()
RingAni(1) = RingAni(1)+1
Select Case RingAni(1)
Case 1: B1Ring3.IsDropped = False
Case 2: B1Ring3.IsDropped = True : B1Ring2.IsDropped = False
Case 3: B1Ring2.IsDropped = True : B1Ring1.IsDropped = False
Case 4: B1Ring1.IsDropped = True : B1Ring2.IsDropped = False
Case 5: B1Ring2.IsDropped = True : B1Ring3.IsDropped = False
Case 6: B1Ring3.IsDropped = True : Me.TimerEnabled = False
End Select
End Sub
Sub Bumper2_Timer()
RingAni(2) = RingAni(2)+1
Select Case RingAni(2)
Case 1: B2Ring3.IsDropped = False
Case 2: B2Ring3.IsDropped = True : B2Ring2.IsDropped = False
Case 3: B2Ring2.IsDropped = True : B2Ring1.IsDropped = False
Case 4: B2Ring1.IsDropped = True : B2Ring2.IsDropped = False
Case 5: B2Ring2.IsDropped = True : B2Ring3.IsDropped = False
Case 6: B2Ring3.IsDropped = True : Me.TimerEnabled = False
End Select
End Sub
Sub Bumper3_Timer()
RingAni(3) = RingAni(3)+1
Select Case RingAni(3)
Case 1: B3Ring3.IsDropped = False
Case 2: B3Ring3.IsDropped = True : B3Ring2.IsDropped = False
Case 3: B3Ring2.IsDropped = True : B3Ring1.IsDropped = False
Case 4: B3Ring1.IsDropped = True : B3Ring2.IsDropped = False
Case 5: B3Ring2.IsDropped = True : B3Ring3.IsDropped = False
Case 6: B3Ring3.IsDropped = True : Me.TimerEnabled = False
End Select
End Sub
Sub TriggerLBRoll_Hit()
SpeedX = BallSpeed.velx: SpeedY = BallSpeed.vely
FinalSpeed = SQR(BallSpeed.velx * BallSpeed.velx + BallSpeed.vely * BallSpeed.vely)
BRollOff : If Finalspeed > 2 then BRollOn
End Sub
Sub TriggerRBRoll_Hit()
SpeedX = BallSpeed.velx: SpeedY = BallSpeed.vely
FinalSpeed = SQR(BallSpeed.velx * BallSpeed.velx + BallSpeed.vely * BallSpeed.vely)
BRollOff : If Finalspeed > 2 then BRollOn
End Sub
Sub TriggerMBRoll_Hit()
SpeedX = BallSpeed.velx: SpeedY = BallSpeed.vely
FinalSpeed = SQR(BallSpeed.velx * BallSpeed.velx + BallSpeed.vely * BallSpeed.vely)
BRollOff : If Finalspeed > 2 then BRollOn
End Sub
Sub TriggerL_Hit
Stopsound"cuphit" : Playsound"cuphit"
Me.TimerEnabled = True
End Sub
Sub TriggerL_Timer
KickerL.Enabled = True
Me.TimerEnabled = False
End Sub
Sub TriggerL_Unhit
mLockMagnet.MagnetOn : KickerL.Enabled = False
End Sub
Sub TriggerR_Hit
Stopsound"cuphit" : Playsound"cuphit"
Me.TimerEnabled = True
End Sub
Sub TriggerR_Timer
KickerR.Enabled = True
Me.TimerEnabled = False
End Sub
Sub TriggerR_Unhit
mLockMagnet2.MagnetOn : KickerR.Enabled = False
End Sub
Sub TriggerLane_Hit()
If SwitchLane.IsDropped = False Then SwitchLane.IsDropped = True : Playsound"Launch"
WireLaneA.WidthBottom = 0 : WireLaneA.WidthTop = 0
WireLaneB.WidthBottom = 4 : WireLaneB.WidthTop = 4
LightWireLane.State = Abs(LightWireLane.State -1)
End Sub
Sub TriggerLane_Unhit()
WireLaneA.WidthBottom = 4 : WireLaneA.WidthTop = 4
WireLaneB.WidthBottom = 0 : WireLaneB.WidthTop = 0
LightWireLane.State = Abs(LightWireLane.State -1)
End Sub
Sub TriggerLaneTop_Hit()
SetLamp 22,0 : EB = False : controller.B2SSetData 36, 0
TriggerBRollback.Enabled = True
End Sub
Sub TriggerBRollback_Hit
Playsound"BRollback"
Me.Enabled = False
End Sub
Sub Gate_Hit()
Stopsound"BRollback" : Playsound"GateLane"
End Sub
Sub TriggerLsoundOff_Hit()
SwitchLane.IsDropped = False
End Sub
Sub BallRest_Hit()
RubOn : SwitchLane.IsDropped = False
End Sub
Sub triggersbuttons_Hit(Index)
Stopsound"buttons" : Playsound"buttons"
End Sub
Sub ApronCs_Hit(Index)
CollOff : BRollOff
AC = AC+1
If AC > 2 Then AC = 1
Select Case AC
Case 1: Playsound"apronc2"
Case 2: Playsound"apronc"
End Select
End Sub
Sub MidOut_Hit()
BRollOff : CollOff : Playsound"LostS"
End Sub
Sub Bumpers_Hit(Index)
BRollOff
BVar = CInt(Rnd*2)
Select Case BVar
Case 0: Stopsound"B2" : Stopsound"B3" : Playsound"B1"
Case 1: Stopsound"B1" : Stopsound"B3" : Playsound"B2"
Case 2: Stopsound"B1" : Stopsound"B2" : Playsound"B3"
End Select
End Sub
Sub Targets_Hit(Index)
PlaOn
End Sub
Sub Rubbers_Hit(Index)
RubOn
End Sub
Sub LaneGs_Hit(Index)
MetOn2
End Sub
Sub LaneInGs_Hit(Index)
MetOn
End Sub
Sub TopRubbers_Hit(Index)
CollOff : BRollOff
SpeedX = BallSpeed.velx: SpeedY = BallSpeed.vely
FinalSpeed = SQR(BallSpeed.velx * BallSpeed.velx + BallSpeed.vely * BallSpeed.vely)
If Finalspeed < 4 Then
Playsound"post"
Else
If Finalspeed > 3 Or FinalSpeed <6 Then
Playsound"post1" :
Else
If Finalspeed > 5 Or FinalSpeed <9 Then
Playsound"post2"
Else
If Finalspeed > 8 Or FinalSpeed <12 Then
Playsound"post3"
Else
If Finalspeed => 12 Then
Playsound"post4"
End If
End If
End If
End If
End If
End Sub
Sub WallColls_Hit(Index)
CollOff : BRollOff
SpeedX = BallSpeed.velx: SpeedY = BallSpeed.vely
FinalSpeed = SQR(BallSpeed.velx * BallSpeed.velx + BallSpeed.vely * BallSpeed.vely)
If Finalspeed < 5 Then
Playsound"wall"
Else
If Finalspeed > 4 Or FinalSpeed <8 Then
Playsound"wall1"
Else
If Finalspeed > 7 Or FinalSpeed <11 Then
Playsound"wall2"
Else
If Finalspeed > 10 Or FinalSpeed <13 Then
Playsound"wall3"
Else
If Finalspeed => 13 Then
Playsound"wall4"
End If
End If
End If
End If
End If
End Sub
Sub MetOn2
CollOff : BRollOff
SpeedX = BallSpeed.velx: SpeedY = BallSpeed.vely
FinalSpeed = SQR(BallSpeed.velx * BallSpeed.velx + BallSpeed.vely * BallSpeed.vely)
If Finalspeed < 6 Then
Playsound"met21"
Else
If Finalspeed > 5 Or FinalSpeed <10 Then
Playsound"met22"
Else
If Finalspeed => 10 Then
Playsound"met23"
End If
End If
End If
End Sub
Sub MetOn
CollOff : BRollOff
SpeedX = BallSpeed.velx: SpeedY = BallSpeed.vely
FinalSpeed = SQR(BallSpeed.velx * BallSpeed.velx + BallSpeed.vely * BallSpeed.vely)
If Finalspeed < 6 Then
Playsound"met1"
Else
If Finalspeed > 5 Or FinalSpeed <10 Then
Playsound"met2"
Else
If Finalspeed => 10 Then
Playsound"met3"
End If
End If
End If
End Sub
Sub PlaOn
CollOff : BRollOff
SpeedX = BallSpeed.velx: SpeedY = BallSpeed.vely
FinalSpeed = SQR(BallSpeed.velx * BallSpeed.velx + BallSpeed.vely * BallSpeed.vely)
If Finalspeed < 2 Then
Playsound"pla"
Else
If Finalspeed > 0 Or FinalSpeed <4 Then
Playsound"pla1"
Else
If Finalspeed > 3 Or FinalSpeed <7 Then
Playsound"pla2"
Else
If Finalspeed > 6 Or FinalSpeed <10 Then
Playsound"pla3"
Else
If Finalspeed => 10 Then
Playsound"pla4"
End If
End If
End If
End If
End If
End Sub
Sub RubOn
CollOff : BRollOff
SpeedX = BallSpeed.velx: SpeedY = BallSpeed.vely
FinalSpeed = SQR(BallSpeed.velx * BallSpeed.velx + BallSpeed.vely * BallSpeed.vely)
If Finalspeed < 2 Then
Playsound"post"
Else
If Finalspeed > 1 Or FinalSpeed <4 Then
Playsound"post1"
Else
If Finalspeed > 3 Or FinalSpeed <7 Then
Playsound"post2"
Else
If Finalspeed > 6 Or FinalSpeed <10 Then
Playsound"post3"
Else
If Finalspeed => 10 Then
Playsound"post4"
End If
End If
End If
End If
End If
End Sub
Sub LeftFlipper_Collide(parm)
CollOff : BRollOff
SpeedX = BallSpeed.velx: SpeedY = BallSpeed.vely
FinalSpeed = SQR(BallSpeed.velx * BallSpeed.velx + BallSpeed.vely * BallSpeed.vely)
If Finalspeed < 6 Then
Playsound"flip"
Else
If Finalspeed > 5 Or FinalSpeed <12 Then
Playsound"flip1"
Else
If Finalspeed => 12 Then
Playsound"flip2"
End If
End If
End If
End Sub
Sub RightFlipper_Collide(parm)
CollOff : BRollOff
SpeedX = BallSpeed.velx: SpeedY = BallSpeed.vely
FinalSpeed = SQR(BallSpeed.velx * BallSpeed.velx + BallSpeed.vely * BallSpeed.vely)
If Finalspeed < 5 Then
Playsound"flip"
Else
If Finalspeed > 4 Or FinalSpeed <9 Then
Playsound"flip1"
Else
If Finalspeed => 9 Then
Playsound"flip2"
End If
End If
End If
End Sub
Sub PinColls_Hit(Index)
CollOff : BRollOff
SpeedX = BallSpeed.velx: SpeedY = BallSpeed.vely
FinalSpeed = SQR(BallSpeed.velx * BallSpeed.velx + BallSpeed.vely * BallSpeed.vely)
If Finalspeed < 5 Then
Playsound"Pla"
Else
If Finalspeed > 4 Or FinalSpeed <8 Then
Playsound"Pla1"
Else
If Finalspeed > 7 Or FinalSpeed <11 Then
Playsound"Pla2"
Else
If Finalspeed > 10 Or FinalSpeed <13 Then
Playsound"Pla3"
Else
If Finalspeed => 13 Then
Playsound"Pla4"
End If
End If
End If
End If
End If
End Sub
Sub ChangeRubs_Hit(Index)
CollOff : BRollOff
SpeedX = BallSpeed.velx: SpeedY = BallSpeed.vely
FinalSpeed = SQR(BallSpeed.velx * BallSpeed.velx + BallSpeed.vely * BallSpeed.vely)
If Finalspeed < 5 Then
Playsound"sling"
Else
If Finalspeed > 4 Or FinalSpeed <8 Then
Playsound"sling1"
Else
If Finalspeed > 7 Or FinalSpeed <11 Then
Playsound"sling2"
Else
If Finalspeed > 10 Or FinalSpeed <13 Then
Playsound"sling3"
Else
If Finalspeed => 13 Then
Playsound"sling4"
End If
End If
End If
End If
End If
End Sub
Sub CollOff
Stopsound"apronc"
Stopsound"apronc2"
Stopsound"flip"
Stopsound"flip1"
Stopsound"flip2"
Stopsound"sling"
Stopsound"sling1"
Stopsound"sling2"
Stopsound"sling3"
Stopsound"sling4"
Stopsound"pla0"
Stopsound"pla"
Stopsound"pla1"
Stopsound"pla2"
Stopsound"pla3"
Stopsound"pla4"
Stopsound"post"
Stopsound"post1"
Stopsound"post2"
Stopsound"post3"
Stopsound"post4"
Stopsound"met1"
Stopsound"met2"
Stopsound"met3"
Stopsound"met21"
Stopsound"met22"
Stopsound"met23"
Stopsound"wall"
Stopsound"wall1"
Stopsound"wall2"
Stopsound"wall3"
Stopsound"wall4"
End Sub
Sub TimerWait_Timer
Me.Interval = 2000
BOW = BOW + 1
If BOW > 5 Then BOW = 0
Select Case BOW
Case 1: SetLamp 14,0 : SetLamp 15,0 : SetLamp 16,1 : SetLamp 17,0 : SetLamp 18,0 : SetLamp 19,1' : Me.Interval = 5000
Case 2: SetLamp 14,0 : SetLamp 15,0 : SetLamp 16,1 : SetLamp 17,0 : SetLamp 18,0 : SetLamp 19,1' : Me.Interval = 5000
Case 3: SetLamp 14,1 : SetLamp 15,0 : SetLamp 16,0 : SetLamp 17,1 : SetLamp 18,0 : SetLamp 19,0' : Me.Interval = 5000
Case 4: SetLamp 14,1 : SetLamp 15,1 : SetLamp 16,1 : SetLamp 17,1 : SetLamp 18,1 : SetLamp 19,1' ; Me.Interval = 2000
Case 5: SetLamp 14,0 : SetLamp 15,0 : SetLamp 16,0 : SetLamp 17,0 : SetLamp 18,0 : SetLamp 19,0 : alllampson' : Me.Interval = 5000
End Select
End Sub
Sub WallGL_Hit()
Stopsound"Ballhop" : Playsound"Ballhop"
End Sub
Sub WallGR_Hit()
Stopsound"Ballhop" : Playsound"Ballhop"
End Sub
Sub TriggerTR1_Hit()'TargetR1_Hit()
If TargetR1.IsDropped = False Then
trR1.WidthTop = 0 : trR1.WidthBottom = 0 : LightAnitrR1.State = Abs(LightAnitrR1.State -1)
TargetR1.IsDropped = True
For Each x In Red1s : x.IsDropped = True : Next
LightMirR1.State = 1
Playsound"tdown"
TimerCheck.Enabled = True
End If
End Sub
Sub TriggerTR2_Hit()'TargetR2_Hit()
If TargetR2.IsDropped = False Then
trR2.WidthTop = 0 : trR2.WidthBottom = 0 : LightAnitrR2.State = Abs(LightAnitrR2.State -1)
TargetR2.IsDropped = True
For Each x In Red2s : x.IsDropped = True : Next
LightMirR2.State = 1
Playsound"tdown"
TimerCheck.Enabled = True
End If
End Sub
Sub TriggerTR3_Hit()'TargetR3_Hit()
If TargetR3.IsDropped = False Then
trR3.WidthTop = 0 : trR3.WidthBottom = 0 : LightAnitrR3.State = Abs(LightAnitrR3.State -1)
TargetR3.IsDropped = True
For Each x In Red3s : x.IsDropped = True : Next
LightMirR3.State = 1
Playsound"tdown"
TimerCheck.Enabled = True
End If
End Sub
Sub TriggerTR4_Hit()'TargetR4_Hit()
If TargetR4.IsDropped = False Then
trR4.WidthTop = 0 : trR4.WidthBottom = 0 : LightAnitrR4.State = Abs(LightAnitrR4.State -1)
TargetR4.IsDropped = True
For Each x In Red4s : x.IsDropped = True : Next
LightMirR4.State = 1
Playsound"tdown"
TimerCheck.Enabled = True
End If
End Sub
Sub TriggerTR5_Hit()'TargetR5_Hit()
If TargetR5.IsDropped = False Then
trR5.WidthTop = 0 : trR5.WidthBottom = 0 : LightAnitrR5.State = Abs(LightAnitrR5.State -1)
TargetR5.IsDropped = True
For Each x In Red5s : x.IsDropped = True : Next
LightMirR5.State = 1
Playsound"tdown"
TimerCheck.Enabled = True
End If
End Sub
Sub TriggerTG1_Hit()'TargetG1_Hit()
If TargetG1.IsDropped = False Then
tgR1.WidthTop = 0 : tgR1.WidthBottom = 0 : LightAnitgR1.State = Abs(LightAnitgR1.State -1)
TargetG1.IsDropped = True
For Each x In Green1s : x.IsDropped = True : Next
LightMirG1.State = 1
Playsound"tdown"
TimerCheck.Enabled = True
End If
End Sub
Sub TriggerTG2_Hit()'TargetG2_Hit()
If TargetG2.IsDropped = False Then
tgR2.WidthTop = 0 : tgR2.WidthBottom = 0 : LightAnitgR2.State = Abs(LightAnitgR2.State -1)
TargetG2.IsDropped = True
For Each x In Green2s : x.IsDropped = True : Next
LightMirG2.State = 1
Playsound"tdown"
TimerCheck.Enabled = True
End If
End Sub
Sub TriggerTG3_Hit()'TargetG3_Hit()
If TargetG3.IsDropped = False Then
tgR3.WidthTop = 0 : tgR3.WidthBottom = 0 : LightAnitgR3.State = Abs(LightAnitgR3.State -1)
TargetG3.IsDropped = True
For Each x In Green3s : x.IsDropped = True : Next
LightMirG3.State = 1
Playsound"tdown"
TimerCheck.Enabled = True
End If
End Sub
Sub TriggerTG4_Hit()'TargetG4_Hit()
If TargetG4.IsDropped = False Then
tgR4.WidthTop = 0 : tgR4.WidthBottom = 0 : LightAnitgR4.State = Abs(LightAnitgR4.State -1)
TargetG4.IsDropped = True
For Each x In Green4s : x.IsDropped = True : Next
LightMirG4.State = 1
Playsound"tdown"
TimerCheck.Enabled = True
End If
End Sub
Sub TriggerTG5_Hit()'TargetG5_Hit()
If TargetG5.IsDropped = False Then
tgR5.WidthTop = 0 : tgR5.WidthBottom = 0 : LightAnitgR5.State = Abs(LightAnitgR5.State -1)
TargetG5.IsDropped = True
For Each x In Green5s : x.IsDropped = True : Next
LightMirG5.State = 1
Playsound"tdown"
TimerCheck.Enabled = True
End If
End Sub
Sub TargetR1_Hit()
trR1.WidthTop = 0 : trR1.WidthBottom = 0 : LightAnitrR1.State = Abs(LightAnitrR1.State -1)
TargetR1.IsDropped = True
For Each x In Red1s : x.IsDropped = True : Next
LightMirR1.State = 1
Playsound"tdown"
TimerCheck.Enabled = True
End Sub
Sub TargetR2_Hit()
trR2.WidthTop = 0 : trR2.WidthBottom = 0 : LightAnitrR2.State = Abs(LightAnitrR2.State -1)
TargetR2.IsDropped = True
For Each x In Red2s : x.IsDropped = True : Next
LightMirR2.State = 1
Playsound"tdown"
TimerCheck.Enabled = True
End Sub
Sub TargetR3_Hit()
trR3.WidthTop = 0 : trR3.WidthBottom = 0 : LightAnitrR3.State = Abs(LightAnitrR3.State -1)
TargetR3.IsDropped = True
For Each x In Red3s : x.IsDropped = True : Next
LightMirR3.State = 1
Playsound"tdown"
TimerCheck.Enabled = True
End Sub
Sub TargetR4_Hit()
trR4.WidthTop = 0 : trR4.WidthBottom = 0 : LightAnitrR4.State = Abs(LightAnitrR4.State -1)
TargetR4.IsDropped = True
For Each x In Red4s : x.IsDropped = True : Next
LightMirR4.State = 1
Playsound"tdown"
TimerCheck.Enabled = True
End Sub
Sub TargetR5_Hit()
trR5.WidthTop = 0 : trR5.WidthBottom = 0 : LightAnitrR5.State = Abs(LightAnitrR5.State -1)
TargetR5.IsDropped = True
For Each x In Red5s : x.IsDropped = True : Next
LightMirR5.State = 1
Playsound"tdown"
TimerCheck.Enabled = True
End Sub
Sub TargetG1_Hit()
tgR1.WidthTop = 0 : tgR1.WidthBottom = 0 : LightAnitgR1.State = Abs(LightAnitgR1.State -1)
TargetG1.IsDropped = True
For Each x In Green1s : x.IsDropped = True : Next
LightMirG1.State = 1
Playsound"tdown"
TimerCheck.Enabled = True
End Sub
Sub TargetG2_Hit()
tgR2.WidthTop = 0 : tgR2.WidthBottom = 0 : LightAnitgR2.State = Abs(LightAnitgR2.State -1)
TargetG2.IsDropped = True
For Each x In Green2s : x.IsDropped = True : Next
LightMirG2.State = 1
Playsound"tdown"
TimerCheck.Enabled = True
End Sub
Sub TargetG3_Hit()
tgR3.WidthTop = 0 : tgR3.WidthBottom = 0 : LightAnitgR3.State = Abs(LightAnitgR3.State -1)
TargetG3.IsDropped = True
For Each x In Green3s : x.IsDropped = True : Next
LightMirG3.State = 1
Playsound"tdown"
TimerCheck.Enabled = True
End Sub
Sub TargetG4_Hit()
tgR4.WidthTop = 0 : tgR4.WidthBottom = 0 : LightAnitgR4.State = Abs(LightAnitgR4.State -1)
TargetG4.IsDropped = True
For Each x In Green4s : x.IsDropped = True : Next
LightMirG4.State = 1
Playsound"tdown"
TimerCheck.Enabled = True
End Sub
Sub TargetG5_Hit()
tgR5.WidthTop = 0 : tgR5.WidthBottom = 0 : LightAnitgR5.State = Abs(LightAnitgR5.State -1)
TargetG5.IsDropped = True
For Each x In Green5s : x.IsDropped = True : Next
LightMirG5.State = 1
Playsound"tdown"
TimerCheck.Enabled = True
End Sub
Sub CheckABC
If LampState(0) = 0 And LampState(1) = 0 And LampState(2) = 0 Then SetLamp 22,1 : EB = True : controller.B2SSetData 36,1
End Sub
Sub CheckPins
If TargetR1.IsDropped = True And TargetR2.IsDropped = True And TargetR3.IsDropped = True And TargetR4.IsDropped = True And TargetR5.IsDropped = True Then SetLamp 21,1
If TargetG1.IsDropped = True And TargetG2.IsDropped = True And TargetG3.IsDropped = True And TargetG4.IsDropped = True And TargetG5.IsDropped = True Then SetLamp 20,1
End SuB
Sub TriggerTR1Off_Hit()
TriggerTR1.Enabled = True
End Sub
Sub TriggerTR1Off_Unhit()
TriggerTR1.Enabled = False
End Sub
Sub TriggerTR2Off_Hit()
TriggerTR2.Enabled = True
End Sub
Sub TriggerTR2Off_Unhit()
TriggerTR2.Enabled = False
End Sub
Sub TriggerTR3Off_Hit()
TriggerTR3.Enabled = True
End Sub
Sub TriggerTR3Off_Unhit()
TriggerTR3.Enabled = False
End Sub
Sub TriggerTR4Off_Hit()
TriggerTR3.Enabled = True
End Sub
Sub TriggerTR4Off_Unhit()
TriggerTR4.Enabled = False
End Sub
Sub TriggerTR5Off_Hit()
TriggerTR5.Enabled = True
End Sub
Sub TriggerTR5Off_Unhit()
TriggerTR5.Enabled = False
End Sub
Sub TriggerTG1Off_Hit()
TriggerTG1.Enabled = True
End Sub
Sub TriggerTG1Off_Unhit()
TriggerTG1.Enabled = False
End Sub
Sub TriggerTG2Off_Hit()
TriggerTG2.Enabled = True
End Sub
Sub TriggerTG2Off_Unhit()
TriggerTG2.Enabled = False
End Sub
Sub TriggerTG3Off_Hit()
TriggerTG3.Enabled = True
End Sub
Sub TriggerTG3Off_Unhit()
TriggerTG3.Enabled = False
End Sub
Sub TriggerTG4Off_Hit()
TriggerTG4.Enabled = True
End Sub
Sub TriggerTG4Off_Unhit()
TriggerTG4.Enabled = False
End Sub
Sub TriggerTG5Off_Hit()
TriggerTG5.Enabled = True
End Sub
Sub TriggerTG5Off_Unhit()
TriggerTG1.Enabled = False
End Sub
Sub WKBR_Hit()
Stopsound"kickerwall" : Playsound"kickerwall"
End Sub
Sub WKBL_Hit()
Stopsound"kickerwall" : Playsound"kickerwall"
End Sub