Advertisement
Outhere

Led Zeppelin Pinball 1.03

Aug 25th, 2020 (edited)
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 77.04 KB | None | 0 0
  1. '*
  2. '* Bally's Freedom (1976)
  3. '* Table primary build/scripted by Loserman76
  4. '* VPM Table version by Allknowing2012 & Hauntfreaks
  5. '* Source photos for EM Backglass by Wrd1972
  6. '*
  7. '*
  8.  
  9.  
  10. '* Led Zeppelin (Recreation of a real world mod of a Freedom EM Table)
  11. 'https://www.youtube.com/watch?v=rZtgmcyYAI8
  12.  
  13. '* Brought to you by iDigstuff & Apophis & Bord
  14. '* Real world mod designed by David Peck
  15. '* Original artwork by Brad Albright
  16. '* UpDated DOF Outhere 8-25-2020 -- Added more soundFXDOF to silence solenoid sounds when selected in 10.6
  17. '* and added a few more Solenoids and separated some solenoid actions
  18.  
  19. option explicit
  20. Randomize
  21. ExecuteGlobal GetTextFile("core.vbs")
  22.  
  23. On Error Resume Next
  24. ExecuteGlobal GetTextFile("Controller.vbs")
  25. If Err Then MsgBox "Unable to open Controller.vbs. Ensure that it is in the scripts folder."
  26. On Error Goto 0
  27.  
  28. Const cGameName = "ledzeppelin"
  29.  
  30. Const ShadowFlippersOn = false
  31. Const ShadowBallOn = false
  32.  
  33. Const ShadowConfigFile = false
  34.  
  35. '***********************************************************************************************************************
  36.  
  37. '*********************************************************************************************************************
  38.  
  39. 'MOD OPTIONS
  40.  
  41. 'Music Mod # of tracks
  42.  
  43. 'Place as many songs (MP3 ONLY) as you want in the Zeppelin music folder making sure to rename the files 1.mp3 2.mp3 3.mp3 etc...
  44. 'Then come here and change this number to the total number of songs in the folder. All Done!
  45.  
  46.  
  47. Const NumMusicTracks = 13 'Total number of songs in the Zeppelin music folder
  48.  
  49. Const MusicMode = 0 ' 0 = Normal (Jukebox Mode) 1 = Song changes when ball drains
  50.  
  51. '**********************************************************************************************************************
  52.  
  53. Dim Controller ' B2S
  54. Dim B2SScore ' B2S Score Displayed
  55. Const HSFileName="LedZeppelin.txt"
  56.  
  57. Const B2STableName="LedZeppelin"
  58. Const LMEMTableConfig="LMEMTables.txt"
  59. Const LMEMShadowConfig="LMEMShadows.txt"
  60. Dim EnableFlipperShadow
  61.  
  62. '* this value adjusts score motor behavior - 0 allows you to continue scoring while the score motor is running - 1 sets score motor to behave more like a real EM
  63. Const ScoreMotorAdjustment=1
  64.  
  65. '* this is a debug setting to use an older scoring routine vs a newer score routine - don't change this value
  66. Const ScoreAdditionAdjustment=1
  67.  
  68. 'Const ChimesOn=0
  69.  
  70. dim ScoreChecker
  71. dim CheckAllScores
  72. dim sortscores(4)
  73. dim sortplayers(4)
  74.  
  75. Dim ChimesOn
  76. Dim B2SOn
  77. Dim B2SFrameCounter
  78. Dim BackglassBallFlagColor
  79. Dim TextStr,TextStr2
  80. Dim i
  81. Dim obj
  82. Dim BallsPerGame
  83. Dim InProgress
  84. Dim BallInPlay
  85. Dim CreditsPerCoin
  86. Dim Score100K(4)
  87. Dim Score(4)
  88. Dim ScoreDisplay(4)
  89. Dim HighScorePaid(4)
  90. Dim HighScore
  91. Dim HighScoreReward
  92. Dim BonusMultiplier
  93. Dim Credits
  94. Dim Match
  95. Dim Replay1
  96. Dim Replay2
  97. Dim Replay3
  98. Dim Replay4
  99. Dim Replay1Paid(4)
  100. Dim Replay2Paid(4)
  101. Dim Replay3Paid(4)
  102. Dim Replay4Paid(4)
  103. Dim TableTilted
  104. Dim TiltCount
  105.  
  106. Dim OperatorMenu
  107.  
  108. Dim TargetSetting
  109. Dim BonusBooster
  110. Dim BonusBoosterCounter
  111. Dim BonusCounter
  112. Dim HoleCounter
  113.  
  114. Dim ZeroNineCounter
  115. Dim Ones
  116. Dim Tens
  117. Dim Hundreds
  118. Dim Thousands
  119.  
  120. Dim Player
  121. Dim Players
  122.  
  123. Dim rst
  124. Dim bonuscountdown
  125. Dim TempMultiCounter
  126. dim TempPlayerup
  127. dim RotatorTemp
  128.  
  129. Dim bump1
  130. Dim bump2
  131. Dim bump3
  132. Dim bump4
  133.  
  134. Dim LastChime10
  135. Dim LastChime100
  136. Dim LastChime1000
  137.  
  138. Dim Score10
  139. Dim Score100
  140.  
  141. Dim targettempscore
  142. Dim SpecialLightCounter
  143. Dim SpecialLightOption
  144. Dim HorseshoeCounter
  145. Dim DropTargetCounter
  146.  
  147. Dim LeftTargetCounter
  148. Dim RightTargetCounter
  149.  
  150. Dim MotorRunning
  151. Dim Replay1Table(18)
  152. Dim Replay2Table(18)
  153. Dim Replay3Table(18)
  154. Dim Replay4Table(18)
  155. Dim ReplayTableSet
  156. Dim ReplayLevel
  157. Dim ReplayTableMax
  158.  
  159. Dim BonusSpecialThreshold
  160. Dim TargetLightsOn
  161. Dim AdvanceLightCounter
  162. dim bonustempcounter
  163.  
  164. dim raceRflag
  165. dim raceAflag
  166. dim raceCflag
  167. dim raceEflag
  168. dim race5flag
  169.  
  170. Dim LStep, LStep2, RStep, L2Step, R2Step, xx
  171.  
  172. Dim ReelCounter
  173. Dim BallCounter
  174. Dim BallReelAddStart(12)
  175. Dim BallReelAddFrames(12)
  176. Dim BallReelDropStart(12)
  177. Dim BallReelDropFrames(12)
  178.  
  179. Dim EightLit
  180.  
  181. Dim X
  182. Dim Y
  183. Dim Z
  184. Dim AddABall
  185. Dim AddABallFrames
  186. Dim DropABall
  187. Dim DropABallFrames
  188. Dim CurrentFrame
  189. Dim BonusMotorRunning
  190. Dim QueuedBonusAdds
  191. Dim QueuedBonusDrops
  192.  
  193.  
  194. Dim TempLightTracker
  195.  
  196. Dim TargetLeftFlag
  197. Dim TargetCenterFlag
  198. Dim TargetRightFlag
  199.  
  200. Dim TargetSequenceComplete
  201.  
  202. Dim SpecialLightsFlag
  203.  
  204. Dim AlternatingRelay
  205.  
  206. Dim ZeroToNineUnit
  207.  
  208. Dim Kicker1Hold,Kicker2Hold,Kicker3Hold
  209.  
  210. Dim mHole,mHole2, mHole3, mHole4, mHole5
  211.  
  212. Dim SpinPos,Spin,Count,Count1,Count2,Count3,Reset,VelX,VelY,BallSpeed,LitSpinner
  213.  
  214. Dim GoldBonusCounter,SilverBonusCounter
  215.  
  216. Dim ScoreMotorStepper
  217.  
  218. Dim GameOption,CircusSetting
  219.  
  220. Dim LeftSpinnerCounter
  221.  
  222. Dim bgpos, dooralreadyopen
  223.  
  224. Dim ABCDCounter, tKickerTCount, DropTargetCompletedCount, DropTargetsDownCount, DropTargetsSetting, AddCounter
  225.  
  226. Sub Table1_Init()
  227.  
  228. LoadEM
  229. LoadLMEMConfig2
  230. PlaySound"PreShowCrowd",-1
  231.  
  232. If Table1.ShowDT = false then
  233. For each obj in DesktopCrap
  234. obj.visible=False
  235. next
  236. End If
  237.  
  238. OperatorMenuBackdrop.image = "PostitBL"
  239. For XOpt = 1 to MaxOption
  240. Eval("OperatorOption"&XOpt).image = "PostitBL"
  241. next
  242.  
  243. For XOpt = 1 to 256
  244. Eval("Option"&XOpt).image = "PostItBL"
  245. next
  246.  
  247.  
  248.  
  249. CircusSetting=0
  250. LeftSpinnerCounter=0
  251. DropTargetsSetting=1
  252. Count=0
  253. Count1=0
  254. Count2=0
  255. Count3=0
  256. Reset=0
  257. ZeroToNineUnit=Int(Rnd*10)
  258. Kicker1Hold=0
  259. Kicker2Hold=0
  260. Kicker3Hold=0
  261.  
  262. EightLit=0
  263.  
  264. BallCounter=0
  265. ReelCounter=0
  266. AddABall=0
  267. DropABall=0
  268. HideOptions
  269. SetupReplayTables
  270. PlasticsOff
  271. BumpersOff
  272. OperatorMenu=0
  273. HighScore=0
  274. MotorRunning=0
  275. HighScoreReward=1
  276. Credits=0
  277. BallsPerGame=5
  278. ReplayLevel=1
  279. ChimesOn=0
  280. TargetSetting=0
  281. AlternatingRelay=1
  282. ZeroNineCounter=0
  283. SpecialLightOption=2
  284. BackglassBallFlagColor=1
  285. GameOption=2
  286. loadhs
  287. if HighScore=0 then HighScore=500000
  288.  
  289.  
  290. TableTilted=false
  291.  
  292. Match=int(Rnd*10)
  293. MatchReel.SetValue((Match)+1)
  294. Match=Match*10
  295.  
  296. CanPlay001.state=0
  297. CanPlay002.state=0
  298. CanPlay003.state=0
  299. CanPlay004.state=0
  300. 'GameOverReel.SetValue(1)
  301. LightGameOver.state=1
  302.  
  303.  
  304.  
  305. For each obj in PlayerHuds
  306. obj.state=0
  307. next
  308. For each obj in PlayerScores
  309. obj.ResetToZero
  310. next
  311.  
  312. For each obj in Flashers
  313. obj.state=1
  314. next
  315.  
  316. For each obj in GoldBonus
  317. obj.state=0
  318. next
  319.  
  320.  
  321. ChimesOn=0
  322. dooralreadyopen=0
  323. Replay1=Replay1Table(ReplayLevel)
  324. Replay2=Replay2Table(ReplayLevel)
  325. Replay3=Replay3Table(ReplayLevel)
  326. Replay4=Replay4Table(ReplayLevel)
  327.  
  328. BonusCounter=0
  329. HoleCounter=0
  330.  
  331. BallCard.image="BC"+FormatNumber(BallsPerGame,0)
  332.  
  333. InstructCard.image="IC"+FormatNumber(BallsPerGame,0)+FormatNumber(GameOption,0)
  334. ' CardLight1.State = ABS(CardLight1.State-1)
  335. RefreshReplayCard
  336.  
  337. CurrentFrame=0
  338.  
  339. AdvanceLightCounter=0
  340.  
  341. Players=0
  342. RotatorTemp=1
  343. InProgress=false
  344. TargetLightsOn=false
  345.  
  346.  
  347. RollReel001.Setvalue(0)
  348. RollReel002.Setvalue(0)
  349. RollReel003.Setvalue(0)
  350. RollReel004.Setvalue(0)
  351.  
  352. If B2SOn Then
  353.  
  354. if Match=0 then
  355. Controller.B2SSetMatch 100
  356. else
  357. Controller.B2SSetMatch Match
  358. end if
  359. Controller.B2SSetScoreRolloverPlayer1 0
  360. Controller.B2SSetScoreRolloverPlayer2 0
  361. Controller.B2SSetScoreRolloverPlayer3 0
  362. Controller.B2SSetScoreRolloverPlayer4 0
  363.  
  364.  
  365. Controller.B2SSetTilt 0
  366. Controller.B2SSetCredits Credits
  367. Controller.B2SSetGameOver 1
  368. End If
  369.  
  370. for i=1 to 4
  371. player=i
  372. If B2SOn Then
  373. Controller.B2SSetScorePlayer player, 0
  374. End If
  375. next
  376. bump1=1
  377. bump2=1
  378. InitPauser5.enabled=true
  379. If Credits > 0 Then
  380. DOF 127, 1
  381. CreditLight.state=1
  382. end if
  383.  
  384. End Sub
  385.  
  386. Sub Table1_exit()
  387. savehs
  388. SaveLMEMConfig
  389. SaveLMEMConfig2
  390. If B2SOn Then Controller.Stop
  391. end sub
  392.  
  393. Sub Delay( seconds )
  394. Dim wshShell, strCmd
  395. Set wshShell = CreateObject( "WScript.Shell" )
  396. strCmd = wshShell.ExpandEnvironmentStrings( "%COMSPEC% /C (PING.EXE -n " & ( seconds + 1 ) & " localhost >NUL 2>&1)" )
  397. wshShell.Run strCmd, 0, 1
  398. Set wshShell = Nothing
  399. End Sub
  400.  
  401.  
  402. Sub MusicOn
  403. Dim x
  404. x = INT(NumMusicTracks * Rnd + 1)
  405. PlayMusic "EM\Zeppelin\"& x &".mp3"
  406. End Sub
  407.  
  408. Sub Table1_MusicDone()
  409. MusicOn
  410. End Sub
  411.  
  412.  
  413. Sub FlipperSounds
  414. x = INT(2 * Rnd )
  415. select case x
  416. Case 0:PlaySound SoundFX("mxFlipper",DOFFlippers)
  417. Case 1:PlaySound SoundFX("mxFlipperHit",DOFFlippers)
  418.  
  419. End Select
  420. End Sub
  421.  
  422.  
  423. Sub GameOverMusic
  424. x = INT(2 * Rnd )
  425. select case x
  426. Case 0:PlayMusic"EM\Zeppelin\End.mp3"
  427. Case 1:PlayMusic"EM\Zeppelin\End2.mp3"
  428.  
  429. End Select
  430. End Sub
  431.  
  432.  
  433. Sub Table1_KeyDown(ByVal keycode)
  434.  
  435. If KeyCode = RightMagnaSave Then MusicOn
  436. If KeyCode = LeftMagnaSave Then EndMusic
  437.  
  438. ' GNMOD
  439. if EnteringInitials then
  440. CollectInitials(keycode)
  441. exit sub
  442. else
  443. If Keycode = StartGameKey Then EndMusic
  444. If KeyCode = StartGameKey And Credits > 0 Then StopSound "PreShowCrowd"
  445. If Keycode = StartGameKey And Credits > 0 Then PlaySound "dxGoodEvening":Delay 1:MusicOn:End If
  446. If KeyCode = StartGameKey And Credits < 1 Then EndMusic
  447. If KeyCode = StartGameKey And InProgress = True Then MusicOn
  448.  
  449. end if
  450.  
  451. if EnteringOptions then
  452. CollectOptions(keycode)
  453. exit sub
  454. end if
  455.  
  456. If keycode = PlungerKey Then
  457. Plunger.PullBack
  458. PlungerPulled = 1
  459. End If
  460.  
  461. if keycode = LeftFlipperKey and InProgress = false then
  462. OperatorMenuTimer.Enabled = true
  463. end if
  464. ' END GNMOD
  465.  
  466. If keycode = LeftFlipperKey and InProgress=true and TableTilted=false Then
  467. LeftFlipper.RotateToEnd
  468. 'PlaySound "mxBuzzL"
  469. FlipperSounds
  470. DOF 101, 1
  471. End If
  472.  
  473. If keycode = RightFlipperKey and InProgress=true and TableTilted=false Then
  474. RightFlipper.RotateToEnd
  475.  
  476. FlipperSounds
  477. 'PlaySound "mxBuzz"
  478. DOF 102, 1
  479. End If
  480.  
  481. If keycode = LeftTiltKey Then
  482. Nudge 90, 2
  483. TiltIt
  484. End If
  485.  
  486. If keycode = RightTiltKey Then
  487. Nudge 270, 2
  488. TiltIt
  489. End If
  490.  
  491. If keycode = CenterTiltKey Then
  492. Nudge 0, 2
  493. TiltIt
  494. End If
  495.  
  496. If keycode = MechanicalTilt Then
  497. TiltCount=2
  498. TiltIt
  499. End If
  500.  
  501.  
  502. If keycode = AddCreditKey or keycode = 4 then
  503. If B2SOn Then
  504. 'Controller.B2SSetScorePlayer6 HighScore
  505.  
  506. End If
  507.  
  508. playsound "fx_coinin"
  509. CreditLight.state=1
  510. AddSpecial2
  511. delay 1
  512. playsound"BallyCoinIn1Credits"
  513. end if
  514.  
  515. if keycode = 5 then
  516. playsound "fx_coinin"
  517. CreditLight.state=1
  518. AddSpecial2
  519. delay 1
  520. playsound"BallyCoinIn1Credits"
  521. keycode= StartGameKey
  522. end if
  523.  
  524.  
  525. if keycode = StartGameKey and Credits>0 and InProgress=true and Players>0 and Players<4 and BallInPlay<2 then
  526. Credits=Credits-1
  527. If Credits < 1 Then
  528. DOF 127, 0
  529. CreditLight.state=0
  530. end if
  531. CreditsReel.SetValue(Credits)
  532. Players=Players+1
  533. If Players=2 then
  534. CanPlay001.state=0
  535. CanPlay002.state=1
  536. end if
  537. If Players=3 then
  538. CanPlay002.state=0
  539. CanPlay003.state=1
  540. end if
  541. If Players=4 then
  542. CanPlay003.state=0
  543. CanPlay004.state=1
  544. end if
  545. playsound "BallyStartButtonPlayers2-4"
  546. RollReel002.Setvalue(0)
  547. RollReel003.Setvalue(0)
  548. RollReel004.Setvalue(0)
  549. If B2SOn Then
  550. Controller.B2SSetCanPlay Players
  551. If Players=2 Then
  552. Controller.B2SSetScoreRolloverPlayer2 0
  553. End If
  554. If Players=3 Then
  555. Controller.B2SSetScoreRolloverPlayer3 0
  556. End If
  557. If Players=4 Then
  558. Controller.B2SSetScoreRolloverPlayer4 0
  559. End If
  560. Controller.B2SSetCredits Credits
  561. End If
  562. end if
  563.  
  564. if keycode=StartGameKey and Credits>0 and InProgress=false and Players=0 and EnteringOptions = 0 then
  565. 'GNMOD
  566. OperatorMenuTimer.Enabled = false
  567. 'END GNMOD
  568. Credits=Credits-1
  569. If Credits < 1 Then
  570. DOF 127, 0
  571. CreditLight.state=0
  572. end if
  573. CreditsReel.SetValue(Credits)
  574. Players=1
  575. CanPlay001.state=1
  576. MatchReel.SetValue(0)
  577. Player=1
  578. playsound "mxStartup"
  579. TempPlayerUp=Player
  580. ' PlayerUpRotator.enabled=true
  581. rst=0
  582. BallInPlay=1
  583. InProgress=true
  584. resettimer.enabled=true
  585. BonusMultiplier=1
  586. TimerTitle1.enabled=0
  587. TimerTitle2.enabled=0
  588. TimerTitle3.enabled=0
  589. TimerTitle4.enabled=0
  590. RollReel001.setvalue(0)
  591. RollReel002.setvalue(0)
  592. RollReel003.setvalue(0)
  593. RollReel004.setvalue(0)
  594. If B2SOn Then
  595. Controller.B2SSetCanPlay Players
  596. Controller.B2SSetTilt 0
  597. Controller.B2SSetGameOver 0
  598. Controller.B2SSetMatch 0
  599. Controller.B2SSetCredits Credits
  600.  
  601. Controller.B2SSetCanPlay 1
  602. Controller.B2SSetPlayerUp 1
  603. Controller.B2SSetData 81,1
  604. Controller.B2SSetBallInPlay BallInPlay
  605. Controller.B2SSetScoreRolloverPlayer1 0
  606. Controller.B2SSetScoreRolloverPlayer2 0
  607. Controller.B2SSetScoreRolloverPlayer3 0
  608. Controller.B2SSetScoreRolloverPlayer4 0
  609. Controller.B2SSetShootAgain 0
  610.  
  611.  
  612. End If
  613. If Table1.ShowDT = True then
  614. For each obj in PlayerScores
  615. ' obj.ResetToZero
  616. obj.Visible=true
  617. next
  618. For each obj in PlayerScoresOn
  619. ' obj.ResetToZero
  620. obj.Visible=false
  621. next
  622.  
  623. For each obj in PlayerHuds
  624. obj.state=0
  625. next
  626. For each obj in PlayerHUDScores
  627. obj.state=0
  628. next
  629. PlayerHuds(Player-1).state=1
  630. PlayerHUDScores(Player-1).state=1
  631. PlayerScores(Player-1).Visible=0
  632. PlayerScoresOn(Player-1).Visible=1
  633. end If
  634. 'GameOverReel.SetValue(0)
  635. LightGameOver.state=0
  636.  
  637.  
  638. end if
  639.  
  640.  
  641.  
  642. End Sub
  643.  
  644. Sub Table1_KeyUp(ByVal keycode)
  645.  
  646. ' GNMOD
  647. if EnteringInitials then
  648. exit sub
  649. end if
  650.  
  651. If keycode = PlungerKey Then
  652.  
  653. if PlungerPulled = 0 then
  654. exit sub
  655. end if
  656.  
  657. PlaySound"plungerrelease"
  658. Plunger.Fire
  659. End If
  660.  
  661. if keycode = LeftFlipperKey then
  662. OperatorMenuTimer.Enabled = false
  663. end if
  664.  
  665. ' END GNMOD
  666.  
  667. If keycode = LeftFlipperKey and InProgress=true and TableTilted=false Then
  668. LeftFlipper.RotateToStart
  669. PlaySound SoundFXDOF("FlipperDown",101,DOFoff,DOFFlippers)
  670. StopSound SoundFXDOF("mxBuzzL",101,DOFoff,DOFFlippers)
  671. End If
  672.  
  673. If keycode = RightFlipperKey and InProgress=true and TableTilted=false Then
  674. RightFlipper.RotateToStart
  675. StopSound SoundFXDOF("mxBuzzL",102,DOFoff,DOFFlippers)
  676. PlaySound SoundFXDOF("FlipperDown",102,DOFoff,DOFFlippers)
  677. End If
  678.  
  679. End Sub
  680.  
  681.  
  682.  
  683. Sub Drain_Hit()
  684.  
  685. If musicmode=1 and BallinPlay < 5 then MusicOn
  686. DOF 124, 2
  687. Drain.DestroyBall
  688. PlaySound "mxdrainhit"
  689. Pause4Bonustimer.enabled=true
  690.  
  691. End Sub
  692.  
  693. Sub Trigger0_Unhit()
  694. DOF 126, 2
  695. End Sub
  696.  
  697. Sub Pause4Bonustimer_timer
  698. Pause4Bonustimer.enabled=0
  699. ScoreGoldBonus
  700. End Sub
  701.  
  702. Sub NewBonusHolder_timer
  703. if NewBonusTimer.enabled=0 then
  704. NewBonusHolder.enabled=0
  705. NextBallDelay.enabled=true
  706. end if
  707.  
  708. end sub
  709.  
  710. '***********************
  711. ' Animated business
  712. '***********************
  713.  
  714. Function PI()
  715. PI = 4*Atn(1)
  716. End Function
  717.  
  718. Sub UpdateFlipperLogos_Timer
  719. Pgate002.rotx = -GateR.currentangle*0.5
  720. Pgate001.rotx = -GateL.currentangle*0.5
  721. gates005.rotx = gate1.currentangle
  722.  
  723. Dim SpinnerRadius: SpinnerRadius=7
  724.  
  725. SpinnerRod.TransZ = (cos((spinnerleft.CurrentAngle + 180) * (PI/180))+1) * SpinnerRadius
  726. SpinnerRod.TransY = sin((spinnerleft.CurrentAngle) * (PI/180)) * -SpinnerRadius
  727. SpinnerRod001.TransZ = (cos((spinnerright.CurrentAngle + 180) * (PI/180))+1) * SpinnerRadius
  728. SpinnerRod001.TransY = sin((spinnerright.CurrentAngle) * (PI/180)) * -SpinnerRadius
  729. End Sub
  730.  
  731. '***********************
  732. ' slingshots
  733. '
  734.  
  735. Sub RightSlingShot_Slingshot
  736. PlaySound SoundFXDOF("right_slingshot",104,DOFPulse,DOFContactors), 0, 1, 0.05, 0.05
  737. RSling0.Visible = 0
  738. RSling1.Visible = 1
  739. sling1.TransZ = -20
  740. RStep = 0
  741. RightSlingShot.TimerEnabled = 1
  742. AddScore 10
  743. End Sub
  744.  
  745. Sub RightSlingShot_Timer
  746. Select Case RStep
  747. Case 3:RSLing1.Visible = 0:RSLing2.Visible = 1:sling1.TransZ = -10
  748. Case 4:RSLing2.Visible = 0:RSling0.Visible = 1:sling1.TransZ = 0:RightSlingShot.TimerEnabled = 0
  749. End Select
  750. RStep = RStep + 1
  751. End Sub
  752.  
  753. Sub LeftSlingShot_Slingshot
  754. PlaySound SoundFXDOF("left_slingshot",103,DOFPulse,DOFContactors),0,1,-0.05,0.05
  755. LSling0.Visible = 0
  756. LSling1.Visible = 1
  757. sling2.TransZ = -20
  758. LStep = 0
  759. LeftSlingShot.TimerEnabled = 1
  760. AddScore 10
  761. End Sub
  762.  
  763. Sub LeftSlingShot_Timer
  764. Select Case LStep
  765. Case 3:LSLing1.Visible = 0:LSLing2.Visible = 1:sling2.TransZ = -10
  766. Case 4:LSLing2.Visible = 0:LSLing0.Visible = 1:sling2.TransZ = 0:LeftSlingShot.TimerEnabled = 0
  767. End Select
  768. LStep = LStep + 1
  769. End Sub
  770.  
  771. '***********************************
  772. ' Walls
  773. '***********************************
  774.  
  775. Sub RubberWallSwitches_Hit(idx)
  776. if TableTilted=false then
  777. AddScore(10)
  778.  
  779. end if
  780. end Sub
  781.  
  782.  
  783. '***********************************
  784. ' Bumpers
  785. '***********************************
  786.  
  787.  
  788. Sub Bumper1_Hit
  789. If TableTilted=false then
  790.  
  791. PlaySound SoundFXDOF("bumper1",105,DOFPulse,DOFContactors)
  792. bump1 = 1
  793. AddScore(10)
  794. end if
  795.  
  796. End Sub
  797.  
  798. Sub Bumper2_Hit
  799. If TableTilted=false then
  800.  
  801. PlaySound SoundFXDOF("bumper1",106,DOFPulse,DOFContactors)
  802. bump2 = 1
  803. AddScore(10)
  804. end if
  805.  
  806. End Sub
  807.  
  808. Sub Bumper3_Hit
  809. If TableTilted=false then
  810.  
  811. PlaySound SoundFXDOF("bumper1",107,DOFPulse,DOFContactors)
  812. bump3 = 1
  813. AddScore(10)
  814. end if
  815.  
  816. End Sub
  817.  
  818. Sub Bumper4_Hit
  819. If TableTilted=false then
  820.  
  821. PlaySound SoundFXDOF("bumper1",137,DOFPulse,DOFContactors)
  822. bump4 = 1
  823. AddScore(10)
  824. end if
  825.  
  826. End Sub
  827.  
  828. '************************************
  829. ' Rollover lanes
  830. '************************************
  831.  
  832.  
  833.  
  834. Sub LeftOutlane_Hit
  835. if TableTilted=false then
  836. DOF 110, 2
  837. CollectCenterSpinner
  838. end if
  839. end sub
  840.  
  841. Sub LeftInlane_Hit
  842. if TableTilted=false then
  843. DOF 111, 2
  844. SetMotor(500)
  845. IncreaseGoldBonus
  846. end if
  847. end sub
  848.  
  849. Sub RightOutlane_Hit
  850. if TableTilted=false then
  851. DOF 113, 2
  852. CollectCenterSpinner
  853. end if
  854. end sub
  855.  
  856. Sub RightInlane_Hit
  857. if TableTilted=false then
  858. DOF 112, 2
  859. SetMotor(500)
  860.  
  861. IncreaseGoldBonus
  862. end if
  863. end sub
  864.  
  865. Sub TriggerPlunge_Hit
  866. if TableTilted=false then
  867. DOF 132, 2 'apophis
  868. end if
  869. end sub
  870.  
  871. '******************************************
  872. ' Spinners
  873.  
  874.  
  875. Sub SpinnerLeft_Spin()
  876. If TableTilted=false and MotorRunning=0 then
  877. DOF 122, 2
  878. if Left100.state=1 then
  879. AddScore(100)
  880. ToggleAlternatingRelay
  881. elseif Left1000.state=1 then
  882. AddScore(1000)
  883. ToggleAlternatingRelay
  884. else
  885. AddScore(10)
  886. end if
  887.  
  888. end if
  889.  
  890. end Sub
  891.  
  892. Sub SpinnerRight_Spin()
  893. If TableTilted=false and MotorRunning=0 then
  894. DOF 123, 2
  895. if Right100.state=1 then
  896. AddScore(100)
  897. ToggleAlternatingRelay
  898. elseif Right1000.state=1 then
  899. AddScore(1000)
  900. ToggleAlternatingRelay
  901. else
  902. AddScore(10)
  903. end if
  904.  
  905. end if
  906.  
  907. end Sub
  908.  
  909. '************Kickers
  910. Dim rkickstep, lkickstep, ktimer, kickFill, rKickerHit, lKickerHit
  911.  
  912.  
  913. Dim kickBalls
  914. Dim kickerBall1
  915. Sub kickBall(kball, kangle, kvel, kvelz, kzlift)
  916. dim rangle
  917. rangle = 3.14 * (kangle - 90) / 180
  918. kball.z = kball.z + kzlift
  919. kball.velz = kvelz
  920. kball.velx = cos(rangle)*kvel
  921. kball.vely = sin(rangle)*kvel
  922. End Sub
  923.  
  924.  
  925. '****************************************************
  926. ' Kickers
  927. '****************************************************
  928.  
  929. sub Kicker1_Hit()
  930. set kickerBall1 = activeball
  931. if TableTilted=true then
  932. tKickerTCount=0
  933. Kicker1.Timerenabled=1
  934. exit sub
  935. end if
  936. KickerHolder1.enabled=1
  937. end sub
  938.  
  939. Sub KickerHolder1_timer
  940. If MotorRunning=0 then
  941. KickerHolder1.enabled=0
  942. Kicker1.timerinterval=500
  943. Kicker1.timerenabled=1
  944. tKickerTCount=0
  945. CollectCenterSpinner
  946. end if
  947. end sub
  948.  
  949. Sub Kicker1_Timer()
  950. tKickerTCount=tKickerTCount+1
  951. select case tKickerTCount
  952. case 1:
  953. if kicker1.ballcntover > 0 Then
  954. Pkickarm1.rotz=15
  955. PlaySound SoundFXDOF("saucer",135,DOFPulse,DOFContactors)
  956. DOF 111, 2
  957. kickBall KickerBall1, 152, 8, 5, 30
  958. else
  959. end if
  960. case 2:
  961. Kicker1.timerenabled=0
  962. Pkickarm1.rotz=0
  963. end Select
  964. end sub
  965.  
  966.  
  967. sub Kicker2_Hit()
  968. set kickerBall1 = activeball
  969. if TableTilted=true then
  970. tKickerTCount=0
  971. Kicker2.Timerenabled=1
  972. exit sub
  973. end if
  974. KickerHolder2.enabled=1
  975. end sub
  976.  
  977. Sub KickerHolder2_timer
  978. If MotorRunning=0 then
  979. KickerHolder2.enabled=0
  980. Kicker2.timerinterval=500
  981. Kicker2.timerenabled=1
  982. tKickerTCount=0
  983. CollectCenterSpinner
  984. end if
  985. end sub
  986.  
  987. Sub Kicker2_Timer()
  988. tKickerTCount=tKickerTCount+1
  989. select case tKickerTCount
  990. case 1:
  991. if kicker2.ballcntover > 0 Then
  992. Pkickarm2.rotz=15
  993. PlaySound SoundFXDOF("saucer",136,DOFPulse,DOFContactors)
  994. DOF 112, 2
  995. kickBall KickerBall1, 215, 10, 5, 30
  996. Else
  997. End if
  998. case 2:
  999. Kicker2.timerenabled=0
  1000. Pkickarm2.rotz=0
  1001. end Select
  1002. end sub
  1003.  
  1004.  
  1005.  
  1006.  
  1007. '****************************************************
  1008. '* Star Triggers
  1009. '****************************************************
  1010.  
  1011. Sub StarTrigger_Hit
  1012. If TableTilted=false then
  1013. SetMotor(40)
  1014.  
  1015. end if
  1016. end sub
  1017.  
  1018.  
  1019. '****************************************************
  1020. '* Stationary Targets
  1021. '****************************************************
  1022.  
  1023. Sub RightTarget_Hit
  1024. If TableTilted=false then
  1025. DOF 119, 2
  1026. DOF 233, 2 'apophis
  1027. SetMotor(500)
  1028. IncreaseGoldBonus
  1029.  
  1030. end if
  1031. end sub
  1032.  
  1033.  
  1034. '****************************************************
  1035. '* Drop Targets
  1036. '****************************************************
  1037.  
  1038. 'DropTargetCompletedCount, DropTargetsDownCount
  1039.  
  1040. Sub Target1_hit
  1041. if TableTilted=false then
  1042. If Target1.IsDropped=false then
  1043. Target1.IsDropped=true
  1044. SetMotor(500)
  1045. DOF 232, 2 'apophis
  1046. IncreaseGoldBonus
  1047. DropTargetsDownCount=DropTargetsDownCount+1
  1048. CheckAllDrops
  1049. end if
  1050. end if
  1051. end sub
  1052.  
  1053. Sub Target2_hit
  1054. if TableTilted=false then
  1055. If Target2.IsDropped=false then
  1056. Target2.IsDropped=true
  1057. SetMotor(500)
  1058. DOF 232, 2 'apophis
  1059. IncreaseGoldBonus
  1060. DropTargetsDownCount=DropTargetsDownCount+1
  1061. CheckAllDrops
  1062. end if
  1063. end if
  1064. end sub
  1065.  
  1066. Sub Target3_hit
  1067. if TableTilted=false then
  1068. If Target3.IsDropped=false then
  1069. Target3.IsDropped=true
  1070. SetMotor(500)
  1071. DOF 232, 2 'apophis
  1072. IncreaseGoldBonus
  1073. DropTargetsDownCount=DropTargetsDownCount+1
  1074. CheckAllDrops
  1075. end if
  1076. end if
  1077. end sub
  1078.  
  1079. Sub Target4_hit
  1080. if TableTilted=false then
  1081. If Target4.IsDropped=false then
  1082. Target4.IsDropped=true
  1083. SetMotor(500)
  1084. DOF 232, 2 'apophis
  1085. IncreaseGoldBonus
  1086. DropTargetsDownCount=DropTargetsDownCount+1
  1087. CheckAllDrops
  1088. end if
  1089. end if
  1090. end sub
  1091.  
  1092. Sub Target5_hit
  1093. if TableTilted=false then
  1094. If Target5.IsDropped=false then
  1095. Target5.IsDropped=true
  1096. SetMotor(500)
  1097. DOF 232, 2 'apophis
  1098. IncreaseGoldBonus
  1099. DropTargetsDownCount=DropTargetsDownCount+1
  1100. CheckAllDrops
  1101. end if
  1102. end if
  1103. end sub
  1104.  
  1105. Sub CheckAllDrops
  1106. If DropTargetsDownCount=5 then
  1107. DropsCompleted.enabled=true
  1108. end if
  1109. end sub
  1110.  
  1111. Sub DropsCompleted_timer
  1112. if MotorRunning<>0 then exit sub
  1113. DropsCompleted.enabled=false
  1114. DropTargetCompletedCount=DropTargetCompletedCount+1
  1115. SetMotor(5000)
  1116. ResetDropTargets.enabled=1
  1117. SpecialLight.state=1
  1118. If DropTargetCompletedCount=1 AND GameOption=2 then
  1119. ShootAgainLight.state=1
  1120. LightSamePlayer.state=1
  1121. 'ShootAgainReel.setvalue(1)
  1122. SpecialLight.state=1
  1123. If B2SOn then
  1124. Controller.B2SSetShootAgain 1
  1125. end if
  1126. end if
  1127. If DropTargetCompletedCount=2 then
  1128. ShootAgainLight.state=1
  1129. LightSamePlayer.state=1
  1130. 'ShootAgainReel.setvalue(1)
  1131. AddSpecial
  1132. If B2SOn then
  1133. Controller.B2SSetShootAgain 1
  1134. end if
  1135. end if
  1136.  
  1137. end sub
  1138.  
  1139.  
  1140. Sub ResetDropTargets_timer
  1141. If MotorRunning<>0 then exit sub
  1142. ResetDropTargets.enabled=0
  1143. for each obj in Targets
  1144. obj.IsDropped=false
  1145. next
  1146. PlaySound SoundFXDOF("dropsup",138,DOFPulse,DOFDropTargets)
  1147. DropTargetsDownCount=0
  1148. End Sub
  1149.  
  1150. '****************************************************
  1151.  
  1152. Sub CheckABCDSequence
  1153.  
  1154.  
  1155. end sub
  1156.  
  1157. Sub CheckCenterTargetSpecials
  1158.  
  1159.  
  1160. end sub
  1161.  
  1162. Sub CenterSpinnerLights
  1163. For each obj in SpinnerLights
  1164. obj.state=0
  1165. next
  1166. SpinnerLights(LeftSpinnerCounter).state=1
  1167. SpinnerLights(LeftSpinnerCounter+10).state=1
  1168.  
  1169. end sub
  1170.  
  1171. sub CollectCenterSpinner
  1172. Select Case LeftSpinnerCounter
  1173. case 0,2:
  1174. SetMotor(5000)
  1175. case 1,7:
  1176. SetMotor(500)
  1177. DoubleBonus.state=1
  1178. case 3,9:
  1179. SetMotor(3000)
  1180. Advance3Bonus
  1181. case 4,6,8:
  1182. SetMotor(500)
  1183. IncreaseGoldBonus
  1184. case 5:
  1185. SetMotor(500)
  1186. if BallsPerGame=3 then
  1187. Left1000.state=1
  1188. Right1000.state=1
  1189. else
  1190. Left100.state=1
  1191. Right100.state=1
  1192. end if
  1193. end select
  1194. end sub
  1195.  
  1196. Sub Advance3Bonus
  1197. AddCounter=3
  1198. Add3Bonus.enabled=true
  1199. end sub
  1200.  
  1201. Sub Add3Bonus_timer
  1202. IncreaseGoldBonus
  1203. AddCounter=AddCounter-1
  1204. if AddCounter<1 then
  1205. Add3Bonus.enabled=false
  1206. end if
  1207. end sub
  1208.  
  1209.  
  1210. '**************************************
  1211.  
  1212. Sub AddSpecial()
  1213. If ChimesOn=1 then
  1214. PlaySound"Circus-BiriBiri"
  1215. else
  1216. PlaySound SoundFXDOF("knocker",134,DOFPulse,DOFknocker)
  1217. end if
  1218. Credits=Credits+1
  1219. DOF 127, 1
  1220. CreditLight.state=1
  1221. if Credits>36 then Credits=36
  1222. If B2SOn Then
  1223. Controller.B2SSetCredits Credits
  1224. End If
  1225. CreditsReel.SetValue(Credits)
  1226. End Sub
  1227.  
  1228. Sub AddSpecial2()
  1229. PlaySound"click"
  1230. Credits=Credits+1
  1231. DOF 127, 1
  1232. CreditLight.state=1
  1233. if Credits>36 then Credits=36
  1234. If B2SOn Then
  1235. Controller.B2SSetCredits Credits
  1236. End If
  1237. CreditsReel.SetValue(Credits)
  1238. End Sub
  1239.  
  1240. Sub CloseGateTrigger_Hit()
  1241. if dooralreadyopen=1 then
  1242. closeg.enabled=true
  1243.  
  1244. end if
  1245. End Sub
  1246.  
  1247.  
  1248. sub openg_timer
  1249.  
  1250.  
  1251. end sub
  1252.  
  1253. sub closeg_timer
  1254.  
  1255. end sub
  1256.  
  1257.  
  1258.  
  1259. Sub ToggleAlternatingRelay
  1260. LeftSpinnerCounter=LeftSpinnerCounter+1
  1261. If LeftSpinnerCounter>9 then
  1262. LeftSpinnerCounter=0
  1263. end if
  1264. CenterSpinnerLights
  1265.  
  1266. end sub
  1267.  
  1268. Sub ToggleRedBumper
  1269.  
  1270.  
  1271.  
  1272. BumpersOn
  1273.  
  1274. end sub
  1275.  
  1276. Sub ResetABCD
  1277.  
  1278.  
  1279. end sub
  1280.  
  1281.  
  1282. Sub ResetBallDrops
  1283.  
  1284. For each obj in GoldBonus
  1285. obj.state=0
  1286. next
  1287.  
  1288.  
  1289. DoubleBonus.state=0
  1290.  
  1291. DropTargetCompletedCount=0
  1292. SpecialLight.state=0
  1293. DoubleBonus.state=0
  1294. Left100.state=0
  1295. Left1000.state=0
  1296. Right100.state=0
  1297. Right1000.state=0
  1298.  
  1299. ResetDropTargets.enabled=1
  1300. HoleCounter=0
  1301. SilverBonusCounter=0
  1302. GoldBonusCounter=0
  1303. BumpLight1.state=1
  1304. BumpLight2.state=1
  1305. BumpLight3.state=1
  1306. BumpLight4.state=1
  1307.  
  1308. End Sub
  1309.  
  1310.  
  1311.  
  1312. Sub LightsOut
  1313.  
  1314. BonusCounter=0
  1315. HoleCounter=0
  1316. BumpLight1.state=0
  1317. BumpLight2.state=0
  1318. BumpLight3.state=0
  1319. BumpLight4.state=0
  1320.  
  1321. end sub
  1322.  
  1323. Sub ResetBalls()
  1324. StopSound"BallyBuzzer"
  1325.  
  1326.  
  1327. TempMultiCounter=BallsPerGame-BallInPlay
  1328.  
  1329. ResetBallDrops
  1330. BonusMultiplier=1
  1331. TableTilted=false
  1332. If B2SOn then
  1333.  
  1334. Controller.B2SSetTilt 0
  1335. Controller.B2SSetData 80+Player,1
  1336. end if
  1337. LightTilt.state = 0
  1338. 'TiltReel.SetValue(0)
  1339. GoldBonusCounter=1
  1340. GoldBonus(GoldBonusCounter).state=1
  1341. PlasticsOn
  1342. 'CreateBallID BallRelease
  1343. Ballrelease.CreateSizedBall 25
  1344. Ballrelease.Kick 40,7
  1345. DOF 125, 2
  1346. BallInPlayReel.SetValue(BallInPlay)
  1347. BallInPlay001.state=0
  1348. BallInPlay002.state=0
  1349. BallInPlay003.state=0
  1350. BallInPlay004.state=0
  1351. BallInPlay005.state=0
  1352. EVAL("BallInPlay00"&BallInPlay).state=1
  1353.  
  1354. ' InstructCard.image="IC"+FormatNumber(BallsPerGame,0)+FormatNumber(TargetSetting,0)+FormatNumber(BallInPlay,0)
  1355. ' CardLight1.State = ABS(CardLight1.State-1)
  1356.  
  1357.  
  1358. End Sub
  1359.  
  1360.  
  1361.  
  1362.  
  1363. sub IncreaseGoldBonus
  1364. if GoldBonusCounter<15 then
  1365. If GoldBonusCounter<10 then
  1366. GoldBonus(GoldBonusCounter).state=0
  1367. GoldBonusCounter=GoldBonusCounter+1
  1368. GoldBonus(GoldBonusCounter).state=1
  1369. elseIf GoldBonusCounter>9 then
  1370. GoldBonus(GoldBonusCounter-10).state=0
  1371. GoldBonusCounter=GoldBonusCounter+1
  1372. GoldBonus(10).state=1
  1373. GoldBonus(GoldBonusCounter-10).state=1
  1374. end if
  1375. end if
  1376. end sub
  1377.  
  1378. sub ScoreSilverBonus
  1379.  
  1380. If DoubleBonus.state=0 then
  1381. ScoreMotorStepper=0
  1382.  
  1383. else
  1384. ScoreMotorStepper=0
  1385.  
  1386. end if
  1387. CollectSilverBonus.enabled=1
  1388. end sub
  1389.  
  1390. sub CollectSilverBonus_timer
  1391. if MotorRunning=1 then
  1392. exit sub
  1393. end if
  1394. if GoldBonusCounter<1 then
  1395. CollectSilverBonus.enabled=0
  1396. GoldBonusCounter=1
  1397. GoldBonus(GoldBonusCounter).state=1
  1398. else
  1399. if ScoreMotorStepper<5 then
  1400. ' If TableTilted=false then
  1401. ' SetMotor(5000)
  1402. ' end if
  1403. If DoubleBonus.state=0 then
  1404. if TableTilted=false then
  1405. SetMotor(5000)
  1406. end if
  1407. else
  1408. if TableTilted=false then
  1409. AddScore(10000)
  1410. end if
  1411. end if
  1412. GoldBonus(GoldBonusCounter).state=0
  1413. GoldBonusCounter=GoldBonusCounter-1
  1414. if GoldBonusCounter>=0 then
  1415. GoldBonus(GoldBonusCounter).state=1
  1416. end if
  1417. ScoreMotorStepper=ScoreMotorStepper+1
  1418. else
  1419. If DoubleBonus.state=0 then
  1420. ScoreMotorStepper=0
  1421. else
  1422. ScoreMotorStepper=0
  1423.  
  1424. end if
  1425. end if
  1426. end if
  1427. end sub
  1428.  
  1429.  
  1430.  
  1431. sub ScoreGoldBonus
  1432. ScoreMotorStepper=0
  1433. CollectGoldBonus.interval=135
  1434. CollectGoldBonus.enabled=1
  1435. end sub
  1436.  
  1437. sub CollectGoldBonus_timer
  1438. if MotorRunning=1 then
  1439. exit sub
  1440. end if
  1441. if GoldBonusCounter<1 then
  1442. CollectGoldBonus.enabled=0
  1443. NextBallDelay.enabled=true
  1444. else
  1445. If DoubleBonus.state=1 then
  1446. Select case ScoreMotorStepper
  1447. case 0,1,3,4:
  1448. AddScore(1000)
  1449.  
  1450. case 2,5:
  1451. PlaySound"BallyClunk"
  1452. If GoldBonusCounter>10 then
  1453. GoldBonus(GoldBonusCounter-10).state=0
  1454. else
  1455. GoldBonus(GoldBonusCounter).state=0
  1456.  
  1457. end if
  1458.  
  1459. GoldBonusCounter=GoldBonusCounter-1
  1460. if GoldBonusCounter>=0 then
  1461. If GoldBonusCounter<=10 then
  1462. GoldBonus(GoldBonusCounter).state=1
  1463. elseif GoldBonusCounter>10 then
  1464. GoldBonus(10).state=1
  1465. GoldBonus(GoldBonusCounter-10).state=1
  1466. end if
  1467. end if
  1468. case 6:
  1469.  
  1470.  
  1471. case 7:
  1472.  
  1473.  
  1474. end select
  1475. ScoreMotorStepper=ScoreMotorStepper+1
  1476. If ScoreMotorStepper>7 then
  1477. ScoreMotorStepper=0
  1478. end if
  1479. else
  1480. Select Case ScoreMotorStepper
  1481. case 0,1,2,3,4:
  1482. AddScore(1000)
  1483. If GoldBonusCounter>10 then
  1484. GoldBonus(GoldBonusCounter-10).state=0
  1485. else
  1486. GoldBonus(GoldBonusCounter).state=0
  1487.  
  1488. end if
  1489. GoldBonusCounter=GoldBonusCounter-1
  1490. if GoldBonusCounter>=0 then
  1491. If GoldBonusCounter<=10 then
  1492. GoldBonus(GoldBonusCounter).state=1
  1493. elseif GoldBonusCounter>10 then
  1494. GoldBonus(10).state=1
  1495. GoldBonus(GoldBonusCounter-10).state=1
  1496. end if
  1497. end if
  1498. case 5:
  1499. PlaySound"BallyClunk"
  1500.  
  1501.  
  1502. end select
  1503. ScoreMotorStepper=ScoreMotorStepper+1
  1504. If ScoreMotorStepper>5 then
  1505. ScoreMotorStepper=0
  1506. end if
  1507. end if
  1508. end if
  1509. end sub
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516. sub OffRollovers
  1517.  
  1518.  
  1519. end sub
  1520.  
  1521.  
  1522.  
  1523. sub resettimer_timer
  1524. rst=rst+1
  1525. if rst>1 and rst<12 then
  1526. ResetReelsToZero(1)
  1527. end if
  1528. if rst=13 then
  1529. playsound "StartBall1"
  1530. end if
  1531. if rst=14 then
  1532. newgame
  1533. resettimer.enabled=false
  1534. end if
  1535. end sub
  1536.  
  1537. Sub ResetReelsToZero(reelzeroflag)
  1538. dim d1(5)
  1539. dim d2(5)
  1540. dim scorestring1, scorestring2
  1541.  
  1542. If reelzeroflag=1 then
  1543. scorestring1=CStr(Score(1))
  1544. scorestring2=CStr(Score(2))
  1545. scorestring1=right("00000" & scorestring1,5)
  1546. scorestring2=right("00000" & scorestring2,5)
  1547. for i=0 to 4
  1548. d1(i)=CInt(mid(scorestring1,i+1,1))
  1549. d2(i)=CInt(mid(scorestring2,i+1,1))
  1550. next
  1551. for i=0 to 4
  1552. if d1(i)>0 then
  1553. d1(i)=d1(i)+1
  1554. if d1(i)>9 then d1(i)=0
  1555. end if
  1556. if d2(i)>0 then
  1557. d2(i)=d2(i)+1
  1558. if d2(i)>9 then d2(i)=0
  1559. end if
  1560.  
  1561. next
  1562. Score(1)=(d1(0)*10000) + (d1(1)*1000) + (d1(2)*100) + (d1(3)*10) + d1(4)
  1563. Score(2)=(d2(0)*10000) + (d2(1)*1000) + (d2(2)*100) + (d2(3)*10) + d2(4)
  1564. If B2SOn Then
  1565. Controller.B2SSetScorePlayer 1, Score(1)
  1566. Controller.B2SSetScorePlayer 2, Score(2)
  1567. End If
  1568. PlayerScores(0).SetValue(Score(1))
  1569. PlayerScoresOn(0).SetValue(Score(1))
  1570. PlayerScores(1).SetValue(Score(2))
  1571. PlayerScoresOn(1).SetValue(Score(2))
  1572.  
  1573. scorestring1=CStr(Score(3))
  1574. scorestring2=CStr(Score(4))
  1575. scorestring1=right("00000" & scorestring1,5)
  1576. scorestring2=right("00000" & scorestring2,5)
  1577. for i=0 to 4
  1578. d1(i)=CInt(mid(scorestring1,i+1,1))
  1579. d2(i)=CInt(mid(scorestring2,i+1,1))
  1580. next
  1581. for i=0 to 4
  1582. if d1(i)>0 then
  1583. d1(i)=d1(i)+1
  1584. if d1(i)>9 then d1(i)=0
  1585. end if
  1586. if d2(i)>0 then
  1587. d2(i)=d2(i)+1
  1588. if d2(i)>9 then d2(i)=0
  1589. end if
  1590.  
  1591. next
  1592. Score(3)=(d1(0)*10000) + (d1(1)*1000) + (d1(2)*100) + (d1(3)*10) + d1(4)
  1593. Score(4)=(d2(0)*10000) + (d2(1)*1000) + (d2(2)*100) + (d2(3)*10) + d2(4)
  1594. If B2SOn Then
  1595. Controller.B2SSetScorePlayer 3, Score(3)
  1596. Controller.B2SSetScorePlayer 4, Score(4)
  1597. End If
  1598. PlayerScores(2).SetValue(Score(3))
  1599. PlayerScoresOn(2).SetValue(Score(3))
  1600. PlayerScores(3).SetValue(Score(4))
  1601. PlayerScoresOn(3).SetValue(Score(4))
  1602.  
  1603. end if
  1604.  
  1605. end sub
  1606.  
  1607.  
  1608.  
  1609. sub NextBallDelay_timer()
  1610. NextBallDelay.enabled=false
  1611. nextball
  1612.  
  1613. end sub
  1614.  
  1615. sub newgame
  1616. InProgress=true
  1617. queuedscore=0
  1618. for i = 1 to 4
  1619. Score(i)=0
  1620. Score100K(1)=0
  1621. HighScorePaid(i)=false
  1622. Replay1Paid(i)=false
  1623. Replay2Paid(i)=false
  1624. Replay3Paid(i)=false
  1625. next
  1626. If B2SOn Then
  1627. Controller.B2SSetTilt 0
  1628. Controller.B2SSetGameOver 0
  1629. Controller.B2SSetMatch 0
  1630. ' Controller.B2SSetScorePlayer1 0
  1631. ' Controller.B2SSetScorePlayer2 0
  1632. ' Controller.B2SSetScorePlayer3 0
  1633. ' Controller.B2SSetScorePlayer4 0
  1634. Controller.B2SSetBallInPlay BallInPlay
  1635.  
  1636. End if
  1637.  
  1638. BumpLight1.state=1
  1639. BumpLight2.state=1
  1640. BumpLight3.state=1
  1641. AlternatingRelay=0
  1642. ZeroNineCounter=0
  1643. 'LeftSpinnerCounter=0
  1644. BumpersOn
  1645. BonusCounter=0
  1646. BallCounter=0
  1647. TargetLeftFlag=1
  1648. TargetCenterFlag=1
  1649. TargetRightFlag=1
  1650. TargetSequenceComplete=0
  1651.  
  1652.  
  1653. AlternatingRelay=1
  1654. ToggleAlternatingRelay
  1655. ' IncreaseBonus
  1656. ' ToggleBumper
  1657. EightLit=1
  1658. ResetBalls
  1659. End sub
  1660.  
  1661. sub nextball
  1662. If B2SOn Then
  1663. Controller.B2SSetTilt 0
  1664. Controller.B2SSetData 81,0
  1665. Controller.B2SSetData 82,0
  1666. Controller.B2SSetData 83,0
  1667. Controller.B2SSetData 84,0
  1668. End If
  1669.  
  1670. If ShootAgainLight.state=0 then
  1671. Player=Player+1
  1672. else
  1673. ShootAgainLight.state=0
  1674. LightSamePlayer.state=0
  1675. 'ShootAgainReel.SetValue(0)
  1676. if B2SOn then
  1677. Controller.B2SSetShootAgain 0
  1678. end if
  1679. end if
  1680.  
  1681. 'GameOver
  1682.  
  1683. If Player>Players Then
  1684. BallInPlay=BallInPlay+1
  1685. If BallInPlay>BallsPerGame then
  1686. PlaySound("MotorLeer")
  1687. PlaySound"dxGoodnight"
  1688. EndMusic
  1689. GameOverMusic
  1690. InProgress=false
  1691.  
  1692. If B2SOn Then
  1693. Controller.B2SSetGameOver 1
  1694. Controller.B2SSetPlayerUp 0
  1695. Controller.B2SSetBallInPlay 0
  1696. Controller.B2SSetCanPlay 0
  1697. End If
  1698. For each obj in PlayerHuds
  1699. obj.state=0
  1700. next
  1701. If Table1.ShowDT = True then
  1702. For each obj in PlayerScores
  1703. obj.visible=1
  1704. Next
  1705. For each obj in PlayerScoresOn
  1706. obj.visible=0
  1707. Next
  1708. For each obj in PlayerHUDScores
  1709. obj.state=0
  1710. Next
  1711. end If
  1712. 'GameOverReel.SetValue(1)
  1713. LightGameOver.state=1
  1714. ' InstructCard.image="IC"+FormatNumber(BallsPerGame,0)+FormatNumber(TargetSetting,0)+"0"
  1715. ' CardLight1.State = ABS(CardLight1.State-1)
  1716. BallInPlayReel.SetValue(0)
  1717. BallInPlay001.state=0
  1718. BallInPlay002.state=0
  1719. BallInPlay003.state=0
  1720. BallInPlay004.state=0
  1721. BallInPlay005.state=0
  1722. CanPlay001.state=0
  1723. CanPlay002.state=0
  1724. CanPlay003.state=0
  1725. CanPlay004.state=0
  1726. LeftFlipper.RotateToStart
  1727. RightFlipper.RotateToStart
  1728. LightsOut
  1729. BumpersOff
  1730. PlasticsOff
  1731. checkmatch
  1732. CheckHighScore
  1733. Players=0
  1734.  
  1735.  
  1736. TimerTitle1.enabled=1
  1737. TimerTitle2.enabled=1
  1738. TimerTitle3.enabled=1
  1739. TimerTitle4.enabled=1
  1740. TimerTitle4.enabled=1
  1741. HighScoreTimer.interval=100
  1742. HighScoreTimer.enabled=True
  1743. Else
  1744. Player=1
  1745. If B2SOn Then
  1746. Controller.B2SSetPlayerUp Player
  1747. Controller.B2SSetBallInPlay BallInPlay
  1748.  
  1749. End If
  1750. ' PlaySound("RotateThruPlayers")
  1751. TempPlayerUp=Player
  1752. ' PlayerUpRotator.enabled=true
  1753. PlayStartBall.enabled=true
  1754. For each obj in PlayerHuds
  1755. obj.state=0
  1756. next
  1757. If Table1.ShowDT = True then
  1758. For each obj in PlayerScores
  1759. obj.visible=1
  1760. Next
  1761. For each obj in PlayerScoresOn
  1762. obj.visible=0
  1763. Next
  1764. For each obj in PlayerHUDScores
  1765. obj.state=0
  1766. Next
  1767. PlayerHuds(Player-1).state=1
  1768. PlayerHUDScores(Player-1).state=1
  1769. PlayerScores(Player-1).visible=0
  1770. PlayerScoresOn(Player-1).visible=1
  1771. end If
  1772.  
  1773. ResetBalls
  1774. End If
  1775. Else
  1776. If B2SOn Then
  1777. Controller.B2SSetPlayerUp Player
  1778. Controller.B2SSetBallInPlay BallInPlay
  1779. End If
  1780. ' PlaySound("RotateThruPlayers")
  1781. TempPlayerUp=Player
  1782. ' PlayerUpRotator.enabled=true
  1783. PlayStartBall.enabled=true
  1784. For each obj in PlayerHuds
  1785. obj.state=0
  1786. next
  1787. If Table1.ShowDT = True then
  1788. For each obj in PlayerScores
  1789. obj.visible=1
  1790. Next
  1791. For each obj in PlayerScoresOn
  1792. obj.visible=0
  1793. Next
  1794. For each obj in PlayerHUDScores
  1795. obj.state=0
  1796. Next
  1797. PlayerHuds(Player-1).state=1
  1798. PlayerHUDScores(Player-1).state=1
  1799. PlayerScores(Player-1).visible=0
  1800. PlayerScoresOn(Player-1).visible=1
  1801. end If
  1802. ResetBalls
  1803. End If
  1804.  
  1805. End sub
  1806.  
  1807. sub CheckHighScore
  1808. Dim playertops
  1809. dim si
  1810. dim sj
  1811. dim stemp
  1812. dim stempplayers
  1813. for i=1 to 4
  1814. sortscores(i)=0
  1815. sortplayers(i)=0
  1816. next
  1817. playertops=0
  1818. for i = 1 to Players
  1819. sortscores(i)=Score(i)
  1820. sortplayers(i)=i
  1821. next
  1822.  
  1823. for si = 1 to Players
  1824. for sj = 1 to Players-1
  1825. if sortscores(sj)>sortscores(sj+1) then
  1826. stemp=sortscores(sj+1)
  1827. stempplayers=sortplayers(sj+1)
  1828. sortscores(sj+1)=sortscores(sj)
  1829. sortplayers(sj+1)=sortplayers(sj)
  1830. sortscores(sj)=stemp
  1831. sortplayers(sj)=stempplayers
  1832. end if
  1833. next
  1834. next
  1835. ScoreChecker=4
  1836. CheckAllScores=1
  1837. NewHighScore sortscores(ScoreChecker),sortplayers(ScoreChecker)
  1838. savehs
  1839. end sub
  1840.  
  1841.  
  1842. sub checkmatch
  1843. Dim tempmatch
  1844. tempmatch=Int(Rnd*10)
  1845. Match=tempmatch*10
  1846. MatchReel.SetValue(tempmatch+1)
  1847.  
  1848. If B2SOn Then
  1849. If Match = 0 Then
  1850. Controller.B2SSetMatch 100
  1851. Else
  1852. Controller.B2SSetMatch Match
  1853. End If
  1854. End if
  1855. for i = 1 to Players
  1856. if (Match*10)=(Score(i) mod 100) then
  1857. AddSpecial
  1858. end if
  1859. next
  1860. end sub
  1861.  
  1862. Sub TiltTimer_Timer()
  1863. if TiltCount > 0 then TiltCount = TiltCount - 1
  1864. if TiltCount = 0 then
  1865. TiltTimer.Enabled = False
  1866. end if
  1867. end sub
  1868.  
  1869. Sub TiltIt()
  1870. TiltCount = TiltCount + 1
  1871. if TiltCount = 3 then
  1872. TableTilted=True
  1873. PlasticsOff
  1874. BumpersOff
  1875. LeftFlipper.RotateToStart
  1876. RightFlipper.RotateToStart
  1877. StopSound SoundFX("mxbuzz",DOFFlippers)
  1878. StopSound SoundFX("mxbuzzL",DOFFlippers)
  1879. LightTilt.state = 1
  1880. 'TiltReel.SetValue(1)
  1881. If B2Son then
  1882. Controller.B2SSetTilt 1
  1883. end if
  1884. else
  1885. TiltTimer.Interval = 500
  1886. TiltTimer.Enabled = True
  1887. end if
  1888.  
  1889. end sub
  1890.  
  1891.  
  1892.  
  1893. Sub PlayStartBall_timer()
  1894.  
  1895. PlayStartBall.enabled=false
  1896. PlaySound("StartBall1")
  1897. end sub
  1898.  
  1899. Sub PlayerUpRotator_timer()
  1900. If RotatorTemp<5 then
  1901. TempPlayerUp=TempPlayerUp+1
  1902. If TempPlayerUp>4 then
  1903. TempPlayerUp=1
  1904. end if
  1905. If B2SOn Then
  1906. Controller.B2SSetPlayerUp TempPlayerUp
  1907. End If
  1908.  
  1909. else
  1910. if B2SOn then
  1911. Controller.B2SSetPlayerUp Player
  1912. end if
  1913. PlayerUpRotator.enabled=false
  1914. RotatorTemp=1
  1915. end if
  1916. RotatorTemp=RotatorTemp+1
  1917.  
  1918.  
  1919. end sub
  1920.  
  1921. sub savehs
  1922. ' Based on Black's Highscore routines
  1923. Dim FileObj
  1924. Dim ScoreFile
  1925. Set FileObj=CreateObject("Scripting.FileSystemObject")
  1926. If Not FileObj.FolderExists(UserDirectory) then
  1927. Exit Sub
  1928. End if
  1929. Set ScoreFile=FileObj.CreateTextFile(UserDirectory & HSFileName,True)
  1930. ScoreFile.WriteLine 0
  1931. ScoreFile.WriteLine Credits
  1932. scorefile.writeline BallsPerGame
  1933. scorefile.writeline ChimesOn
  1934. scorefile.writeline ReplayLevel
  1935. scorefile.writeline GameOption
  1936. scorefile.writeline CircusSetting
  1937. for xx=1 to 5
  1938. scorefile.writeline HSScore(xx)
  1939. next
  1940. for xx=1 to 5
  1941. scorefile.writeline HSName(xx)
  1942. next
  1943. ScoreFile.Close
  1944. Set ScoreFile=Nothing
  1945. Set FileObj=Nothing
  1946. end sub
  1947.  
  1948. sub SaveLMEMConfig
  1949. Dim FileObj
  1950. Dim LMConfig
  1951. dim temp1
  1952. dim tempb2s
  1953. tempb2s=0
  1954. if B2SOn=true then
  1955. tempb2s=1
  1956. else
  1957. tempb2s=0
  1958. end if
  1959. Set FileObj=CreateObject("Scripting.FileSystemObject")
  1960. If Not FileObj.FolderExists(UserDirectory) then
  1961. Exit Sub
  1962. End if
  1963. Set LMConfig=FileObj.CreateTextFile(UserDirectory & LMEMTableConfig,True)
  1964. LMConfig.WriteLine tempb2s
  1965. LMConfig.Close
  1966. Set LMConfig=Nothing
  1967. Set FileObj=Nothing
  1968.  
  1969. end Sub
  1970.  
  1971. sub LoadLMEMConfig
  1972. Dim FileObj
  1973. Dim LMConfig
  1974. dim tempC
  1975. dim tempb2s
  1976.  
  1977. Set FileObj=CreateObject("Scripting.FileSystemObject")
  1978. If Not FileObj.FolderExists(UserDirectory) then
  1979. Exit Sub
  1980. End if
  1981. If Not FileObj.FileExists(UserDirectory & LMEMTableConfig) then
  1982. Exit Sub
  1983. End if
  1984. Set LMConfig=FileObj.GetFile(UserDirectory & LMEMTableConfig)
  1985. Set TextStr2=LMConfig.OpenAsTextStream(1,0)
  1986. If (TextStr2.AtEndOfStream=True) then
  1987. Exit Sub
  1988. End if
  1989. tempC=TextStr2.ReadLine
  1990. TextStr2.Close
  1991. tempb2s=cdbl(tempC)
  1992. if tempb2s=0 then
  1993. B2SOn=false
  1994. else
  1995. B2SOn=true
  1996. end if
  1997. Set LMConfig=Nothing
  1998. Set FileObj=Nothing
  1999. end sub
  2000.  
  2001. sub SaveLMEMConfig2
  2002. If ShadowConfigFile=false then exit sub
  2003. Dim FileObj
  2004. Dim LMConfig2
  2005. dim temp1
  2006. dim temp2
  2007. dim tempBS
  2008. dim tempFS
  2009.  
  2010. if EnableFlipperShadow=true then
  2011. tempFS=1
  2012. else
  2013. tempFS=0
  2014. end if
  2015.  
  2016. Set FileObj=CreateObject("Scripting.FileSystemObject")
  2017. If Not FileObj.FolderExists(UserDirectory) then
  2018. Exit Sub
  2019. End if
  2020. Set LMConfig2=FileObj.CreateTextFile(UserDirectory & LMEMShadowConfig,True)
  2021. LMConfig2.WriteLine tempBS
  2022. LMConfig2.WriteLine tempFS
  2023. LMConfig2.Close
  2024. Set LMConfig2=Nothing
  2025. Set FileObj=Nothing
  2026.  
  2027. end Sub
  2028.  
  2029. sub LoadLMEMConfig2
  2030. If ShadowConfigFile=false then
  2031. EnableFlipperShadow = ShadowFlippersOn
  2032. exit sub
  2033. end if
  2034. Dim FileObj
  2035. Dim LMConfig2
  2036. dim tempC
  2037. dim tempD
  2038. dim tempFS
  2039. dim tempBS
  2040.  
  2041. Set FileObj=CreateObject("Scripting.FileSystemObject")
  2042. If Not FileObj.FolderExists(UserDirectory) then
  2043. Exit Sub
  2044. End if
  2045. If Not FileObj.FileExists(UserDirectory & LMEMShadowConfig) then
  2046. Exit Sub
  2047. End if
  2048. Set LMConfig2=FileObj.GetFile(UserDirectory & LMEMShadowConfig)
  2049. Set TextStr2=LMConfig2.OpenAsTextStream(1,0)
  2050. If (TextStr2.AtEndOfStream=True) then
  2051. Exit Sub
  2052. End if
  2053. tempC=TextStr2.ReadLine
  2054. tempD=TextStr2.Readline
  2055. TextStr2.Close
  2056. tempBS=cdbl(tempC)
  2057. tempFS=cdbl(tempD)
  2058. if tempFS=0 then
  2059. EnableFlipperShadow=false
  2060. FlipperLSh.visible=false
  2061. FLipperRSh.visible=false
  2062. else
  2063. EnableFlipperShadow=true
  2064. end if
  2065. Set LMConfig2=Nothing
  2066. Set FileObj=Nothing
  2067.  
  2068. end sub
  2069.  
  2070.  
  2071. sub loadhs
  2072. ' Based on Black's Highscore routines
  2073. Dim FileObj
  2074. Dim ScoreFile
  2075. dim temp1
  2076. dim temp2
  2077. dim temp3
  2078. dim temp4
  2079. dim temp5
  2080. dim temp6
  2081. dim temp7
  2082.  
  2083. dim temp8
  2084. dim temp9
  2085. dim temp10
  2086. dim temp11
  2087. dim temp12
  2088. dim temp13
  2089. dim temp14
  2090. dim temp15
  2091. dim temp16
  2092. dim temp17
  2093.  
  2094. Set FileObj=CreateObject("Scripting.FileSystemObject")
  2095. If Not FileObj.FolderExists(UserDirectory) then
  2096. Exit Sub
  2097. End if
  2098. If Not FileObj.FileExists(UserDirectory & HSFileName) then
  2099. Exit Sub
  2100. End if
  2101. Set ScoreFile=FileObj.GetFile(UserDirectory & HSFileName)
  2102. Set TextStr=ScoreFile.OpenAsTextStream(1,0)
  2103. If (TextStr.AtEndOfStream=True) then
  2104. Exit Sub
  2105. End if
  2106. temp1=TextStr.ReadLine
  2107. temp2=textstr.readline
  2108. temp3=textstr.readline
  2109. temp4=textstr.readline
  2110. temp5=textstr.readline
  2111. temp6=textstr.readline
  2112. temp7=textstr.readline
  2113.  
  2114. HighScore=cdbl(temp1)
  2115. if HighScore<1 then
  2116. temp8=textstr.readline
  2117. temp9=textstr.readline
  2118. temp10=textstr.readline
  2119. temp11=textstr.readline
  2120. temp12=textstr.readline
  2121. temp13=textstr.readline
  2122. temp14=textstr.readline
  2123. temp15=textstr.readline
  2124. temp16=textstr.readline
  2125. temp17=textstr.readline
  2126. end if
  2127.  
  2128. TextStr.Close
  2129. Credits=cdbl(temp2)
  2130. BallsPerGame=cdbl(temp3)
  2131. ChimesOn=cdbl(temp4)
  2132. ReplayLevel=cdbl(temp5)
  2133. GameOption=cdbl(temp6)
  2134. CircusSetting=cdbl(temp7)
  2135. if HighScore<1 then
  2136. HSScore(1) = int(temp8)
  2137. HSScore(2) = int(temp9)
  2138. HSScore(3) = int(temp10)
  2139. HSScore(4) = int(temp11)
  2140. HSScore(5) = int(temp12)
  2141.  
  2142. HSName(1) = temp13
  2143. HSName(2) = temp14
  2144. HSName(3) = temp15
  2145. HSName(4) = temp16
  2146. HSName(5) = temp17
  2147. end if
  2148. Set ScoreFile=Nothing
  2149. Set FileObj=Nothing
  2150. end sub
  2151.  
  2152. Sub DisplayHighScore
  2153.  
  2154.  
  2155. end sub
  2156.  
  2157. sub InitPauser5_timer
  2158.  
  2159. DisplayHighScore
  2160. CreditsReel.SetValue(Credits)
  2161. InitPauser5.enabled=false
  2162. end sub
  2163.  
  2164.  
  2165.  
  2166. sub BumpersOff
  2167.  
  2168. BumpLight1.visible=0
  2169. BumpLight2.visible=0
  2170. BumpLight3.visible=0
  2171.  
  2172.  
  2173. end sub
  2174.  
  2175. sub BumpersOn
  2176.  
  2177.  
  2178. BumpLight1.visible=1
  2179. BumpLight2.visible=1
  2180. BumpLight3.visible=1
  2181.  
  2182.  
  2183. end sub
  2184.  
  2185. Sub PlasticsOn
  2186.  
  2187. For each obj in Flashers
  2188. obj.visible=1
  2189. playfield_off.visible=0
  2190. layer1.image="layer1"
  2191. layer2.image="layer2"
  2192. layer3.image="layer3"
  2193. metal.image="metal"
  2194. backmetal.image="backmetal"
  2195. bracket.image="bakery"
  2196. next
  2197.  
  2198.  
  2199.  
  2200. end sub
  2201.  
  2202. Sub PlasticsOff
  2203.  
  2204. For each obj in Flashers
  2205. obj.visible=0
  2206. playfield_off.visible=1
  2207. layer1.image="layer1off"
  2208. layer2.image="layer2off"
  2209. layer3.image="layer3off"
  2210. metal.image="metaloff"
  2211. backmetal.image="backmetaloff"
  2212. bracket.image="bakeryoff"
  2213. next
  2214.  
  2215.  
  2216.  
  2217. StopSound "mxbuzz"
  2218. StopSound "mxbuzzL"
  2219. end sub
  2220.  
  2221. Sub SetupReplayTables
  2222.  
  2223. Replay1Table(1)=59000
  2224. Replay1Table(2)=59000
  2225. Replay1Table(3)=72000
  2226. Replay1Table(4)=80000
  2227. Replay1Table(5)=88000
  2228. Replay1Table(6)=88000
  2229. Replay1Table(7)=94000
  2230. Replay1Table(8)=96000
  2231. Replay1Table(9)=100000
  2232. Replay1Table(10)=100000
  2233. Replay1Table(11)=112000
  2234. Replay1Table(12)=112000
  2235. Replay1Table(13)=116000
  2236. Replay1Table(14)=120000
  2237. Replay1Table(15)=120000
  2238. Replay1Table(16)=120000
  2239. Replay1Table(17)=132000
  2240. Replay1Table(18)=138000
  2241.  
  2242. Replay2Table(1)=114000
  2243. Replay2Table(2)=140000
  2244. Replay2Table(3)=118000
  2245. Replay2Table(4)=118000
  2246. Replay2Table(5)=120000
  2247. Replay2Table(6)=132000
  2248. Replay2Table(7)=132000
  2249. Replay2Table(8)=132000
  2250. Replay2Table(9)=134000
  2251. Replay2Table(10)=134000
  2252. Replay2Table(11)=134000
  2253. Replay2Table(12)=140000
  2254. Replay2Table(13)=138000
  2255. Replay2Table(14)=138000
  2256. Replay2Table(15)=162000
  2257. Replay2Table(16)=139000
  2258. Replay2Table(17)=134000
  2259. Replay2Table(18)=170000
  2260.  
  2261. Replay3Table(1)=166000
  2262. Replay3Table(2)=168000
  2263. Replay3Table(3)=164000
  2264. Replay3Table(4)=162000
  2265. Replay3Table(5)=162000
  2266. Replay3Table(6)=9990000
  2267. Replay3Table(7)=166000
  2268. Replay3Table(8)=9990000
  2269. Replay3Table(9)=9990000
  2270. Replay3Table(10)=168000
  2271. Replay3Table(11)=168000
  2272. Replay3Table(12)=9990000
  2273. Replay3Table(13)=170000
  2274. Replay3Table(14)=9990000
  2275. Replay3Table(15)=9990000
  2276. Replay3Table(16)=168000
  2277. Replay3Table(17)=9990000
  2278. Replay3Table(18)=9990000
  2279.  
  2280.  
  2281. Replay4Table(1)=9990000
  2282. Replay4Table(2)=9990000
  2283. Replay4Table(3)=9990000
  2284. Replay4Table(4)=9990000
  2285. Replay4Table(5)=9990000
  2286. Replay4Table(6)=9990000
  2287. Replay4Table(7)=9990000
  2288. Replay4Table(8)=9990000
  2289. Replay4Table(9)=9990000
  2290. Replay4Table(10)=9990000
  2291. Replay4Table(11)=9990000
  2292. Replay4Table(12)=9990000
  2293. Replay4Table(13)=9990000
  2294. Replay4Table(14)=9990000
  2295. Replay4Table(15)=9990000
  2296. Replay4Table(16)=9990000
  2297. Replay4Table(17)=9990000
  2298. Replay4Table(18)=9990000
  2299.  
  2300. ReplayTableMax=18
  2301.  
  2302.  
  2303. end sub
  2304.  
  2305. Sub RefreshReplayCard
  2306. Dim tempst1
  2307. Dim tempst2
  2308.  
  2309. tempst1=FormatNumber(BallsPerGame,0)
  2310. tempst2=FormatNumber(ReplayLevel,0)
  2311.  
  2312.  
  2313. ReplayCard.image = "SC" + tempst2
  2314. Replay1=Replay1Table(ReplayLevel)
  2315. Replay2=Replay2Table(ReplayLevel)
  2316. Replay3=Replay3Table(ReplayLevel)
  2317. Replay4=Replay4Table(ReplayLevel)
  2318. ' CardLight2.State = ABS(CardLight2.State-1)
  2319. end sub
  2320.  
  2321.  
  2322. '****************************************
  2323. ' SCORE MOTOR
  2324. '****************************************
  2325.  
  2326. ScoreMotorTimer.Enabled = 1
  2327. ScoreMotorTimer.Interval = 135 '135
  2328. AddScoreTimer.Enabled = 1
  2329. AddScoreTimer.Interval = 135
  2330.  
  2331. Dim queuedscore
  2332. Dim MotorMode
  2333. Dim MotorPosition
  2334.  
  2335. Sub SetMotor(y)
  2336. Select Case ScoreMotorAdjustment
  2337. Case 0:
  2338. queuedscore=queuedscore+y
  2339. Case 1:
  2340. If MotorRunning<>1 And InProgress=true then
  2341. queuedscore=queuedscore+y
  2342. end if
  2343. end Select
  2344. end sub
  2345.  
  2346. Sub SetMotor2(x)
  2347. If MotorRunning<>1 And InProgress=true then
  2348. MotorRunning=1
  2349.  
  2350. Select Case x
  2351. Case 40:
  2352. MotorMode=10
  2353. MotorPosition=4
  2354. Case 50:
  2355. MotorMode=10
  2356. MotorPosition=5
  2357.  
  2358. Case 500:
  2359. MotorMode=100
  2360. MotorPosition=5
  2361.  
  2362. Case 1000:
  2363. MotorMode=1000
  2364. MotorPosition=1
  2365.  
  2366. Case 3000:
  2367. MotorMode=1000
  2368. MotorPosition=3
  2369.  
  2370. Case 5000:
  2371. MotorMode=1000
  2372. MotorPosition=5
  2373.  
  2374. Case 10000:
  2375. MotorMode=10000
  2376. MotorPosition=1
  2377. Case 20000:
  2378. MotorMode=10000
  2379. MotorPosition=2
  2380.  
  2381. Case 30000:
  2382. MotorMode=10000
  2383. MotorPosition=3
  2384.  
  2385. Case 40000:
  2386. MotorMode=10000
  2387. MotorPosition=4
  2388.  
  2389. Case 50000:
  2390. MotorMode=10000
  2391. MotorPosition=5
  2392.  
  2393. End Select
  2394. End If
  2395. End Sub
  2396.  
  2397. Sub AddScoreTimer_Timer
  2398. Dim tempscore
  2399.  
  2400.  
  2401. If MotorRunning<>1 And InProgress=true then
  2402. if queuedscore>=50000 then
  2403. tempscore=50000
  2404. queuedscore=queuedscore-50000
  2405. SetMotor2(50000)
  2406. exit sub
  2407. end if
  2408. if queuedscore>=40000 then
  2409. tempscore=4000
  2410. queuedscore=queuedscore-40000
  2411. SetMotor2(40000)
  2412. exit sub
  2413. end if
  2414.  
  2415. if queuedscore>=30000 then
  2416. tempscore=30000
  2417. queuedscore=queuedscore-30000
  2418. SetMotor2(30000)
  2419. exit sub
  2420. end if
  2421.  
  2422. if queuedscore>=20000 then
  2423. tempscore=20000
  2424. queuedscore=queuedscore-20000
  2425. SetMotor2(20000)
  2426. exit sub
  2427. end if
  2428.  
  2429. if queuedscore>=10000 then
  2430. tempscore=10000
  2431. queuedscore=queuedscore-10000
  2432. SetMotor2(10000)
  2433. exit sub
  2434. end if
  2435.  
  2436. if queuedscore>=5000 then
  2437. tempscore=5000
  2438. queuedscore=queuedscore-5000
  2439. SetMotor2(5000)
  2440. exit sub
  2441. end if
  2442.  
  2443. if queuedscore>=3000 then
  2444. tempscore=3000
  2445. queuedscore=queuedscore-3000
  2446. SetMotor2(3000)
  2447. exit sub
  2448. end if
  2449.  
  2450. if queuedscore>=1000 then
  2451. tempscore=1000
  2452. queuedscore=queuedscore-1000
  2453. SetMotor2(1000)
  2454. exit sub
  2455. end if
  2456.  
  2457. if queuedscore>=500 then
  2458. tempscore=500
  2459. queuedscore=queuedscore-500
  2460. SetMotor2(500)
  2461. exit sub
  2462. end if
  2463.  
  2464. if queuedscore>=50 then
  2465. tempscore=50
  2466. queuedscore=queuedscore-50
  2467. SetMotor2(50)
  2468. exit sub
  2469. end if
  2470.  
  2471. if queuedscore>=40 then
  2472. tempscore=40
  2473. queuedscore=queuedscore-40
  2474. SetMotor2(40)
  2475. exit sub
  2476. end if
  2477.  
  2478. End If
  2479.  
  2480.  
  2481. end Sub
  2482.  
  2483. Sub ScoreMotorTimer_Timer
  2484. If MotorPosition > 0 Then
  2485. Select Case MotorPosition
  2486. Case 5,4,3,2:
  2487. If MotorMode=10000 Then
  2488. AddScore(10000)
  2489. end if
  2490. if MotorMode=1000 then
  2491. AddScore(1000)
  2492. End If
  2493. if MotorMode=100 then
  2494. AddScore(100)
  2495. End if
  2496. if MotorMode=10 then
  2497. AddScore(10)
  2498. End if
  2499. MotorPosition=MotorPosition-1
  2500. Case 1:
  2501. If MotorMode=10000 Then
  2502. AddScore(10000)
  2503. end if
  2504. If MotorMode=1000 then
  2505. AddScore(1000)
  2506. End If
  2507. if MotorMode=100 then
  2508. AddScore(100)
  2509. End if
  2510. if MotorMode=10 then
  2511. AddScore(10)
  2512. End if
  2513. MotorPosition=0:MotorRunning=0
  2514. End Select
  2515. End If
  2516. End Sub
  2517.  
  2518.  
  2519. Sub AddScore(x)
  2520. If TableTilted=true then exit sub
  2521. Select Case ScoreAdditionAdjustment
  2522. Case 0:
  2523. AddScore1(x)
  2524. Case 1:
  2525. AddScore2(x)
  2526. end Select
  2527.  
  2528. end sub
  2529.  
  2530.  
  2531. Sub AddScore1(x)
  2532. ' debugtext.text=score
  2533. Select Case x
  2534. Case 10:
  2535. PlayChime(10)
  2536. Score(Player)=Score(Player)+10
  2537. ' If DoubleBonus.state=1 then
  2538. ' Score(Player)=Score(Player)+10
  2539. ' end if
  2540. ToggleAlternatingRelay
  2541. Case 100:
  2542. PlayChime(100)
  2543. Score(Player)=Score(Player)+100
  2544. ' If DoubleBonus.state=1 then
  2545. ' Score(Player)=Score(Player)+100
  2546. ' end if
  2547.  
  2548. ' debugscore=debugscore+10
  2549.  
  2550. Case 1000:
  2551. PlayChime(1000)
  2552. Score(Player)=Score(Player)+1000
  2553. ' If DoubleBonus.state=1 then
  2554. ' Score(Player)=Score(Player)+1000
  2555. ' end if
  2556.  
  2557. ' debugscore=debugscore+100
  2558.  
  2559.  
  2560. Case 10000:
  2561. PlayChime(10000)
  2562. Score(Player)=Score(Player)+10000
  2563. ' If DoubleBonus.state=1 then
  2564. ' Score(Player)=Score(Player)+10000
  2565. ' end if
  2566.  
  2567. ' debugscore=debugscore+1000
  2568.  
  2569. Case 100000:
  2570. PlayChime(10000)
  2571. Score(Player)=Score(Player)+100000
  2572. ' If DoubleBonus.state=1 then
  2573. ' Score(Player)=Score(Player)+10000
  2574. ' end if
  2575.  
  2576. ' debugscore=debugscore+1000
  2577.  
  2578.  
  2579. End Select
  2580. PlayerScores(Player-1).AddValue(x)
  2581. PlayerScoresOn(Player-1).AddValue(x)
  2582. ' if DoubleBonus.state=1 then
  2583. ' PlayerScores(Player-1).AddValue(x)
  2584. ' end if
  2585. If ScoreDisplay(Player)<100000 then
  2586. ScoreDisplay(Player)=Score(Player)
  2587. Else
  2588. Score100K(Player)=Int(Score(Player)/100000)
  2589. ScoreDisplay(Player)=Score(Player)-100000
  2590. End If
  2591. if Score(Player)=>100000 then
  2592. EVAL("RollReel00"&Player).Setvalue(Score100K(Player))
  2593.  
  2594. If B2SOn Then
  2595. If Player=1 Then
  2596. Controller.B2SSetScoreRolloverPlayer1 Score100K(Player)
  2597. End If
  2598. If Player=2 Then
  2599. Controller.B2SSetScoreRolloverPlayer2 Score100K(Player)
  2600. End If
  2601.  
  2602. If Player=3 Then
  2603. Controller.B2SSetScoreRolloverPlayer3 Score100K(Player)
  2604. End If
  2605.  
  2606. If Player=4 Then
  2607. Controller.B2SSetScoreRolloverPlayer4 Score100K(Player)
  2608. End If
  2609. End If
  2610. End If
  2611. If B2SOn Then
  2612. Controller.B2SSetScorePlayer Player, ScoreDisplay(Player)
  2613. End If
  2614. If Score(Player)>Replay1 and Replay1Paid(Player)=false then
  2615. Replay1Paid(Player)=True
  2616. AddSpecial
  2617. End If
  2618. If Score(Player)>Replay2 and Replay2Paid(Player)=false then
  2619. Replay2Paid(Player)=True
  2620. AddSpecial
  2621. End If
  2622. If Score(Player)>Replay3 and Replay3Paid(Player)=false then
  2623. Replay3Paid(Player)=True
  2624. AddSpecial
  2625. End If
  2626. If Score(Player)>Replay4 and Replay4Paid(Player)=false then
  2627. Replay4Paid(Player)=True
  2628. AddSpecial
  2629. End If
  2630. ' ScoreText.text=debugscore
  2631. End Sub
  2632.  
  2633. Sub AddScore2(x)
  2634. Dim OldScore, NewScore, OldTestScore, NewTestScore
  2635. OldScore = Score(Player)
  2636.  
  2637. Select Case x
  2638. Case 10:
  2639. Score(Player)=Score(Player)+10
  2640. ' If DoubleBonus.state=1 then
  2641. ' Score(Player)=Score(Player)+10
  2642. ' end if
  2643.  
  2644. Case 100:
  2645. Score(Player)=Score(Player)+100
  2646. ' If DoubleBonus.state=1 then
  2647. ' Score(Player)=Score(Player)+100
  2648. ' end if
  2649.  
  2650. Case 1000:
  2651. Score(Player)=Score(Player)+1000
  2652. ' If DoubleBonus.state=1 then
  2653. ' Score(Player)=Score(Player)+1000
  2654. ' end if
  2655.  
  2656. Case 10000:
  2657. Score(Player)=Score(Player)+10000
  2658. ' If DoubleBonus.state=1 then
  2659. ' Score(Player)=Score(Player)+10000
  2660. ' end if
  2661.  
  2662. Case 100000:
  2663. Score(Player)=Score(Player)+100000
  2664. ' If DoubleBonus.state=1 then
  2665. ' Score(Player)=Score(Player)+100000
  2666. ' end if
  2667.  
  2668. End Select
  2669. if Score(Player)=>100000 then
  2670. If Score100K(Player)<1 then
  2671. PlaySound"Ballymxmxbuzzfer"
  2672. EVAL("RollReel00"&Player).Setvalue(1)
  2673. If B2SOn Then
  2674. If Player=1 Then
  2675. Controller.B2SSetScoreRolloverPlayer1 1
  2676. End If
  2677. If Player=2 Then
  2678. Controller.B2SSetScoreRolloverPlayer2 1
  2679. End If
  2680.  
  2681. If Player=3 Then
  2682. Controller.B2SSetScoreRolloverPlayer3 1
  2683. End If
  2684.  
  2685. If Player=4 Then
  2686. Controller.B2SSetScoreRolloverPlayer4 1
  2687. End If
  2688. End If
  2689. end if
  2690. Score100K(Player)=1
  2691. End If
  2692. NewScore = Score(Player)
  2693.  
  2694. OldTestScore = OldScore
  2695. NewTestScore = NewScore
  2696. Do
  2697. if OldTestScore < Replay1 and NewTestScore >= Replay1 then
  2698. AddSpecial()
  2699. NewTestScore = 0
  2700. Elseif OldTestScore < Replay2 and NewTestScore >= Replay2 then
  2701. AddSpecial()
  2702. NewTestScore = 0
  2703. Elseif OldTestScore < Replay3 and NewTestScore >= Replay3 then
  2704. AddSpecial()
  2705. NewTestScore = 0
  2706. Elseif OldTestScore < Replay4 and NewTestScore >= Replay4 then
  2707. AddSpecial()
  2708. NewTestScore = 0
  2709. End if
  2710. NewTestScore = NewTestScore - 1000000
  2711. OldTestScore = OldTestScore - 1000000
  2712. Loop While NewTestScore > 0
  2713.  
  2714. OldScore = int(OldScore / 10) ' divide by 10 for games with fixed 0 in 1s position, by 1 for games with real 1s digits
  2715. NewScore = int(NewScore / 10) ' divide by 10 for games with fixed 0 in 1s position, by 1 for games with real 1s digits
  2716. ' MsgBox("OldScore="&OldScore&", NewScore="&NewScore&", OldScore Mod 10="&OldScore Mod 10 & ", NewScore % 10="&NewScore Mod 10)
  2717.  
  2718. if (OldScore Mod 10 <> NewScore Mod 10) then
  2719. PlayChime(10)
  2720. ToggleAlternatingRelay
  2721. end if
  2722.  
  2723. OldScore = int(OldScore / 10)
  2724. NewScore = int(NewScore / 10)
  2725. ' MsgBox("OldScore="&OldScore&", NewScore="&NewScore)
  2726. if (OldScore Mod 10 <> NewScore Mod 10) then
  2727. PlayChime(100)
  2728.  
  2729.  
  2730. end if
  2731.  
  2732. OldScore = int(OldScore / 10)
  2733. NewScore = int(NewScore / 10)
  2734. ' MsgBox("OldScore="&OldScore&", NewScore="&NewScore)
  2735. if (OldScore Mod 10 <> NewScore Mod 10) then
  2736. PlayChime(1000)
  2737.  
  2738.  
  2739.  
  2740. end if
  2741.  
  2742. OldScore = int(OldScore / 10)
  2743. NewScore = int(NewScore / 10)
  2744. ' MsgBox("OldScore="&OldScore&", NewScore="&NewScore)
  2745. if (OldScore Mod 10 <> NewScore Mod 10) then
  2746. PlayChime(10000)
  2747. end if
  2748.  
  2749. If B2SOn Then
  2750. Controller.B2SSetScorePlayer Player, Score(Player)
  2751. End If
  2752.  
  2753. OldScore = int(OldScore / 10)
  2754. NewScore = int(NewScore / 10)
  2755. ' MsgBox("OldScore="&OldScore&", NewScore="&NewScore)
  2756. if (OldScore Mod 10 <> NewScore Mod 10) then
  2757. PlayChime(10000)
  2758. end if
  2759.  
  2760. If B2SOn Then
  2761. Controller.B2SSetScorePlayer Player, Score(Player)
  2762. End If
  2763. ' EMReel1.SetValue Score(Player)
  2764. PlayerScores(Player-1).AddValue(x)
  2765. PlayerScoresOn(Player-1).AddValue(x)
  2766. ' If DoubleBonus.state=1 then
  2767. ' PlayerScores(Player-1).AddValue(x)
  2768. ' end if
  2769. End Sub
  2770.  
  2771.  
  2772.  
  2773. Sub PlayChime(x)
  2774. if ChimesOn=0 then
  2775. Select Case x
  2776. Case 10
  2777.  
  2778. PlaySound SoundFXDOF("mxBell0",141,DOFPulse,DOFChimes)
  2779.  
  2780. Case 100
  2781.  
  2782. PlaySound SoundFXDOF("mxBell000",142,DOFPulse,DOFChimes)
  2783. Case 1000
  2784.  
  2785. PlaySound SoundFXDOF("mxBell0000",143,DOFPulse,DOFChimes)
  2786. End Select
  2787. else
  2788. Select Case x
  2789. Case 10
  2790. If LastChime10=1 Then
  2791. PlaySound SoundFXDOF("SJ_Chime_10a",141,DOFPulse,DOFChimes)
  2792. LastChime10=0
  2793. Else
  2794. PlaySound SoundFXDOF("SJ_Chime_10b",141,DOFPulse,DOFChimes)
  2795. LastChime10=1
  2796. End If
  2797. Case 100
  2798. If LastChime100=1 Then
  2799. PlaySound SoundFXDOF("SJ_Chime_100a",142,DOFPulse,DOFChimes)
  2800. LastChime100=0
  2801. Else
  2802. PlaySound SoundFXDOF("SJ_Chime_100b",142,DOFPulse,DOFChimes)
  2803. LastChime100=1
  2804. End If
  2805. Case 1000
  2806. If LastChime1000=1 Then
  2807. PlaySound SoundFXDOF("SJ_Chime_1000a",143,DOFPulse,DOFChimes)
  2808. LastChime1000=0
  2809. Else
  2810. PlaySound SoundFXDOF("SJ_Chime_1000b",143,DOFPulse,DOFChimes)
  2811. LastChime1000=1
  2812. End If
  2813. End Select
  2814. end if
  2815. End Sub
  2816.  
  2817.  
  2818. Sub HideOptions()
  2819.  
  2820. end sub
  2821.  
  2822. '*****************************************
  2823. ' FLIPPER SHADOWS
  2824. '*****************************************
  2825.  
  2826. sub FlipperTimer_Timer()
  2827.  
  2828. End Sub
  2829.  
  2830. '*********************************************************************
  2831. ' Positional Sound Playback Functions
  2832. '*********************************************************************
  2833.  
  2834. ' Play a sound, depending on the X,Y position of the table element (especially cool for surround speaker setups, otherwise stereo panning only)
  2835. ' parameters (defaults): loopcount (1), volume (1), randompitch (0), pitch (0), useexisting (0), restart (1))
  2836. ' Note that this will not work (currently) for walls/slingshots as these do not feature a simple, single X,Y position
  2837. Sub PlayXYSound(soundname, tableobj, loopcount, volume, randompitch, pitch, useexisting, restart)
  2838. PlaySound soundname, loopcount, volume, AudioPan(tableobj), randompitch, pitch, useexisting, restart, AudioFade(tableobj)
  2839. End Sub
  2840.  
  2841. ' Similar subroutines that are less complicated to use (e.g. simply use standard parameters for the PlaySound call)
  2842. Sub PlaySoundAt(soundname, tableobj)
  2843. PlaySound soundname, 1, 1, AudioPan(tableobj), 0,0,0, 1, AudioFade(tableobj)
  2844. End Sub
  2845.  
  2846. Sub PlaySoundAtBall(soundname)
  2847. PlaySoundAt soundname, ActiveBall
  2848. End Sub
  2849.  
  2850.  
  2851. '*********************************************************************
  2852. ' Supporting Ball & Sound Functions
  2853. '*********************************************************************
  2854.  
  2855. Function AudioFade(tableobj) ' Fades between front and back of the table (for surround systems or 2x2 speakers, etc), depending on the Y position on the table. "table1" is the name of the table
  2856. Dim tmp
  2857. tmp = tableobj.y * 2 / table1.height-1
  2858. If tmp > 0 Then
  2859. AudioFade = Csng(tmp ^10)
  2860. Else
  2861. AudioFade = Csng(-((- tmp) ^10) )
  2862. End If
  2863. End Function
  2864.  
  2865. Function AudioPan(tableobj) ' Calculates the pan for a tableobj based on the X position on the table. "table1" is the name of the table
  2866. Dim tmp
  2867. tmp = tableobj.x * 2 / table1.width-1
  2868. If tmp > 0 Then
  2869. AudioPan = Csng(tmp ^10)
  2870. Else
  2871. AudioPan = Csng(-((- tmp) ^10) )
  2872. End If
  2873. End Function
  2874.  
  2875. Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed
  2876. Vol = Csng(BallVel(ball) ^2 / 2000)
  2877. End Function
  2878.  
  2879. Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed
  2880. Pitch = BallVel(ball) * 20
  2881. End Function
  2882.  
  2883. Function BallVel(ball) 'Calculates the ball speed
  2884. BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) )
  2885. End Function
  2886.  
  2887. '*****************************************
  2888. ' JP's VP10 Rolling Sounds
  2889. '*****************************************
  2890.  
  2891. Const tnob = 3 ' total number of balls
  2892. ReDim rolling(tnob)
  2893. InitRolling
  2894.  
  2895. Sub InitRolling
  2896. Dim i
  2897. For i = 0 to tnob
  2898. rolling(i) = False
  2899. Next
  2900. End Sub
  2901.  
  2902. Sub RollingSoundTimer_Timer()
  2903. Dim BOT, b
  2904. BOT = GetBalls
  2905.  
  2906. ' stop the sound of deleted balls
  2907. For b = UBound(BOT) + 1 to tnob
  2908. rolling(b) = False
  2909. StopSound("fx_ballrolling" & b)
  2910. Next
  2911.  
  2912. ' exit the sub if no balls on the table
  2913. If UBound(BOT) = -1 Then Exit Sub
  2914.  
  2915. ' play the rolling sound for each ball
  2916. For b = 0 to UBound(BOT)
  2917. If BallVel(BOT(b) ) > 1 AND BOT(b).z < 30 Then
  2918. rolling(b) = True
  2919. PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b)), AudioPan(BOT(b)), 0, Pitch(BOT(b)), 1, 0, AudioFade(BOT(b))
  2920. Else
  2921. If rolling(b) = True Then
  2922. StopSound("fx_ballrolling" & b)
  2923. rolling(b) = False
  2924. End If
  2925. End If
  2926. Next
  2927. End Sub
  2928.  
  2929. '**********************
  2930. ' Ball Collision Sound
  2931. '**********************
  2932.  
  2933. Sub OnBallBallCollision(ball1, ball2, velocity)
  2934. PlaySound("fx_collide"), 0, Csng(velocity) ^2 / 2000, AudioPan(ball1), 0, Pitch(ball1), 0, 0, AudioFade(ball1)
  2935. End Sub
  2936.  
  2937.  
  2938. '*****************************************
  2939. ' BALL SHADOW
  2940. '*****************************************
  2941. Dim BallShadow
  2942. BallShadow = Array (BallShadow001,BallShadow002,BallShadow003)
  2943.  
  2944. Sub BallShadowUpdate_timer()
  2945. Dim BOT, b
  2946. BOT = GetBalls
  2947. ' hide shadow of deleted balls
  2948. If UBound(BOT)<(tnob-1) Then
  2949. For b = (UBound(BOT) + 1) to (tnob-1)
  2950. BallShadow(b).visible = 0
  2951. Next
  2952. End If
  2953. ' exit the Sub if no balls on the table
  2954. If UBound(BOT) = -1 Then Exit Sub
  2955. ' render the shadow for each ball
  2956. For b = 0 to UBound(BOT)
  2957. If BOT(b).X < Table1.Width/2 Then
  2958. BallShadow(b).X = ((BOT(b).X) + ((BOT(b).X - (Table1.Width/2))/7))
  2959. Else
  2960. BallShadow(b).X = ((BOT(b).X) + ((BOT(b).X - (Table1.Width/2))/7))
  2961. End If
  2962. ballShadow(b).Y = BOT(b).Y + 10
  2963. If BOT(b).Z > 20 Then
  2964. BallShadow(b).visible = 1
  2965. Else
  2966. BallShadow(b).visible = 0
  2967. End If
  2968. Next
  2969. End Sub
  2970.  
  2971. '*****************************************
  2972. ' Object sounds
  2973. '*****************************************
  2974.  
  2975. Sub Plastics_Hit (idx)
  2976. PlaySound "woodhit_low", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall)
  2977. End Sub
  2978.  
  2979. Sub Pins_Hit (idx)
  2980. PlaySound "pinhit_low", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall)
  2981. End Sub
  2982.  
  2983. Sub Targets_Hit (idx)
  2984. PlaySound "target", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall)
  2985. End Sub
  2986.  
  2987. Sub Metals_Thin_Hit (idx)
  2988. PlaySound "metalhit_thin", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  2989. End Sub
  2990.  
  2991. Sub Metals_Medium_Hit (idx)
  2992. PlaySound "metalhit_medium", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  2993. End Sub
  2994.  
  2995. Sub Metals2_Hit (idx)
  2996. PlaySound "metalhit2", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  2997. End Sub
  2998.  
  2999. Sub Gates_Hit (idx)
  3000. PlaySound "gate4", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  3001. End Sub
  3002.  
  3003. Sub Spinner_Spin
  3004. PlaySound "mxSpinner", 0, .25, AudioPan(Spinner), 0.25, 0, 0, 1, AudioFade(Spinner)
  3005. End Sub
  3006.  
  3007. Sub Rubbers_Hit(idx)
  3008. dim finalspeed
  3009. finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
  3010. If finalspeed > 20 then
  3011. PlaySound "fx_rubber2", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  3012. End if
  3013. If finalspeed >= 6 AND finalspeed <= 20 then
  3014. RandomSoundRubber()
  3015. End If
  3016. End Sub
  3017.  
  3018. Sub Posts_Hit(idx)
  3019. dim finalspeed
  3020. finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
  3021. If finalspeed > 16 then
  3022. PlaySound "fx_rubber2", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  3023. End if
  3024. If finalspeed >= 6 AND finalspeed <= 16 then
  3025. RandomSoundRubber()
  3026. End If
  3027. End Sub
  3028.  
  3029. Sub RandomSoundRubber()
  3030. Select Case Int(Rnd*3)+1
  3031. Case 1 : PlaySound "rubber_hit_1", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  3032. Case 2 : PlaySound "rubber_hit_2", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  3033. Case 3 : PlaySound "rubber_hit_3", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  3034. End Select
  3035. End Sub
  3036.  
  3037. Sub LeftFlipper_Collide(parm)
  3038. RandomSoundFlipper()
  3039. End Sub
  3040.  
  3041. Sub RightFlipper_Collide(parm)
  3042. RandomSoundFlipper()
  3043. End Sub
  3044.  
  3045. Sub RandomSoundFlipper()
  3046. Select Case Int(Rnd*3)+1
  3047. Case 1 : PlaySound "flip_hit_1", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  3048. Case 2 : PlaySound "flip_hit_2", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  3049. Case 3 : PlaySound "flip_hit_3", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  3050. End Select
  3051. End Sub
  3052.  
  3053. ' ============================================================================================
  3054. ' GNMOD - Multiple High Score Display and Collection
  3055. ' ============================================================================================
  3056. Dim EnteringInitials ' Normally zero, set to non-zero to enter initials
  3057. EnteringInitials = 0
  3058.  
  3059. Dim PlungerPulled
  3060. PlungerPulled = 0
  3061.  
  3062. Dim SelectedChar ' character under the "cursor" when entering initials
  3063.  
  3064. Dim HSTimerCount ' Pass counter for HS timer, scores are cycled by the timer
  3065. HSTimerCount = 5 ' Timer is initially enabled, it'll wrap from 5 to 1 when it's displayed
  3066.  
  3067. Dim InitialString ' the string holding the player's initials as they're entered
  3068.  
  3069. Dim AlphaString ' A-Z, 0-9, space (_) and backspace (<)
  3070. Dim AlphaStringPos ' pointer to AlphaString, move forward and backward with flipper keys
  3071. AlphaString = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_<"
  3072.  
  3073. Dim HSNewHigh ' The new score to be recorded
  3074.  
  3075. Dim HSScore(5) ' High Scores read in from config file
  3076. Dim HSName(5) ' High Score Initials read in from config file
  3077.  
  3078. ' default high scores, remove this when the scores are available from the config file
  3079. HSScore(1) = 75000
  3080. HSScore(2) = 70000
  3081. HSScore(3) = 60000
  3082. HSScore(4) = 55000
  3083. HSScore(5) = 50000
  3084.  
  3085. HSName(1) = "AAA"
  3086. HSName(2) = "ZZZ"
  3087. HSName(3) = "XXX"
  3088. HSName(4) = "ABC"
  3089. HSName(5) = "BBB"
  3090.  
  3091. Sub HighScoreTimer_Timer
  3092.  
  3093. if EnteringInitials then
  3094. if HSTimerCount = 1 then
  3095. SetHSLine 3, InitialString & MID(AlphaString, AlphaStringPos, 1)
  3096. HSTimerCount = 2
  3097. else
  3098. SetHSLine 3, InitialString
  3099. HSTimerCount = 1
  3100. end if
  3101. elseif InProgress then
  3102. SetHSLine 1, "HIGH SCORE1"
  3103. SetHSLine 2, HSScore(1)
  3104. SetHSLine 3, HSName(1)
  3105. HSTimerCount = 5 ' set so the highest score will show after the game is over
  3106. HighScoreTimer.enabled=false
  3107. elseif CheckAllScores then
  3108. NewHighScore sortscores(ScoreChecker),sortplayers(ScoreChecker)
  3109.  
  3110. else
  3111. ' cycle through high scores
  3112. HighScoreTimer.interval=2000
  3113. HSTimerCount = HSTimerCount + 1
  3114. if HsTimerCount > 5 then
  3115. HSTimerCount = 1
  3116. End If
  3117. SetHSLine 1, "HIGH SCORE"+FormatNumber(HSTimerCount,0)
  3118. SetHSLine 2, HSScore(HSTimerCount)
  3119. SetHSLine 3, HSName(HSTimerCount)
  3120. end if
  3121. End Sub
  3122.  
  3123. Function GetHSChar(String, Index)
  3124. dim ThisChar
  3125. dim FileName
  3126. ThisChar = Mid(String, Index, 1)
  3127. FileName = "PostIt"
  3128. if ThisChar = " " or ThisChar = "" then
  3129. FileName = FileName & "BL"
  3130. elseif ThisChar = "<" then
  3131. FileName = FileName & "LT"
  3132. elseif ThisChar = "_" then
  3133. FileName = FileName & "SP"
  3134. else
  3135. FileName = FileName & ThisChar
  3136. End If
  3137. GetHSChar = FileName
  3138. End Function
  3139.  
  3140. Sub SetHsLine(LineNo, String)
  3141. dim Letter
  3142. dim ThisDigit
  3143. dim ThisChar
  3144. dim StrLen
  3145. dim LetterLine
  3146. dim Index
  3147. dim StartHSArray
  3148. dim EndHSArray
  3149. dim LetterName
  3150. dim xfor
  3151. StartHSArray=array(0,1,12,22)
  3152. EndHSArray=array(0,11,21,31)
  3153. StrLen = len(string)
  3154. Index = 1
  3155.  
  3156. for xfor = StartHSArray(LineNo) to EndHSArray(LineNo)
  3157. Eval("HS"&xfor).image = GetHSChar(String, Index)
  3158. Index = Index + 1
  3159. next
  3160.  
  3161. End Sub
  3162.  
  3163. Sub NewHighScore(NewScore, PlayNum)
  3164. if NewScore > HSScore(5) then
  3165. HighScoreTimer.interval = 500
  3166. HSTimerCount = 1
  3167. AlphaStringPos = 1 ' start with first character "A"
  3168. EnteringInitials = 1 ' intercept the control keys while entering initials
  3169. InitialString = "" ' initials entered so far, initialize to empty
  3170. SetHSLine 1, "PLAYER "+FormatNumber(PlayNum,0)
  3171. SetHSLine 2, "ENTER NAME"
  3172. SetHSLine 3, MID(AlphaString, AlphaStringPos, 1)
  3173. HSNewHigh = NewScore
  3174. For xx=1 to HighScoreReward
  3175. AddSpecial
  3176. next
  3177. End if
  3178. ScoreChecker=ScoreChecker-1
  3179. if ScoreChecker=0 then
  3180. CheckAllScores=0
  3181. end if
  3182. End Sub
  3183.  
  3184. Sub CollectInitials(keycode)
  3185. If keycode = LeftFlipperKey Then
  3186. ' back up to previous character
  3187. AlphaStringPos = AlphaStringPos - 1
  3188. if AlphaStringPos < 1 then
  3189. AlphaStringPos = len(AlphaString) ' handle wrap from beginning to end
  3190. if InitialString = "" then
  3191. ' Skip the backspace if there are no characters to backspace over
  3192. AlphaStringPos = AlphaStringPos - 1
  3193. End if
  3194. end if
  3195. SetHSLine 3, InitialString & MID(AlphaString, AlphaStringPos, 1)
  3196. PlaySound "target"
  3197. elseif keycode = RightFlipperKey Then
  3198. ' advance to next character
  3199. AlphaStringPos = AlphaStringPos + 1
  3200. if AlphaStringPos > len(AlphaString) or (AlphaStringPos = len(AlphaString) and InitialString = "") then
  3201. ' Skip the backspace if there are no characters to backspace over
  3202. AlphaStringPos = 1
  3203. end if
  3204. SetHSLine 3, InitialString & MID(AlphaString, AlphaStringPos, 1)
  3205. PlaySound "target"
  3206. elseif keycode = StartGameKey or keycode = PlungerKey Then
  3207. SelectedChar = MID(AlphaString, AlphaStringPos, 1)
  3208. if SelectedChar = "_" then
  3209. InitialString = InitialString & " "
  3210. PlaySound("mxBell000")
  3211. elseif SelectedChar = "<" then
  3212. InitialString = MID(InitialString, 1, len(InitialString) - 1)
  3213. if len(InitialString) = 0 then
  3214. ' If there are no more characters to back over, don't leave the < displayed
  3215. AlphaStringPos = 1
  3216. end if
  3217. PlaySound("mxBell0000")
  3218. else
  3219. InitialString = InitialString & SelectedChar
  3220. PlaySound("mxBell000")
  3221. end if
  3222. if len(InitialString) < 3 then
  3223. SetHSLine 3, InitialString & SelectedChar
  3224. End If
  3225. End If
  3226. if len(InitialString) = 3 then
  3227. SetHSLine 3, InitialString
  3228. ' save the score
  3229. for i = 5 to 1 step -1
  3230. if i = 1 or (HSNewHigh > HSScore(i) and HSNewHigh <= HSScore(i - 1)) then
  3231. ' Replace the score at this location
  3232. if i < 5 then
  3233. ' MsgBox("Moving " & i & " to " & (i + 1))
  3234. HSScore(i + 1) = HSScore(i)
  3235. HSName(i + 1) = HSName(i)
  3236. end if
  3237. ' MsgBox("Saving initials " & InitialString & " to position " & i)
  3238. EnteringInitials = 0
  3239. HSScore(i) = HSNewHigh
  3240. HSName(i) = InitialString
  3241. HSTimerCount = 5
  3242. HighScoreTimer_Timer
  3243. HighScoreTimer.interval = 2000
  3244. PlaySound SoundFX("knocker",DOFknocker)
  3245. exit sub
  3246. elseif i < 5 then
  3247. ' move the score in this slot down by 1, it's been exceeded by the new score
  3248. ' MsgBox("Moving " & i & " to " & (i + 1))
  3249. HSScore(i + 1) = HSScore(i)
  3250. HSName(i + 1) = HSName(i)
  3251. end if
  3252. next
  3253. End If
  3254.  
  3255. End Sub
  3256. ' END GNMOD
  3257. ' ============================================================================================
  3258. ' GNMOD - New Options menu
  3259. ' ============================================================================================
  3260. Dim EnteringOptions
  3261. Dim CurrentOption
  3262. Dim OptionCHS
  3263. Dim MaxOption
  3264. Dim OptionHighScorePosition
  3265. Dim XOpt
  3266. Dim StartingArray
  3267. Dim EndingArray
  3268.  
  3269. StartingArray=Array(0,1,2,30,33,61,89,117,145,173,201,229)
  3270. EndingArray=Array(0,1,29,32,60,88,116,144,172,200,228,256)
  3271. EnteringOptions = 0
  3272. MaxOption = 9
  3273. OptionCHS = 0
  3274. OptionHighScorePosition = 0
  3275. Const OptionLinesToMark="111010011"
  3276. Const OptionLine1="" 'do not use this line
  3277. Const OptionLine2="" 'do not use this line
  3278. Const OptionLine3="" 'do not use this line
  3279. Const OptionLine4=""
  3280. Const OptionLine5="Game Option"
  3281. Const OptionLine6=""
  3282. Const OptionLine7=""
  3283. Const OptionLine8="" 'do not use this line
  3284. Const OptionLine9="" 'do not use this line
  3285.  
  3286. Sub OperatorMenuTimer_Timer
  3287. EnteringOptions = 1
  3288. OperatorMenuTimer.enabled=false
  3289. ShowOperatorMenu
  3290. end sub
  3291.  
  3292. sub ShowOperatorMenu
  3293. OperatorMenuBackdrop.image = "OperatorMenu"
  3294.  
  3295. OptionCHS = 0
  3296. CurrentOption = 1
  3297. DisplayAllOptions
  3298. OperatorOption1.image = "BluePlus"
  3299. SetHighScoreOption
  3300.  
  3301. End Sub
  3302.  
  3303. Sub DisplayAllOptions
  3304. dim linecounter
  3305. dim tempstring
  3306. For linecounter = 1 to MaxOption
  3307. tempstring=Eval("OptionLine"&linecounter)
  3308. Select Case linecounter
  3309. Case 1:
  3310. tempstring=tempstring + FormatNumber(BallsPerGame,0)
  3311. SetOptLine 1,tempstring
  3312. Case 2:
  3313. if Replay3Table(ReplayLevel)=9990000 then
  3314. tempstring = FormatNumber(Replay1Table(ReplayLevel),0) + "/" + FormatNumber(Replay2Table(ReplayLevel),0)
  3315. elseif Replay4Table(ReplayLevel)=9990000 then
  3316. tempstring = FormatNumber(Replay1Table(ReplayLevel),0) + "/" + FormatNumber(Replay2Table(ReplayLevel),0) + "/" + FormatNumber(Replay3Table(ReplayLevel),0)
  3317. else
  3318. tempstring = FormatNumber(Replay1Table(ReplayLevel),0,0,0,0) + "/" + FormatNumber(Replay2Table(ReplayLevel),0,0,0,0) + "/" + FormatNumber(Replay3Table(ReplayLevel),0,0,0,0) + "/" + FormatNumber(Replay4Table(ReplayLevel),0,0,0,0)
  3319. end if
  3320. SetOptLine 2,tempstring
  3321. Case 3:
  3322. If OptionCHS=0 then
  3323. tempstring = "NO"
  3324. else
  3325. tempstring = "YES"
  3326. end if
  3327. SetOptLine 3,tempstring
  3328. Case 4:
  3329. SetOptLine 4, tempstring
  3330.  
  3331.  
  3332. SetOptLine 5, tempstring
  3333. Case 5:
  3334. SetOptLine 6, tempstring
  3335. if GameOption=1 then
  3336. tempstring = "Conservative"
  3337. else
  3338. tempstring = "Liberal"
  3339. end if
  3340. SetOptLine 7, tempstring
  3341.  
  3342. Case 6:
  3343. SetOptLine 8, tempstring
  3344.  
  3345.  
  3346. SetOptLine 9, tempstring
  3347.  
  3348. Case 7:
  3349. SetOptLine 10, tempstring
  3350. SetOptLine 11, tempstring
  3351.  
  3352. Case 8:
  3353.  
  3354. Case 9:
  3355.  
  3356.  
  3357. End Select
  3358.  
  3359. next
  3360. end sub
  3361.  
  3362. sub MoveArrow
  3363. do
  3364. CurrentOption = CurrentOption + 1
  3365. If CurrentOption>Len(OptionLinesToMark) then
  3366. CurrentOption=1
  3367. end if
  3368. loop until Mid(OptionLinesToMark,CurrentOption,1)="1"
  3369. end sub
  3370.  
  3371. sub CollectOptions(ByVal keycode)
  3372. if Keycode = LeftFlipperKey then
  3373. PlaySound "DropTargetDropped"
  3374. For XOpt = 1 to MaxOption
  3375. Eval("OperatorOption"&XOpt).image = "PostitBL"
  3376. next
  3377. MoveArrow
  3378. if CurrentOption<8 then
  3379. Eval("OperatorOption"&CurrentOption).image = "BluePlus"
  3380. elseif CurrentOption=8 then
  3381. Eval("OperatorOption"&CurrentOption).image = "GreenCheck"
  3382. else
  3383. Eval("OperatorOption"&CurrentOption).image = "RedX"
  3384. end if
  3385.  
  3386. elseif Keycode = RightFlipperKey then
  3387. PlaySound "DropTargetDropped"
  3388. if CurrentOption = 1 then
  3389. If BallsPerGame = 3 then
  3390. BallsPerGame = 5
  3391. else
  3392. BallsPerGame = 3
  3393. end if
  3394. DisplayAllOptions
  3395. elseif CurrentOption = 2 then
  3396. ReplayLevel=ReplayLevel+1
  3397. If ReplayLevel>ReplayTableMax then
  3398. ReplayLevel=1
  3399. end if
  3400. DisplayAllOptions
  3401. elseif CurrentOption = 3 then
  3402. if OptionCHS = 0 then
  3403. OptionCHS = 1
  3404.  
  3405. else
  3406. OptionCHS = 0
  3407.  
  3408. end if
  3409. DisplayAllOptions
  3410.  
  3411.  
  3412. elseif CurrentOption = 5 then
  3413. if GameOption=1 then
  3414. GameOption=2
  3415.  
  3416. else
  3417. GameOption=1
  3418.  
  3419. end if
  3420. DisplayAllOptions
  3421.  
  3422. elseif CurrentOption = 8 or CurrentOption = 9 then
  3423. if OptionCHS=1 then
  3424. HSScore(1) = 75000
  3425. HSScore(2) = 70000
  3426. HSScore(3) = 60000
  3427. HSScore(4) = 55000
  3428. HSScore(5) = 50000
  3429.  
  3430. HSName(1) = "AAA"
  3431. HSName(2) = "ZZZ"
  3432. HSName(3) = "XXX"
  3433. HSName(4) = "ABC"
  3434. HSName(5) = "BBB"
  3435. end if
  3436.  
  3437. if CurrentOption = 8 then
  3438. savehs
  3439. else
  3440. loadhs
  3441. end if
  3442. OperatorMenuBackdrop.image = "PostitBL"
  3443. For XOpt = 1 to MaxOption
  3444. Eval("OperatorOption"&XOpt).image = "PostitBL"
  3445. next
  3446.  
  3447. For XOpt = 1 to 256
  3448. Eval("Option"&XOpt).image = "PostItBL"
  3449. next
  3450. RefreshReplayCard
  3451. BallCard.image="BC"+FormatNumber(BallsPerGame,0)
  3452. InstructCard.image="IC"+FormatNumber(BallsPerGame,0)+FormatNumber(GameOption,0)
  3453. EnteringOptions = 0
  3454.  
  3455. end if
  3456. end if
  3457. End Sub
  3458.  
  3459. Sub SetHighScoreOption
  3460.  
  3461. End Sub
  3462.  
  3463. Function GetOptChar(String, Index)
  3464. dim ThisChar
  3465. dim FileName
  3466. ThisChar = Mid(String, Index, 1)
  3467. FileName = "PostIt"
  3468. if ThisChar = " " or ThisChar = "" then
  3469. FileName = FileName & "BL"
  3470. elseif ThisChar = "<" then
  3471. FileName = FileName & "LT"
  3472. elseif ThisChar = "_" then
  3473. FileName = FileName & "SP"
  3474. elseif ThisChar = "/" then
  3475. FileName = FileName & "SL"
  3476. elseif ThisChar = "," then
  3477. FileName = FileName & "CM"
  3478. else
  3479. FileName = FileName & ThisChar
  3480. End If
  3481. GetOptChar = FileName
  3482. End Function
  3483.  
  3484. dim LineLengths(22) ' maximum number of lines
  3485. Sub SetOptLine(LineNo, String)
  3486. Dim DispLen
  3487. Dim StrLen
  3488. dim xfor
  3489. dim Letter
  3490. dim ThisDigit
  3491. dim ThisChar
  3492. dim LetterLine
  3493. dim Index
  3494. dim LetterName
  3495. StrLen = len(string)
  3496. Index = 1
  3497.  
  3498. StrLen = len(String)
  3499. DispLen = StrLen
  3500. if (DispLen < LineLengths(LineNo)) Then
  3501. DispLen = LineLengths(LineNo)
  3502. end If
  3503.  
  3504. for xfor = StartingArray(LineNo) to StartingArray(LineNo) + DispLen
  3505. Eval("Option"&xfor).image = GetOptChar(string, Index)
  3506. Index = Index + 1
  3507. next
  3508. LineLengths(LineNo) = StrLen
  3509.  
  3510. End Sub
  3511.  
  3512.  
  3513.  
  3514.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement