Arngrim

Domino DOF

Dec 4th, 2016
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 77.92 KB | None | 0 0
  1. '*
  2. '* Gottlieb's Domino (1968)
  3. '* Table build/scripted by Loserman!
  4. '* Images/plastics redrawn by GNance
  5. '*
  6. '* Thanks to the following for their contributions (whether they know it or not!)
  7. '* If I have missed anyone, let me know as this table would not exist without the
  8. '* folks in the community.
  9. '*
  10. '* GNance - images/plastics without which this table would not exist
  11. '* JPSalas - gameroom backdrop and methods gleaned from his fantastic tables
  12. '* EalaDubhSidhe - table object templates
  13. '* Black - HS save/load routines
  14. '* Itchigo - table templates
  15. '* CONRAM - various code ideas learned by tracing through code on his tables
  16. '* Inkochnito - scorecards/instruction cards
  17. '* Pinuck - Gottlieb chimes and score motor routines
  18. '* Herweh - directB2S designer and tools
  19. '* JimmyFingers - rolling ball and additional sound routines
  20. '* pbecker1946 - roto-code & images
  21. '* Bodydump - for his assistance on various tables
  22. '* UncleWilly - for his primitive templates
  23. '*
  24. '* Of course, the team behind Visual Pinball - without them, there wouldn't be much choice for playing pinball on a PC
  25. '* I also must include Black and his Future Pinball as I used tables on that platform to help in building my VP tables.
  26. '*
  27.  
  28. option explicit
  29. Randomize
  30.  
  31. On Error Resume Next
  32. ExecuteGlobal GetTextFile("controller.vbs")
  33. If Err Then MsgBox "You need the controller.vbs in order to run this table, available in the vp10 package"
  34. On Error Goto 0
  35.  
  36. ExecuteGlobal GetTextFile("core.vbs")
  37.  
  38. Dim B2SScore ' B2S Score Displayed
  39. Const HSFileName="Domino_68_2.txt"
  40. Const cGameName="Domino_1968"
  41.  
  42. '* 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
  43. Const ScoreMotorAdjustment=1
  44.  
  45. '* this is a debug setting to use an older scoring routine vs a newer score routine - don't change this value
  46. Const ScoreAdditionAdjustment=1
  47.  
  48. '* this setting controls whether you hear bells (0) or chimes (1) during scoring
  49. Const ChimesOn=0
  50.  
  51. dim ScoreChecker
  52. dim CheckAllScores
  53. dim sortscores(4)
  54. dim sortplayers(4)
  55. Dim TextStr, TextStr2,TiltEndsGame
  56. Dim i
  57. Dim obj
  58. Dim bgpos
  59. Dim kgpos
  60. Dim dooralreadyopen
  61. Dim kgdooralreadyopen
  62. Dim TargetSpecialLit
  63. Dim Points210counter
  64. Dim Points500counter
  65. Dim Points1000counter
  66. Dim Points2000counter
  67. Dim BallsPerGame
  68. Dim InProgress
  69. Dim BallInPlay
  70. Dim CreditsPerCoin
  71. Dim Score100K(4)
  72. Dim Score(4)
  73. Dim ScoreDisplay(4)
  74. Dim HighScorePaid(4)
  75. Dim HighScore
  76. Dim HighScoreReward
  77. Dim BonusMultiplier
  78. Dim Credits
  79. Dim Match
  80. Dim Replay1
  81. Dim Replay2
  82. Dim Replay3
  83. Dim Replay4
  84. Dim Replay1Paid(4)
  85. Dim Replay2Paid(4)
  86. Dim Replay3Paid(4)
  87. Dim Replay4Paid(4)
  88. Dim TableTilted
  89. Dim TiltCount
  90. Dim debugscore
  91.  
  92. Dim OperatorMenu
  93.  
  94. Dim BonusBooster
  95. Dim BonusBoosterCounter
  96. Dim BonusCounter
  97. Dim HoleCounter
  98.  
  99. Dim Ones
  100. Dim Tens
  101. Dim Hundreds
  102. Dim Thousands
  103.  
  104. Dim Player
  105. Dim Players
  106.  
  107. Dim rst
  108. Dim bonuscountdown
  109. Dim TempMultiCounter
  110. dim TempPlayerup
  111. dim RotatorTemp
  112.  
  113. dim GreenTargetsDownCounter
  114. dim BlueTargetsDownCounter
  115. dim YellowTargetsDownCounter
  116.  
  117. Dim bump1
  118. Dim bump2
  119. Dim bump3
  120. Dim bump4
  121.  
  122. Dim LastChime10
  123. Dim LastChime100
  124. Dim LastChime1000
  125.  
  126. Dim Score10
  127. Dim Score100
  128.  
  129. Dim raceRflag, raceAflag, raceCflag,raceEflag
  130. dim tempbumper
  131.  
  132. Dim MotorRunning
  133.  
  134. Dim Replay1Table(15)
  135. Dim Replay2Table(15)
  136. Dim Replay3Table(15)
  137. Dim Replay4Table(15)
  138. Dim ReplayTableSet
  139. Dim ReplayLevel
  140. Dim ReplayTableMax
  141.  
  142. Dim RelayB
  143. Dim RelayC
  144. Dim RelayE
  145. Dim FlippingFlag
  146.  
  147. Dim TempRotoScore
  148.  
  149. Dim KickerCounter
  150. Dim mHole,mHole2
  151.  
  152.  
  153. Dim RotoCycles ' Number of Digits To Animate on a Spin
  154.  
  155. Dim X, xx
  156. Dim LStep, LStep2, RStep, L2Step, R2Step
  157. Dim RotoImagesL1, RotoImagesL2, RotoImagesR1, RotoImagesR2
  158. Dim RotoPosition, RotoFlip
  159. Dim AdvancePosition, DominoAdvance
  160. Dim ZeroNineCounter, AlternatingRelay
  161. Dim AdvanceSetting
  162.  
  163. RotoImagesL1 = array (6,6,2,2,4,4,1,1,3,3,5,5,1,1,2,2,4,4,3,3,2,2,1,1,4,4,3,3,4,4)
  164. RotoImagesL2 = array (4,4,6,6,2,2,4,4,1,1,3,3,5,5,1,1,2,2,4,4,3,3,2,2,1,1,4,4,3,3)
  165. RotoImagesR1 = array (4,4,3,3,4,4,6,6,2,2,4,4,1,1,3,3,5,5,1,1,2,2,4,4,3,3,2,2,1,1)
  166. RotoImagesR2 = array (1,1,4,4,3,3,4,4,6,6,2,2,4,4,1,1,3,3,5,5,1,1,2,2,4,4,3,3,2,2)
  167.  
  168. DominoAdvance = array (5,3,4,1,2,3,4,2,1,5,3,1,4,2,6)
  169.  
  170.  
  171. Sub Table1_Init()
  172. LoadEM
  173. Set mHole = New cvpmMagnet
  174. With mHole
  175. .InitMagnet Umagnet, 3.85
  176. .GrabCenter = 0
  177. .MagnetOn = 0
  178. .CreateEvents "mHole"
  179. End With
  180.  
  181. Set mHole2 = New cvpmMagnet
  182. With mHole2
  183. .InitMagnet Umagnet2, 3.85
  184. .GrabCenter = 0
  185. .MagnetOn = 0
  186. .CreateEvents "mHole2"
  187. End With
  188.  
  189. HideOptions
  190. SetupReplayTables
  191. PlasticsOff
  192. BumpersOff
  193. OperatorMenu=0
  194. ReplayLevel=1
  195. BallsPerGame=5
  196. EMReel1.ResetToZero
  197. HighScore=0
  198. MotorRunning=0
  199. AdvanceSetting=0
  200. ZeroNineCounter=0
  201. FlippingFlag=0
  202. HighScoreReward=3
  203. TiltEndsGame=1
  204. BallTextBox.text=""
  205. MatchTextBox.text=""
  206. Credits=0
  207. loadhs
  208. if HighScore=0 then HighScore=5000
  209.  
  210.  
  211. RotoPosition=int(Rnd*30)
  212. LRotoA1.image = "RotoT1-"+FormatNumber(RotoImagesL1(RotoPosition),0)
  213. LRotoA2.image = "RotoT1-"+FormatNumber(RotoImagesL2(RotoPosition),0)
  214. LRotoA.image = "RotoT1-"+FormatNumber(RotoImagesL1(RotoPosition),0)
  215.  
  216. RRotoA1.image = "RotoT1-"+FormatNumber(RotoImagesR1(RotoPosition),0)
  217. RRotoA.image = "RotoT1-"+FormatNumber(RotoImagesR1(RotoPosition),0)
  218. RRotoA2.image = "RotoT1-"+FormatNumber(RotoImagesR2(RotoPosition),0)
  219.  
  220. LRotoA1.topvisible=0
  221. LRotoA2.topvisible=0
  222. RRotoA1.topvisible=0
  223. RRotoA2.topvisible=0
  224. LRotoA.topvisible=1
  225. RRotoA.topvisible=1
  226.  
  227. TableTilted=false
  228. TiltReel.SetValue(1)
  229. Match=int(Rnd*10)*10
  230. MatchReel.SetValue((Match/10)+1)
  231.  
  232. For each obj in PlayerScores
  233. obj.ResetToZero
  234. next
  235.  
  236. Replay1=Replay1Table(ReplayLevel)
  237. Replay2=Replay2Table(ReplayLevel)
  238. Replay3=Replay3Table(ReplayLevel)
  239. Replay4=Replay4Table(ReplayLevel)
  240.  
  241. BonusCounter=0
  242. HoleCounter=0
  243. bgpos=6
  244. kgpos=0
  245.  
  246. For each obj in AllLights
  247. obj.state=0
  248. next
  249.  
  250. ScoreLight.state=0
  251. dooralreadyopen=0
  252. kgdooralreadyopen=0
  253. Bumper1.state=0
  254. Bumper2.state=0
  255. Bumper3.state=0
  256. Bumper4.state=0
  257.  
  258.  
  259. InstructCard.image="IC"+FormatNumber(BallsPerGame,0)+"0"
  260.  
  261. RefreshReplayCard
  262. ' ResetBalls
  263. ' PlaySound "Plunger"
  264. TargetSpecialLit = 0
  265. Points210counter=0
  266. Points500counter=0
  267. Points1000counter=0
  268. Points2000counter=0
  269. BonusBooster=3
  270. BonusBoosterCounter=0
  271. Players=0
  272. RotatorTemp=1
  273. InProgress=false
  274.  
  275. ScoreText.text=HighScore
  276. if B2SOn then
  277. Set Controller = CreateObject("B2S.Server")
  278. Controller.B2SName = cGameName
  279. Controller.Run()
  280. If Err Then MsgBox "Can't Load B2S.Server."
  281. end if
  282.  
  283. If B2SOn Then
  284. if Match=0 then
  285. Controller.B2SSetMatch 10
  286. else
  287. Controller.B2SSetMatch Match/10
  288. end if
  289. Controller.B2SSetScoreRolloverPlayer1 0
  290. Controller.B2SSetScore 3,HighScore
  291. Controller.B2SSetTilt 0
  292. Controller.B2SSetCredits Credits
  293. Controller.B2SSetGameOver 1
  294. End If
  295.  
  296. EMReel6.SetValue(Credits)
  297. for i=1 to 1
  298. player=i
  299. If B2SOn Then
  300. Controller.B2SSetScorePlayer player, 0
  301. End If
  302. next
  303. bump1=1
  304. bump2=1
  305. bump3=1
  306. bump4=1
  307. InitPauser5.enabled=true
  308.  
  309. If Credits > 0 Then DOF 125, DOFOn
  310. End Sub
  311.  
  312. Sub Table1_exit()
  313. savehs
  314. If B2SOn Then Controller.Stop
  315. end sub
  316.  
  317. Sub TimerTitle1_timer
  318. if B2SOn then
  319. if raceRflag=1 then
  320. Controller.B2SSetData 11,0
  321. raceRflag=0
  322. else
  323. Controller.B2SSetData 11,1
  324. raceRflag=1
  325. end if
  326. end if
  327. end sub
  328.  
  329. Sub TimerTitle2_timer
  330. if B2SOn then
  331. if raceAflag=1 then
  332. Controller.B2SSetData 12,0
  333. raceAflag=0
  334. else
  335. Controller.B2SSetData 12,1
  336. raceAflag=1
  337. end if
  338. end if
  339. end sub
  340.  
  341. Sub TimerTitle3_timer
  342. if B2SOn then
  343. if raceCflag=1 then
  344. Controller.B2SSetData 13,0
  345. raceCflag=0
  346. else
  347. Controller.B2SSetData 13,1
  348. raceCflag=1
  349. end if
  350. end if
  351. end sub
  352.  
  353. Sub TimerTitle4_timer
  354. if B2SOn then
  355. if raceEflag=1 then
  356. Controller.B2SSetData 10,0
  357. raceEflag=0
  358. else
  359. Controller.B2SSetData 10,1
  360. raceEflag=1
  361. end if
  362. end if
  363. end sub
  364.  
  365.  
  366.  
  367. Sub Table1_KeyDown(ByVal keycode)
  368.  
  369. ' GNMOD
  370. if EnteringInitials then
  371. CollectInitials(keycode)
  372. exit sub
  373. end if
  374.  
  375.  
  376. if EnteringOptions then
  377. CollectOptions(keycode)
  378. exit sub
  379. end if
  380.  
  381.  
  382.  
  383. If keycode = PlungerKey Then
  384. Plunger.PullBack
  385. PlungerPulled = 1
  386. End If
  387.  
  388. if keycode = LeftFlipperKey and InProgress = false then
  389. OperatorMenuTimer.Enabled = true
  390. end if
  391. ' END GNMOD
  392.  
  393.  
  394. If keycode = LeftFlipperKey and InProgress=true and TableTilted=false Then
  395. LeftFlipper.RotateToEnd
  396. PlaySound SoundFXDOF("FlipperUp",101,DOFOn,DOFFlippers)
  397. PlaySound "buzzL",-1
  398. End If
  399.  
  400. If keycode = RightFlipperKey and InProgress=true and TableTilted=false Then
  401. RightFlipper.RotateToEnd
  402. PlaySound "buzz",-1
  403. PlaySound SoundFXDOF("FlipperUp",102,DOFOn,DOFFlippers)
  404. End If
  405.  
  406. If keycode = LeftTiltKey Then
  407. Nudge 90, 2
  408. TiltIt
  409. End If
  410.  
  411. If keycode = RightTiltKey Then
  412. Nudge 270, 2
  413. TiltIt
  414. End If
  415.  
  416. If keycode = CenterTiltKey Then
  417. Nudge 0, 2
  418. TiltIt
  419. End If
  420.  
  421. If keycode = 6 then
  422. If B2SOn Then
  423. Controller.B2SSetScore 6,HighScore
  424.  
  425. End If
  426.  
  427. playsound "coinin"
  428. AddSpecial2
  429. end if
  430.  
  431.  
  432.  
  433.  
  434. ' if keycode = 2 and Credits>0 and InProgress=true and Players>0 and Players<4 and BallInPlay<2 then
  435. ' Credits=Credits-1
  436. ' Players=Players+1
  437. ' playsound "click"
  438. ' If B2SOn Then
  439. ' Controller.B2SSetCanPlay Players
  440. ' If Players=2 Then
  441. ' Controller.B2SSetScoreRolloverPlayer2 0
  442. ' End If
  443. ' If Players=3 Then
  444. ' Controller.B2SSetScoreRolloverPlayer3 0
  445. ' End If
  446. ' If Players=4 Then
  447. ' Controller.B2SSetScoreRolloverPlayer4 0
  448. ' End If
  449. ' Controller.B2SSetCredits Credits
  450. ' End If
  451. ' end if
  452. if keycode=2 and Credits>0 and InProgress=false and Players=0 and EnteringOptions = 0 then
  453. 'GNMOD
  454. OperatorMenuTimer.Enabled = false
  455. 'END GNMOD
  456. Credits=Credits-1
  457. If Credits < 1 Then DOF 125, DOFOff
  458. EMReel6.SetValue(Credits)
  459. Players=1
  460. MatchReel.SetValue(0)
  461. Player=1
  462. playsound "startup_norm"
  463. TempPlayerUp=Player
  464. ' PlayerUpRotator.enabled=true
  465. rst=0
  466. BallInPlay=1
  467. ScoreLight.state=1
  468. InProgress=true
  469. resettimer.enabled=true
  470. BonusMultiplier=1
  471. If B2SOn Then
  472. Controller.B2SSetTilt 0
  473. Controller.B2SSetGameOver 0
  474. Controller.B2SSetMatch 0
  475. Controller.B2SSetCredits Credits
  476. Controller.B2SSetScore 3,HighScore
  477. ' Controller.B2SSetCanPlay 1
  478. Controller.B2SSetPlayerUp 1
  479. ' Controller.B2SSetBallInPlay BallInPlay
  480. Controller.B2SSetScoreRolloverPlayer1 0
  481. Controller.B2SSetShootAgain 0
  482.  
  483. Controller.B2SSetData 11,0
  484. Controller.B2SSetData 12,0
  485. Controller.B2SSetData 13,0
  486. Controller.B2SSetData 10,0
  487. End If
  488. EMReel1.ResetToZero
  489. end if
  490.  
  491.  
  492.  
  493. End Sub
  494.  
  495. Sub Table1_KeyUp(ByVal keycode)
  496.  
  497. ' GNMOD
  498. if EnteringInitials then
  499. exit sub
  500. end if
  501.  
  502. If keycode = PlungerKey Then
  503.  
  504. if PlungerPulled = 0 then
  505. exit sub
  506. end if
  507.  
  508. PlaySound"plungerrelease"
  509. Plunger.Fire
  510. End If
  511.  
  512. if keycode = LeftFlipperKey then
  513. OperatorMenuTimer.Enabled = false
  514. end if
  515.  
  516. ' END GNMOD
  517.  
  518. If keycode = LeftFlipperKey and InProgress=true and TableTilted=false Then
  519. LeftFlipper.RotateToStart
  520. PlaySound SoundFXDOF("FlipperDown",101,DOFOff,DOFFlippers)
  521. StopSound "buzzL"
  522. End If
  523.  
  524. If keycode = RightFlipperKey and InProgress=true and TableTilted=false Then
  525. RightFlipper.RotateToStart
  526. StopSound "buzz"
  527. PlaySound SoundFXDOF("FlipperDown",102,DOFOff,DOFFlippers)
  528. End If
  529.  
  530. End Sub
  531.  
  532. Sub Drain_Hit()
  533. DOF 127, DOFPulse
  534. RotoSpin
  535. ClearBallId
  536. Drain.DestroyBall
  537. PlaySound "fx_drain"
  538. StopRollingSound
  539. ' AddBonus
  540. Pause4Bonustimer.enabled=true
  541. End Sub
  542.  
  543. Sub CloseGateTrigger_hit
  544. DOF 126, DOFPulse
  545. End Sub
  546.  
  547. Sub Pause4Bonustimer_timer
  548. Pause4Bonustimer.enabled=0
  549. NextBallDelay.enabled=true
  550.  
  551. End Sub
  552.  
  553. '***********************
  554. ' Flipper Logos
  555. '***********************
  556.  
  557. Sub UpdateFlipperLogos_Timer
  558. LFLogo.ObjRotZ = LeftFlipper.CurrentAngle+90
  559. RFlogo.ObjRotZ = RightFlipper.CurrentAngle+90
  560. End Sub
  561.  
  562.  
  563. '***********************
  564. ' slingshots
  565. '
  566.  
  567. For each xx in LSling2:xx.topvisible = 0:xx.TriggerSingleUpdate:Next
  568. For each xx in LSling1:xx.topvisible = 0:xx.TriggerSingleUpdate:Next
  569.  
  570. For each xx in RSling2:xx.topvisible = 0:xx.TriggerSingleUpdate:Next
  571. For each xx in RSling1:xx.topvisible = 0:xx.TriggerSingleUpdate:Next
  572.  
  573.  
  574. Sub LSLING_Slingshot
  575. If TableTilted=false then
  576. PlaySound SoundFXDOF("slingshot",103,DOFPulse,DOFContactors)
  577. AddScore(10)
  578.  
  579. For each xx in LSling2:xx.topvisible = 1:xx.TriggerSingleUpdate:Next
  580. LStep = 0:Me.TimerEnabled = 1
  581. End If
  582. End Sub
  583.  
  584. Sub LSLING_Timer
  585. Select Case LStep
  586. Case 0: 'pause
  587. Case 1: 'pause
  588. Case 2:For each xx in LSling2:xx.topvisible = 0:xx.TriggerSingleUpdate:Next
  589. For each xx in LSling1:xx.topvisible = 1:xx.TriggerSingleUpdate:Next
  590. Case 3: 'pause
  591. Case 4:For each xx in LSling1:xx.topvisible = 0:xx.TriggerSingleUpdate:Next
  592. Me.TimerEnabled = 0
  593. End Select
  594. LStep = LStep + 1
  595. End Sub
  596.  
  597. Sub RSLING_Slingshot
  598. If TableTilted=false then
  599. PlaySound SoundFXDOF("slingshot",104,DOFPulse,DOFContactors)
  600. AddScore(10)
  601.  
  602. For each xx in RSling2:xx.topvisible = 1:xx.TriggerSingleUpdate:Next
  603. RStep = 0:Me.TimerEnabled = 1
  604. End If
  605. End Sub
  606.  
  607. Sub RSLING_Timer
  608. Select Case RStep
  609. Case 0: 'pause
  610. Case 1: 'pause
  611. Case 2:For each xx in RSling2:xx.topvisible = 0:xx.TriggerSingleUpdate:Next
  612. For each xx in RSling1:xx.topvisible = 1:xx.TriggerSingleUpdate:Next
  613. Case 3: 'Pause
  614. Case 4:For each xx in RSling1:xx.topvisible = 0:xx.TriggerSingleUpdate:Next
  615. Me.TimerEnabled = 0
  616. End Select
  617. RStep = RStep + 1
  618. End Sub
  619. '**********************************************************
  620.  
  621. Sub RubberWall3_Hit()
  622. If TableTilted=false then
  623. AddScore(1)
  624. end if
  625. end sub
  626.  
  627. Sub RubberWall4_Hit()
  628. If TableTilted=false then
  629. AddScore(1)
  630. end if
  631. end sub
  632.  
  633. Sub RubberWall2_Hit()
  634. If TableTilted=false then
  635. AddScore(10)
  636. end if
  637. end sub
  638.  
  639. Sub RubberWall5_Hit()
  640. If TableTilted=false then
  641. AddScore(10)
  642. end if
  643. end sub
  644.  
  645.  
  646. '***********************************
  647.  
  648.  
  649. Sub Bumper1_Hit
  650. If TableTilted=false then
  651. PlaySound SoundFXDOF("bumper1",105,DOFPulse,DOFContactors)
  652. bump1 = 1
  653. Bumper1.TimerEnabled = 1
  654. If Bumper1Light.IsVisible=true then
  655. AddScore(10)
  656. else
  657. AddScore(1)
  658. end if
  659. end if
  660.  
  661. End Sub
  662.  
  663. Sub Bumper1_Timer()
  664. Select Case bump1
  665. Case 1:Ring1.HeightTop = 15:Ring1.HeightBottom = 15:bump1 = 2
  666. Case 2:Ring1.HeightTop = 25:Ring1.HeightBottom = 25:bump1 = 3
  667. Case 3:Ring1.HeightTop = 35:Ring1.HeightBottom = 35:bump1 = 4
  668. Case 4:Ring1.HeightTop = 45:Ring1.HeightBottom = 45:Bumper1.TimerEnabled = 0
  669. End Select
  670.  
  671.  
  672. End Sub
  673.  
  674. Sub Bumper2_Hit
  675. If TableTilted=false then
  676.  
  677. PlaySound SoundFXDOF("bumper1",106,DOFPulse,DOFContactors)
  678. bump2 = 1
  679. Bumper2.TimerEnabled = 1
  680.  
  681. If Bumper2Light.IsVisible=true then
  682. AddScore(10)
  683. else
  684. AddScore(1)
  685. end if
  686. end if
  687. end sub
  688.  
  689.  
  690. Sub Bumper2_Timer()
  691. Select Case bump2
  692. Case 1:Ring2.HeightTop = 15:Ring2.HeightBottom = 15:bump2 = 2
  693. Case 2:Ring2.HeightTop = 25:Ring2.HeightBottom = 25:bump2 = 3
  694. Case 3:Ring2.HeightTop = 35:Ring2.HeightBottom = 35:bump2 = 4
  695. Case 4:Ring2.HeightTop = 45:Ring2.HeightBottom = 45:Bumper2.TimerEnabled = 0
  696. End Select
  697.  
  698.  
  699. End Sub
  700.  
  701. Sub Bumper3_Hit
  702. If TableTilted=false then
  703.  
  704. PlaySound SoundFXDOF("bumper1",107,DOFPulse,DOFContactors)
  705. bump3 = 1
  706. Bumper3.TimerEnabled = 1
  707. If Bumper3Light.IsVisible=true then
  708. AddScore(10)
  709. else
  710. AddScore(1)
  711. end if
  712. end if
  713.  
  714. End Sub
  715.  
  716. Sub Bumper3_Timer()
  717. Select Case bump3
  718. Case 1:Ring3.HeightTop = 15:Ring3.HeightBottom = 15:bump3 = 2
  719. Case 2:Ring3.HeightTop = 25:Ring3.HeightBottom = 25:bump3 = 3
  720. Case 3:Ring3.HeightTop = 35:Ring3.HeightBottom = 35:bump3 = 4
  721. Case 4:Ring3.HeightTop = 45:Ring3.HeightBottom = 45:Bumper3.TimerEnabled = 0
  722. End Select
  723.  
  724.  
  725. End Sub
  726.  
  727. Sub Bumper4_Hit
  728. If TableTilted=false then
  729.  
  730. PlaySound SoundFXDOF("bumper1",108,DOFPulse,DOFContactors)
  731. bump4 = 1
  732. Bumper4.TimerEnabled = 1
  733. If Bumper4Light.IsVisible=true then
  734. AddScore(10)
  735. else
  736. AddScore(1)
  737. end if
  738. end if
  739.  
  740. End Sub
  741.  
  742. Sub Bumper4_Timer()
  743. Select Case bump4
  744. Case 1:Ring4.HeightTop = 15:Ring4.HeightBottom = 15:bump4 = 2
  745. Case 2:Ring4.HeightTop = 25:Ring4.HeightBottom = 25:bump4 = 3
  746. Case 3:Ring4.HeightTop = 35:Ring4.HeightBottom = 35:bump4 = 4
  747. Case 4:Ring4.HeightTop = 45:Ring4.HeightBottom = 45:Bumper4.TimerEnabled = 0
  748. End Select
  749.  
  750.  
  751. End Sub
  752.  
  753.  
  754. '***********************************
  755.  
  756. Sub TriggerTop1_Hit()
  757. DOF 109, DOFOn
  758. If TableTilted=false then
  759. PlaySound "sensor"
  760. if UpperLight1.state=1 then
  761. AddScore(100)
  762. X = DominoAdvance(AdvancePosition)
  763. CheckNumSpecials()
  764. else
  765. SetMotor(50)
  766. end if
  767. trig_1.TopVisible=0
  768.  
  769. end if
  770. End Sub
  771.  
  772. Sub TriggerTop1_UnHit()
  773. DOF 109, DOFOff
  774. trig_1.TopVisible=1
  775. end sub
  776.  
  777. Sub TriggerTop2_Hit()
  778. DOF 110, DOFOn
  779. If TableTilted=false then
  780. PlaySound "sensor"
  781. if UpperLight2.state=1 then
  782. AddScore(100)
  783. X = DominoAdvance(AdvancePosition)
  784. CheckNumSpecials()
  785. else
  786. SetMotor(50)
  787. end if
  788. trig_2.TopVisible=0
  789.  
  790. end if
  791. End Sub
  792.  
  793. Sub TriggerTop2_UnHit()
  794. DOF 110, DOFOff
  795. trig_2.TopVisible=1
  796. end sub
  797.  
  798. Sub TriggerTop3_Hit()
  799. DOF 111, DOFOn
  800. If TableTilted=false then
  801. PlaySound "sensor"
  802. if UpperLight3.state=1 then
  803. AddScore(100)
  804. X = DominoAdvance(AdvancePosition)
  805. CheckNumSpecials()
  806. else
  807. SetMotor(50)
  808. end if
  809. trig_3.TopVisible=0
  810.  
  811. end if
  812. End Sub
  813.  
  814. Sub TriggerTop3_UnHit()
  815. DOF 111, DOFOff
  816. trig_3.TopVisible=1
  817. end sub
  818.  
  819. Sub TriggerTop4_Hit()
  820. DOF 112, DOFOn
  821. If TableTilted=false then
  822. PlaySound "sensor"
  823. if UpperLight4.state=1 then
  824. AddScore(100)
  825. X = DominoAdvance(AdvancePosition)
  826. CheckNumSpecials()
  827. else
  828. SetMotor(50)
  829. end if
  830. trig_4.TopVisible=0
  831.  
  832. end if
  833. End Sub
  834.  
  835. Sub TriggerTop4_UnHit()
  836. DOF 112, DOFOff
  837. trig_4.TopVisible=1
  838. end sub
  839.  
  840. Sub TriggerTop5_Hit()
  841. DOF 113, DOFOn
  842. If TableTilted=false then
  843. PlaySound "sensor"
  844. if UpperLight5.state=1 then
  845. AddScore(100)
  846. X = DominoAdvance(AdvancePosition)
  847. CheckNumSpecials()
  848. else
  849. SetMotor(50)
  850. end if
  851. trig_5.TopVisible=0
  852.  
  853. end if
  854. End Sub
  855.  
  856. Sub TriggerTop5_UnHit()
  857. DOF 113, DOFOff
  858. trig_5.TopVisible=1
  859. end sub
  860.  
  861. Sub TriggerTop6_Hit()
  862. DOF 114, DOFOn
  863. If TableTilted=false then
  864. PlaySound "sensor"
  865. if UpperLight6.state=1 then
  866. AddScore(100)
  867. X = DominoAdvance(AdvancePosition)
  868. CheckNumSpecials()
  869. else
  870. SetMotor(50)
  871. end if
  872. trig_6.TopVisible=0
  873.  
  874. end if
  875. End Sub
  876.  
  877. Sub TriggerTop6_UnHit()
  878. DOF 114, DOFOff
  879. trig_6.TopVisible=1
  880. end sub
  881.  
  882.  
  883.  
  884. Sub TriggerLeftOutlane_Hit()
  885. DOF 115, DOFOn
  886. If TableTilted=false then
  887. PlaySound "sensor"
  888. X = DominoAdvance(AdvancePosition)
  889. CheckNumSpecials()
  890.  
  891. trig_lol.TopVisible=0
  892. AddScore(100)
  893. If LeftOutlaneLight.state=1 then
  894. AddSpecial
  895. end if
  896. end If
  897. End Sub
  898.  
  899. Sub TriggerLeftOutlane_UnHit()
  900. DOF 115, DOFOff
  901. trig_lol.TopVisible=1
  902. end sub
  903.  
  904. Sub TriggerRightOutlane_Hit()
  905. DOF 116, DOFOn
  906. If TableTilted=false then
  907. PlaySound "sensor"
  908. X = DominoAdvance(AdvancePosition)
  909. CheckNumSpecials()
  910.  
  911. AddScore(100)
  912. trig_rol.TopVisible=0
  913. If RightOutlaneLight.state=1 then
  914. AddSpecial
  915. end if
  916. End If
  917. End Sub
  918.  
  919. Sub TriggerRightOutlane_UnHit()
  920. DOF 116, DOFOff
  921. trig_rol.TopVisible=1
  922. end sub
  923.  
  924.  
  925.  
  926. '****************************************************
  927. Sub LowerTargetLeft1_Hit()
  928. DOF 117, DOFPulse
  929. if TableTilted=false then
  930. if LeftTargetLight1.state=1 then
  931. AddScore(100)
  932. X = DominoAdvance(AdvancePosition)
  933. CheckNumSpecials()
  934. else
  935. SetMotor(50)
  936.  
  937. end if
  938. end if
  939. left1p.transX=-10:LowerTargetLeft1.timerenabled=1
  940. end sub
  941.  
  942. Sub LowerTargetLeft1_timer
  943. left1p.transX=0:LowerTargetLeft1.timerenabled=0
  944. end sub
  945.  
  946. Sub LowerTargetLeft2_Hit()
  947. DOF 117, DOFPulse
  948. if TableTilted=false then
  949. if LeftTargetLight2.state=1 then
  950. AddScore(100)
  951. X = DominoAdvance(AdvancePosition)
  952. CheckNumSpecials()
  953. else
  954. SetMotor(50)
  955.  
  956. end if
  957. end if
  958. left2p.transX=-10:LowerTargetLeft2.timerenabled=1
  959. end sub
  960.  
  961. Sub LowerTargetLeft2_timer
  962. left2p.transX=0:LowerTargetLeft2.timerenabled=0
  963. end sub
  964.  
  965. Sub LowerTargetLeft3_Hit()
  966. DOF 117, DOFPulse
  967. if TableTilted=false then
  968. if LeftTargetLight3.state=1 then
  969. AddScore(100)
  970. X = DominoAdvance(AdvancePosition)
  971. CheckNumSpecials()
  972. else
  973. SetMotor(50)
  974.  
  975. end if
  976. end if
  977. left3p.transX=-10:LowerTargetLeft3.timerenabled=1
  978. end sub
  979.  
  980. Sub LowerTargetLeft3_timer
  981. left3p.transX=0:LowerTargetLeft3.timerenabled=0
  982. end sub
  983.  
  984.  
  985. Sub LowerTargetRight1_Hit()
  986. DOF 118, DOFPulse
  987. if TableTilted=false then
  988. if RightTargetLight1.state=1 then
  989. AddScore(100)
  990. X = DominoAdvance(AdvancePosition)
  991. CheckNumSpecials()
  992. else
  993. SetMotor(50)
  994.  
  995. end if
  996. end if
  997. right1p.transX=-10:LowerTargetRight1.timerenabled=1
  998. end sub
  999.  
  1000. Sub LowerTargetRight1_timer
  1001. right1p.transX=0:LowerTargetRight1.timerenabled=0
  1002. end sub
  1003.  
  1004. Sub LowerTargetRight2_Hit()
  1005. DOF 118, DOFPulse
  1006. if TableTilted=false then
  1007. if RightTargetLight2.state=1 then
  1008. AddScore(100)
  1009. X = DominoAdvance(AdvancePosition)
  1010. CheckNumSpecials()
  1011. else
  1012. SetMotor(50)
  1013.  
  1014. end if
  1015. end if
  1016. right2p.transX=-10:LowerTargetRight2.timerenabled=1
  1017. end sub
  1018.  
  1019. Sub LowerTargetRight2_timer
  1020. right2p.transX=0:LowerTargetRight2.timerenabled=0
  1021. end sub
  1022.  
  1023. Sub LowerTargetRight3_Hit()
  1024. DOF 118, DOFPulse
  1025. if TableTilted=false then
  1026. if RightTargetLight3.state=1 then
  1027. AddScore(100)
  1028. X = DominoAdvance(AdvancePosition)
  1029. CheckNumSpecials()
  1030. else
  1031. SetMotor(50)
  1032.  
  1033. end if
  1034. end if
  1035. right3p.transX=-10:LowerTargetRight3.timerenabled=1
  1036. end sub
  1037.  
  1038. Sub LowerTargetRight3_timer
  1039. right3p.transX=0:LowerTargetRight3.timerenabled=0
  1040. end sub
  1041.  
  1042. Sub Target3_Hit()
  1043. DOF 119, DOFPulse
  1044. if TableTilted=false then
  1045. if CenterTargetLight.state=0 then
  1046. SetMotor(50)
  1047. Else
  1048. AddScore(100)
  1049. end if
  1050. end if
  1051. target3p.transX=-10:Target3.timerenabled=1
  1052. end sub
  1053.  
  1054. Sub Target3_timer
  1055. target3p.transX=0:Target3.timerenabled=0
  1056. end sub
  1057.  
  1058.  
  1059. '****************************************************
  1060. '****************************************************
  1061.  
  1062. sub Kicker1_Hit()
  1063. Dim speedx,speedy,finalspeed
  1064. speedx=activeball.velx
  1065. speedy=activeball.vely
  1066. finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
  1067. if TableTilted=true then
  1068. Kicker1.Timerenabled=1
  1069. exit sub
  1070. end if
  1071. if finalspeed>10 then
  1072. Kicker1.Kick 0,0
  1073. activeball.velx=speedx
  1074. activeball.vely=speedy
  1075. else
  1076. mHole.MagnetOn=1
  1077.  
  1078. if MotorRunning=0 then
  1079. Kicker1Process
  1080. else
  1081. KickerHolder1.enabled=1
  1082. end if
  1083. end if
  1084.  
  1085. end sub
  1086.  
  1087. sub KickerHolder1_timer
  1088. if MotorRunning=0 then
  1089. KickerHolder1.enabled=0
  1090. Kicker1Process
  1091. end if
  1092. end sub
  1093.  
  1094. sub Kicker1Process
  1095.  
  1096. Kicker1.timerinterval=(500)
  1097. Kicker1.timerenabled=1
  1098. if Kick1Light.state=1 then
  1099. SetMotor(500)
  1100. RotoSpin
  1101. AddSpecial
  1102. Else
  1103. SetMotor(500)
  1104. RotoSpin
  1105. X = DominoAdvance(AdvancePosition)
  1106. If BallsPerGame=5 then
  1107. CheckNumSpecials()
  1108. else
  1109. CheckNumSpecials2()
  1110. end if
  1111. end if
  1112.  
  1113. end sub
  1114.  
  1115. Sub Kicker1_Timer()
  1116. mHole.MagnetOn=0
  1117. Kicker1.timerenabled=0
  1118. Playsound SoundFXDOF("saucer",120,DOFPulse,DOFContactors)
  1119. DOF 121, DOFPulse
  1120. Kicker1.kick 165,10
  1121. end sub
  1122.  
  1123.  
  1124. sub Kicker2_Hit()
  1125. Dim speedx,speedy,finalspeed
  1126. speedx=activeball.velx
  1127. speedy=activeball.vely
  1128. finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
  1129. if TableTilted=true then
  1130. Kicker2.Timerenabled=1
  1131. exit sub
  1132. end if
  1133. if finalspeed>10 then
  1134. Kicker2.Kick 0,0
  1135. activeball.velx=speedx
  1136. activeball.vely=speedy
  1137. else
  1138. mHole2.MagnetOn=1
  1139.  
  1140. if MotorRunning=0 then
  1141. Kicker2Process
  1142. else
  1143. KickerHolder2.enabled=1
  1144. end if
  1145. end if
  1146.  
  1147. end sub
  1148.  
  1149. sub KickerHolder2_timer
  1150. if MotorRunning=0 then
  1151. KickerHolder2.enabled=0
  1152. Kicker2Process
  1153. end if
  1154. end sub
  1155.  
  1156. sub Kicker2Process
  1157.  
  1158. Kicker2.timerinterval=(500)
  1159. Kicker2.timerenabled=1
  1160. if Kick2Light.state=1 then
  1161. SetMotor(500)
  1162. RotoSpin
  1163. AddSpecial
  1164. Else
  1165. SetMotor(500)
  1166. RotoSpin
  1167. X = DominoAdvance(AdvancePosition)
  1168. If BallsPerGame=5 then
  1169. CheckNumSpecials()
  1170. else
  1171. CheckNumSpecials2()
  1172. end if
  1173. end if
  1174.  
  1175. end sub
  1176.  
  1177.  
  1178. Sub Kicker2_Timer()
  1179. mHole2.MagnetOn=0
  1180. Kicker2.timerenabled=0
  1181. Playsound SoundFXDOF("saucer",122,DOFPulse,DOFContactors)
  1182. DOF 121, DOFPulse
  1183. Kicker2.kick 185,10
  1184. end sub
  1185.  
  1186.  
  1187.  
  1188. '****************************************************
  1189. Sub RotoSpin()
  1190. Dim X22
  1191. X22=INT(RND()*10) ' get random Number from 0-9
  1192. If X22 < 4 Then
  1193. ' 40% of Time advance 3 positions
  1194. RotoCycles=6
  1195. Else
  1196. If X22 < 8 Then
  1197. ' 40% of Time Advance 4 Positions
  1198. RotoCycles=8
  1199. Else
  1200. ' 20% of Time Advance 5 Positions
  1201. RotoCycles=10
  1202. End If
  1203. End if
  1204. RotoFlip=1
  1205. RotoTimer.enabled=1
  1206. StopSound "BuzzLeft" ' In Case Quick Hit
  1207. PlaySound SoundFXDOF("RotoStart",128,DOFPulse,DOFGear) ' Sound "Kick" Solenoid
  1208. End Sub
  1209. '
  1210. ' RotoWheel Spin Animation Timer moves Through the Animation Stages
  1211. Sub RotoTimer_timer
  1212. RotoPosition=RotoPosition+1
  1213. if RotoPosition>29 then
  1214. RotoPosition=0
  1215. end if
  1216. LRotoA1.image = "RotoT1-"+FormatNumber(RotoImagesL1(RotoPosition),0)
  1217. LRotoA2.image = "RotoT1-"+FormatNumber(RotoImagesL2(RotoPosition),0)
  1218. LRotoA.image = "RotoT1-"+FormatNumber(RotoImagesL1(RotoPosition),0)
  1219.  
  1220. RRotoA1.image = "RotoT1-"+FormatNumber(RotoImagesR1(RotoPosition),0)
  1221. RRotoA.image = "RotoT1-"+FormatNumber(RotoImagesR1(RotoPosition),0)
  1222. RRotoA2.image = "RotoT1-"+FormatNumber(RotoImagesR2(RotoPosition),0)
  1223.  
  1224. if RotoFlip = 0 then
  1225. LRotoA1.topvisible=0
  1226. LRotoA2.topvisible=0
  1227. RRotoA1.topvisible=0
  1228. RRotoA2.topvisible=0
  1229. LRotoA.topvisible=1
  1230. RRotoA.topvisible=1
  1231. RotoFlip=1
  1232. else
  1233. LRotoA1.topvisible=1
  1234. LRotoA2.topvisible=1
  1235. RRotoA1.topvisible=1
  1236. RRotoA2.topvisible=1
  1237. LRotoA.topvisible=0
  1238. RRotoA.topvisible=0
  1239. RotoFlip=0
  1240. end if
  1241. RotoCycles=RotoCycles-1
  1242. If RotoCycles<1 then
  1243. LRotoA1.topvisible=0
  1244. LRotoA2.topvisible=0
  1245. RRotoA1.topvisible=0
  1246. RRotoA2.topvisible=0
  1247. LRotoA.topvisible=1
  1248. RRotoA.topvisible=1
  1249. RotoTimer.enabled=0
  1250. end if
  1251. end sub
  1252.  
  1253.  
  1254. '****************************************************
  1255. Sub RotoNumLeft_Hit()
  1256. PlaySound SoundFXDOF("Target",119,DOFPulse,DOFContactors)
  1257.  
  1258. SpotLeftNum() ' Spot Left-Hand Number
  1259. If RotoTimer.enabled=0 then
  1260. LRotoA.transX=-10
  1261. RotoNumLeft.TimerEnabled=True
  1262. end if
  1263.  
  1264. End Sub
  1265.  
  1266. Sub RotoNumLeft_Timer()
  1267. LRotoA.transX=0
  1268. RotoNumLeft.TimerEnabled=False ' Kick Animation Timer
  1269. End Sub
  1270.  
  1271. Sub RotoNumRight_Hit()
  1272. PlaySound SoundFXDOF("Target",119,DOFPulse,DOFContactors)
  1273.  
  1274. SpotRightNum() ' Spot Current Right-Hand Number
  1275.  
  1276. If RotoTimer.enabled=0 then
  1277. RRotoA.transX=-10
  1278. RotoNumRight.TimerEnabled=True ' Kick Animation Timer
  1279. End If
  1280. End Sub
  1281. '
  1282. ' End Right Num hit Animation
  1283. '
  1284. Sub RotoNumRight_Timer()
  1285. RRotoA.transX=0
  1286. RotoNumRight.TimerEnabled=False ' Kick Animation Timer
  1287. End Sub
  1288. '
  1289. ' Spot RightHand Roto Number
  1290. '
  1291. Sub SpotRightNum()
  1292. if TableTilted=false then
  1293.  
  1294. X= RotoImagesR1(RotoPosition)
  1295. TempRotoScore=100
  1296. if X=DominoAdvance(AdvancePosition) then
  1297. TempRotoScore=500
  1298. end if
  1299. if X=6 and AdvancePosition<14 then
  1300. TempRotoScore=500
  1301. end if
  1302. SetMotor(TempRotoScore)
  1303. If BallsPerGame=5 then
  1304. CheckNumSpecials()
  1305. else
  1306. CheckNumSpecials2()
  1307. end if
  1308. end if
  1309. End Sub
  1310. '
  1311. ' Spot LeftHand Roto Number
  1312. '
  1313. Sub SpotLeftNum()
  1314. if TableTilted=false then
  1315.  
  1316. X= RotoImagesL1(RotoPosition)
  1317. TempRotoScore=100
  1318. if X=DominoAdvance(AdvancePosition) then
  1319. TempRotoScore=500
  1320. end if
  1321. if X=6 and AdvancePosition<14 then
  1322. TempRotoScore=500
  1323. end if
  1324. SetMotor(TempRotoScore)
  1325. If BallsPerGame=5 then
  1326. CheckNumSpecials()
  1327. else
  1328. CheckNumSpecials2()
  1329. end if ' See If Special Happened
  1330. end if
  1331. End Sub
  1332.  
  1333.  
  1334. '****************************************************
  1335. Sub CheckNumSpecials()
  1336.  
  1337. If X = DominoAdvance(AdvancePosition) then
  1338. DominoAdvanceLights(AdvancePosition).state=0
  1339. AdvancePosition=AdvancePosition+1
  1340. If AdvancePosition>14 then
  1341. AdvancePosition=14
  1342. end if
  1343. DominoAdvanceLights(AdvancePosition).state=1
  1344. if RelayB=0 then
  1345. RelayB=1
  1346. else
  1347. RelayB=0
  1348. end if
  1349. else
  1350. if X=6 and AdvancePosition<14 then
  1351. DominoAdvanceLights(AdvancePosition).state=0
  1352. AdvancePosition=AdvancePosition+1
  1353. DominoAdvanceLights(AdvancePosition).state=1
  1354. end if
  1355. if RelayB=0 then
  1356. RelayB=1
  1357. else
  1358. RelayB=0
  1359. end if
  1360.  
  1361. end if
  1362. If AdvancePosition=14 then
  1363. For each xx in SpecialLights
  1364. xx.state=1
  1365. next
  1366. else
  1367. For each xx in SpecialLights
  1368. xx.state=0
  1369. next
  1370. if FlippingFlag=0 then
  1371. FlippingFlag=1
  1372. if RelayC=0 then
  1373. RelayC=1
  1374. else
  1375. RelayC=0
  1376. end if
  1377. else
  1378. FlippingFlag=0
  1379. if RelayE=0 then
  1380. RelayE=1
  1381. else
  1382. RelayE=0
  1383. end if
  1384. end if
  1385. end if
  1386. End Sub
  1387.  
  1388. Sub CheckNumSpecials2()
  1389.  
  1390. If X = DominoAdvance(AdvancePosition) then
  1391. DominoAdvanceLights(AdvancePosition).state=0
  1392. AdvancePosition=AdvancePosition+1+AdvanceSetting
  1393. If AdvancePosition>14 then
  1394. AdvancePosition=14
  1395. end if
  1396. DominoAdvanceLights(AdvancePosition).state=1
  1397. if RelayB=0 then
  1398. RelayB=1
  1399. else
  1400. RelayB=0
  1401. end if
  1402. else
  1403. if X=6 and AdvancePosition<14 then
  1404. DominoAdvanceLights(AdvancePosition).state=0
  1405. AdvancePosition=AdvancePosition+1+AdvanceSetting
  1406. If AdvancePosition>14 then
  1407. AdvancePosition=14
  1408. end if
  1409. DominoAdvanceLights(AdvancePosition).state=1
  1410. end if
  1411. if RelayB=0 then
  1412. RelayB=1
  1413. else
  1414. RelayB=0
  1415. end if
  1416.  
  1417. end if
  1418. If AdvancePosition=14 then
  1419. For each xx in SpecialLights
  1420. xx.state=1
  1421. next
  1422. else
  1423. For each xx in SpecialLights
  1424. xx.state=0
  1425. next
  1426. if FlippingFlag=0 then
  1427. FlippingFlag=1
  1428. if RelayC=0 then
  1429. RelayC=1
  1430. else
  1431. RelayC=0
  1432. end if
  1433. else
  1434. FlippingFlag=0
  1435. if RelayE=0 then
  1436. RelayE=1
  1437. else
  1438. RelayE=0
  1439. end if
  1440. end if
  1441. end if
  1442. End Sub
  1443.  
  1444. '
  1445. '
  1446. ' Relay Timers
  1447. '
  1448. '
  1449. Sub TimerAlternatingRelay_timer
  1450. if InProgress=true then
  1451.  
  1452. if RelayB=0 then
  1453. Bumper1.state=0
  1454. Bumper4.state=0
  1455. Bumper2.state=1
  1456. Bumper3.state=1
  1457. If BallsPerGame=3 then
  1458. LeftTargetLight1.state=1
  1459. RightTargetLight1.state=1
  1460. LeftTargetLight2.state=0
  1461. RightTargetLight2.state=0
  1462. LeftTargetLight3.state=1
  1463. RightTargetLight3.state=1
  1464.  
  1465. end if
  1466. end if
  1467. if RelayB=1 then
  1468. Bumper1.state=1
  1469. Bumper4.state=1
  1470.  
  1471. Bumper2.state=0
  1472. Bumper3.state=0
  1473.  
  1474. If BallsPerGame=3 then
  1475. LeftTargetLight1.state=0
  1476. RightTargetLight1.state=0
  1477. LeftTargetLight2.state=1
  1478. RightTargetLight2.state=1
  1479. LeftTargetLight3.state=0
  1480. RightTargetLight3.state=0
  1481.  
  1482. end if
  1483.  
  1484. end if
  1485. BumpersOn
  1486. end if
  1487. end sub
  1488.  
  1489. Sub TimerCRelay_timer
  1490.  
  1491. if InProgress=true then
  1492.  
  1493. if RelayC=0 then
  1494. UpperLight1.state=0
  1495. UpperLight4.state=0
  1496. If RelayE=0 then
  1497. UpperLight2.state=1
  1498. Upperlight5.state=1
  1499. UpperLight3.state=0
  1500. UpperLight6.state=0
  1501. if BallsPerGame=5 then
  1502. LeftTargetLight2.state=1
  1503. RightTargetLight2.state=1
  1504. LeftTargetLight3.state=0
  1505. RightTargetLight3.state=0
  1506.  
  1507. end if
  1508. else
  1509. UpperLight2.state=0
  1510. Upperlight5.state=0
  1511. UpperLight3.state=1
  1512. UpperLight6.state=1
  1513. if BallsPerGame=5 then
  1514. LeftTargetLight2.state=0
  1515. RightTargetLight2.state=0
  1516. LeftTargetLight3.state=1
  1517. RightTargetLight3.state=1
  1518.  
  1519. end if
  1520. end if
  1521.  
  1522. if BallsPerGame=5 then
  1523. CenterTargetLight.state=0
  1524. LeftTargetLight1.state=0
  1525. RightTargetLight1.state=0
  1526. UpperLight1.state=0
  1527. UpperLight4.state=0
  1528. else
  1529. Bumper1.state=0
  1530. Bumper4.state=0
  1531. if (RelayB=1) then
  1532. Bumper1.state=1
  1533. Bumper4.state=1
  1534.  
  1535. end if
  1536. BumpersOn
  1537. end if
  1538.  
  1539. else
  1540. UpperLight2.state=0
  1541. Upperlight5.state=0
  1542. UpperLight3.state=0
  1543. UpperLight6.state=0
  1544. UpperLight1.state=1
  1545. UpperLight4.state=1
  1546. if BallsPerGame=5 then
  1547. LeftTargetLight2.state=0
  1548. RightTargetLight2.state=0
  1549. LeftTargetLight3.state=0
  1550. RightTargetLight3.state=0
  1551. CenterTargetLight.state=1
  1552. LeftTargetLight1.state=1
  1553. RightTargetLight1.state=1
  1554. else
  1555. Bumper1.state=0
  1556. Bumper4.state=0
  1557. if (RelayB=1) or (BallsPerGame=3) then
  1558. Bumper1.state=1
  1559. Bumper4.state=1
  1560.  
  1561. end if
  1562. BumpersOn
  1563. end if
  1564. end if
  1565.  
  1566. end if
  1567. end sub
  1568.  
  1569. Sub TimerERelay_timer
  1570. if InProgress=true then
  1571. if RelayE=0 then
  1572.  
  1573. else
  1574.  
  1575. end if
  1576.  
  1577. end if
  1578. end sub
  1579.  
  1580.  
  1581. Sub AddSpecial()
  1582. PlaySound SoundFXDOF("knocker",124,DOFPulse,DOFKnocker)
  1583. DOF 121, DOFPulse
  1584. Credits=Credits+1
  1585. DOF 125, DOFOn
  1586. if Credits>9 then Credits=9
  1587. If B2SOn Then
  1588. Controller.B2SSetCredits Credits
  1589. End If
  1590. EMReel6.SetValue(Credits)
  1591. End Sub
  1592.  
  1593. Sub AddSpecial2()
  1594. PlaySound"click"
  1595. Credits=Credits+1
  1596. DOF 125, DOFOn
  1597. if Credits>9 then Credits=9
  1598. If B2SOn Then
  1599. Controller.B2SSetCredits Credits
  1600. End If
  1601. EMReel6.SetValue(Credits)
  1602. End Sub
  1603.  
  1604. Sub AddBonus()
  1605. bonuscountdown=bonuscounter
  1606. ScoreBonus.enabled=true
  1607. End Sub
  1608.  
  1609.  
  1610.  
  1611. Sub ResetBallDrops()
  1612.  
  1613.  
  1614.  
  1615. BonusCounter=0
  1616. HoleCounter=0
  1617. End Sub
  1618.  
  1619.  
  1620. Sub LightsOut
  1621. BonusCounter=0
  1622. HoleCounter=0
  1623.  
  1624. Bumper1.state=0
  1625.  
  1626. Bumper2.state=0
  1627.  
  1628. Bumper3.state=0
  1629.  
  1630. Bumper4.state=0
  1631. For each obj in AllLights
  1632. obj.state=0
  1633. next
  1634.  
  1635. end sub
  1636.  
  1637. Sub ResetDrops()
  1638.  
  1639.  
  1640.  
  1641. End Sub
  1642.  
  1643. Sub ResetBalls()
  1644.  
  1645. TempMultiCounter=BallsPerGame-BallInPlay
  1646.  
  1647.  
  1648.  
  1649. BonusMultiplier=1
  1650.  
  1651. TableTilted=false
  1652. TiltReel.SetValue(0)
  1653. If B2Son then
  1654. Controller.B2SSetTilt 0
  1655. end if
  1656. ScoreLight.state=1
  1657. PlasticsOn
  1658. BumpersOn
  1659. CreateBallID BallRelease
  1660. 'Ballrelease.CreateSizedBall 27
  1661. Ballrelease.Kick 40,7
  1662. DOF 123, DOFPulse
  1663. If BallInPlay=BallsPerGame then
  1664. if B2SOn then
  1665. Controller.B2SSetShootAgain 1
  1666. end if
  1667. end if
  1668. InstructCard.image="IC"+FormatNumber(BallsPerGame,0)+FormatNumber(BallInPlay,0)
  1669.  
  1670.  
  1671. End Sub
  1672.  
  1673. sub delaykgclose_timer
  1674. delaykgclose.enabled=false
  1675. closekg.enabled=true
  1676.  
  1677. end sub
  1678.  
  1679. sub resettimer_timer
  1680. rst=rst+1
  1681. for i=1 to 1
  1682. If B2SOn Then
  1683. Controller.B2SSetScorePlayer i, 0
  1684. End If
  1685. next
  1686. if rst=10 then
  1687. playsound "StartBall1"
  1688. end if
  1689. if rst=12 then
  1690. newgame
  1691. resettimer.enabled=false
  1692. end if
  1693. end sub
  1694.  
  1695. sub ScoreBonus_timer
  1696.  
  1697. if (Bonus(bonuscountdown).state=1) and (bonuscountdown>0) then
  1698. AddScore2(1000)
  1699. Bonus(bonuscountdown).state=0
  1700. If BonusMultiplier=1 then
  1701. ScoreBonus.interval=300
  1702. Else
  1703. ScoreBonus.interval=300
  1704. end if
  1705. else
  1706. ScoreBonus.interval=10
  1707. end if
  1708. bonuscountdown=bonuscountdown-1
  1709. if bonuscountdown<=0 then
  1710. ScoreBonus.enabled=false
  1711. ScoreBonus.interval=600
  1712. NextBallDelay.enabled=true
  1713. else
  1714. Bonus(bonuscountdown).state=1
  1715. end if
  1716.  
  1717. end sub
  1718.  
  1719. sub NextBallDelay_timer()
  1720. NextBallDelay.enabled=false
  1721. nextball
  1722.  
  1723. end sub
  1724.  
  1725. sub newgame
  1726. InProgress=true
  1727. debugscore=0
  1728.  
  1729. AdvancePosition=0
  1730. MatchTextBox.text=""
  1731. BallTextBox.text=FormatNumber(BallInPlay,0)
  1732. for i = 1 to 4
  1733. Score(i)=0
  1734. Score100K(1)=0
  1735. HighScorePaid(i)=false
  1736. Replay1Paid(i)=false
  1737. Replay2Paid(i)=false
  1738. Replay3Paid(i)=false
  1739. Replay4Paid(i)=false
  1740. next
  1741. If B2SOn Then
  1742. Controller.B2SSetTilt 0
  1743. Controller.B2SSetGameOver 0
  1744. Controller.B2SSetMatch 0
  1745. Controller.B2SSetScorePlayer1 0
  1746. ' Controller.B2SSetScorePlayer2 0
  1747. ' Controller.B2SSetScorePlayer3 0
  1748. ' Controller.B2SSetScorePlayer4 0
  1749. Controller.B2SSetBallInPlay BallInPlay
  1750. End if
  1751.  
  1752.  
  1753. For each obj in DominoAdvanceLights
  1754. obj.state=0
  1755. next
  1756. For each obj in SpecialLights
  1757. obj.state=0
  1758. next
  1759. For each obj in LeftTargetLights
  1760. obj.state=0
  1761. next
  1762. For each obj in RightTargetLights
  1763. obj.state=0
  1764. next
  1765. DominoAdvanceLights(AdvancePosition).state=1
  1766. AlternatingRelay=1
  1767. ZeroNineCounter=0
  1768. FlippingFlag=0
  1769. RelayB=0
  1770. RelayC=0
  1771. RelayE=0
  1772. If BallsPerGame=3 then
  1773. CenterTargetLight.state=1
  1774. else
  1775. CenterTargetLight.state=0
  1776. end if
  1777. Bumper1.state=0
  1778. Bumper2.state=0
  1779. Bumper3.state=0
  1780. Bumper4.state=0
  1781. Bumper1Light.IsVisible=0
  1782. Bumper2Light.IsVisible=0
  1783. Bumper3Light.IsVisible=0
  1784. Bumper4Light.IsVisible=0
  1785. ResetDrops
  1786. ResetBalls
  1787. End sub
  1788.  
  1789. sub nextball
  1790.  
  1791. Player=Player+1
  1792. If Player>Players Then
  1793. BallInPlay=BallInPlay+1
  1794. If BallInPlay>BallsPerGame then
  1795. PlaySound("MotorLeer")
  1796. InProgress=false
  1797.  
  1798. If B2SOn Then
  1799. Controller.B2SSetGameOver 1
  1800. Controller.B2SSetShootAgain 0
  1801. Controller.B2SSetPlayerUp 0
  1802. Controller.B2SSetBallInPlay 0
  1803. ' Controller.B2SSetCanPlay 0
  1804. End If
  1805. InstructCard.image="IC"+FormatNumber(BallsPerGame,0)+"0"
  1806. ScoreLight.state=0
  1807. LeftFlipper.RotateToStart
  1808. RightFlipper.RotateToStart
  1809. LightsOut
  1810. PlasticsOff
  1811. BallTextBox.text=""
  1812. checkmatch
  1813. CheckHighScore
  1814. Players=0
  1815. Else
  1816. Player=1
  1817. If B2SOn Then
  1818. Controller.B2SSetPlayerUp Player
  1819. Controller.B2SSetBallInPlay BallInPlay
  1820.  
  1821. End If
  1822. ' PlaySound("RotateThruPlayers")
  1823. TempPlayerUp=Player
  1824. ' PlayerUpRotator.enabled=true
  1825. PlayStartBall.enabled=true
  1826. BallTextBox.text=FormatNumber(BallInPlay,0)
  1827. ResetBalls
  1828. End If
  1829. Else
  1830. If B2SOn Then
  1831. Controller.B2SSetPlayerUp Player
  1832. Controller.B2SSetBallInPlay BallInPlay
  1833. End If
  1834. ' PlaySound("RotateThruPlayers")
  1835. TempPlayerUp=Player
  1836. ' PlayerUpRotator.enabled=true
  1837. PlayStartBall.enabled=true
  1838. BallTextBox.text=FormatNumber(BallInPlay,0)
  1839. ResetBalls
  1840. End If
  1841.  
  1842. End sub
  1843.  
  1844. sub CheckHighScore
  1845. Dim playertops
  1846. dim si
  1847. dim sj
  1848. dim stemp
  1849. dim stempplayers
  1850. for i=1 to 4
  1851. sortscores(i)=0
  1852. sortplayers(i)=0
  1853. next
  1854. playertops=0
  1855. for i = 1 to Players
  1856. sortscores(i)=Score(i)
  1857. sortplayers(i)=i
  1858. next
  1859.  
  1860. for si = 1 to Players
  1861. for sj = 1 to Players-1
  1862. if sortscores(sj)>sortscores(sj+1) then
  1863. stemp=sortscores(sj+1)
  1864. stempplayers=sortplayers(sj+1)
  1865. sortscores(sj+1)=sortscores(sj)
  1866. sortplayers(sj+1)=sortplayers(sj)
  1867. sortscores(sj)=stemp
  1868. sortplayers(sj)=stempplayers
  1869. end if
  1870. next
  1871. next
  1872. ScoreChecker=4
  1873. CheckAllScores=1
  1874. NewHighScore sortscores(ScoreChecker),sortplayers(ScoreChecker)
  1875. savehs
  1876. end sub
  1877.  
  1878.  
  1879. sub checkmatch
  1880. Dim tempmatch
  1881. if TableTilted=true and TiltEndsGame=1 then
  1882. exit sub
  1883. end if
  1884. tempmatch=Int(Rnd*10)
  1885. Match=tempmatch*10
  1886. MatchReel.SetValue(tempmatch+1)
  1887. if Match=0 then
  1888. MatchTextBox.text="Match: 00"
  1889. else
  1890. MatchTextBox.text="Match: " + FormatNumber(Match,0)
  1891. end if
  1892.  
  1893. If B2SOn Then
  1894. If Match = 0 Then
  1895. Controller.B2SSetMatch 10
  1896. Else
  1897. Controller.B2SSetMatch Match/10
  1898. End If
  1899. End if
  1900. for i = 1 to Players
  1901. if Match=(Score(i) mod 10) then
  1902. AddSpecial
  1903. end if
  1904. next
  1905. end sub
  1906.  
  1907. Sub TiltTimer_Timer()
  1908. if TiltCount > 0 then TiltCount = TiltCount - 1
  1909. if TiltCount = 0 then
  1910. TiltTimer.Enabled = False
  1911. end if
  1912. end sub
  1913.  
  1914. Sub TiltIt()
  1915. TiltCount = TiltCount + 1
  1916. if TiltCount = 3 then
  1917. TableTilted=True
  1918. TiltReel.SetValue(1)
  1919. If TiltEndsGame=1 then
  1920. BallInPlay=BallsPerGame
  1921. If B2SOn Then
  1922. Controller.B2SSetGameOver 1
  1923. Controller.B2SSetShootAgain 0
  1924. Controller.B2SSetPlayerUp 0
  1925. Controller.B2SSetBallInPlay 0
  1926. ' Controller.B2SSetCanPlay 0
  1927. End If
  1928. InstructCard.image="IC"+FormatNumber(BallsPerGame,0)+"0"
  1929. ScoreLight.state=0
  1930. end if
  1931. PlasticsOff
  1932. BumpersOff
  1933. ScoreLight.state=0
  1934. LeftFlipper.RotateToStart
  1935. RightFlipper.RotateToStart
  1936. If B2Son then
  1937. Controller.B2SSetTilt 1
  1938. end if
  1939. else
  1940. TiltTimer.Interval = 500
  1941. TiltTimer.Enabled = True
  1942. end if
  1943.  
  1944. end sub
  1945.  
  1946.  
  1947.  
  1948. Sub PlayStartBall_timer()
  1949.  
  1950. PlayStartBall.enabled=false
  1951. PlaySound("ballrel")
  1952. end sub
  1953.  
  1954. Sub PlayerUpRotator_timer()
  1955. If RotatorTemp<5 then
  1956. TempPlayerUp=TempPlayerUp+1
  1957. If TempPlayerUp>4 then
  1958. TempPlayerUp=1
  1959. end if
  1960. If B2SOn Then
  1961. Controller.B2SSetPlayerUp TempPlayerUp
  1962. End If
  1963.  
  1964. else
  1965. if B2SOn then
  1966. Controller.B2SSetPlayerUp Player
  1967. end if
  1968. PlayerUpRotator.enabled=false
  1969. RotatorTemp=1
  1970. end if
  1971. RotatorTemp=RotatorTemp+1
  1972.  
  1973.  
  1974. end sub
  1975.  
  1976. sub savehs
  1977. ' Based on Black's Highscore routines
  1978. Dim FileObj
  1979. Dim ScoreFile
  1980. Set FileObj=CreateObject("Scripting.FileSystemObject")
  1981. If Not FileObj.FolderExists(UserDirectory) then
  1982. Exit Sub
  1983. End if
  1984. Set ScoreFile=FileObj.CreateTextFile(UserDirectory & HSFileName,True)
  1985. ScoreFile.WriteLine 0
  1986. ScoreFile.WriteLine Credits
  1987. scorefile.writeline BallsPerGame
  1988. scorefile.writeline TiltEndsGame
  1989. scorefile.writeline AdvanceSetting
  1990. scorefile.writeline ReplayLevel
  1991. for xx=1 to 5
  1992. scorefile.writeline HSScore(xx)
  1993. next
  1994. for xx=1 to 5
  1995. scorefile.writeline HSName(xx)
  1996. next
  1997. ScoreFile.Close
  1998. Set ScoreFile=Nothing
  1999. Set FileObj=Nothing
  2000. end sub
  2001.  
  2002. sub loadhs
  2003. ' Based on Black's Highscore routines
  2004. Dim FileObj
  2005. Dim ScoreFile
  2006. dim temp1
  2007. dim temp2
  2008. dim temp3
  2009. dim temp4
  2010. dim temp5
  2011. dim temp6
  2012. dim temp8
  2013. dim temp9
  2014. dim temp10
  2015. dim temp11
  2016. dim temp12
  2017. dim temp13
  2018. dim temp14
  2019. dim temp15
  2020. dim temp16
  2021. dim temp17
  2022.  
  2023. Set FileObj=CreateObject("Scripting.FileSystemObject")
  2024. If Not FileObj.FolderExists(UserDirectory) then
  2025. Exit Sub
  2026. End if
  2027. If Not FileObj.FileExists(UserDirectory & HSFileName) then
  2028. Exit Sub
  2029. End if
  2030. Set ScoreFile=FileObj.GetFile(UserDirectory & HSFileName)
  2031. Set TextStr=ScoreFile.OpenAsTextStream(1,0)
  2032. If (TextStr.AtEndOfStream=True) then
  2033. Exit Sub
  2034. End if
  2035. temp1=TextStr.ReadLine
  2036. temp2=textstr.readline
  2037. temp3=textstr.readline
  2038. temp4=textstr.readline
  2039. temp5=textstr.readline
  2040. temp6=textstr.readline
  2041. HighScore=cdbl(temp1)
  2042. if HighScore<1 then
  2043.  
  2044. temp8=textstr.readline
  2045. temp9=textstr.readline
  2046. temp10=textstr.readline
  2047. temp11=textstr.readline
  2048. temp12=textstr.readline
  2049. temp13=textstr.readline
  2050. temp14=textstr.readline
  2051. temp15=textstr.readline
  2052. temp16=textstr.readline
  2053. temp17=textstr.readline
  2054. end if
  2055. TextStr.Close
  2056. Credits=cdbl(temp2)
  2057. BallsPerGame=cdbl(temp3)
  2058. TiltEndsGame=cdbl(temp4)
  2059. AdvanceSetting=cdbl(temp5)
  2060. ReplayLevel=cdbl(temp6)
  2061. if HighScore<1 then
  2062. HSScore(1) = int(temp8)
  2063. HSScore(2) = int(temp9)
  2064. HSScore(3) = int(temp10)
  2065. HSScore(4) = int(temp11)
  2066. HSScore(5) = int(temp12)
  2067.  
  2068. HSName(1) = temp13
  2069. HSName(2) = temp14
  2070. HSName(3) = temp15
  2071. HSName(4) = temp16
  2072. HSName(5) = temp17
  2073. end if
  2074. Set ScoreFile=Nothing
  2075. Set FileObj=Nothing
  2076. end sub
  2077.  
  2078. Sub DisplayHighScore
  2079.  
  2080.  
  2081. end sub
  2082.  
  2083. sub InitPauser5_timer
  2084. If B2SOn Then
  2085. Controller.B2SSetScore 3,HighScore
  2086. End If
  2087. DisplayHighScore
  2088. InitPauser5.enabled=false
  2089. end sub
  2090.  
  2091. sub ResetDropsTimer_timer
  2092. ResetDropsTimer.enabled=0
  2093. ResetDrops
  2094. end sub
  2095.  
  2096. sub BumpersOff
  2097. Bumper1Light.IsVisible=0
  2098. Bumper2Light.IsVisible=0
  2099. Bumper3Light.IsVisible=0
  2100. Bumper4Light.IsVisible=0
  2101.  
  2102. end sub
  2103.  
  2104. sub BumpersOn
  2105. Bumper1Light.IsVisible=0
  2106. Bumper2Light.IsVisible=0
  2107. Bumper3Light.IsVisible=0
  2108. Bumper4Light.IsVisible=0
  2109. if MotorRunning=1 then
  2110. exit sub
  2111. end if
  2112. if Bumper1.state=1 then
  2113. Bumper1Light.IsVisible=1
  2114. end if
  2115. if Bumper2.state=1 then
  2116. Bumper2Light.IsVisible=1
  2117. end if
  2118. if Bumper3.state=1 then
  2119. Bumper3Light.IsVisible=1
  2120. end if
  2121. if Bumper4.state=1 then
  2122. Bumper4Light.IsVisible=1
  2123. end if
  2124.  
  2125. end sub
  2126.  
  2127. Sub PlasticsOn
  2128. For each obj in PlasticsUnlit
  2129. obj.IsDropped=1
  2130. next
  2131. For each obj in PlasticsLit
  2132. obj.IsDropped=0
  2133. next
  2134. For each obj in Flashers
  2135. obj.IsVisible=1
  2136. next
  2137. end sub
  2138.  
  2139. Sub PlasticsOff
  2140. For each obj in PlasticsLit
  2141. obj.IsDropped=1
  2142. next
  2143. For each obj in PlasticsUnlit
  2144. obj.IsDropped=0
  2145. next
  2146. For each obj in Flashers
  2147. obj.IsVisible=0
  2148. next
  2149. StopSound "buzz"
  2150. StopSound "buzzL"
  2151. end sub
  2152.  
  2153. Sub SetupReplayTables
  2154.  
  2155. Replay1Table(1)=3200
  2156. Replay1Table(2)=4200
  2157. Replay1Table(3)=5100
  2158. Replay1Table(4)=999000
  2159. Replay1Table(5)=999000
  2160. Replay1Table(6)=999000
  2161. Replay1Table(7)=999000
  2162. Replay1Table(8)=999000
  2163. Replay1Table(9)=999000
  2164. Replay1Table(10)=999000
  2165. Replay1Table(11)=999000
  2166. Replay1Table(12)=999000
  2167. Replay1Table(13)=999000
  2168. Replay1Table(14)=999000
  2169. Replay1Table(15)=999000
  2170.  
  2171. Replay2Table(1)=3800
  2172. Replay2Table(2)=4800
  2173. Replay2Table(3)=5700
  2174. Replay2Table(4)=999000
  2175. Replay2Table(5)=999000
  2176. Replay2Table(6)=999000
  2177. Replay2Table(7)=999000
  2178. Replay2Table(8)=999000
  2179. Replay2Table(9)=999000
  2180. Replay2Table(10)=999000
  2181. Replay2Table(11)=999000
  2182. Replay2Table(12)=999000
  2183. Replay2Table(13)=999000
  2184. Replay2Table(14)=999000
  2185. Replay2Table(15)=999000
  2186.  
  2187. Replay3Table(1)=4400
  2188. Replay3Table(2)=5400
  2189. Replay3Table(3)=6300
  2190. Replay3Table(4)=999000
  2191. Replay3Table(5)=999000
  2192. Replay3Table(6)=999000
  2193. Replay3Table(7)=999000
  2194. Replay3Table(8)=999000
  2195. Replay3Table(9)=999000
  2196. Replay3Table(10)=999000
  2197. Replay3Table(11)=999000
  2198. Replay3Table(12)=999000
  2199. Replay3Table(13)=999000
  2200. Replay3Table(14)=999000
  2201. Replay3Table(15)=999000
  2202.  
  2203. Replay4Table(1)=5000
  2204. Replay4Table(2)=6000
  2205. Replay4Table(3)=6900
  2206. Replay4Table(4)=999000
  2207. Replay4Table(5)=999000
  2208. Replay4Table(6)=999000
  2209. Replay4Table(7)=999000
  2210. Replay4Table(8)=999000
  2211. Replay4Table(9)=999000
  2212. Replay4Table(10)=999000
  2213. Replay4Table(11)=999000
  2214. Replay4Table(12)=999000
  2215. Replay4Table(13)=999000
  2216. Replay4Table(14)=999000
  2217. Replay4Table(15)=999000
  2218.  
  2219. ReplayTableMax=3
  2220.  
  2221.  
  2222. end sub
  2223.  
  2224. Sub RefreshReplayCard
  2225. Dim tempst1
  2226. Dim tempst2
  2227.  
  2228. tempst1=FormatNumber(BallsPerGame,0)
  2229. tempst2=FormatNumber(ReplayLevel,0)
  2230.  
  2231. ReplayCard.image = "SC" + tempst2
  2232. Replay1=Replay1Table(ReplayLevel)
  2233. Replay2=Replay2Table(ReplayLevel)
  2234. Replay3=Replay3Table(ReplayLevel)
  2235. Replay4=Replay4Table(ReplayLevel)
  2236. end sub
  2237.  
  2238. '****************************************
  2239. ' SCORE MOTOR
  2240. '****************************************
  2241.  
  2242. ScoreMotorTimer.Enabled = 1
  2243. ScoreMotorTimer.Interval = 135 '135
  2244. AddScoreTimer.Enabled = 1
  2245. AddScoreTimer.Interval = 135
  2246.  
  2247. Dim queuedscore
  2248. Dim MotorMode
  2249. Dim MotorPosition
  2250.  
  2251. Sub SetMotor(y)
  2252. Select Case ScoreMotorAdjustment
  2253. Case 0:
  2254. queuedscore=queuedscore+y
  2255. Case 1:
  2256. If MotorRunning<>1 And InProgress=true then
  2257. queuedscore=queuedscore+y
  2258. end if
  2259. end Select
  2260. end sub
  2261.  
  2262. Sub SetMotor2(x)
  2263. If MotorRunning<>1 And InProgress=true then
  2264. MotorRunning=1
  2265.  
  2266. Select Case x
  2267. Case 50:
  2268. MotorMode=10
  2269. MotorPosition=5
  2270. BumpersOff
  2271. Case 100:
  2272. MotorMode=100
  2273. MotorPosition=1
  2274.  
  2275. Case 500:
  2276. MotorMode=100
  2277. MotorPosition=5
  2278. BumpersOff
  2279. Case 1000:
  2280. MotorMode=1000
  2281. MotorPosition=1
  2282. Case 2000:
  2283. MotorMode=1000
  2284. MotorPosition=2
  2285. BumpersOff
  2286. Case 3000:
  2287. MotorMode=1000
  2288. MotorPosition=3
  2289. BumpersOff
  2290. Case 4000:
  2291. MotorMode=1000
  2292. MotorPosition=4
  2293. BumpersOff
  2294. Case 5000:
  2295. MotorMode=1000
  2296. MotorPosition=5
  2297. BumpersOff
  2298. End Select
  2299. End If
  2300. End Sub
  2301.  
  2302. Sub AddScoreTimer_Timer
  2303. Dim tempscore
  2304.  
  2305.  
  2306. If MotorRunning<>1 And InProgress=true then
  2307. if queuedscore>=5000 then
  2308. tempscore=5000
  2309. queuedscore=queuedscore-5000
  2310. SetMotor2(5000)
  2311. exit sub
  2312. end if
  2313. if queuedscore>=4000 then
  2314. tempscore=4000
  2315. queuedscore=queuedscore-4000
  2316. SetMotor2(4000)
  2317. exit sub
  2318. end if
  2319.  
  2320. if queuedscore>=3000 then
  2321. tempscore=3000
  2322. queuedscore=queuedscore-3000
  2323. SetMotor2(3000)
  2324. exit sub
  2325. end if
  2326.  
  2327. if queuedscore>=2000 then
  2328. tempscore=2000
  2329. queuedscore=queuedscore-2000
  2330. SetMotor2(2000)
  2331. exit sub
  2332. end if
  2333.  
  2334. if queuedscore>=1000 then
  2335. tempscore=1000
  2336. queuedscore=queuedscore-1000
  2337. SetMotor2(1000)
  2338. exit sub
  2339. end if
  2340.  
  2341. if queuedscore>=500 then
  2342. tempscore=500
  2343. queuedscore=queuedscore-500
  2344. SetMotor2(500)
  2345. exit sub
  2346. end if
  2347.  
  2348. if queuedscore>=100 then
  2349. tempscore=100
  2350. queuedscore=queuedscore-100
  2351. SetMotor2(100)
  2352. exit sub
  2353. end if
  2354.  
  2355. if queuedscore>=50 then
  2356. tempscore=50
  2357. queuedscore=queuedscore-50
  2358. SetMotor2(50)
  2359. exit sub
  2360. end if
  2361.  
  2362. End If
  2363.  
  2364.  
  2365. end Sub
  2366.  
  2367. Sub ScoreMotorTimer_Timer
  2368. If MotorPosition > 0 Then
  2369. Select Case MotorPosition
  2370. Case 5,4,3,2:
  2371. If MotorMode=1000 Then
  2372. AddScore(1000)
  2373. end if
  2374. if MotorMode=100 then
  2375. AddScore(100)
  2376. End If
  2377. if MotorMode=10 then
  2378. AddScore(10)
  2379. End if
  2380. MotorPosition=MotorPosition-1
  2381. Case 1:
  2382. If MotorMode=1000 Then
  2383. AddScore(1000)
  2384. end if
  2385. If MotorMode=100 then
  2386. AddScore(100)
  2387. End If
  2388. if MotorMode=10 then
  2389. AddScore(10)
  2390. End if
  2391. MotorPosition=0:MotorRunning=0:BumpersOn
  2392. End Select
  2393. End If
  2394. End Sub
  2395.  
  2396.  
  2397. Sub AddScore(x)
  2398. Select Case ScoreAdditionAdjustment
  2399. Case 0:
  2400. AddScore1(x)
  2401. Case 1:
  2402. AddScore2(x)
  2403. end Select
  2404.  
  2405. end sub
  2406.  
  2407.  
  2408. Sub AddScore1(x)
  2409. ' debugtext.text=score
  2410. Select Case x
  2411. Case 1:
  2412. PlayChime(10)
  2413. Score(Player)=Score(Player)+1
  2414.  
  2415. Case 10:
  2416. PlayChime(10)
  2417. Score(Player)=Score(Player)+10
  2418. ' debugscore=debugscore+10
  2419. Case 100:
  2420. PlayChime(100)
  2421. Score(Player)=Score(Player)+100
  2422. ' debugscore=debugscore+100
  2423.  
  2424. Case 1000:
  2425. PlayChime(100)
  2426. Score(Player)=Score(Player)+1000
  2427. ' debugscore=debugscore+1000
  2428. End Select
  2429. PlayerScores(Player-1).AddValue(x)
  2430. If ScoreDisplay(Player)<100000 then
  2431. ScoreDisplay(Player)=Score(Player)
  2432. Else
  2433. Score100K(Player)=Int(Score(Player)/100000)
  2434. ScoreDisplay(Player)=Score(Player)-100000
  2435. End If
  2436. if Score(Player)=>100000 then
  2437. If B2SOn Then
  2438. If Player=1 Then
  2439. Controller.B2SSetScoreRolloverPlayer1 Score100K(Player)
  2440. End If
  2441. If Player=2 Then
  2442. Controller.B2SSetScoreRolloverPlayer2 Score100K(Player)
  2443. End If
  2444.  
  2445. If Player=3 Then
  2446. Controller.B2SSetScoreRolloverPlayer3 Score100K(Player)
  2447. End If
  2448.  
  2449. If Player=4 Then
  2450. Controller.B2SSetScoreRolloverPlayer4 Score100K(Player)
  2451. End If
  2452. End If
  2453. End If
  2454. If B2SOn Then
  2455. Controller.B2SSetScorePlayer Player, ScoreDisplay(Player)
  2456. End If
  2457. If Score(Player)>Replay1 and Replay1Paid(Player)=false then
  2458. Replay1Paid(Player)=True
  2459. AddSpecial
  2460. End If
  2461. If Score(Player)>Replay2 and Replay2Paid(Player)=false then
  2462. Replay2Paid(Player)=True
  2463. AddSpecial
  2464. End If
  2465. If Score(Player)>Replay3 and Replay3Paid(Player)=false then
  2466. Replay3Paid(Player)=True
  2467. AddSpecial
  2468. End If
  2469. If Score(Player)>Replay4 and Replay4Paid(Player)=false then
  2470. Replay4Paid(Player)=True
  2471. AddSpecial
  2472. End If
  2473. ' ScoreText.text=debugscore
  2474. End Sub
  2475.  
  2476. Sub AddScore2(x)
  2477. Dim OldScore, NewScore, OldTestScore, NewTestScore
  2478. OldScore = Score(Player)
  2479.  
  2480. Select Case x
  2481. Case 1:
  2482. Score(Player)=Score(Player)+1
  2483. Case 10:
  2484. Score(Player)=Score(Player)+10
  2485. Case 100:
  2486. Score(Player)=Score(Player)+100
  2487. Case 1000:
  2488. Score(Player)=Score(Player)+1000
  2489. End Select
  2490. NewScore = Score(Player)
  2491.  
  2492. OldTestScore = OldScore
  2493. NewTestScore = NewScore
  2494. Do
  2495. if OldTestScore < Replay1 and NewTestScore >= Replay1 then
  2496. AddSpecial()
  2497. NewTestScore = 0
  2498. Elseif OldTestScore < Replay2 and NewTestScore >= Replay2 then
  2499. AddSpecial()
  2500. NewTestScore = 0
  2501. Elseif OldTestScore < Replay3 and NewTestScore >= Replay3 then
  2502. AddSpecial()
  2503. NewTestScore = 0
  2504. Elseif OldTestScore < Replay4 and NewTestScore >= Replay4 then
  2505. AddSpecial()
  2506. NewTestScore = 0
  2507. End if
  2508. NewTestScore = NewTestScore - 100000
  2509. OldTestScore = OldTestScore - 100000
  2510. Loop While NewTestScore > 0
  2511.  
  2512. OldScore = int(OldScore / 1) ' divide by 10 for games with fixed 0 in 1s position, by 1 for games with real 1s digits
  2513. NewScore = int(NewScore / 1) ' divide by 10 for games with fixed 0 in 1s position, by 1 for games with real 1s digits
  2514. ' MsgBox("OldScore="&OldScore&", NewScore="&NewScore&", OldScore Mod 10="&OldScore Mod 10 & ", NewScore % 10="&NewScore Mod 10)
  2515.  
  2516. if (OldScore Mod 10 <> NewScore Mod 10) then
  2517. PlayChime(10)
  2518.  
  2519. end if
  2520.  
  2521. OldScore = int(OldScore / 10)
  2522. NewScore = int(NewScore / 10)
  2523. ' MsgBox("OldScore="&OldScore&", NewScore="&NewScore)
  2524. if (OldScore Mod 10 <> NewScore Mod 10) then
  2525. PlayChime(10)
  2526.  
  2527. end if
  2528.  
  2529. OldScore = int(OldScore / 10)
  2530. NewScore = int(NewScore / 10)
  2531. ' MsgBox("OldScore="&OldScore&", NewScore="&NewScore)
  2532. if (OldScore Mod 10 <> NewScore Mod 10) then
  2533. PlayChime(100)
  2534.  
  2535. end if
  2536.  
  2537. OldScore = int(OldScore / 10)
  2538. NewScore = int(NewScore / 10)
  2539. ' MsgBox("OldScore="&OldScore&", NewScore="&NewScore)
  2540. if (OldScore Mod 10 <> NewScore Mod 10) then
  2541. PlayChime(1000)
  2542. end if
  2543.  
  2544. If B2SOn Then
  2545. Controller.B2SSetScorePlayer 1, Score(Player)
  2546. End If
  2547. ' EMReel1.SetValue Score(Player)
  2548. PlayerScores(Player-1).AddValue(x)
  2549. End Sub
  2550.  
  2551.  
  2552.  
  2553. Sub PlayChime(x)
  2554. if ChimesOn=0 then
  2555. Select Case x
  2556. Case 10
  2557. If LastChime10=1 Then
  2558. PlaySound SoundFXDOF("SpinACard_1_10_Point_Bell",141,DOFPulse,DOFChimes)
  2559. LastChime10=0
  2560. Else
  2561. PlaySound SoundFXDOF("SpinACard_1_10_Point_Bell",141,DOFPulse,DOFChimes)
  2562. LastChime10=1
  2563. End If
  2564. Case 100
  2565. If LastChime100=1 Then
  2566. PlaySound SoundFXDOF("SpinACard_1_100_Point_Bell",142,DOFPulse,DOFChimes)
  2567. LastChime100=0
  2568. Else
  2569. PlaySound SoundFXDOF("SpinACard_1_100_Point_Bell",142,DOFPulse,DOFChimes)
  2570. LastChime100=1
  2571. End If
  2572.  
  2573. End Select
  2574. else
  2575. Select Case x
  2576. Case 10
  2577. If LastChime10=1 Then
  2578. PlaySound SoundFXDOF("SJ_Chime_10a",141,DOFPulse,DOFChimes)
  2579. LastChime10=0
  2580. Else
  2581. PlaySound SoundFXDOF("SJ_Chime_10b",141,DOFPulse,DOFChimes)
  2582. LastChime10=1
  2583. End If
  2584. Case 100
  2585. If LastChime100=1 Then
  2586. PlaySound SoundFXDOF("SJ_Chime_100a",142,DOFPulse,DOFChimes)
  2587. LastChime100=0
  2588. Else
  2589. PlaySound SoundFXDOF("SJ_Chime_100b",142,DOFPulse,DOFChimes)
  2590. LastChime100=1
  2591. End If
  2592. Case 1000
  2593. If LastChime1000=1 Then
  2594. PlaySound SoundFXDOF("SJ_Chime_1000a",143,DOFPulse,DOFChimes)
  2595. LastChime1000=0
  2596. Else
  2597. PlaySound SoundFXDOF("SJ_Chime_1000b",143,DOFPulse,DOFChimes)
  2598. LastChime1000=1
  2599. End If
  2600. End Select
  2601. end if
  2602. End Sub
  2603.  
  2604. '***************************** Operator Menu *******************************************
  2605. Sub DisplayOptions()
  2606. TextBox1.text = ""
  2607. TextBox2.text = ""
  2608. OptionsBox1.text = ""
  2609. OptionsBox2.text = ""
  2610. OptionsBox3.text = ""
  2611. OptionsBox4.text = ""
  2612. OptionsBox5.text = ""
  2613. TextBox1.text = "Operator's Menu"
  2614. TextBox2.text = "([) to exit"
  2615. OptionsBox1.text = "(6) Balls/Game: " + FormatNumber(BallsPerGame,0)
  2616. OptionsBox2.text = "(7) Domino Advance Setting: "
  2617. if AdvanceSetting=0 then
  2618. OptionsBox2.text = OptionsBox2.text + "Conservative"
  2619. else
  2620. OptionsBox2.text = OptionsBox2.text + "Liberal"
  2621. end if
  2622. OptionsBox3.Text = "(8) Replay Settings: "
  2623. if Replay4Table(ReplayLevel)=999000 then
  2624. OptionsBox3.Text = OptionsBox3.Text + FormatNumber(Replay1Table(ReplayLevel),0) + "/" + FormatNumber(Replay2Table(ReplayLevel),0) + "/" + FormatNumber(Replay3Table(ReplayLevel),0)
  2625. else
  2626. OptionsBox3.Text = OptionsBox3.Text + FormatNumber(Replay1Table(ReplayLevel),0) + "/" + FormatNumber(Replay2Table(ReplayLevel),0) + "/" + FormatNumber(Replay3Table(ReplayLevel),0) + "/" + FormatNumber(Replay4Table(ReplayLevel),0)
  2627. end if
  2628.  
  2629. end sub
  2630. Sub HideOptions()
  2631. TextBox1.text = ""
  2632. TextBox2.text = ""
  2633. OptionsBox1.text = ""
  2634. OptionsBox2.text = ""
  2635. OptionsBox3.text = ""
  2636. OptionsBox4.text = ""
  2637. OptionsBox5.text = ""
  2638. end sub
  2639.  
  2640. '*********Sound Routines - Thanks to JimmyFingers
  2641. dim MetalsSoundActive
  2642. dim PlasticsSoundActive
  2643. 'Metals
  2644. Sub ametals_Hit(idx)
  2645. If MetalsSoundActive=True Then Exit Sub
  2646. dim finalspeed
  2647. finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
  2648. If finalspeed > 1 AND finalspeed < 6 AND ABS(activeball.vely) > 1 Then
  2649. PlaySound "metalhit2_low"
  2650. MetalsSoundActive=True
  2651. MetalSoundTimer.Enabled=1
  2652. ElseIf finalspeed >= 6 AND ABS(activeball.vely) > 2 Then
  2653. PlaySound "metalhit2"
  2654. MetalsSoundActive=True
  2655. MetalSoundTimer.Enabled=1
  2656. End If
  2657. End sub
  2658.  
  2659. Sub MetalSoundTimer_Timer()
  2660. MetalsSoundActive=False
  2661. Me.Enabled=0
  2662. End Sub
  2663.  
  2664. 'Plastic Sounds
  2665. Sub aplastics_Hit(idx)
  2666. If PlasticsSoundActive=True Then Exit Sub
  2667. dim finalspeed
  2668. finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
  2669. if finalspeed > 1 AND finalspeed < 4 AND ABS(activeball.velx) > 1 Then
  2670. PlaySound "woodhit_low"
  2671. PlasticsSoundActive=True
  2672. PlasticsSoundTimer.Enabled=1
  2673. ElseIf finalspeed >= 4 AND ABS(activeball.velx) > 1 Then
  2674. PlaySound "woodhit"
  2675. PlasticsSoundActive=True
  2676. PlasticsSoundTimer.Enabled=1
  2677. End If
  2678. End sub
  2679.  
  2680. Sub PlasticsSoundTimer_Timer()
  2681. PlasticsSoundActive=False
  2682. Me.Enabled=0
  2683. End Sub
  2684.  
  2685. Sub arubberposts_Hit(idx)
  2686. dim finalspeed
  2687. finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
  2688. If finalspeed > 14 then
  2689. PlaySound "bump"
  2690. End if
  2691. If finalspeed >= 4 AND finalspeed <= 14 then
  2692. RandomSoundRubber()
  2693. End If
  2694. If finalspeed < 4 AND finalspeed > 1 then
  2695. RandomSoundRubberLowVolume()
  2696. End If
  2697. Dampen 5, .9, 20
  2698. End sub
  2699.  
  2700. Sub aRubbers_Hit(idx)
  2701. dim finalspeed
  2702. finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
  2703. If finalspeed > 16 then
  2704. PlaySound "bump"
  2705. End if
  2706. If finalspeed >= 8 AND finalspeed <= 16 then
  2707. RandomSoundRubber()
  2708. End If
  2709. If finalspeed < 7 and finalspeed > 2 then
  2710. RandomSoundRubberLowVolume
  2711. End If
  2712. Dampen 5, .9, 20
  2713. End sub
  2714.  
  2715. Sub RandomSoundRubber()
  2716. Select Case Int(Rnd*3)+1
  2717. Case 1 : PlaySound "rubber_hit_1"
  2718. Case 2 : PlaySound "rubber_hit_2"
  2719. Case 3 : PlaySound "rubber_hit_3"
  2720. End Select
  2721. End Sub
  2722.  
  2723. Sub RandomSoundRubberLowVolume()
  2724. Select Case Int(Rnd*3)+1
  2725. Case 1 : PlaySound "rubber_hit_1_low"
  2726. Case 2 : PlaySound "rubber_hit_2_low"
  2727. Case 3 : PlaySound "rubber_hit_3_low"
  2728. End Select
  2729. End Sub
  2730.  
  2731. Sub LeftFlipper_Collide(parm)
  2732. dim finalspeed
  2733. finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
  2734. If finalspeed > 4 then
  2735. RandomSoundFlipper()
  2736. Else
  2737. RandomSoundFlipperLowVolume()
  2738. End If
  2739. Dampen 15, .5, 1
  2740. End Sub
  2741.  
  2742. Sub RightFlipper_Collide(parm)
  2743. dim finalspeed
  2744. finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
  2745. If finalspeed > 4 then
  2746. RandomSoundFlipper()
  2747. Else
  2748. RandomSoundFlipperLowVolume()
  2749. End If
  2750. Dampen 15, .5, 1
  2751. End Sub
  2752.  
  2753. Sub RandomSoundFlipper()
  2754. Select Case Int(Rnd*3)+1
  2755. Case 1 : PlaySound "flip_hit_1"
  2756. Case 2 : PlaySound "flip_hit_2"
  2757. Case 3 : PlaySound "flip_hit_3"
  2758. End Select
  2759. End Sub
  2760.  
  2761. Sub RandomSoundFlipperLowVolume()
  2762. Select Case Int(Rnd*3)+1
  2763. Case 1 : PlaySound "flip_hit_1_low"
  2764. Case 2 : PlaySound "flip_hit_2_low"
  2765. Case 3 : PlaySound "flip_hit_3_low"
  2766. End Select
  2767. End Sub
  2768.  
  2769. Sub gate3_Hit:PlaySound "gate":End Sub
  2770. Sub gatetrigger_Hit:PlaySound "gateback":End Sub
  2771.  
  2772. Sub Dampen(dt,df,r) 'dt is threshold speed, df is dampen factor 0 to 1 (higher more dampening), r is randomness
  2773. Dim dfRandomness
  2774. r=cint(r)
  2775. dfRandomness=INT(RND*(2*r+1))
  2776. df=df+(r-dfRandomness)*.01
  2777. If ABS(activeball.velx) > dt Then activeball.velx=activeball.velx*(1-df*(ABS(activeball.velx)/100))
  2778. If ABS(activeball.vely) > dt Then activeball.vely=activeball.vely*(1-df*(ABS(activeball.vely)/100))
  2779. End Sub
  2780. '*************************************************
  2781. ' destruk's new vpmCreateBall for ball collision
  2782. ' use it: vpmCreateBall kicker
  2783. '*************************************************
  2784.  
  2785. Set vpmCreateBall = GetRef("mycreateball")
  2786. Function mycreateball(aKicker)
  2787. For cnt = 1 to ubound(ballStatus)
  2788. If ballStatus(cnt) = 0 Then
  2789. If Not IsEmpty(vpmBallImage) Then
  2790. Set CurrentBall(cnt) = aKicker.CreateSizedBall(BSize).Image
  2791. Else
  2792. Set CurrentBall(cnt) = aKicker.CreateSizedBall(BSize)
  2793. End If
  2794. Set mycreateball = aKicker
  2795. currentball(cnt).uservalue = cnt
  2796. ballStatus(cnt) = 1
  2797. ballStatus(0) = ballStatus(0) + 1
  2798. If coff = False Then
  2799. If ballStatus(0) > 1 and XYdata.enabled = False Then XYdata.enabled = True
  2800. End If
  2801. Exit For
  2802. End If
  2803. Next
  2804. End Function
  2805.  
  2806. '**************************************************************
  2807. ' vpm Ball Collision based on the code by Steely & Pinball Ken
  2808. ' added destruk's changes, ball size and height check by koadic
  2809. '**************************************************************
  2810.  
  2811. Const tnopb = 10 'max nr. of balls
  2812. Const nosf = 10 'nr. of sound files
  2813.  
  2814. ReDim CurrentBall(tnopb), BallStatus(tnopb)
  2815. Dim iball, cnt, coff, errMessage
  2816.  
  2817. XYdata.interval = 1
  2818. coff = False
  2819.  
  2820. For cnt = 0 to ubound(BallStatus):BallStatus(cnt) = 0:Next
  2821.  
  2822. ' Create ball in kicker and assign a Ball ID used mostly in non-vpm tables
  2823. Sub CreateBallID(aKicker)
  2824. For cnt = 1 to ubound(ballStatus)
  2825. If ballStatus(cnt) = 0 Then
  2826. Set CurrentBall(cnt) = aKicker.CreateSizedBall(27)
  2827. currentball(cnt).uservalue = cnt
  2828. ballStatus(cnt) = 1
  2829. ballStatus(0) = ballStatus(0) + 1
  2830. If coff = False Then
  2831. If ballStatus(0) > 1 and XYdata.enabled = False Then XYdata.enabled = True
  2832. End If
  2833. Exit For
  2834. End If
  2835. Next
  2836. End Sub
  2837.  
  2838. Sub ClearBallID
  2839. On Error Resume Next
  2840. iball = ActiveBall.uservalue
  2841. currentball(iball).UserValue = 0
  2842. If Err Then Msgbox Err.description & vbCrLf & iball
  2843. ballStatus(iBall) = 0
  2844. ballStatus(0) = ballStatus(0) -1
  2845. On Error Goto 0
  2846. End Sub
  2847.  
  2848. ' Ball data collection and B2B Collision detection. jpsalas: added height check
  2849. ReDim baX(tnopb, 4), baY(tnopb, 4), baZ(tnopb, 4), bVx(tnopb, 4), bVy(tnopb, 4), TotalVel(tnopb, 4)
  2850. Dim cForce, bDistance, xyTime, cFactor, id, id2, id3, B1, B2
  2851.  
  2852. Sub XYdata_Timer()
  2853. xyTime = Timer + (XYdata.interval * .001)
  2854. If id2 >= 4 Then id2 = 0
  2855. id2 = id2 + 1
  2856. For id = 1 to ubound(ballStatus)
  2857. If ballStatus(id) = 1 Then
  2858. baX(id, id2) = round(currentball(id).x, 2)
  2859. baY(id, id2) = round(currentball(id).y, 2)
  2860. baZ(id, id2) = round(currentball(id).z, 2)
  2861. bVx(id, id2) = round(currentball(id).velx, 2)
  2862. bVy(id, id2) = round(currentball(id).vely, 2)
  2863. TotalVel(id, id2) = (bVx(id, id2) ^2 + bVy(id, id2) ^2)
  2864. If TotalVel(id, id2) > TotalVel(0, 0) Then TotalVel(0, 0) = int(TotalVel(id, id2) )
  2865. End If
  2866. Next
  2867.  
  2868. id3 = id2:B2 = 2:B1 = 1
  2869. Do
  2870. If ballStatus(B1) = 1 and ballStatus(B2) = 1 Then
  2871. bDistance = int((TotalVel(B1, id3) + TotalVel(B2, id3) ) ^(1.04 * (CurrentBall(B1).radius + CurrentBall(B2).radius) / 50) )
  2872. If((baX(B1, id3) - baX(B2, id3) ) ^2 + (baY(B1, id3) - baY(B2, id3) ) ^2) < (2800 * ((CurrentBall(B1).radius + CurrentBall(B2).radius) / 50) ^2) + bDistance Then
  2873. If ABS(baZ(B1, id3) - baZ(B2, id3) ) < (CurrentBall(B1).radius + CurrentBall(B2).radius) Then collide B1, B2:Exit Sub
  2874. End If
  2875. End If
  2876. B1 = B1 + 1
  2877. If B1 = ubound(ballstatus) Then Exit Do
  2878. If B1 >= B2 then B1 = 1:B2 = B2 + 1
  2879. Loop
  2880.  
  2881. If ballStatus(0) <= 1 Then XYdata.enabled = False
  2882.  
  2883. If XYdata.interval >= 40 Then coff = True:XYdata.enabled = False
  2884. If Timer > xyTime * 3 Then coff = True:XYdata.enabled = False
  2885. If Timer > xyTime Then XYdata.interval = XYdata.interval + 1
  2886. End Sub
  2887.  
  2888. 'Calculate the collision force and play sound
  2889. Dim cTime, cb1, cb2, avgBallx, cAngle, bAngle1, bAngle2
  2890.  
  2891. Sub Collide(cb1, cb2)
  2892. If TotalVel(0, 0) / 1.8 > cFactor Then cFactor = int(TotalVel(0, 0) / 1.8)
  2893. avgBallx = (bvX(cb2, 1) + bvX(cb2, 2) + bvX(cb2, 3) + bvX(cb2, 4) ) / 4
  2894. If avgBallx < bvX(cb2, id2) + .1 and avgBallx > bvX(cb2, id2) -.1 Then
  2895. If ABS(TotalVel(cb1, id2) - TotalVel(cb2, id2) ) < .000005 Then Exit Sub
  2896. End If
  2897. If Timer < cTime Then Exit Sub
  2898. cTime = Timer + .1
  2899. GetAngle baX(cb1, id3) - baX(cb2, id3), baY(cb1, id3) - baY(cb2, id3), cAngle
  2900. id3 = id3 - 1:If id3 = 0 Then id3 = 4
  2901. GetAngle bVx(cb1, id3), bVy(cb1, id3), bAngle1
  2902. GetAngle bVx(cb2, id3), bVy(cb2, id3), bAngle2
  2903. cForce = Cint((abs(TotalVel(cb1, id3) * Cos(cAngle-bAngle1) ) + abs(TotalVel(cb2, id3) * Cos(cAngle-bAngle2) ) ) )
  2904. If cForce < 4 Then Exit Sub
  2905. cForce = Cint((cForce) / (cFactor / nosf) )
  2906. If cForce > nosf-1 Then cForce = nosf-1
  2907. PlaySound("fx_collide" & cForce)
  2908. End Sub
  2909.  
  2910. ' Get angle
  2911. Dim Xin, Yin, rAngle, Radit, wAngle, Pi
  2912. Pi = Round(4 * Atn(1), 6) '3.1415926535897932384626433832795
  2913.  
  2914. Sub GetAngle(Xin, Yin, wAngle)
  2915. If Sgn(Xin) = 0 Then
  2916. If Sgn(Yin) = 1 Then rAngle = 3 * Pi / 2 Else rAngle = Pi / 2
  2917. If Sgn(Yin) = 0 Then rAngle = 0
  2918. Else
  2919. rAngle = atn(- Yin / Xin)
  2920. End If
  2921. If sgn(Xin) = -1 Then Radit = Pi Else Radit = 0
  2922. If sgn(Xin) = 1 and sgn(Yin) = 1 Then Radit = 2 * Pi
  2923. wAngle = round((Radit + rAngle), 4)
  2924. End Sub
  2925.  
  2926.  
  2927.  
  2928. '******************************************
  2929. ' Use RollingSoundTimer to call div subs
  2930. '******************************************
  2931.  
  2932.  
  2933. Sub RollingSoundTimer_Timer()
  2934. RollingSound
  2935. End Sub
  2936.  
  2937.  
  2938. '****************************************
  2939. ' JimmyFingers Enhanced Ball Rolling Script (Extension of Rascal's Original)
  2940. '****************************************
  2941.  
  2942. ReDim BRVeloY(tnopb), BRVeloX(tnopb), rolling(tnopb), rollingfast(tnopb)
  2943. Dim b
  2944. b = 0
  2945.  
  2946. RollingSoundTimer.Interval = 60/tnopb
  2947.  
  2948. Sub RollingSound()
  2949. B = B + 1
  2950. If B > tnopb Then B = 1
  2951. If BallStatus(b) = 0 Then Exit Sub
  2952.  
  2953. BRVeloY(b) = Cint(CurrentBall(b).VelY)
  2954. BRVeloX(b) = Cint(CurrentBall(b).VelX)
  2955. If((ABS(BRVeloY(b))> 3 AND (ABS(BRVeloY(b))< 10) or (ABS(BRVeloX(b) )> 3 AND (ABS(BRVeloX(b))< 10)))) Then
  2956. If rolling(b) = True then
  2957. Exit Sub
  2958. Else
  2959. If rollingfast(b) = True then
  2960. StopSound "JF_rollingfaster"
  2961. rollingfast(b) = False
  2962. Else
  2963. rolling(b) = True
  2964. Select Case Int(Rnd*3)+1
  2965. Case 1 : PlaySound "JF_roll1"
  2966. Case 2 : PlaySound "JF_roll2"
  2967. Case 3 : PlaySound "JF_roll3"
  2968. End Select
  2969. End If
  2970. End If
  2971. ElseIf (ABS(BRVeloY(b) )> 10 or ABS(BRVeloX(b) )> 10) Then
  2972. If rollingfast(b) = True then
  2973. Exit Sub
  2974. Else
  2975. If rolling(b) = True then
  2976. StopSound "JF_roll1"
  2977. StopSound "JF_roll2"
  2978. StopSound "JF_roll3"
  2979. rolling(b) = False
  2980. Else
  2981. rollingfast(b) = True
  2982. PlaySound "JF_rollingfaster"
  2983. End If
  2984. End If
  2985. Else
  2986. If rolling(b) = True Then
  2987. StopSound "JF_roll1"
  2988. StopSound "JF_roll2"
  2989. StopSound "JF_roll3"
  2990. rolling(b) = False
  2991. ElseIf rollingfast(b) = True Then
  2992. StopSound "JF_rollingfaster"
  2993. rollingfast(b) = False
  2994. End If
  2995. End If
  2996. End Sub
  2997.  
  2998. Sub StopRollingSound()
  2999. StopSound "JF_roll1"
  3000. StopSound "JF_roll2"
  3001. StopSound "JF_roll3"
  3002. StopSound "JF_rollingfaster"
  3003. End Sub
  3004.  
  3005. ' ============================================================================================
  3006. ' GNMOD - Multiple High Score Display and Collection
  3007. ' ============================================================================================
  3008. Dim EnteringInitials ' Normally zero, set to non-zero to enter initials
  3009. EnteringInitials = 0
  3010.  
  3011. Dim PlungerPulled
  3012. PlungerPulled = 0
  3013.  
  3014. Dim SelectedChar ' character under the "cursor" when entering initials
  3015.  
  3016. Dim HSTimerCount ' Pass counter for HS timer, scores are cycled by the timer
  3017. HSTimerCount = 5 ' Timer is initially enabled, it'll wrap from 5 to 1 when it's displayed
  3018.  
  3019. Dim InitialString ' the string holding the player's initials as they're entered
  3020.  
  3021. Dim AlphaString ' A-Z, 0-9, space (_) and backspace (<)
  3022. Dim AlphaStringPos ' pointer to AlphaString, move forward and backward with flipper keys
  3023. AlphaString = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_<"
  3024.  
  3025. Dim HSNewHigh ' The new score to be recorded
  3026.  
  3027. Dim HSScore(5) ' High Scores read in from config file
  3028. Dim HSName(5) ' High Score Initials read in from config file
  3029.  
  3030. ' default high scores, remove this when the scores are available from the config file
  3031. HSScore(1) = 7500
  3032. HSScore(2) = 7000
  3033. HSScore(3) = 6000
  3034. HSScore(4) = 5500
  3035. HSScore(5) = 5000
  3036.  
  3037. HSName(1) = "AAA"
  3038. HSName(2) = "ZZZ"
  3039. HSName(3) = "XXX"
  3040. HSName(4) = "ABC"
  3041. HSName(5) = "BBB"
  3042.  
  3043. Sub HighScoreTimer_Timer
  3044. if EnteringInitials then
  3045. if HSTimerCount = 1 then
  3046. SetHSLine 3, InitialString & MID(AlphaString, AlphaStringPos, 1)
  3047. HSTimerCount = 2
  3048. else
  3049. SetHSLine 3, InitialString
  3050. HSTimerCount = 1
  3051. end if
  3052. elseif InProgress then
  3053. SetHSLine 1, "HIGH SCORE1"
  3054. SetHSLine 2, HSScore(1)
  3055. SetHSLine 3, HSName(1)
  3056. HSTimerCount = 5 ' set so the highest score will show after the game is over
  3057. elseif CheckAllScores then
  3058. NewHighScore sortscores(ScoreChecker),sortplayers(ScoreChecker)
  3059.  
  3060. else
  3061. ' cycle through high scores
  3062. HSTimerCount = HSTimerCount + 1
  3063. if HsTimerCount > 5 then
  3064. HSTimerCount = 1
  3065. End If
  3066. SetHSLine 1, "HIGH SCORE"+FormatNumber(HSTimerCount,0)
  3067. SetHSLine 2, HSScore(HSTimerCount)
  3068. SetHSLine 3, HSName(HSTimerCount)
  3069. end if
  3070. End Sub
  3071.  
  3072. Function GetHSChar(String, Index)
  3073. dim ThisChar
  3074. dim FileName
  3075. ThisChar = Mid(String, Index, 1)
  3076. FileName = "PostIt"
  3077. if ThisChar = " " or ThisChar = "" then
  3078. FileName = FileName & "BL"
  3079. elseif ThisChar = "<" then
  3080. FileName = FileName & "LT"
  3081. elseif ThisChar = "_" then
  3082. FileName = FileName & "SP"
  3083. else
  3084. FileName = FileName & ThisChar
  3085. End If
  3086. GetHSChar = FileName
  3087. End Function
  3088.  
  3089. Sub SetHsLine(LineNo, String)
  3090. dim Letter
  3091. dim ThisDigit
  3092. dim ThisChar
  3093. dim StrLen
  3094. dim LetterLine
  3095. dim Index
  3096. dim StartHSArray
  3097. dim EndHSArray
  3098. dim LetterName
  3099. dim xfor
  3100. StartHSArray=array(0,1,12,22)
  3101. EndHSArray=array(0,11,21,31)
  3102. StrLen = len(string)
  3103. Index = 1
  3104.  
  3105. for xfor = StartHSArray(LineNo) to EndHSArray(LineNo)
  3106. Eval("HS"&xfor).image = GetHSChar(String, Index)
  3107. Index = Index + 1
  3108. next
  3109.  
  3110. End Sub
  3111.  
  3112. Sub NewHighScore(NewScore, PlayNum)
  3113. if NewScore > HSScore(5) then
  3114. HighScoreTimer.interval = 500
  3115. HSTimerCount = 1
  3116. AlphaStringPos = 1 ' start with first character "A"
  3117. EnteringInitials = 1 ' intercept the control keys while entering initials
  3118. InitialString = "" ' initials entered so far, initialize to empty
  3119. SetHSLine 1, "PLAYER "+FormatNumber(PlayNum,0)
  3120. SetHSLine 2, "ENTER NAME"
  3121. SetHSLine 3, MID(AlphaString, AlphaStringPos, 1)
  3122. HSNewHigh = NewScore
  3123. For xx=1 to HighScoreReward
  3124. AddSpecial
  3125. next
  3126. End if
  3127. ScoreChecker=ScoreChecker-1
  3128. if ScoreChecker=0 then
  3129. CheckAllScores=0
  3130. end if
  3131. End Sub
  3132.  
  3133. Sub CollectInitials(keycode)
  3134. If keycode = LeftFlipperKey Then
  3135. ' back up to previous character
  3136. AlphaStringPos = AlphaStringPos - 1
  3137. if AlphaStringPos < 1 then
  3138. AlphaStringPos = len(AlphaString) ' handle wrap from beginning to end
  3139. if InitialString = "" then
  3140. ' Skip the backspace if there are no characters to backspace over
  3141. AlphaStringPos = AlphaStringPos - 1
  3142. End if
  3143. end if
  3144. SetHSLine 3, InitialString & MID(AlphaString, AlphaStringPos, 1)
  3145. PlaySound "DropTargetDropped"
  3146. elseif keycode = RightFlipperKey Then
  3147. ' advance to next character
  3148. AlphaStringPos = AlphaStringPos + 1
  3149. if AlphaStringPos > len(AlphaString) or (AlphaStringPos = len(AlphaString) and InitialString = "") then
  3150. ' Skip the backspace if there are no characters to backspace over
  3151. AlphaStringPos = 1
  3152. end if
  3153. SetHSLine 3, InitialString & MID(AlphaString, AlphaStringPos, 1)
  3154. PlaySound "DropTargetDropped"
  3155. elseif keycode = StartGameKey or keycode = PlungerKey Then
  3156. SelectedChar = MID(AlphaString, AlphaStringPos, 1)
  3157. if SelectedChar = "_" then
  3158. InitialString = InitialString & " "
  3159. PlaySound("Ding10")
  3160. elseif SelectedChar = "<" then
  3161. InitialString = MID(InitialString, 1, len(InitialString) - 1)
  3162. if len(InitialString) = 0 then
  3163. ' If there are no more characters to back over, don't leave the < displayed
  3164. AlphaStringPos = 1
  3165. end if
  3166. PlaySound("Ding100")
  3167. else
  3168. InitialString = InitialString & SelectedChar
  3169. PlaySound("Ding10")
  3170. end if
  3171. if len(InitialString) < 3 then
  3172. SetHSLine 3, InitialString & SelectedChar
  3173. End If
  3174. End If
  3175. if len(InitialString) = 3 then
  3176. ' save the score
  3177. for i = 5 to 1 step -1
  3178. if i = 1 or (HSNewHigh > HSScore(i) and HSNewHigh <= HSScore(i - 1)) then
  3179. ' Replace the score at this location
  3180. if i < 5 then
  3181. ' MsgBox("Moving " & i & " to " & (i + 1))
  3182. HSScore(i + 1) = HSScore(i)
  3183. HSName(i + 1) = HSName(i)
  3184. end if
  3185. ' MsgBox("Saving initials " & InitialString & " to position " & i)
  3186. EnteringInitials = 0
  3187. HSScore(i) = HSNewHigh
  3188. HSName(i) = InitialString
  3189. HSTimerCount = 5
  3190. HighScoreTimer_Timer
  3191. HighScoreTimer.interval = 2000
  3192. PlaySound("Ding1000")
  3193. exit sub
  3194. elseif i < 5 then
  3195. ' move the score in this slot down by 1, it's been exceeded by the new score
  3196. ' MsgBox("Moving " & i & " to " & (i + 1))
  3197. HSScore(i + 1) = HSScore(i)
  3198. HSName(i + 1) = HSName(i)
  3199. end if
  3200. next
  3201. End If
  3202.  
  3203. End Sub
  3204. ' END GNMOD
  3205. ' ============================================================================================
  3206. ' GNMOD - New Options menu
  3207. ' ============================================================================================
  3208. Dim EnteringOptions
  3209. Dim CurrentOption
  3210. Dim OptionCHS
  3211. Dim MaxOption
  3212. Dim OptionHighScorePosition
  3213. Dim XOpt
  3214. Dim StartingArray
  3215. Dim EndingArray
  3216.  
  3217. StartingArray=Array(0,1,2,30,33,61,89,117,145,173,201,229)
  3218. EndingArray=Array(0,1,29,32,60,88,116,144,172,200,228,256)
  3219. EnteringOptions = 0
  3220. MaxOption = 9
  3221. OptionCHS = 0
  3222. OptionHighScorePosition = 0
  3223. Const OptionLinesToMark="111100011"
  3224. Const OptionLine1="" 'do not use this line
  3225. Const OptionLine2="" 'do not use this line
  3226. Const OptionLine3="" 'do not use this line
  3227. Const OptionLine4="Domino Advance Setting"
  3228. Const OptionLine5="Wedgehead Tilt Setting"
  3229. Const OptionLine6=""
  3230. Const OptionLine7=""
  3231. Const OptionLine8="" 'do not use this line
  3232. Const OptionLine9="" 'do not use this line
  3233.  
  3234. Sub OperatorMenuTimer_Timer
  3235. OperatorMenuBackdrop.image = "OperatorMenu"
  3236. EnteringOptions = 1
  3237. OptionCHS = 0
  3238. CurrentOption = 1
  3239. DisplayAllOptions
  3240. OperatorOption1.image = "BluePlus"
  3241. SetHighScoreOption
  3242.  
  3243. End Sub
  3244.  
  3245. Sub DisplayAllOptions
  3246. dim linecounter
  3247. dim tempstring
  3248. For linecounter = 1 to MaxOption
  3249. tempstring=Eval("OptionLine"&linecounter)
  3250. Select Case linecounter
  3251. Case 1:
  3252. tempstring=tempstring + FormatNumber(BallsPerGame,0)
  3253. SetOptLine 1,tempstring
  3254. Case 2:
  3255. if Replay3Table(ReplayLevel)=999000 then
  3256. tempstring = FormatNumber(Replay1Table(ReplayLevel),0) + "/" + FormatNumber(Replay2Table(ReplayLevel),0)
  3257. elseif Replay4Table(ReplayLevel)=999000 then
  3258. tempstring = FormatNumber(Replay1Table(ReplayLevel),0) + "/" + FormatNumber(Replay2Table(ReplayLevel),0) + "/" + FormatNumber(Replay3Table(ReplayLevel),0)
  3259. else
  3260. tempstring = FormatNumber(Replay1Table(ReplayLevel),0) + "/" + FormatNumber(Replay2Table(ReplayLevel),0) + "/" + FormatNumber(Replay3Table(ReplayLevel),0) + "/" + FormatNumber(Replay4Table(ReplayLevel),0)
  3261. end if
  3262.  
  3263. SetOptLine 2,tempstring
  3264. Case 3:
  3265. If OptionCHS=0 then
  3266. tempstring = "NO"
  3267. else
  3268. tempstring = "YES"
  3269. end if
  3270. SetOptLine 3,tempstring
  3271. Case 4:
  3272. SetOptLine 4, tempstring
  3273. if AdvanceSetting=0 then
  3274. tempstring = "Conservative"
  3275. else
  3276. tempstring = "Liberal"
  3277. end if
  3278.  
  3279. SetOptLine 5, tempstring
  3280. Case 5:
  3281. SetOptLine 6, tempstring
  3282. If TiltEndsGame=0 then
  3283. tempstring="Tilt loses ball in play"
  3284. else
  3285. tempstring="Tilt ends game"
  3286. end if
  3287. SetOptLine 7, tempstring
  3288.  
  3289. Case 6:
  3290. SetOptLine 8, tempstring
  3291.  
  3292. SetOptLine 9, tempstring
  3293.  
  3294. Case 7:
  3295. SetOptLine 10, tempstring
  3296. SetOptLine 11, tempstring
  3297.  
  3298. Case 8:
  3299.  
  3300. Case 9:
  3301.  
  3302.  
  3303. End Select
  3304.  
  3305. next
  3306. end sub
  3307.  
  3308. sub MoveArrow
  3309. do
  3310. CurrentOption = CurrentOption + 1
  3311. If CurrentOption>Len(OptionLinesToMark) then
  3312. CurrentOption=1
  3313. end if
  3314. loop until Mid(OptionLinesToMark,CurrentOption,1)="1"
  3315. end sub
  3316.  
  3317. sub CollectOptions(ByVal keycode)
  3318. if Keycode = LeftFlipperKey then
  3319. PlaySound "DropTargetDropped"
  3320. For XOpt = 1 to MaxOption
  3321. Eval("OperatorOption"&XOpt).image = "PostitBL"
  3322. next
  3323. MoveArrow
  3324. if CurrentOption<8 then
  3325. Eval("OperatorOption"&CurrentOption).image = "BluePlus"
  3326. elseif CurrentOption=8 then
  3327. Eval("OperatorOption"&CurrentOption).image = "GreenCheck"
  3328. else
  3329. Eval("OperatorOption"&CurrentOption).image = "RedX"
  3330. end if
  3331.  
  3332. elseif Keycode = RightFlipperKey then
  3333. PlaySound "DropTargetDropped"
  3334. if CurrentOption = 1 then
  3335. If BallsPerGame = 3 then
  3336. BallsPerGame = 5
  3337. else
  3338. BallsPerGame = 3
  3339. end if
  3340. DisplayAllOptions
  3341. elseif CurrentOption = 2 then
  3342. ReplayLevel=ReplayLevel+1
  3343. If ReplayLevel>ReplayTableMax then
  3344. ReplayLevel=1
  3345. end if
  3346. DisplayAllOptions
  3347. elseif CurrentOption = 3 then
  3348. if OptionCHS = 0 then
  3349. OptionCHS = 1
  3350.  
  3351. else
  3352. OptionCHS = 0
  3353.  
  3354. end if
  3355. DisplayAllOptions
  3356. elseif CurrentOption = 4 then
  3357. if AdvanceSetting=0 then
  3358. AdvanceSetting=1
  3359. else
  3360. AdvanceSetting=0
  3361. end if
  3362. DisplayAllOptions
  3363. elseif CurrentOption = 5 then
  3364. if TiltEndsGame=0 then
  3365. TiltEndsGame=1
  3366. else
  3367. TiltEndsGame=0
  3368. end if
  3369. DisplayAllOptions
  3370. elseif CurrentOption = 8 or CurrentOption = 9 then
  3371. if OptionCHS=1 then
  3372. HSScore(1) = 7500
  3373. HSScore(2) = 7000
  3374. HSScore(3) = 6000
  3375. HSScore(4) = 5500
  3376. HSScore(5) = 5000
  3377.  
  3378. HSName(1) = "AAA"
  3379. HSName(2) = "ZZZ"
  3380. HSName(3) = "XXX"
  3381. HSName(4) = "ABC"
  3382. HSName(5) = "BBB"
  3383. end if
  3384.  
  3385. if CurrentOption = 8 then
  3386. savehs
  3387. else
  3388. loadhs
  3389. end if
  3390. OperatorMenuBackdrop.image = "PostitBL"
  3391. For XOpt = 1 to MaxOption
  3392. Eval("OperatorOption"&XOpt).image = "PostitBL"
  3393. next
  3394.  
  3395. For XOpt = 1 to 256
  3396. Eval("Option"&XOpt).image = "PostItBL"
  3397. next
  3398. RefreshReplayCard
  3399. InstructCard.image="IC"+FormatNumber(BallsPerGame,0)+"0"
  3400. EnteringOptions = 0
  3401.  
  3402. end if
  3403. end if
  3404. End Sub
  3405.  
  3406. Sub SetHighScoreOption
  3407.  
  3408. End Sub
  3409.  
  3410. Function GetOptChar(String, Index)
  3411. dim ThisChar
  3412. dim FileName
  3413. ThisChar = Mid(String, Index, 1)
  3414. FileName = "PostIt"
  3415. if ThisChar = " " or ThisChar = "" then
  3416. FileName = FileName & "BL"
  3417. elseif ThisChar = "<" then
  3418. FileName = FileName & "LT"
  3419. elseif ThisChar = "_" then
  3420. FileName = FileName & "SP"
  3421. elseif ThisChar = "/" then
  3422. FileName = FileName & "SL"
  3423. elseif ThisChar = "," then
  3424. FileName = FileName & "CM"
  3425. else
  3426. FileName = FileName & ThisChar
  3427. End If
  3428. GetOptChar = FileName
  3429. End Function
  3430.  
  3431. Sub SetOptLine(LineNo, String)
  3432. dim xfor
  3433. dim Letter
  3434. dim ThisDigit
  3435. dim ThisChar
  3436. dim StrLen
  3437. dim LetterLine
  3438. dim Index
  3439. dim LetterName
  3440. StrLen = len(string)
  3441. Index = 1
  3442.  
  3443. for xfor = StartingArray(LineNo) to EndingArray(LineNo)
  3444. Eval("Option"&xfor).image = GetOptChar(string, Index)
  3445. Index = Index + 1
  3446. next
  3447.  
  3448.  
  3449. End Sub
Advertisement
Add Comment
Please, Sign In to add comment