Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Option explicit
- Randomize
- On Error Resume Next
- ExecuteGlobal GetTextFile("controller.vbs")
- If Err Then MsgBox "You need the controller.vbs in order to run this table, available in the vp10 package"
- On Error Goto 0
- Const cGameName = "dolphin_1974"
- Dim B2SScore(2), B2SPlayer, B2SPlayers
- Dim TableHeight
- TableHeight = 2020
- Dim SwingFactor
- Dim SloDoFactor
- Dim TiltStatus
- SwingFactor = 0
- SloDoFactor = 5
- TiltStatus = 0
- Dim Score
- Dim HighScore
- dim Credits
- dim BIP,PUP,BtP,Players
- dim RCC 'Reset Cyle Complete
- dim pwr1 'Motor
- dim pwr2 '30V Relays
- dim pwr3 '
- dim Ball1
- dim CB1,CB2,CB3,bs
- dim MoPo
- dim RE(24)
- dim SC(6) 'Switch control (Status)
- dim Bonus
- dim MUnit '00-90
- dim TCount(2)
- dim HCount(2)
- dim KCount(2)
- dim TKCount(2)
- dim AuxScore(2)
- dim ZPos(8)
- dim alt
- dim i
- dim GStyle,BNumb
- dim th1a,th1b,th2a,th2b,th3a,th3b,th4a,th4b
- Sub GetTHs()
- If BNumb=3 then
- If GStyle=1 then
- th1a=3:th1b=9
- th2a=5:th2b=7
- th3a=7:th3b=5
- th4a=9:th4b=3
- SCOREreel.SetValue 0
- ElseIf GStyle=2 then
- th1a=3:th1b=1
- th2a=4:th2b=5
- th3a=5:th3b=9
- th4a=0:th4b=0
- SCOREreel.SetValue 1
- Else
- chStyle()
- End If
- ElseIf BNumb=5 then
- If GStyle=1 then
- th1a=7:th1b=4
- th2a=8:th2b=6
- th3a=9:th3b=8
- th4a=0:th4b=0
- SCOREreel.SetValue 2
- ElseIf GStyle=2 then
- th1a=5:th1b=0
- th2a=7:th2b=5
- th3a=0:th3b=0
- th4a=0:th4b=0
- SCOREreel.SetValue 3
- Else
- chStyle()
- End If
- Else
- chBall()
- End If
- End Sub
- Function chBall()
- 'BNumb=5("Balls per Game: 3 or 5","What is your NUMBER?",3)
- BNumb=5
- BtP=BNumb+1
- End Function
- Function chStyle()
- 'GStyle=2("'Replays' = 1 or 'Extra Balls' = 2","What is your STYLE?","1")
- GStyle=2
- GetTHs()
- End Function
- Sub DOLPHIN_Init()
- LoadEM
- chBall()
- chStyle()
- TCount(1)=0:HCount(1)=0:KCount(1)=0:TKCount(1)=0
- TCount(2)=0:HCount(2)=0:KCount(2)=0:TKCount(2)=0
- B2SPlayers = 0
- B2SPlayer = 0
- Set Ball1=Drain.CreateBall
- Set CB1=KK1.CreateBall
- Set CB2=KK2.CreateBall
- Set CB3=KK3.CreateBall
- Bonus=0
- PUP=1
- BIP=6
- 'BtP=4
- SC(1)=true 'Ball in OH
- '- - - - - - - - - - - GENERAL RELAYS - - - - - - - - - - - -
- RE(00)=true 'LOCK
- RE(01)=true 'Game Over
- RE(02)=false 'Tilt
- RE(03)=false 'Reset
- RE(04)=false 'Ball Index
- RE(05)=false 'Alternator
- RE(06)=false 'XB
- RE(07)=false 'XB Target
- RE(08)=true 'OutHole
- RE(09)=false '2 Player game
- RE(10)=false 'Coin
- RE(11)=false 'Credit (Start)
- RE(12)=false 'Reset 1
- 'RE(13)=false 'Reset 2
- RE(14)=false 'PlayerReset
- RE(15)=false '2nd PlayerUp
- RE(16)=false 'Match
- RE(17)=false '
- RE(18)=false 'Bonus reset
- RE(19)=false 'Bonus score
- RE(20)=true 'Bonus zero
- '- - - - - - - - - - - GAME SPECIFIC - - - - - - - - - - - -
- RE(21)=false '300
- RE(22)=false 'Adv
- RE(23)=false 'Bonus Advance (Extra)
- RE(24)=false 'Double Bonus
- AllLightsOff
- MoPo=0
- MUnit=0
- GOREEL.SetValue "1"
- tiltREEL.SetValue "0"
- If B2SOn Then
- Controller.B2SSetTilt 0
- Controller.B2SSetGameOver 4
- End If
- C_RE5
- pwr1=true
- End Sub
- ' Quick Ball Sound V1.1 by STAT, stefanaustria
- ' -----------------------
- Dim aX, aY, sX, RSound, SBall
- Sub TriggerS_Timer()
- aX = int(SBall.VelX): aY = int(SBall.VelY)
- sX = -1.0: If int(Sball.X)>500 Then sX = 1.0
- If (aX>3 OR aY>3) AND Rsound = 0 Then
- RSound=int(RND*4)+1
- PlaySound "Roll "&RSound,0,1.0,sX,0.2 'replace sX to 0 for FullSound
- Elseif (aX<6 AND aY<6) AND Rsound > 0 Then
- StopSound "Roll "&Rsound
- Rsound = 0
- End If
- End Sub
- Sub TriggerS_Hit()
- DOF 123, DOFPulse
- Set SBall = Activeball
- TriggerS.TimerInterval = 100
- TriggerS.TimerEnabled = True
- PlaySound "Roll 1"
- End Sub
- ' -----------------------
- '*************************************** SWITCHES *********************************
- If RE(02)=false then
- Sub SW01_Hit()
- DOF 111, DOFPulse
- If RE(05)=false then
- add1000
- adv
- Else
- add100
- End If
- End Sub
- Sub SW02_Hit()
- DOF 112, DOFPulse
- If RE(05)=true then
- C_RE21
- C_RE23
- Else
- add100
- End If
- End Sub
- Sub SW03_Hit()
- DOF 113, DOFPulse
- If RE(05)=true then
- add1000
- adv
- Else
- add100
- End If
- End Sub
- Sub SW04_Hit()
- Adv
- Add100
- End Sub
- Sub SW05_Hit()
- Adv
- Add100
- End Sub
- Sub SW06_Hit()
- DOF 114, DOFPulse
- If RE(05)=false then
- C_RE23
- End If
- C_RE21
- End Sub
- Sub SW07_Hit()
- DOF 115, DOFPulse
- If RE(05)=true then
- C_RE23
- End If
- C_RE21
- End Sub
- Sub SW08_Hit()
- If RE(05)=false then
- If SC(4)=true then
- adv
- End If
- End If
- add100
- End Sub
- Sub SW09_Hit()
- If RE(05)=false then
- If SC(5)=true then
- adv
- End If
- End If
- add100
- End Sub
- Sub SW10_Hit()
- If RE(05)=false then
- If SC(6)=true then
- adv
- End If
- End If
- add100
- End Sub
- Sub SW11_Hit()
- add10
- End Sub
- Sub SW12_Hit()
- add10
- End Sub
- Sub SW13_Hit()
- DOF 116, DOFPulse
- add1000
- End Sub
- Sub SW14_Hit()
- DOF 117, DOFPulse
- add1000
- End Sub
- End If
- Sub KK1_Hit()
- SC(4)=true
- If SC(5)=true and SC(6)=true then
- C_RE6
- End If
- If RE(05)=false then
- L08.IsDropped=false
- L08off.IsDropped=true
- End If
- add1000
- End Sub
- Sub KK2_Hit()
- SC(5)=true
- If SC(4)=true and SC(6)=true then
- C_RE6
- End If
- If RE(05)=false then
- L09.IsDropped=false
- L09off.IsDropped=true
- End If
- add1000
- End Sub
- Sub KK3_Hit()
- SC(6)=true
- If SC(4)=true and SC(5)=true then
- C_RE6
- End If
- If RE(05)=false then
- L10.IsDropped=false
- L10off.IsDropped=true
- End If
- add1000
- End Sub
- Sub Drain_Hit()
- DOF 124, DOFPulse
- SC(1)=true
- If RE(20)=false then
- C_RE18
- Else
- C_RE8
- End If
- End Sub
- '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% RELAYS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- Sub O_RE01
- RE(01)=false
- GOREEL.SetValue "0"
- BIPReel.SetValue BIP
- If B2SOn Then Controller.B2SSetBallInPlay BIP
- MatchREEL.SetValue 10
- End Sub
- Sub C_RE01
- O_RE4
- GOREEL.SetValue "1"
- BIPREEL.SetValue "0"
- If B2SOn Then
- Controller.B2SSetBallInPlay 0
- Controller.B2SSetScoreRolloverPlayer1 0
- Controller.B2SSetScoreRolloverPlayer2 0
- B2SPlayers = 0
- B2SPlayer = 0
- Controller.B2SSetPlayerUp 0
- Controller.B2SSetGameOver 4
- End If
- RE(09)=false:RE(15)=false
- MatchREEL.SetValue MUnit
- If B2SOn Then
- Controller.B2SSetMatch MUnit
- If MUnit = 0 Then Controller.B2SSetMatch 10
- End if
- PUPReel1.SetValue 0
- PUPReel2.SetValue 0
- RE(01)=true
- End Sub
- Sub C_RE2
- C_RE4
- TiltREEL.SetValue "1"
- If B2SOn Then Controller.B2SSetTilt 4
- LeftFlipper.RotateToStart
- RightFlipper.RotateToStart
- TiltB1.IsDropped=false
- TiltB2.IsDropped=false
- RE(02)=true
- End Sub
- Sub O_RE2
- TiltB1.IsDropped=true
- TiltB2.IsDropped=true
- TiltREEL.SetValue "0"
- If B2SOn Then Controller.B2SSetTilt 0
- RE(02)=false
- End Sub
- Sub C_RE3
- RE(03)=true
- CMot
- End Sub
- Sub O_RE3
- RE(03)=false
- End Sub
- Sub C_RE4
- RE(04)=true
- RCC=false
- End Sub
- Sub O_RE4
- RE(04)=false
- End Sub
- Sub C_RE5
- alt=true
- L01.IsDropped=true
- L02.IsDropped=false
- L03.IsDropped=false
- L04.IsDropped=true
- L05.IsDropped=false
- L08.IsDropped=true
- L09.IsDropped=true
- L10.IsDropped=true
- L08off.IsDropped=false
- L09off.IsDropped=false
- L10off.IsDropped=false
- RE(05)=true
- End Sub
- Sub O_RE5
- alt=false
- L01.IsDropped=false
- L02.IsDropped=true
- L03.IsDropped=true
- L04.IsDropped=false
- L05.IsDropped=true
- If SC(4)=true then
- L08.IsDropped=false
- L08off.IsDropped=true
- End If
- If SC(5)=true then
- L09.IsDropped=false
- L09off.IsDropped=true
- End If
- If SC(6)=true then
- L10.IsDropped=false
- L10off.IsDropped=true
- End If
- RE(05)=false
- End Sub
- Sub C_RE6
- RE(06)=true
- L06.IsDropped=false
- L07.IsDropped=true
- SPSAREEL.SetValue "1"
- If B2SOn Then Controller.B2SSetShootAgain 4
- End Sub
- Sub O_RE6
- RE(06)=false
- L06.IsDropped=true
- L07.IsDropped=false
- SPSAREEL.SetValue "0"
- If B2SOn Then Controller.B2SSetShootAgain 0
- End Sub
- Sub C_RE7
- RE(07)=true
- End Sub
- Sub O_RE7
- RE(07)=false
- End Sub
- Sub C_RE8 'Outhole
- RE(08)=true
- C_RE18
- End Sub
- Sub O_RE8
- RE(08)=false
- End Sub
- Sub C_RE9
- PLRSreel.SetValue 1
- RE(09)=true
- End Sub
- Sub O_RE9
- RE(09)=false
- PLRSreel.SetValue 0
- End Sub
- Sub C_RE10
- RE(10)=true
- C_RE3
- End Sub
- Sub O_RE10
- RE(10)=false
- End Sub
- Sub C_RE11
- O_RE24
- If RCC=false then
- C_RE10
- Else
- CMot
- End If
- RE(11)=true
- End Sub
- Sub O_RE11
- RE(11)=false
- End Sub
- Sub C_RE12
- RE(12)=true
- End Sub
- Sub O_RE12
- RE(12)=false
- End Sub
- Sub C_RE15 '
- PUPReel1.SetValue 0
- PUPReel2.SetValue 1
- RE(15)=true
- End Sub
- Sub O_RE15
- PUPReel1.SetValue 1
- PUPReel2.SetValue 0
- RE(15)=false
- End Sub
- Sub C_RE16 'Match
- RE(16)=true
- CMot
- End Sub
- Sub O_RE16
- RE(16)=false
- End Sub
- Sub C_RE17 'Adv extra
- RE(17)=true
- CMot
- End Sub
- Sub O_RE17
- RE(17)=false
- End Sub
- Sub C_RE18 '
- RE(18)=true
- If RE(02)=false then
- C_RE19
- End If
- CMot
- End Sub
- Sub O_RE18
- O_RE19
- RE(18)=false
- End Sub
- Sub C_RE19 '
- RE(19)=true
- CMot
- End Sub
- Sub O_RE19
- RE(19)=false
- End Sub
- Sub C_RE20
- If SC(1)=true then
- C_RE8
- End If
- RE(20)=true
- End Sub
- Sub O_RE20
- RE(20)=false
- End Sub
- Sub C_RE21
- CMot
- RE(21)=true
- End Sub
- Sub O_RE21
- RE(21)=false
- End Sub
- Sub C_RE22
- RE(22)=true
- End Sub
- Sub O_RE22
- RE(22)=false
- End Sub
- Sub C_RE23
- RE(23)=true
- End Sub
- Sub O_RE23
- RE(23)=false
- End Sub
- Sub C_RE24
- L22.IsDropped=false
- L22a.IsDropped=false
- RE(24)=true
- End Sub
- Sub O_RE24
- L22.IsDropped=true
- L22a.IsDropped=true
- RE(24)=false
- End Sub
- '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- Sub CMot()
- pwr2=true
- Motor.Enabled=true
- End Sub
- Sub MotorHoldIn()
- Motor.Enabled=true
- End Sub
- Sub Motor_Timer()
- If MoPo=0 then
- Cam1
- End If
- If pwr2=true then
- MoPo=MoPo + 0.5
- Else
- Cam1
- Motor.Enabled=false
- Exit Sub
- End If
- If MoPo=1 then
- PlaySound "MotorRun"
- cam2
- cam3
- End If
- If MoPo=1.5 then
- Cam11
- End If
- If MoPo=2 then
- Cam2
- Cam4
- End If
- If MoPo=2.5 then
- Cam11
- End If
- If MoPo=3 then
- Cam2
- Cam5
- Cam9
- End If
- If MoPo=3.5 then
- Cam11
- End If
- If MoPo=4 then
- Cam2
- Cam6
- Cam9
- End If
- If MoPo=4.5 then
- Cam11
- End If
- If MoPo=5 then
- Cam2
- Cam7
- Cam9
- End If
- If MoPo=5.5 then
- Cam11
- End If
- If MoPo=6 then
- Cam8
- End If
- If MoPo=7 then
- Cam10
- End If
- If MoPo=8 then
- CheckRelays()
- MoPo=0
- End If
- MotorHoldIn()
- End Sub
- Sub CheckRelays()
- If RE(01)=true then
- If RE(03)=false and RE(09)=false and RE(18)=false then
- pwr2=false
- Else
- pwr2=true
- End If
- ElseIf RE(01)=false then
- If RE(03)=false and RE(08)=false and RE(21)=false and RE(18)=false and RE(19)=false and RE(21)=false and RE(23)=false then
- pwr2=false
- Else
- pwr2=true
- End If
- End If
- End Sub
- '-------------------------------------------------------------------------------------------
- '1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
- Sub Cam1 'v_______
- pwr1=true
- If SC(1)=false then:O_RE8:End If 'Release OH-Relay
- End Sub
- '2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
- Sub Cam2 '-^^^^^--
- pwr1=false
- If RE(18)=true and RE(24)=false then
- Decr
- End If
- If RE(03)=true then
- ResetA()
- Decr
- End If
- End Sub
- '3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333
- Sub Cam3 '-^------
- '---------------------------------------- ADMIN
- If RE(11)=true then
- Credits=Credits-1
- If Credits < 1 Then DOF 122, DOFOff
- CreditREEL.SetValue Credits
- If B2SOn Then Controller.B2SSetCredits Credits
- If RE(03)=false and BIP=1 then
- C_RE9
- PlaySound "UnitStepDn"
- End If
- End If
- If RE(10)=true then '
- If RE(03)=true then
- BIP=1 'reset Ball count unit
- PUP=1 'Player reset
- O_RE9 '1 Player only
- End If
- End If
- If RE(01)=false then
- If RE(08)=true and RE(18)=false then
- If RE(04)=true then
- If RE(09)=false then
- If RE(15)=false and RE(06)=false then
- BIP=BIP +1
- If BIP<BtP then
- BIPReel.SetValue BIP
- If B2SOn Then Controller.B2SSetBallInPlay BIP
- O_RE4
- Else
- BIPReel.SetValue 0
- If B2SOn Then Controller.B2SSetBallInPlay BIP
- C_RE16
- C_RE01
- End If
- End If
- ElseIf RE(09)=true then
- If RE(15)=true and RE(06)=false then
- BIP=BIP +1
- If BIP<BtP then
- BIPReel.SetValue BIP
- If B2SOn Then Controller.B2SSetBallInPlay BIP
- O_RE15
- O_RE4
- Else
- BIPReel.SetValue 0
- If B2SOn Then Controller.B2SSetBallInPlay BIP
- C_RE16
- C_RE01
- End If
- End if
- End If
- If BtP=4 then 'trig 2X
- If BIP=3 then
- C_RE24
- End If
- End If
- If BtP=6 then
- If BIP=5 then
- C_RE24
- End If
- End If
- End If
- End If
- End If
- '_________________________________________________
- If RE(18)=true and RE(20)=false and RE(24)=true then
- Add1000
- End If
- End Sub
- '4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444
- Sub Cam4 '--^-----
- If RE(08)=true and RE(18)=false then 'OH Relay
- If RE(04)=true then
- If RE(09)=true then
- If RE(15)=false and RE(06)=false then
- C_RE15
- O_RE4
- Exit Sub
- ElseIf RE(15)=true and RE(06)=false then
- O_RE15
- O_RE4
- End if
- End If
- End If
- End If
- If RE(18)=true and RE(24)=true then
- Decr
- End If
- If RE(16)=true and TCount(1)=MUnit then
- AddSpecial
- End If
- End Sub
- '555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555
- Sub Cam5 '---^----
- If RE(16)=true and RE(09)=true and TCount(2)=MUnit then
- AddSpecial
- End If
- End Sub
- '666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666
- Sub Cam6 '----^---
- If RE(01)=false then
- End If
- If RE(18)=true and RE(20)=false and RE(24)=true then
- Add1000
- End If
- End Sub
- '7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777
- Sub Cam7 '-----^--
- If RE(01)=false then 'Game Over = FALSE -------------
- If RE(08)=true and RE(18)=false then 'Ball in OH '|
- Drain.Kick 60,10
- If B2SOn Then
- Controller.B2SSetScoreRolloverPlayer1 0
- Controller.B2SSetScoreRolloverPlayer2 0
- End If
- If B2SPlayers = 2 and B2SPlayer = 1 Then
- B2SPlayer = 2
- If B2SOn Then Controller.B2SSetScoreRolloverPlayer2 3
- Else
- B2SPlayer = 1
- If B2SOn Then Controller.B2SSetScoreRolloverPlayer1 3
- End If
- PlaySound SoundFXDOF("ServeBall",118,DOFPulse,DOFContactors) 'Kick out Ball '|
- SC(1)=false '|
- O_RE6
- O_RE4 '|
- End If '|
- '|
- End If 'Game Over = FALSE -------------
- '|
- '|
- If RE(11)=true then:O_RE11:End If '|
- If RE(22)=true then
- Adv
- End If
- If RE(18)=true and RE(24)=true then
- Decr
- End If
- End Sub
- '888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
- Sub Cam8 '------^-
- If RE(01)=false then 'Game Over = FALSE
- '|
- If RE(21)=true then:O_RE21:End If
- If RE(22)=true then:O_RE22:End If '|
- If RE(23)=true then:O_RE23:End If
- If RE(08)=true and RE(20)=true then 'Reset Tilt
- O_RE2
- End If
- End If 'Game Over = FALSE
- If RE(03)=true then 'Resetting active
- If RCC=true then 'All REELS zero
- O_RE3 'Reset RE(03)
- PUPReel1.SetValue 1
- PUPReel2.SetValue 0
- If RE(10)=true then
- O_RE10
- End If '|
- End If '|
- End If
- End Sub
- '9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
- Sub Cam9 '-^-^-^--
- If RE(21)=true then
- Add100
- End If
- If RE(23)=true then
- Adv
- End If
- End Sub
- 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
- Sub Cam10 '-------^
- pwr3=false
- GetDiff()
- If RE(20)=true then O_RE18:End If
- If BIP=1 then
- If RE(03)=false then
- O_RE01 'GAME ON (Latch)
- End If
- End If
- If RE(01)=false then 'Game in progress
- If RE(08)=true then
- If RE(06)=false and SC(1)=false then
- O_RE8
- End If
- End If
- If RE(18)=false and SC(1)=true then
- ResetBalls
- End If
- ElseIf RE(01)=true and RE(03)=false then 'Game over
- O_RE18
- O_RE16
- pwr2=false
- End If
- End Sub
- 'XIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXI
- Sub Cam11 '/--^^^^^-/
- pwr3=true
- If RE(03)=true then
- 'CheckZero() 'Check REELS
- End If
- End Sub
- '-------------------------------------------------------------------------------------------
- '-------------------------------------------------------------------------------------------
- '############################################################################################################################
- Sub Adv
- If Bonus < 20 then
- Bonus=Bonus + 1
- BonusLights()
- PlaySound "UnitStepUp"
- End If
- If Bonus=20 then
- PlaySound "UnitStepUp"
- End If
- O_RE20 'Bonus zero false
- End Sub
- Sub Decr
- If Bonus>0 then
- Bonus = Bonus - 1
- BonusLights()
- PlaySound "UnitStepDn"
- If RE(18)=true then 'Ball in OH
- Add1000
- End If
- End If
- If Bonus=0 then
- C_RE20 'Bonus zero true
- End If
- If SC(1)=true then 'Ball in OH
- C_RE8
- End If
- End Sub
- Sub BonusLights()
- L11.IsDropped=true
- L12.IsDropped=true
- L13.IsDropped=true
- L14.IsDropped=true
- L15.IsDropped=true
- L16.IsDropped=true
- L17.IsDropped=true
- L18.IsDropped=true
- L19.IsDropped=true
- L20.IsDropped=true
- L21.IsDropped=true
- Select Case Bonus
- Case 1:L11.IsDropped=false
- Case 2:L12.IsDropped=false
- Case 3:L13.IsDropped=false
- Case 4:L14.IsDropped=false
- Case 5:L15.IsDropped=false
- Case 6:L16.IsDropped=false
- Case 7:L17.IsDropped=false
- Case 8:L18.IsDropped=false
- Case 9:L19.IsDropped=false
- Case 10:L20.IsDropped=false
- Case 11:L11.IsDropped=false:L20.IsDropped=false
- Case 12:L12.IsDropped=false:L20.IsDropped=false
- Case 13:L13.IsDropped=false:L20.IsDropped=false
- Case 14:L14.IsDropped=false:L20.IsDropped=false
- Case 15:L15.IsDropped=false:L20.IsDropped=false
- Case 16:L16.IsDropped=false:L20.IsDropped=false
- Case 17:L17.IsDropped=false:L20.IsDropped=false
- Case 18:L18.IsDropped=false:L20.IsDropped=false
- Case 19:L19.IsDropped=false:L20.IsDropped=false
- Case 20:L21.IsDropped=false
- End Select
- End Sub
- Sub Bumper1_Hit()
- PlaySound SoundFXDOF("Bumper3",107,DOFPulse,DOFContactors)
- DOF 109, DOFPulse
- Add100
- StepMunit
- End Sub
- Sub Bumper2_Hit()
- PlaySound SoundFXDOF("Bumper3",108,DOFPulse,DOFContactors)
- DOF 110, DOFPulse
- Add100
- StepMunit
- End Sub
- Sub LSS_Slingshot()
- Add10sling
- PlaySound SoundFXDOF("LeftSling",103,DOFPulse,DOFContactors)
- DOF 105, DOFPulse
- End Sub
- Sub RSS_Slingshot()
- Add10sling
- PlaySound SoundFXDOF("RightSling",104,DOFPulse,DOFContactors)
- DOF 106, DOFPulse
- End Sub
- Sub rb01_Slingshot()
- Add100
- Adv
- End Sub
- Sub rb02_Slingshot()
- Add10
- End Sub
- Sub rb03_Slingshot()
- Add10
- End Sub
- Sub rb04_Slingshot()
- Add10
- End Sub
- Sub rb05_Slingshot()
- Add10
- End Sub
- Sub rb06_Slingshot()
- Add10
- End Sub
- Sub rb07_Slingshot()
- Add10
- End Sub
- Sub rb08_Slingshot()
- Add10
- End Sub
- Sub rb09_Slingshot()
- Add10
- End Sub
- '**************************************** SCORING ***********************************
- Sub AddB2SScores
- If B2SOn Then
- B2SScore(1) = TKCount(1) * 10000 + KCount(1) * 1000 + HCount(1) * 100 + TCount(1) * 10
- B2SScore(2) = TKCount(2) * 10000 + KCount(2) * 1000 + HCount(2) * 100 + TCount(2) * 10
- If B2SOn Then
- Controller.B2SSetScorePlayer 1, B2SScore(1)
- Controller.B2SSetScorePlayer 2, B2SScore(2)
- End If
- End If
- End Sub
- Sub add10sling
- If RE(02)=false then
- If RE(15)=false then 'PL1
- T1.spinreel 1,1
- TCount(1)=TCount(1) + 1
- ZPos(1)=false
- If TCount(1)=10 then
- TCount(1)=0
- Add100
- ZPos(1)=true
- End If
- ElseIf RE(15)=true then 'PL2
- T2.spinreel 1,1
- TCount(2)=TCount(2) + 1
- ZPos(2)=false
- If TCount(2)=10 then
- TCount(2)=0
- Add100
- ZPos(2)=true
- End If
- End If
- StepMunit
- Alter()
- 'PlaySound "10pts"
- AddB2SScores
- End If
- C_RE4
- End Sub
- Sub add10
- If RE(02)=false then
- If RE(15)=false then 'PL1
- T1.spinreel 1,1
- TCount(1)=TCount(1) + 1
- ZPos(1)=false
- If TCount(1)=10 then
- TCount(1)=0
- Add100
- ZPos(1)=true
- End If
- ElseIf RE(15)=true then 'PL2
- T2.spinreel 1,1
- TCount(2)=TCount(2) + 1
- ZPos(2)=false
- If TCount(2)=10 then
- TCount(2)=0
- Add100
- ZPos(2)=true
- End If
- End If
- StepMunit
- Alter()
- PlaySound SoundFXDOF("10pts",141,DOFPulse,DOFChimes)
- AddB2SScores
- End If
- C_RE4
- End Sub
- Sub add100
- If RE(02)=false then
- If RE(15)=false then 'PL1
- H1.spinreel 1,1
- HCount(1)=HCount(1) + 1
- ZPos(3)=false
- If HCount(1)=10 then
- HCount(1)=0
- Add1000
- ZPos(3)=true
- End If
- ElseIf RE(15)=true then 'PL2
- H2.spinreel 1,1
- HCount(2)=HCount(2) + 1
- ZPos(4)=false
- If HCount(2)=10 then
- HCount(2)=0
- Add1000
- ZPos(4)=true
- End If
- End If
- PlaySound SoundFXDOF("100pts",142,DOFPulse,DOFChimes)
- AddB2SScores
- End If
- C_RE4
- End Sub
- Sub add1000
- If RE(02)=false then
- If RE(15)=false then 'PL1
- K1.spinreel 1,1
- KCount(1)=KCount(1) + 1
- ZPos(5)=false
- If KCount(1)=10 then
- KCount(1)=0
- Add10000
- ZPos(5)=true
- End If
- ElseIf RE(15)=true then 'PL2
- K2.spinreel 1,1
- KCount(2)=KCount(2) + 1
- ZPos(6)=false
- If KCount(2)=10 then
- KCount(2)=0
- Add10000
- ZPos(6)=true
- End If
- End If
- PlaySound SoundFXDOF("1000pts",143,DOFPulse,DOFChimes)
- AddB2SScores
- End If
- C_RE4
- CheckTH()
- End Sub
- Sub add10000
- If RE(15)=false then 'PL1
- TK1.spinreel 1,1
- TKCount(1)=TKCount(1) + 1
- AddB2SScores
- ZPos(7)=false
- ElseIf RE(15)=true then 'PL2
- TK2.spinreel 1,1
- TKCount(2)=TKCount(2) + 1
- AddB2SScores
- ZPos(8)=false
- End If
- End Sub
- Sub CheckTH()
- If RE(15)=false then
- If TKCount(1)=th1a and KCount(1)=th1b then
- AddSpecial
- End If
- If TKCount(1)=th2a and KCount(1)=th2b then
- AddSpecial
- End If
- If TKCount(1)=th3a and KCount(1)=th3b then
- AddSpecial
- End If
- If TKCount(1)=th4a and KCount(1)=th4b then
- AddSpecial
- End If
- ElseIf RE(15)=true then
- If TKCount(2)=th1a and KCount(2)=th1b then
- AddSpecial
- End If
- If TKCount(2)=th2a and KCount(2)=th2b then
- AddSpecial
- End If
- If TKCount(2)=th3a and KCount(2)=th3b then
- AddSpecial
- End If
- If TKCount(2)=th4a and KCount(2)=th4b then
- AddSpecial
- End If
- End If
- End Sub
- Sub AddSpecial
- If GStyle=1 then
- PlaySound SoundFXDOF("Knocker",120,DOFPulse,DOFKnocker)
- DOF 121, DOFPulse
- Credits=Credits + 1
- DOF 122, DOFOn
- CreditREEL.SetValue Credits
- If B2SOn Then Controller.B2SSetCredits Credits
- ElseIf GStyle=2 then
- C_RE6
- End If
- End Sub
- Sub AddCredit()
- PlaySound "StepUpUnit"
- Credits=Credits + 1
- DOF 122, DOFOn
- CreditREEL.SetValue Credits
- If B2SOn Then Controller.B2SSetCredits Credits
- End Sub
- '-------------------------------------------------------------------------------------
- '************************************ ADMINISTRATION ***********************************
- Sub Start()
- If pwr1=true then
- If Credits>0 and RE(03)=false and BIP>1 then
- MatchREEL.SetValue "10"
- PUPReel1.SetValue 0
- PUPReel2.SetValue 0
- If B2SPlayers < 2 Then B2SPlayers = B2SPlayers + 1
- If B2SOn Then
- Controller.B2SSetScorePlayer 1, 0
- Controller.B2SSetScorePlayer 2, 0
- B2SScore(1) = 0: B2SScore(2) = 0
- Controller.B2SSetBallInPlay 1
- Controller.B2SSetScoreRolloverPlayer1 3
- B2SPlayer = 0
- Controller.B2SSetGameOver 0
- Controller.B2SSetMatch 0
- Controller.B2SSetPlayerUp B2SPlayers
- End If
- O_RE9
- PlaySound "UnitStepDn"
- C_RE11
- ElseIf Credits>0 and RE(03)=false and BIP=1 and RE(09)=false then
- C_RE11
- End If
- End If
- End Sub
- Sub DOLPHIN_KeyDown(ByVal keycode)
- If keycode = 6 Then
- PlaySound "CreditUnit"
- Credits=Credits + 1: If Credits = 10 Then Credits = 9
- DOF 122, DOFOn
- CreditREEL.SetValue Credits
- If B2SOn Then Controller.B2SSetCredits Credits
- End If
- If keycode = 2 Then
- Start()
- End If
- If keycode = PlungerKey Then
- Plunger.PullBack
- End If
- If keycode = LeftTiltKey or keycode=29 Then
- Nudged()
- LeftNudge 90, 2.4*CurrentBall.y/TableHeight, 20
- End If
- If keycode = RightTiltKey or keycode=157 Then
- Nudged()
- RightNudge 270, 2.4*CurrentBall.y/TableHeight, 20
- End If
- If keycode = CenterTiltKey Then
- Nudged()
- CenterNudge 0, 1.8, 25
- End If
- If RE(01)=false and RE(02)=false then 'if game in progress
- If keycode = LeftFlipperKey Then
- LeftFlipper.RotateToEnd
- PlaySound SoundFXDOF("FlipperUp",101,DOFOn,DOFFlippers)
- End If
- If keycode = RightFlipperKey Then
- RightFlipper.RotateToEnd
- PlaySound SoundFXDOF("FlipperUp",102,DOFOn,DOFFlippers)
- End If
- End If
- End Sub
- Sub DOLPHIN_KeyUp(ByVal keycode)
- If keycode = PlungerKey Then
- Plunger.Fire
- PlaySound "plunge"
- End If
- If RE(01)=false and RE(02)=false then 'if game in progress
- If keycode = LeftFlipperKey Then
- LeftFlipper.RotateToStart
- PlaySound SoundFXDOF("FlipperDown",101,DOFOff,DOFFlippers)
- End If
- If keycode = RightFlipperKey Then
- RightFlipper.RotateToStart
- PlaySound SoundFXDOF("FlipperDown",102,DOFOff,DOFFlippers)
- End If
- End If
- End Sub
- '************************************ AUX SUBS ******************************
- Sub ResetBalls
- KK1.Kick 180,2
- KK2.Kick 180,2
- KK3.Kick 180,2
- SC(4)=false
- SC(5)=false
- SC(6)=false
- L08.IsDropped=true
- L09.IsDropped=true
- L10.IsDropped=true
- L08off.IsDropped=false
- L09off.IsDropped=false
- L10off.IsDropped=false
- PlaySound SoundFXDOF("Saucer",119,DOFPulse,DOFContactors)
- End Sub
- Sub Alter()
- If alt=false then
- C_RE5
- Exit Sub
- End If
- If alt=true then
- O_RE5
- Exit Sub
- End If
- End Sub
- Sub StepMunit
- MUnit=MUnit-1
- O_RE7:O_RE21
- If MUnit<0 then
- MUnit=9
- End If
- Select Case MUnit
- Case 9:O_RE5
- Case 8:C_RE5
- Case 7:O_RE5
- Case 6:C_RE5
- Case 5:O_RE5
- Case 4:C_RE5
- Case 3:O_RE5
- Case 2:C_RE5
- Case 1:O_RE5
- Case 0:C_RE5
- End Select
- End Sub
- Sub AllLightsOff
- L01.IsDropped=true
- L02.IsDropped=true
- L03.IsDropped=true
- L04.IsDropped=true
- L05.IsDropped=true
- L06.IsDropped=true
- 'L06a.IsDropped=true
- L07.IsDropped=true
- L08.IsDropped=true
- L09.IsDropped=true
- L10.IsDropped=true
- L11.IsDropped=true
- L12.IsDropped=true
- L13.IsDropped=true
- L14.IsDropped=true
- L15.IsDropped=true
- L16.IsDropped=true
- L17.IsDropped=true
- L18.IsDropped=true
- L19.IsDropped=true
- L20.IsDropped=true
- L21.IsDropped=true
- L22.IsDropped=true
- L22a.IsDropped=true
- End Sub
- Sub AllLightsOn
- L01.IsDropped=false
- L02.IsDropped=false
- L03.IsDropped=false
- L04.IsDropped=false
- L05.IsDropped=false
- L06.IsDropped=false
- 'L06a.IsDropped=false
- L07.IsDropped=false
- L08.IsDropped=false
- L09.IsDropped=false
- L10.IsDropped=false
- L11.IsDropped=false
- L12.IsDropped=false
- L13.IsDropped=false
- L14.IsDropped=false
- L15.IsDropped=false
- L16.IsDropped=false
- L17.IsDropped=false
- L18.IsDropped=false
- L19.IsDropped=false
- L20.IsDropped=false
- L21.IsDropped=false
- L22.IsDropped=false
- L22a.IsDropped=false
- End Sub
- Dim Diff
- Sub GetDiff()
- Diff = Int(0 + Rnd *(20-0+1)/10)
- End Sub
- Sub ResetA()
- If TCount(1)<>0 then
- T1.SpinReel 1,1
- PlaySound "Reel2"
- TCount(1)=TCount(1) + 1
- If TCount(1)=10 then
- TCount(1)=0
- End If
- AddB2SScores
- End If
- If HCount(1)<>0 then
- H1.SpinReel 1,1
- PlaySound "Reel4"
- HCount(1)=HCount(1) + 1
- If HCount(1)=10 then
- HCount(1)=0
- End If
- AddB2SScores
- End If
- If KCount(1)<>0 then
- K1.SpinReel 1,1
- PlaySound "Reel1"
- KCount(1)=KCount(1) + 1
- If KCount(1)=10 then
- KCount(1)=0
- End If
- AddB2SScores
- End If
- If TKCount(1)<>0 then
- TK1.SpinReel 1,1
- PlaySound "Reel5"
- TKCount(1)=TKCount(1) + 1
- If TKCount(1)=10 then
- TKCount(1)=0
- End If
- AddB2SScores
- End If
- If TCount(2)<>0 then
- T2.SpinReel 1,1
- PlaySound "Reel1"
- TCount(2)=TCount(2) + 1
- If TCount(2)=10 then
- TCount(2)=0
- End If
- AddB2SScores
- End If
- If HCount(2)<>0 then
- H2.SpinReel 1,1
- PlaySound "Reel3"
- HCount(2)=HCount(2) + 1
- If HCount(2)=10 then
- HCount(2)=0
- End If
- AddB2SScores
- End If
- If KCount(2)<>0 then
- K2.SpinReel 1,1
- PlaySound "Reel4"
- KCount(2)=KCount(2) + 1
- If KCount(2)=10 then
- KCount(2)=0
- End If
- AddB2SScores
- End If
- If TKCount(2)<>0 then
- TK2.SpinReel 1,1
- PlaySound "Reel2"
- TKCount(2)=TKCount(2) + 1
- If TKCount(2)=10 then
- TKCount(2)=0
- End If
- AddB2SScores
- End If
- CheckZero()
- End Sub
- Sub CheckZero()
- If TCount(1)=0 and HCount(1)=0 and KCount(1)=0 and TKCount(1)=0 and TCount(2)=0 and HCount(2)=0 and KCount(2)=0 and TKCount(2)=0 then
- RCC=true
- End If
- End Sub
- Sub SlowBob()
- If SwingFactor > 1 then
- SwingFactor = SwingFactor - SloDoFactor
- End If
- TILT.Enabled = True
- End Sub
- Sub TILT_Timer()
- TILT.Enabled = False
- GetSloDoFactor()
- End Sub
- Sub GetSloDoFactor()
- If SwingFactor <= 1 then
- SloDoFactor = 5
- SwingFactor = 0
- TiltStatus = 0
- TILT.Interval = 250
- End If
- If SwingFactor > 0 then
- If SwingFactor >= 100 then
- TiltStatus = TiltStatus + 1
- SloDoFactor = 8
- SwingFactor = 99
- TILT.Interval = 64
- CheckTilt()
- ElseIf SwingFactor <= 99 and SwingFactor > 50 then
- SloDoFactor = (SloDoFactor * 0.64)
- TILT.Interval = 64
- ElseIf SwingFactor <= 50 and SwingFactor > 25 then
- SloDoFactor = (SloDoFactor * 0.6)
- TILT.Interval = 96
- ElseIf SwingFactor <= 25 and SwingFactor > 12 then
- SloDoFactor = (SloDoFactor * 0.4)
- TILT.Interval = 128
- ElseIf SwingFactor <= 12 and SwingFactor > 8 then
- SloDoFactor = (SloDoFactor * 0.2)
- TiltStatus = 0
- TILT.Interval = 128
- ElseIf SwingFactor <= 8 and SwingFactor > 4 then
- SloDoFactor = (SloDoFactor * 0.1)
- TILT.Interval = 256
- ElseIf SwingFactor <= 4 and SwingFactor > 1 then
- SloDoFactor = 0.1
- TILT.Interval = 24
- End If
- If SloDoFactor <= 1 then
- SloDoFactor = 1 '3.6
- End If
- SlowBob()
- End If
- End Sub
- Sub Nudged()
- SwingFactor = SwingFactor + 32
- SwingFactor = (SwingFactor * 1.2)
- CheckTilt()
- End Sub
- Sub CheckTilt()
- Tilt.Enabled = False
- If TiltStatus >= 4 then
- RE(02)=true
- TILT.Enabled = False 'Reset Timer(!)
- PlaySound "TILT"
- LeftFlipper.RotateToStart
- RightFlipper.RotateToStart
- TiltREEL.SetValue "1"
- If B2SOn Then Controller.B2SSetTilt 4
- End If
- SlowBob()
- End Sub
- 'Captive balls
- Sub cbl_l_Hit()
- bs=Ball1.VelY * -0.3
- CB1.VelY=bs
- CB2.VelY=bs
- CB3.VelY=bs
- End Sub
- Sub cbl_c_Hit()
- bs=Ball1.VelY * -1
- CB1.VelY=CB1.VelY+bs
- End Sub
- Sub cbc_l_Hit()
- bs=Ball1.VelY * -0.3
- CB1.VelY=bs
- CB2.VelY=bs
- CB3.VelY=bs
- End Sub
- Sub cbc_c_Hit()
- bs=Ball1.VelY * -1
- CB2.VelY=CB2.VelY+bs
- End Sub
- Sub cbc_r_Hit()
- bs=Ball1.VelY * -0.3
- CB1.VelY=bs
- CB2.VelY=bs
- CB3.VelY=bs
- End Sub
- Sub cbr_c_Hit()
- bs=Ball1.VelY * -1
- CB3.VelY=CB3.VelY+bs
- End Sub
- Sub cbr_r_Hit()
- bs=Ball1.VelY * -0.3
- CB1.VelY=bs
- CB2.VelY=bs
- CB3.VelY=bs
- End Sub
- Dim LeftNudgeEffect, RightNudgeEffect, NudgeEffect 'Preparing variables for use in the nudge subroutine
- Sub LeftNudge(angle, strength, delay) 'Assigns variables from keycode subroutine
- Nudge angle, (strength * (delay-LeftNudgeEffect) / delay) + RightNudgeEffect / delay 'Executes nudge
- LeftNudgeEffect = delay 'Sets reduced LeftNudge effect if used again prior to end of nudge delay.
- RightNudgeEffect = 0 'Resets Right Nudge instantly as soon as left nudge is executed
- RightNudgeTimer.Enabled = 0 'Resets Right Nudge for swing nudging.
- LeftNudgeTimer.Interval = delay 'Sets Left Nudge Timer to delay assigned in keycode routine.
- LeftNudgeTimer.Enabled = 1 'Enables LeftNudge Timer to impose delay.
- End Sub
- Sub RightNudge(angle, strength, delay) 'Assigns variables from keycode subroutine
- Nudge angle, (strength * (delay-RightNudgeEffect) / delay) + LeftNudgeEffect / delay 'Executes nudge
- RightNudgeEffect = delay 'Sets reduced RightNudge effect if used again prior to end of nudge delay.
- LeftNudgeEffect = 0 'Resets Left Nudge instantly as soon as left nudge is executed
- LeftNudgeTimer.Enabled = 0 'Resets Left Nudge for swing nudging.
- RightNudgeTimer.Interval = delay 'Sets Right Nudge Timer to delay assigned in keycode routine.
- RightNudgeTimer.Enabled = 1 'Enables RightNudge Timer to impose delay.
- End Sub
- Sub CenterNudge(angle, strength, delay) 'Assigns variables from keycode subroutine
- Nudge angle, strength * (delay-NudgeEffect) / delay 'Executes nudge
- NudgeEffect = delay 'Sets reduced CenterNudge effect if used again prior to end of nudge delay.
- NudgeTimer.Interval = delay 'Sets Center Nudge Timer to delay assigned in keycode routine.
- NudgeTimer.Enabled = 1 'Enables CenterNudge Timer to impose delay.
- End Sub
- Sub LeftNudgeTimer_Timer() 'Simulates the time it takes for the table to return to a rest postion after nudge.
- LeftNudgeEffect = LeftNudgeEffect-1
- If LeftNudgeEffect = 0 then LeftNudgeTimer.Enabled = 0
- End Sub
- Sub RightNudgeTimer_Timer() 'Simulates the time it takes for the table to return to a rest postion after nudge.
- RightNudgeEffect = RightNudgeEffect-1
- If RightNudgeEffect = 0 then RightNudgeTimer.Enabled = 0
- End Sub
- Sub NudgeTimer_Timer() 'Simulates the time it takes for the table to return to a rest postion after nudge.
- NudgeEffect = NudgeEffect-1
- If NudgeEffect = 0 then NudgeTimer.Enabled = 0
- End Sub
- Dim CurrentBall
- Sub Drain_UnHit() 'Kicker that releases the ball. Not necessarily
- Set CurrentBall=ActiveBall 'Sets a name to the ball.
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment