Outhere

Black Gold (Loserman76_Williams 1975) 1.0

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