Outhere

Led Zeppelin Pinball 1.02

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