Outhere

Deadpool jpsalas (2021) 1.0.1

Jul 16th, 2021 (edited)
621
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 196.37 KB | None | 0 0
  1. ' ****************************************************************
  2. ' JP's Deadpool for VISUAL PINBALL X 10.7
  3. ' Including JP's Arcade Physics 3.0.1
  4. ' ****************************************************************
  5.  
  6. ' Deadpool jpsalas (2021) 1.0.1
  7.  
  8. 'On the DOF website put Exxx
  9. 'DOF some updating by outhere
  10. '101 Left Flipper
  11. '102 Right Flipper
  12. '103 left slingshot
  13. '104 right slingshot
  14. '105
  15. '106
  16. '107 Center Bumper
  17. '108 RIGHT Bumper
  18. '109 Left bumper
  19. '110
  20. '111 HellHouse
  21. '118
  22. '119 Reset drop Targets
  23. '120 AutoFire
  24. '122 knocker
  25. '123 ballrelease
  26.  
  27. Option Explicit
  28. Randomize
  29.  
  30. Const BallSize = 50 ' 50 is the normal size used in the core.vbs, VP kicker routines uses this value divided by 2
  31. Const BallMass = 1.7 ' standard ball mass in JP's VPX Physics 3.0
  32. Const SongVolume = 0.12 ' 1 is full volume, but I set it quite low to listen better the other sounds :)
  33.  
  34. 'FlexDMD in high or normal quality
  35. 'change it to True if you have an LCD screen, 256x64
  36. 'or False if you have a real DMD at 128x32 in size
  37. Const FlexDMDHighQuality = False
  38.  
  39. ' Load the core.vbs for supporting Subs and functions
  40. LoadCoreFiles
  41.  
  42. Sub LoadCoreFiles
  43. On Error Resume Next
  44. ExecuteGlobal GetTextFile("core.vbs")
  45. If Err Then MsgBox "Can't open core.vbs"
  46. ExecuteGlobal GetTextFile("controller.vbs")
  47. If Err Then MsgBox "Can't open controller.vbs"
  48. On Error Goto 0
  49. End Sub
  50.  
  51. ' Define any Constants
  52. Const cGameName = "jpsdeadpool"
  53. Const myVersion = "1.01"
  54. Const MaxPlayers = 4 ' from 1 to 4
  55. Const BallSaverTime = 20 ' in seconds of the first ball
  56. Const MaxMultiplier = 5 ' limit playfield multiplier
  57. Const MaxBonusMultiplier = 50 'limit Bonus multiplier
  58. Const BallsPerGame = 3 ' usually 3 or 5
  59. Const MaxMultiballs = 6 ' max number of balls during multiballs
  60.  
  61. ' Use FlexDMD if in FS mode
  62. Dim UseFlexDMD
  63. If Table1.ShowDT = True then
  64. UseFlexDMD = False
  65. Else
  66. UseFlexDMD = True
  67. End If
  68.  
  69. ' Define Global Variables
  70. Dim PlayersPlayingGame
  71. Dim CurrentPlayer
  72. Dim Credits
  73. Dim BonusPoints(4)
  74. Dim BonusHeldPoints(4)
  75. Dim BonusMultiplier(4)
  76. Dim PlayfieldMultiplier(4)
  77. Dim PFxSeconds
  78. Dim bBonusHeld
  79. Dim BallsRemaining(4)
  80. Dim ExtraBallsAwards(4)
  81. Dim Score(4)
  82. Dim HighScore(4)
  83. Dim HighScoreName(4)
  84. Dim Jackpot(4)
  85. Dim SuperJackpot(4)
  86. Dim Tilt
  87. Dim TiltSensitivity
  88. Dim Tilted
  89. Dim TotalGamesPlayed
  90. Dim mBalls2Eject
  91. Dim SkillshotValue(4)
  92. Dim SuperSkillshotValue(4)
  93. Dim bAutoPlunger
  94. Dim bInstantInfo
  95. Dim bAttractMode
  96. Dim x
  97.  
  98. ' Define Game Control Variables
  99. Dim LastSwitchHit
  100. Dim BallsOnPlayfield
  101. Dim BallsInLock(4)
  102. Dim BallsInHole
  103.  
  104. ' Define Game Flags
  105. Dim bFreePlay
  106. Dim bGameInPlay
  107. Dim bOnTheFirstBall
  108. Dim bBallInPlungerLane
  109. Dim bBallSaverActive
  110. Dim bBallSaverReady
  111. Dim bMultiBallMode
  112. Dim bMusicOn
  113. Dim bSkillshotReady
  114. Dim bExtraBallWonThisBall
  115. Dim bJustStarted
  116. Dim bJackpot
  117.  
  118. ' core.vbs variables
  119. Dim plungerIM 'used mostly as an autofire plunger during multiballs
  120.  
  121. ' *********************************************************************
  122. ' Visual Pinball Defined Script Events
  123. ' *********************************************************************
  124.  
  125. Sub Table1_Init()
  126. LoadEM
  127. Dim i
  128. Randomize
  129.  
  130. 'Impulse Plunger as autoplunger
  131. Const IMPowerSetting = 45 ' Plunger Power
  132. Const IMTime = 0.5 ' Time in seconds for Full Plunge
  133. Set plungerIM = New cvpmImpulseP
  134. With plungerIM
  135. .InitImpulseP swplunger, IMPowerSetting, IMTime
  136. .Random 1.5
  137. .InitExitSnd SoundFXDOF("fx_kicker", 141, DOFPulse, DOFContactors), SoundFXDOF("fx_solenoid", 141, DOFPulse, DOFContactors)
  138. .CreateEvents "plungerIM"
  139. End With
  140.  
  141. ' Misc. VP table objects Initialisation, droptargets, animations...
  142. VPObjects_Init
  143.  
  144. ' load saved values, highscore, names, jackpot
  145. Credits = 0
  146. Loadhs
  147.  
  148. ' Initalise the DMD display
  149. DMD_Init
  150.  
  151. ' freeplay or coins
  152. bFreePlay = False 'we want coins
  153.  
  154. if bFreePlay Then DOF 125, DOFOn
  155.  
  156. ' Init main variables and any other flags
  157. bAttractMode = False
  158. bOnTheFirstBall = False
  159. bBallInPlungerLane = False
  160. bBallSaverActive = False
  161. bBallSaverReady = False
  162. bMultiBallMode = False
  163. PFxSeconds = 0
  164. bGameInPlay = False
  165. bAutoPlunger = False
  166. bMusicOn = True
  167. BallsOnPlayfield = 0
  168. BallsInHole = 0
  169. LastSwitchHit = ""
  170. Tilt = 0
  171. TiltSensitivity = 6
  172. Tilted = False
  173. bBonusHeld = False
  174. bJustStarted = True
  175. bJackpot = False
  176. bInstantInfo = False
  177. ' set any lights for the attract mode
  178. GiOff
  179. StartAttractMode
  180.  
  181. ' Start the RealTime timer
  182. RealTime.Enabled = 1
  183.  
  184. ' Load table color
  185. LoadLut
  186. End Sub
  187.  
  188. '******
  189. ' Keys
  190. '******
  191.  
  192. Sub Table1_KeyDown(ByVal Keycode)
  193.  
  194. If keycode = LeftTiltKey Then Nudge 90, 8:PlaySound "fx_nudge", 0, 1, -0.1, 0.25:lilshake 5
  195. If keycode = RightTiltKey Then Nudge 270, 8:PlaySound "fx_nudge", 0, 1, 0.1, 0.25:lilshake 5
  196. If keycode = CenterTiltKey Then Nudge 0, 9:PlaySound "fx_nudge", 0, 1, 1, 0.25:lilshake 6
  197.  
  198. If keycode = LeftMagnaSave Then bLutActive = True
  199. If keycode = RightMagnaSave or keycode = LockBarKey Then
  200. If bLutActive Then
  201. NextLUT
  202. Else
  203. BoomHit
  204. End If
  205. End If
  206.  
  207. If Keycode = AddCreditKey Then
  208. Credits = Credits + 1
  209. if bFreePlay = False Then DOF 125, DOFOn
  210. If(Tilted = False)Then
  211. DMDFlush
  212. DMD "_", CL(1, "CREDITS " & Credits), "", eNone, eNone, eNone, 500, True, "fx_coin"
  213. If NOT bGameInPlay Then ShowTableInfo
  214. End If
  215. End If
  216.  
  217. If keycode = PlungerKey Then
  218. Plunger.Pullback
  219. PlaySoundAt "fx_plungerpull", plunger
  220. End If
  221.  
  222. If hsbModeActive Then
  223. EnterHighScoreKey(keycode)
  224. Exit Sub
  225. End If
  226.  
  227. ' Normal flipper action
  228.  
  229. If bGameInPlay AND NOT Tilted Then
  230.  
  231. If keycode = LeftTiltKey Then CheckTilt 'only check the tilt during game
  232. If keycode = RightTiltKey Then CheckTilt
  233. If keycode = CenterTiltKey Then CheckTilt
  234.  
  235. If keycode = LeftFlipperKey Then SolLFlipper 1:InstantInfoTimer.Enabled = True:RotateLaneLights 1:UpdateGates 1
  236. If keycode = RightFlipperKey Then SolRFlipper 1:InstantInfoTimer.Enabled = True:RotateLaneLights 0
  237.  
  238. If keycode = StartGameKey Then
  239. If((PlayersPlayingGame <MaxPlayers)AND(bOnTheFirstBall = True))Then
  240.  
  241. If(bFreePlay = True)Then
  242. PlayersPlayingGame = PlayersPlayingGame + 1
  243. TotalGamesPlayed = TotalGamesPlayed + 1
  244. DMD "_", CL(1, PlayersPlayingGame & " PLAYERS"), "", eNone, eBlink, eNone, 800, True, ""
  245. Else
  246. If(Credits> 0)then
  247. PlayersPlayingGame = PlayersPlayingGame + 1
  248. TotalGamesPlayed = TotalGamesPlayed + 1
  249. Credits = Credits - 1
  250. DMD "_", CL(1, PlayersPlayingGame & " PLAYERS"), "", eNone, eBlink, eNone, 800, True, ""
  251. If Credits <1 And bFreePlay = False Then DOF 125, DOFOff
  252. Else
  253. ' Not Enough Credits to start a game.
  254. DMD CL(0, "CREDITS " & Credits), CL(1, "INSERT COIN"), "", eNone, eBlink, eNone, 800, True, "vo_nocredits"
  255. End If
  256. End If
  257. End If
  258. End If
  259. Else ' If (GameInPlay)
  260.  
  261. If keycode = StartGameKey Then
  262. If(bFreePlay = True)Then
  263. If(BallsOnPlayfield = 0)Then
  264. ResetForNewGame()
  265. End If
  266. Else
  267. If(Credits> 0)Then
  268. If(BallsOnPlayfield = 0)Then
  269. Credits = Credits - 1
  270. If Credits <1 And bFreePlay = False Then DOF 125, DOFOff
  271. ResetForNewGame()
  272. End If
  273. Else
  274. ' Not Enough Credits to start a game.
  275. DMDFlush
  276. DMD CL(0, "CREDITS " & Credits), CL(1, "INSERT COIN"), "", eNone, eBlink, eNone, 1000, True, "vo_nocredits"
  277. ShowTableInfo
  278. End If
  279. End If
  280. End If
  281. End If ' If (GameInPlay)
  282.  
  283. ' Table specific
  284.  
  285. If bChooseBattle Then
  286. ChooseBattle(keycode)
  287. End If
  288. End Sub
  289.  
  290. Sub Table1_KeyUp(ByVal keycode)
  291.  
  292. If keycode = LeftMagnaSave Then bLutActive = False
  293.  
  294. If keycode = PlungerKey Then
  295. Plunger.Fire
  296. PlaySoundAt "fx_plunger", plunger
  297. End If
  298.  
  299. If hsbModeActive Then
  300. Exit Sub
  301. End If
  302.  
  303. ' Table specific
  304.  
  305. If bGameInPLay AND NOT Tilted Then
  306. If keycode = LeftFlipperKey Then
  307. SolLFlipper 0
  308. UpdateGates 0
  309. InstantInfoTimer.Enabled = False
  310. If bInstantInfo Then
  311. DMDScoreNow
  312. bInstantInfo = False
  313. End If
  314. End If
  315. If keycode = RightFlipperKey Then
  316. SolRFlipper 0
  317. InstantInfoTimer.Enabled = False
  318. If bInstantInfo Then
  319. DMDScoreNow
  320. bInstantInfo = False
  321. End If
  322. End If
  323. End If
  324. End Sub
  325.  
  326. Sub InstantInfoTimer_Timer
  327. InstantInfoTimer.Enabled = False
  328. If NOT hsbModeActive Then
  329. bInstantInfo = True
  330. DMDFlush
  331. InstantInfo
  332. End If
  333. End Sub
  334.  
  335. '*************
  336. ' Pause Table
  337. '*************
  338.  
  339. Sub table1_Paused
  340. End Sub
  341.  
  342. Sub table1_unPaused
  343. End Sub
  344.  
  345. Sub Table1_Exit
  346. Savehs
  347. If UseFlexDMD Then FlexDMD.Run = False
  348. If B2SOn = true Then Controller.Stop
  349. End Sub
  350.  
  351. '********************
  352. ' Flippers
  353. '********************
  354.  
  355. Sub SolLFlipper(Enabled)
  356. If Enabled Then
  357. PlaySoundAt SoundFXDOF("fx_flipperup", 101, DOFOn, DOFFlippers), LeftFlipper
  358. LeftFlipper.EOSTorque = 0.75:LeftFlipper.RotateToEnd
  359. Else
  360. PlaySoundAt SoundFXDOF("fx_flipperdown", 101, DOFOff, DOFFlippers), LeftFlipper
  361. LeftFlipper.EOSTorque = 0.2:LeftFlipper.RotateToStart
  362. End If
  363. End Sub
  364.  
  365. Sub SolRFlipper(Enabled)
  366. If Enabled Then
  367. PlaySoundAt SoundFXDOF("fx_flipperup", 102, DOFOn, DOFFlippers), RightFlipper
  368. RightFlipper.EOSTorque = 0.75:RightFlipper.RotateToEnd
  369. Else
  370. PlaySoundAt SoundFXDOF("fx_flipperdown", 102, DOFOff, DOFFlippers), RightFlipper
  371. RightFlipper.EOSTorque = 0.2:RightFlipper.RotateToStart
  372. End If
  373. End Sub
  374.  
  375. ' flippers hit Sound
  376.  
  377. Sub LeftFlipper_Collide(parm)
  378. PlaySound "fx_rubber_flipper", 0, parm / 60, pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall)
  379. End Sub
  380.  
  381. Sub RightFlipper_Collide(parm)
  382. PlaySound "fx_rubber_flipper", 0, parm / 60, pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall)
  383. End Sub
  384.  
  385. '*********
  386. ' TILT
  387. '*********
  388.  
  389. 'NOTE: The TiltDecreaseTimer Subtracts .01 from the "Tilt" variable every round
  390.  
  391. Sub CheckTilt 'Called when table is nudged
  392. Tilt = Tilt + TiltSensitivity 'Add to tilt count
  393. TiltDecreaseTimer.Enabled = True
  394. If(Tilt> TiltSensitivity)AND(Tilt <15)Then 'show a warning
  395. DMD "_", CL(1, "CAREFUL"), "_", eNone, eBlinkFast, eNone, 1000, True, ""
  396. End if
  397. If Tilt> 15 Then 'If more that 15 then TILT the table
  398. Tilted = True
  399. 'display Tilt
  400. DMDFlush
  401. DMD "", "", "d_TILT", eNone, eNone, eBlink, 200, False, ""
  402. DisableTable True
  403. TiltRecoveryTimer.Enabled = True 'start the Tilt delay to check for all the balls to be drained
  404. End If
  405. End Sub
  406.  
  407. Sub TiltDecreaseTimer_Timer
  408. ' DecreaseTilt
  409. If Tilt> 0 Then
  410. Tilt = Tilt - 0.1
  411. Else
  412. TiltDecreaseTimer.Enabled = False
  413. End If
  414. End Sub
  415.  
  416. Sub DisableTable(Enabled)
  417. If Enabled Then
  418. 'turn off GI and turn off all the lights
  419. GiOff
  420. LightSeqTilt.Play SeqAllOff
  421. 'Disable slings, bumpers etc
  422. LeftFlipper.RotateToStart
  423. RightFlipper.RotateToStart
  424. Bumper1.Threshold = 100
  425. Bumper2.Threshold = 100
  426. Bumper3.Threshold = 100
  427. LeftSlingshot.Disabled = 1
  428. RightSlingshot.Disabled = 1
  429. Else
  430. 'turn back on GI and the lights
  431. GiOn
  432. LightSeqTilt.StopPlay
  433. Bumper1.Threshold = 1
  434. Bumper2.Threshold = 1
  435. Bumper3.Threshold = 1
  436. LeftSlingshot.Disabled = 0
  437. RightSlingshot.Disabled = 0
  438. 'clean up the buffer display
  439. DMDFlush
  440. End If
  441. End Sub
  442.  
  443. Sub TiltRecoveryTimer_Timer()
  444. ' if all the balls have been drained then..
  445. If(BallsOnPlayfield = 0)Then
  446. ' do the normal end of ball thing (this doesn't give a bonus if the table is tilted)
  447. vpmtimer.Addtimer 2000, "EndOfBall() '"
  448. TiltRecoveryTimer.Enabled = False
  449. End If
  450. ' else retry (checks again in another second or so)
  451. End Sub
  452.  
  453. '*****************************************
  454. ' Music as wav sounds
  455. ' in VPX 10.7 you may use also mp3 or ogg
  456. '*****************************************
  457.  
  458. Dim Song
  459. Song = ""
  460.  
  461. Sub PlaySong(name)
  462. If bMusicOn Then
  463. If Song <> name Then
  464. StopSound Song
  465. Song = name
  466. PlaySound Song, -1, SongVolume
  467. End If
  468. End If
  469. End Sub
  470.  
  471. Sub ChangeSong
  472. Dim a
  473. Select Case Battle(CurrentPlayer, 0)
  474. Case 0 'no battle active so play the standard songs or the multiball songs
  475. If bBerserker Then
  476. PLaySong "mu_beserkerrage"
  477. ElseIf bDiscoLoopsEnabled Then
  478. PlaySong "mu_discoloops"
  479. ElseIf bDiscoMBEnabled Then
  480. PlaySong "mu_discomb"
  481. ElseIf bMechSuitMBStarted Then
  482. PlaySong "mu_mechsuitmb"
  483. ElseIf bNinjaMB Then
  484. PlaySong "mu_ninjamb"
  485. Else 'play default music
  486. PlaySong "mu_hellhouse" &Balls
  487. End If
  488. Case 1 'Juggernaut
  489. PlaySong "mu_juggernaut"
  490. Case 2 'Mystique
  491. PlaySong "mu_mystique"
  492. Case 3 'Sabretooth
  493. PlaySong "mu_sabretooth"
  494. Case 4 'T-Rex
  495. PlaySong "mu_trex"
  496. Case 5 'Megalodon
  497. PlaySong "mu_megalodon"
  498. Case 6 'Sauron
  499. PlaySong "mu_sauronmb"
  500. Case 7 'MrSinister
  501. PlaySong "mu_mrsinister"
  502. End Select
  503. End Sub
  504.  
  505. '********************
  506. ' Play random quotes
  507. '********************
  508.  
  509. Sub PlayQuote
  510. Dim tmp
  511. tmp = RndNbr(42)
  512. PlaySound "quote" &tmp
  513. End Sub
  514.  
  515. Sub PlaySfx
  516. Dim tmp
  517. tmp = RndNbr(39)
  518. PlaySound "sfx" &tmp
  519. FlashForms flasher007, 1500, 50, 0
  520. End Sub
  521.  
  522. '**********************
  523. ' GI effects
  524. ' independent routine
  525. ' it turns on the gi
  526. ' when there is a ball
  527. ' in play
  528. '**********************
  529.  
  530. Dim OldGiState
  531. OldGiState = -1 'start witht the Gi off
  532.  
  533. Sub ChangeGi(col) 'changes the gi color
  534. Dim bulb
  535. For each bulb in aGILights
  536. SetLightColor bulb, col, -1
  537. Next
  538. End Sub
  539.  
  540. Sub GIUpdateTimer_Timer
  541. Dim tmp, obj
  542. tmp = Getballs
  543. If UBound(tmp) <> OldGiState Then
  544. OldGiState = Ubound(tmp)
  545. If UBound(tmp) = -1 Then '-1 means no balls, 0 is the first captive ball, 1 is the second captive ball...)
  546. GiOff ' turn off the gi if no active balls on the table, we could also have used the variable ballsonplayfield.
  547. Else
  548. Gion
  549. End If
  550. End If
  551. End Sub
  552.  
  553. Sub GiOn
  554. PlaySoundAt "fx_GiOn", li036 'about the center of the table
  555. DOF 118, DOFOn
  556. Dim bulb
  557. For each bulb in aGiLights
  558. bulb.State = 1
  559. Next
  560. Fi001.Visible = 1
  561. Fi002.Visible = 1
  562. Fi003.Visible = 1
  563. Fi004.Visible = 1
  564. Fi005.Visible = 1
  565. Fi006.Visible = 1
  566. End Sub
  567.  
  568. Sub GiOff
  569. PlaySoundAt "fx_GiOff", li036 'about the center of the table
  570. DOF 118, DOFOff
  571. Dim bulb
  572. For each bulb in aGiLights
  573. bulb.State = 0
  574. Next
  575. Fi001.Visible = 0
  576. Fi002.Visible = 0
  577. Fi003.Visible = 0
  578. Fi004.Visible = 0
  579. Fi005.Visible = 0
  580. Fi006.Visible = 0
  581. End Sub
  582.  
  583. ' GI, light & flashers sequence effects
  584.  
  585. Sub GiEffect(n)
  586. Dim ii
  587. Select Case n
  588. Case 0 'all off
  589. LightSeqGi.Play SeqAlloff
  590. Case 1 'all blink
  591. LightSeqGi.UpdateInterval = 20
  592. LightSeqGi.Play SeqBlinking, , 15, 10
  593. Case 2 'random
  594. LightSeqGi.UpdateInterval = 20
  595. LightSeqGi.Play SeqRandom, 50, , 1000
  596. Case 3 'all blink fast
  597. LightSeqGi.UpdateInterval = 20
  598. LightSeqGi.Play SeqBlinking, , 10, 10
  599. Case 4 'seq up
  600. LightSeqGi.UpdateInterval = 3
  601. LightSeqGi.Play SeqUpOn, 25, 3
  602. Case 5 'seq down
  603. LightSeqGi.UpdateInterval = 3
  604. LightSeqGi.Play SeqDownOn, 25, 3
  605. End Select
  606. End Sub
  607.  
  608. Sub LightEffect(n)
  609. Select Case n
  610. Case 0 ' all off
  611. LightSeqInserts.Play SeqAlloff
  612. Case 1 'all blink
  613. LightSeqInserts.UpdateInterval = 10
  614. LightSeqInserts.Play SeqBlinking, , 15, 10
  615. Case 2 'random
  616. LightSeqInserts.UpdateInterval = 10
  617. LightSeqInserts.Play SeqRandom, 50, , 1000
  618. Case 3 'all blink fast
  619. LightSeqInserts.UpdateInterval = 10
  620. LightSeqInserts.Play SeqBlinking, , 10, 10
  621. Case 4 'center fra lilDP
  622. LightSeqlilDP.UpdateInterval = 4
  623. LightSeqlilDP.Play SeqCircleOutOn, 15, 2
  624. Case 5 'top down
  625. LightSeqPlayfield.UpdateInterval = 4
  626. LightSeqPlayfield.Play SeqDownOn, 15, 2
  627. Case 6 'down to top
  628. LightSeqPlayfield.UpdateInterval = 4
  629. LightSeqPlayfield.Play SeqUpOn, 15, 1
  630. End Select
  631. End Sub
  632.  
  633. Sub FlashEffect(n)
  634. Select Case n
  635. Case 0 ' all off
  636. LightSeqFlashers.Play SeqAlloff
  637. Case 1 'all blink
  638. LightSeqFlashers.UpdateInterval = 40
  639. LightSeqFlashers.Play SeqBlinking, , 15, 30
  640. Case 2 'random
  641. LightSeqFlashers.UpdateInterval = 30
  642. LightSeqFlashers.Play SeqRandom, 25, , 1500
  643. Case 3 'all blink fast
  644. LightSeqFlashers.UpdateInterval = 20
  645. LightSeqFlashers.Play SeqBlinking, , 10, 30
  646. Case 4 'center
  647. LightSeqFlashers.UpdateInterval = 4
  648. LightSeqFlashers.Play SeqCircleOutOn, 15, 2
  649. Case 5 'top down
  650. LightSeqFlashers.UpdateInterval = 4
  651. LightSeqFlashers.Play SeqDownOn, 15, 2
  652. Case 6 'down to top
  653. LightSeqFlashers.UpdateInterval = 4
  654. LightSeqFlashers.Play SeqUpOn, 15, 1
  655. End Select
  656. End Sub
  657.  
  658. '***************************************************************
  659. ' Supporting Ball & Sound Functions v3.0
  660. ' includes random pitch in PlaySoundAt and PlaySoundAtBall
  661. '***************************************************************
  662.  
  663. Dim TableWidth, TableHeight
  664.  
  665. TableWidth = Table1.width
  666. TableHeight = Table1.height
  667.  
  668. Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed
  669. Vol = Csng(BallVel(ball) ^2 / 2000)
  670. End Function
  671.  
  672. Function Pan(ball) ' Calculates the pan for a ball based on the X position on the table. "table1" is the name of the table
  673. Dim tmp
  674. tmp = ball.x * 2 / TableWidth-1
  675. If tmp> 0 Then
  676. Pan = Csng(tmp ^10)
  677. Else
  678. Pan = Csng(-((- tmp) ^10))
  679. End If
  680. End Function
  681.  
  682. Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed
  683. Pitch = BallVel(ball) * 20
  684. End Function
  685.  
  686. Function BallVel(ball) 'Calculates the ball speed
  687. BallVel = (SQR((ball.VelX ^2) + (ball.VelY ^2)))
  688. End Function
  689.  
  690. Function AudioFade(ball) 'only on VPX 10.4 and newer
  691. Dim tmp
  692. tmp = ball.y * 2 / TableHeight-1
  693. If tmp> 0 Then
  694. AudioFade = Csng(tmp ^10)
  695. Else
  696. AudioFade = Csng(-((- tmp) ^10))
  697. End If
  698. End Function
  699.  
  700. Sub PlaySoundAt(soundname, tableobj) 'play sound at X and Y position of an object, mostly bumpers, flippers and other fast objects
  701. PlaySound soundname, 0, 1, Pan(tableobj), 0.1, 0, 0, 0, AudioFade(tableobj)
  702. End Sub
  703.  
  704. Sub PlaySoundAtBall(soundname) ' play a sound at the ball position, like rubbers, targets, metals, plastics
  705. PlaySound soundname, 0, Vol(ActiveBall), pan(ActiveBall), 0.4, 0, 0, 0, AudioFade(ActiveBall)
  706. End Sub
  707.  
  708. Function RndNbr(n) 'returns a random number between 1 and n
  709. Randomize timer
  710. RndNbr = Int((n * Rnd) + 1)
  711. End Function
  712.  
  713. '***********************************************
  714. ' JP's VP10 Rolling Sounds + Ballshadow v3.0
  715. ' uses a collection of shadows, aBallShadow
  716. '***********************************************
  717.  
  718. Const tnob = 19 'total number of balls, 20 balls, from 0 to 19
  719. Const lob = 0 'number of locked balls
  720. Const maxvel = 45 'max ball velocity
  721. ReDim rolling(tnob)
  722. InitRolling
  723.  
  724. Sub InitRolling
  725. Dim i
  726. For i = 0 to tnob
  727. rolling(i) = False
  728. Next
  729. End Sub
  730.  
  731. Sub RollingUpdate()
  732. Dim BOT, b, ballpitch, ballvol, speedfactorx, speedfactory
  733. BOT = GetBalls
  734.  
  735. ' stop the sound of deleted balls and hide the shadow
  736. For b = UBound(BOT) + 1 to tnob
  737. rolling(b) = False
  738. StopSound("fx_ballrolling" & b)
  739. aBallShadow(b).Y = 3000
  740. Next
  741.  
  742. ' exit the sub if no balls on the table
  743. If UBound(BOT) = lob - 1 Then Exit Sub 'there no extra balls on this table
  744.  
  745. ' play the rolling sound for each ball and draw the shadow
  746. For b = lob to UBound(BOT)
  747. aBallShadow(b).X = BOT(b).X
  748. aBallShadow(b).Y = BOT(b).Y
  749. aBallShadow(b).Height = BOT(b).Z -24
  750.  
  751. If BallVel(BOT(b))> 1 Then
  752. If BOT(b).z <30 Then
  753. ballpitch = Pitch(BOT(b))
  754. ballvol = Vol(BOT(b))
  755. Else
  756. ballpitch = Pitch(BOT(b)) + 25000 'increase the pitch on a ramp
  757. ballvol = Vol(BOT(b)) * 10
  758. End If
  759. rolling(b) = True
  760. PlaySound("fx_ballrolling" & b), -1, ballvol, Pan(BOT(b)), 0, ballpitch, 1, 0, AudioFade(BOT(b))
  761. Else
  762. If rolling(b) = True Then
  763. StopSound("fx_ballrolling" & b)
  764. rolling(b) = False
  765. End If
  766. End If
  767.  
  768. ' rothbauerw's Dropping Sounds
  769. If BOT(b).VelZ <-1 and BOT(b).z <55 and BOT(b).z> 27 Then 'height adjust for ball drop sounds
  770. PlaySound "fx_balldrop", 0, ABS(BOT(b).velz) / 17, Pan(BOT(b)), 0, Pitch(BOT(b)), 1, 0, AudioFade(BOT(b))
  771. End If
  772.  
  773. ' jps ball speed control
  774. If BOT(b).VelX AND BOT(b).VelY <> 0 Then
  775. speedfactorx = ABS(maxvel / BOT(b).VelX)
  776. speedfactory = ABS(maxvel / BOT(b).VelY)
  777. If speedfactorx <1 Then
  778. BOT(b).VelX = BOT(b).VelX * speedfactorx
  779. BOT(b).VelY = BOT(b).VelY * speedfactorx
  780. End If
  781. If speedfactory <1 Then
  782. BOT(b).VelX = BOT(b).VelX * speedfactory
  783. BOT(b).VelY = BOT(b).VelY * speedfactory
  784. End If
  785. End If
  786. Next
  787. End Sub
  788.  
  789. '**********************
  790. ' Ball Collision Sound
  791. '**********************
  792.  
  793. Sub OnBallBallCollision(ball1, ball2, velocity)
  794. PlaySound "fx_collide", 0, Csng(velocity) ^2 / 2000, Pan(ball1), 0, Pitch(ball1), 0, 0, AudioFade(ball1)
  795. End Sub
  796.  
  797. '************************************
  798. ' Diverse Collection Hit Sounds v3.0
  799. '************************************
  800.  
  801. Sub aMetals_Hit(idx):PlaySoundAtBall "fx_MetalHit":End Sub
  802. Sub aMetalWires_Hit(idx):PlaySoundAtBall "fx_MetalWire":End Sub
  803. Sub aRubber_Bands_Hit(idx):PlaySoundAtBall "fx_rubber_band":End Sub
  804. Sub aRubber_LongBands_Hit(idx):PlaySoundAtBall "fx_rubber_longband":End Sub
  805. Sub aRubber_Posts_Hit(idx):PlaySoundAtBall "fx_rubber_post":End Sub
  806. Sub aRubber_Pins_Hit(idx):PlaySoundAtBall "fx_rubber_pin":End Sub
  807. Sub aRubber_Pegs_Hit(idx):PlaySoundAtBall "fx_rubber_peg":End Sub
  808. Sub aPlastics_Hit(idx):PlaySoundAtBall "fx_PlasticHit":End Sub
  809. Sub aGates_Hit(idx):PlaySoundAtBall "fx_Gate":End Sub
  810. Sub aWoods_Hit(idx):PlaySoundAtBall "fx_Woodhit":End Sub
  811. Sub aTriggers_Hit(idx):PlaySfx:End Sub
  812.  
  813. ' *********************************************************************
  814. ' User Defined Script Events
  815. ' *********************************************************************
  816.  
  817. ' Initialise the Table for a new Game
  818. '
  819. Sub ResetForNewGame()
  820. Dim i
  821.  
  822. bGameInPLay = True
  823.  
  824. 'resets the score display, and turn off attract mode
  825. StopAttractMode
  826. GiOn
  827.  
  828. TotalGamesPlayed = TotalGamesPlayed + 1
  829. CurrentPlayer = 1
  830. PlayersPlayingGame = 1
  831. bOnTheFirstBall = True
  832. For i = 1 To MaxPlayers
  833. Score(i) = 0
  834. BonusPoints(i) = 0
  835. BonusHeldPoints(i) = 0
  836. BonusMultiplier(i) = 1
  837. PlayfieldMultiplier(i) = 1
  838. BallsRemaining(i) = BallsPerGame
  839. ExtraBallsAwards(i) = 0
  840. Next
  841.  
  842. ' initialise any other flags
  843. Tilt = 0
  844.  
  845. ' initialise Game variables
  846. Game_Init()
  847.  
  848. ' you may wish to start some music, play a sound, do whatever at this point
  849.  
  850. vpmtimer.addtimer 1500, "FirstBall '"
  851. End Sub
  852.  
  853. ' This is used to delay the start of a game to allow any attract sequence to
  854. ' complete. When it expires it creates a ball for the player to start playing with
  855.  
  856. Sub FirstBall
  857. ' reset the table for a new ball
  858. ResetForNewPlayerBall()
  859. ' create a new ball in the shooters lane
  860. CreateNewBall()
  861. End Sub
  862.  
  863. ' (Re-)Initialise the Table for a new ball (either a new ball after the player has
  864. ' lost one or we have moved onto the next player (if multiple are playing))
  865.  
  866. Sub ResetForNewPlayerBall()
  867. ' make sure the correct display is upto date
  868. AddScore 0
  869.  
  870. ' set the current players bonus multiplier back down to 1X
  871. SetBonusMultiplier 1
  872.  
  873. ' reduce the playfield multiplier
  874. ' reset any drop targets, lights, game Mode etc..
  875.  
  876. BonusPoints(CurrentPlayer) = 0
  877. bBonusHeld = False
  878. bExtraBallWonThisBall = False
  879.  
  880. 'Reset any table specific
  881. ResetNewBallVariables
  882.  
  883. 'This is a new ball, so activate the ballsaver
  884. bBallSaverReady = True
  885.  
  886. 'and the skillshot
  887. bSkillShotReady = True
  888.  
  889. 'Change the music ?
  890. End Sub
  891.  
  892. ' Create a new ball on the Playfield
  893.  
  894. Sub CreateNewBall()
  895. ' create a ball in the plunger lane kicker.
  896. BallRelease.CreateSizedBallWithMass BallSize / 2, BallMass
  897.  
  898. ' There is a (or another) ball on the playfield
  899. BallsOnPlayfield = BallsOnPlayfield + 1
  900.  
  901. ' kick it out..
  902. PlaySoundAt SoundFXDOF("fx_Ballrel", 123, DOFPulse, DOFContactors), BallRelease
  903. BallRelease.Kick 90, 4
  904.  
  905. ' if there is 2 or more balls then set the multibal flag (remember to check for locked balls and other balls used for animations)
  906. ' set the bAutoPlunger flag to kick the ball in play automatically
  907. If BallsOnPlayfield> 1 Then
  908. DOF 143, DOFPulse
  909. bMultiBallMode = True
  910. bAutoPlunger = True
  911. End If
  912. End Sub
  913.  
  914. ' Add extra balls to the table with autoplunger
  915. ' Use it as AddMultiball 4 to add 4 extra balls to the table
  916.  
  917. Sub AddMultiball(nballs)
  918. mBalls2Eject = mBalls2Eject + nballs
  919. CreateMultiballTimer.Enabled = True
  920. 'and eject the first ball
  921. CreateMultiballTimer_Timer
  922. End Sub
  923.  
  924. ' Eject the ball after the delay, AddMultiballDelay
  925. Sub CreateMultiballTimer_Timer()
  926. ' wait if there is a ball in the plunger lane
  927. If bBallInPlungerLane Then
  928. Exit Sub
  929. Else
  930. If BallsOnPlayfield <MaxMultiballs Then
  931. CreateNewBall()
  932. mBalls2Eject = mBalls2Eject -1
  933. If mBalls2Eject = 0 Then 'if there are no more balls to eject then stop the timer
  934. CreateMultiballTimer.Enabled = False
  935. End If
  936. Else 'the max number of multiballs is reached, so stop the timer
  937. mBalls2Eject = 0
  938. CreateMultiballTimer.Enabled = False
  939. End If
  940. End If
  941. End Sub
  942.  
  943. ' The Player has lost his ball (there are no more balls on the playfield).
  944. ' Handle any bonus points awarded
  945.  
  946. Sub EndOfBall()
  947. Dim AwardPoints, TotalBonus, ii
  948. AwardPoints = 0
  949. TotalBonus = 10 'yes 10 points :)
  950. ' the first ball has been lost. From this point on no new players can join in
  951. bOnTheFirstBall = False
  952.  
  953. ' only process any of this if the table is not tilted.
  954. '(the tilt recovery mechanism will handle any extra balls or end of game)
  955.  
  956. If NOT Tilted Then
  957. PLaySong "mu_bonuscount"
  958. 'Count the bonus. This table uses several bonus
  959. DMD CL(0, "BONUS"), "", "", eBlink, eNone, eNone, 1000, True, ""
  960.  
  961. 'Ninja Stars
  962. AwardPoints = NinjaStars(CurrentPlayer) * 100000
  963. TotalBonus = TotalBonus + AwardPoints
  964. DMD CL(0, FormatScore(AwardPoints)), CL(1, "NINJA STARS " & NinjaStars(CurrentPlayer)), "", eBlink, eNone, eNone, 1000, True, ""
  965.  
  966. 'Chimichangas
  967. AwardPoints = Chimichangas(CurrentPlayer) * 250000
  968. TotalBonus = TotalBonus + AwardPoints
  969. DMD CL(0, FormatScore(AwardPoints)), CL(1, "CHIMICHANGAS " & Chimichangas(CurrentPlayer)), "", eBlink, eNone, eNone, 1000, True, ""
  970.  
  971. 'Chimichangas
  972. AwardPoints = Weapons(CurrentPlayer) * 100000
  973. TotalBonus = TotalBonus + AwardPoints
  974. DMD CL(0, FormatScore(AwardPoints)), CL(1, "WEAPONS " & Weapons(CurrentPlayer)), "", eBlink, eNone, eNone, 1000, True, ""
  975.  
  976. ' calculate the totalbonus
  977. DMD CL(0, FormatScore(TotalBonus)), CL(1, "TOTAL BONUS " & " X" & BonusMultiplier(CurrentPlayer)), "", eNone, eNone, eNone, 1500, True, ""
  978. TotalBonus = TotalBonus * BonusMultiplier(CurrentPlayer)
  979. ' Add the bonus to the score
  980. AddScore TotalBonus
  981.  
  982. ' add a bit of a delay to allow for the bonus points to be shown & added up
  983. vpmtimer.addtimer 8000, "EndOfBall2 '"
  984. Else 'if tilted then only add a short delay and move to the 2nd part of the end of the ball
  985. vpmtimer.addtimer 100, "EndOfBall2 '"
  986. End If
  987. End Sub
  988.  
  989. ' The Timer which delays the machine to allow any bonus points to be added up
  990. ' has expired. Check to see if there are any extra balls for this player.
  991. ' if not, then check to see if this was the last ball (of the CurrentPlayer)
  992. '
  993. Sub EndOfBall2()
  994. ' if were tilted, reset the internal tilted flag (this will also
  995. ' set TiltWarnings back to zero) which is useful if we are changing player LOL
  996. Tilted = False
  997. Tilt = 0
  998. DisableTable False 'enable again bumpers and slingshots
  999.  
  1000. ' has the player won an extra-ball ? (might be multiple outstanding)
  1001. If(ExtraBallsAwards(CurrentPlayer) <> 0)Then
  1002. 'debug.print "Extra Ball"
  1003.  
  1004. ' yep got to give it to them
  1005. ExtraBallsAwards(CurrentPlayer) = ExtraBallsAwards(CurrentPlayer)- 1
  1006.  
  1007. ' if no more EB's then turn off any shoot again light
  1008. If(ExtraBallsAwards(CurrentPlayer) = 0)Then
  1009. LightShootAgain.State = 0
  1010. End If
  1011.  
  1012. ' You may wish to do a bit of a song AND dance at this point
  1013. DMD CL(0, "EXTRA BALL"), CL(1, "SHOOT AGAIN"), "", eNone, eNone, eBlink, 1000, True, ""
  1014.  
  1015. ' In this table an extra ball will have the skillshot and ball saver, so we reset the playfield for the new ball
  1016. ResetForNewPlayerBall()
  1017.  
  1018. ' Create a new ball in the shooters lane
  1019. CreateNewBall()
  1020. Else ' no extra balls
  1021.  
  1022. BallsRemaining(CurrentPlayer) = BallsRemaining(CurrentPlayer)- 1
  1023.  
  1024. ' was that the last ball ?
  1025. If(BallsRemaining(CurrentPlayer) <= 0)Then
  1026. 'debug.print "No More Balls, High Score Entry"
  1027.  
  1028. ' Submit the CurrentPlayers score to the High Score system
  1029. CheckHighScore()
  1030. ' you may wish to play some music at this point
  1031.  
  1032. Else
  1033.  
  1034. ' not the last ball (for that player)
  1035. ' if multiple players are playing then move onto the next one
  1036. EndOfBallComplete()
  1037. End If
  1038. End If
  1039. End Sub
  1040.  
  1041. ' This function is called when the end of bonus display
  1042. ' (or high score entry finished) AND it either end the game or
  1043. ' move onto the next player (or the next ball of the same player)
  1044. '
  1045. Sub EndOfBallComplete()
  1046. Dim NextPlayer
  1047.  
  1048. 'debug.print "EndOfBall - Complete"
  1049.  
  1050. ' are there multiple players playing this game ?
  1051. If(PlayersPlayingGame> 1)Then
  1052. ' then move to the next player
  1053. NextPlayer = CurrentPlayer + 1
  1054. ' are we going from the last player back to the first
  1055. ' (ie say from player 4 back to player 1)
  1056. If(NextPlayer> PlayersPlayingGame)Then
  1057. NextPlayer = 1
  1058. End If
  1059. Else
  1060. NextPlayer = CurrentPlayer
  1061. End If
  1062.  
  1063. 'debug.print "Next Player = " & NextPlayer
  1064.  
  1065. ' is it the end of the game ? (all balls been lost for all players)
  1066. If((BallsRemaining(CurrentPlayer) <= 0)AND(BallsRemaining(NextPlayer) <= 0))Then
  1067. ' you may wish to do some sort of Point Match free game award here
  1068. ' generally only done when not in free play mode
  1069.  
  1070. ' set the machine into game over mode
  1071. EndOfGame()
  1072.  
  1073. ' you may wish to put a Game Over message on the desktop/backglass
  1074.  
  1075. Else
  1076. ' set the next player
  1077. CurrentPlayer = NextPlayer
  1078.  
  1079. ' make sure the correct display is up to date
  1080. AddScore 0
  1081.  
  1082. ' reset the playfield for the new player (or new ball)
  1083. ResetForNewPlayerBall()
  1084.  
  1085. ' AND create a new ball
  1086. CreateNewBall()
  1087.  
  1088. ' play a sound if more than 1 player
  1089. If PlayersPlayingGame> 1 Then
  1090. Select Case CurrentPlayer
  1091. Case 1:DMD "", "", "d_player1", eNone, eNone, eNone, 1000, True, "vo_player1"
  1092. Case 2:DMD "", "", "d_player2", eNone, eNone, eNone, 1000, True, "vo_player2"
  1093. Case 3:DMD "", "", "d_player3", eNone, eNone, eNone, 1000, True, "vo_player3"
  1094. Case 4:DMD "", "", "d_player4", eNone, eNone, eNone, 1000, True, "vo_player4"
  1095. End Select
  1096. Else
  1097. DMD "", "", "d_player1", eNone, eNone, eNone, 1000, True, ""
  1098. End If
  1099. End If
  1100. End Sub
  1101.  
  1102. ' This function is called at the End of the Game, it should reset all
  1103. ' Drop targets, AND eject any 'held' balls, start any attract sequences etc..
  1104.  
  1105. Sub EndOfGame()
  1106. 'debug.print "End Of Game"
  1107. bGameInPLay = False
  1108. ' just ended your game then play the end of game tune
  1109. If NOT bJustStarted Then
  1110.  
  1111. End If
  1112. bJustStarted = False
  1113. ' ensure that the flippers are down
  1114. SolLFlipper 0
  1115. SolRFlipper 0
  1116.  
  1117. ' terminate all Mode - eject locked balls
  1118. ' most of the Mode/timers terminate at the end of the ball
  1119.  
  1120. ' set any lights for the attract mode
  1121. GiOff
  1122. StartAttractMode
  1123. ' you may wish to light any Game Over Light you may have
  1124. End Sub
  1125.  
  1126. Function Balls
  1127. Dim tmp
  1128. tmp = BallsPerGame - BallsRemaining(CurrentPlayer) + 1
  1129. If tmp> BallsPerGame Then
  1130. Balls = BallsPerGame
  1131. Else
  1132. Balls = tmp
  1133. End If
  1134. End Function
  1135.  
  1136. ' *********************************************************************
  1137. ' Drain / Plunger Functions
  1138. ' *********************************************************************
  1139.  
  1140. ' lost a ball ;-( check to see how many balls are on the playfield.
  1141. ' if only one then decrement the remaining count AND test for End of game
  1142. ' if more than 1 ball (multi-ball) then kill of the ball but don't create
  1143. ' a new one
  1144. '
  1145. Sub Drain_Hit()
  1146. ' Destroy the ball
  1147. Drain.DestroyBall
  1148. If bGameInPLay = False Then Exit Sub 'don't do anything, just delete the ball
  1149. ' Exit Sub ' only for debugging - this way you can add balls from the debug window
  1150.  
  1151. BallsOnPlayfield = BallsOnPlayfield - 1
  1152.  
  1153. ' pretend to knock the ball into the ball storage mech
  1154. PlaySoundAt "fx_drain", Drain
  1155. 'if Tilted the end Ball Mode
  1156. If Tilted Then
  1157. StopEndOfBallMode
  1158. End If
  1159.  
  1160. ' if there is a game in progress AND it is not Tilted
  1161. If(bGameInPLay = True)AND(Tilted = False)Then
  1162.  
  1163. ' is the ball saver active,
  1164. If(bBallSaverActive = True)Then
  1165.  
  1166. ' yep, create a new ball in the shooters lane
  1167. ' we use the Addmultiball in case the multiballs are being ejected
  1168. AddMultiball 1
  1169. ' we kick the ball with the autoplunger
  1170. bAutoPlunger = True
  1171. ' you may wish to put something on a display or play a sound at this point
  1172. DMD "_", CL(1, "BALL SAVED"), "_", eNone, eBlinkfast, eNone, 1000, True, ""
  1173. Else
  1174. ' cancel any multiball if on last ball (ie. lost all other balls)
  1175. If(BallsOnPlayfield = 1)Then
  1176. ' AND in a multi-ball??
  1177. If(bMultiBallMode = True)then
  1178. ' not in multiball mode any more
  1179. bMultiBallMode = False
  1180. ' you may wish to change any music over at this point and
  1181.  
  1182. ' turn off any multiball specific lights
  1183. ChangeGi white
  1184. 'stop any multiball modes
  1185. StopMBmodes
  1186. End If
  1187. End If
  1188.  
  1189. ' was that the last ball on the playfield
  1190. If(BallsOnPlayfield = 0)Then
  1191. ' End Mode and timers
  1192.  
  1193. ChangeGi white
  1194. ' Show the end of ball animation
  1195. ' and continue with the end of ball
  1196. ' DMD something?
  1197. StopEndOfBallMode
  1198. vpmtimer.addtimer 200, "EndOfBall '" 'the delay is depending of the animation of the end of ball, if there is no animation then move to the end of ball
  1199. End If
  1200. End If
  1201. End If
  1202. End Sub
  1203.  
  1204. ' The Ball has rolled out of the Plunger Lane and it is pressing down the trigger in the shooters lane
  1205. ' Check to see if a ball saver mechanism is needed and if so fire it up.
  1206.  
  1207. Sub swPlungerRest_Hit()
  1208. 'debug.print "ball in plunger lane"
  1209. ' some sound according to the ball position
  1210. PlaySoundAt "fx_sensor", swPlungerRest
  1211. bBallInPlungerLane = True
  1212. ' turn on Launch light is there is one
  1213. 'LaunchLight.State = 2
  1214.  
  1215. 'be sure to update the Scoreboard after the animations, if any
  1216.  
  1217. ' kick the ball in play if the bAutoPlunger flag is on
  1218. If bAutoPlunger Then
  1219. 'debug.print "autofire the ball"
  1220. PlungerIM.AutoFire
  1221. DOF 120, DOFPulse
  1222. PlaySoundAt "fx_kicker", swPlungerRest
  1223. bAutoPlunger = False
  1224. End If
  1225. 'Start the Selection of the skillshot if ready
  1226. If bSkillShotReady Then
  1227. PlaySong "mu_shooterlane"
  1228. UpdateSkillshot()
  1229. ' show the message to shoot the ball in case the player has fallen sleep
  1230. SwPlungerCount = 0
  1231. swPlungerRest.TimerEnabled = 1
  1232. End If
  1233. ' remember last trigger hit by the ball.
  1234. LastSwitchHit = "swPlungerRest"
  1235. End Sub
  1236.  
  1237. ' The ball is released from the plunger turn off some flags and check for skillshot
  1238.  
  1239. Sub swPlungerRest_UnHit()
  1240. lighteffect 6
  1241. bBallInPlungerLane = False
  1242. swPlungerRest.TimerEnabled = 0 'stop the launch ball timer if active
  1243. If bSkillShotReady Then
  1244. ChangeSong
  1245. ResetSkillShotTimer.Enabled = 1
  1246. End If
  1247. ' if there is a need for a ball saver, then start off a timer
  1248. ' only start if it is ready, and it is currently not running, else it will reset the time period
  1249. If(bBallSaverReady = True)AND(BallSaverTime <> 0)And(bBallSaverActive = False)Then
  1250. EnableBallSaver BallSaverTime
  1251. End If
  1252. ' turn off LaunchLight
  1253. ' LaunchLight.State = 0
  1254. End Sub
  1255.  
  1256. ' swPlungerRest timer to show the "launch ball" if the player has not shot the ball during 6 seconds
  1257. Dim SwPlungerCount
  1258. Sub swPlungerRest_Timer
  1259. Select Case SwPlungerCount
  1260. Case 0
  1261. If bInfoNeeded1(CurrentPLayer)Then
  1262. DMD "USE FLIPPER BUTTONS", "TO SELECT SKILLSHOT", "_", eNone, eNone, eNone, 2000, True, "vo_useflipperselecttoplaneskillshot"
  1263. End If
  1264. Case 1
  1265. If bInfoNeeded1(CurrentPLayer)Then
  1266. DMD "HOLD LEFT FLIPPER", "FOR SUPERSKILLSHOT", "_", eNone, eNone, eNone, 2000, True, "vo_holdflipper-sk"
  1267. bInfoNeeded1(CurrentPLayer) = False
  1268. End If
  1269. Case 4
  1270. DMD CL(0, "HEY YOU"), CL(1, "SHOOT THE BALL"), "_", eNone, eNone, eNone, 2000, True, "vo_whatareyouwaitingfor"
  1271. swPlungerRest.TimerEnabled = 0
  1272. End Select
  1273. SwPlungerCount = SwPlungerCount + 1
  1274. End Sub
  1275.  
  1276. Sub EnableBallSaver(seconds)
  1277. 'debug.print "Ballsaver started"
  1278. ' set our game flag
  1279. bBallSaverActive = True
  1280. bBallSaverReady = False
  1281. ' start the timer
  1282. BallSaverTimerExpired.Interval = 1000 * seconds
  1283. BallSaverTimerExpired.Enabled = True
  1284. BallSaverSpeedUpTimer.Interval = 1000 * seconds -(1000 * seconds) / 3
  1285. BallSaverSpeedUpTimer.Enabled = True
  1286. ' if you have a ball saver light you might want to turn it on at this point (or make it flash)
  1287. LightShootAgain.BlinkInterval = 160
  1288. LightShootAgain.State = 2
  1289. End Sub
  1290.  
  1291. ' The ball saver timer has expired. Turn it off AND reset the game flag
  1292. '
  1293. Sub BallSaverTimerExpired_Timer()
  1294. 'debug.print "Ballsaver ended"
  1295. BallSaverTimerExpired.Enabled = False
  1296. ' clear the flag
  1297. bBallSaverActive = False
  1298. ' if you have a ball saver light then turn it off at this point
  1299. LightShootAgain.State = 0
  1300. End Sub
  1301.  
  1302. Sub BallSaverSpeedUpTimer_Timer()
  1303. 'debug.print "Ballsaver Speed Up Light"
  1304. BallSaverSpeedUpTimer.Enabled = False
  1305. ' Speed up the blinking
  1306. LightShootAgain.BlinkInterval = 80
  1307. LightShootAgain.State = 2
  1308. End Sub
  1309.  
  1310. ' *********************************************************************
  1311. ' Supporting Score Functions
  1312. ' *********************************************************************
  1313.  
  1314. ' Add points to the score AND update the score board
  1315. ' In this table we use SecondRound variable to double the score points in the second round after killing Malthael
  1316. Sub AddScore(points)
  1317. If Tilted Then Exit Sub
  1318. ' add the points to the current players score variable
  1319. If Battle(CurrentPLayer, 0)> 0 Then
  1320. Score(CurrentPlayer) = Score(CurrentPlayer) + points * PlayfieldMultiplier(CurrentPlayer) * ColossusValue
  1321. Else
  1322. Score(CurrentPlayer) = Score(CurrentPlayer) + points * PlayfieldMultiplier(CurrentPlayer)
  1323. End if
  1324. ' you may wish to check to see if the player has gotten a replay
  1325. End Sub
  1326.  
  1327. ' Add bonus to the bonuspoints AND update the score board
  1328.  
  1329. Sub AddBonus(points) 'not used in this table, since there are many different bonus items.
  1330. If Tilted Then Exit Sub
  1331. ' add the bonus to the current players bonus variable
  1332. BonusPoints(CurrentPlayer) = BonusPoints(CurrentPlayer) + points
  1333. End Sub
  1334.  
  1335. ' Add some points to the current Jackpot.
  1336. '
  1337. Sub AddJackpot(points)
  1338. ' Jackpots only generally increment in multiball mode AND not tilted
  1339. ' but this doesn't have to be the case
  1340. If Tilted Then Exit Sub
  1341.  
  1342. ' If(bMultiBallMode = True) Then
  1343. Jackpot(CurrentPlayer) = Jackpot(CurrentPlayer) + points
  1344. DMD "_", CL(1, "INCREASED JACKPOT"), "_", eNone, eNone, eNone, 1000, True, ""
  1345. ' you may wish to limit the jackpot to a upper limit, ie..
  1346. ' If (Jackpot >= 6000) Then
  1347. ' Jackpot = 6000
  1348. ' End if
  1349. 'End if
  1350. End Sub
  1351.  
  1352. Sub AddSuperJackpot(points) 'not used in this table
  1353. If Tilted Then Exit Sub
  1354. End Sub
  1355.  
  1356. Sub AddBonusMultiplier(n)
  1357. Dim NewBonusLevel
  1358. ' if not at the maximum bonus level
  1359. if(BonusMultiplier(CurrentPlayer) + n <= MaxBonusMultiplier)then
  1360. ' then add and set the lights
  1361. NewBonusLevel = BonusMultiplier(CurrentPlayer) + n
  1362. SetBonusMultiplier(NewBonusLevel)
  1363. DMD "_", CL(1, "BONUS X " &NewBonusLevel), "_", eNone, eBlink, eNone, 2000, True, ""
  1364. Else
  1365. AddScore 50000
  1366. DMD "_", CL(1, "50000"), "_", eNone, eNone, eNone, 1000, True, ""
  1367. End if
  1368. End Sub
  1369.  
  1370. ' Set the Bonus Multiplier to the specified level AND set any lights accordingly
  1371.  
  1372. Sub SetBonusMultiplier(Level)
  1373. ' Set the multiplier to the specified level
  1374. BonusMultiplier(CurrentPlayer) = Level
  1375. UPdateBonusXLights(Level)
  1376. End Sub
  1377.  
  1378. Sub UpdateBonusXLights(Level) 'no lights in this table
  1379. ' Update the lights
  1380. Select Case Level
  1381. 'Case 1:light54.State = 0:light55.State = 0:light56.State = 0:light57.State = 0
  1382. 'Case 2:light54.State = 1:light55.State = 0:light56.State = 0:light57.State = 0
  1383. 'Case 3:light54.State = 0:light55.State = 1:light56.State = 0:light57.State = 0
  1384. 'Case 4:light54.State = 0:light55.State = 0:light56.State = 1:light57.State = 0
  1385. 'Case 5:light54.State = 0:light55.State = 0:light56.State = 0:light57.State = 1
  1386. End Select
  1387. End Sub
  1388.  
  1389. Sub AddPlayfieldMultiplier(n)
  1390. Dim snd
  1391. Dim NewPFLevel
  1392. ' if not at the maximum level x
  1393. if(PlayfieldMultiplier(CurrentPlayer) + n <= MaxMultiplier)then
  1394. ' then add and set the lights
  1395. NewPFLevel = PlayfieldMultiplier(CurrentPlayer) + n
  1396. SetPlayfieldMultiplier(NewPFLevel)
  1397. snd = "sfx_thunder" &NewPFLevel
  1398. DMD "_", CL(1, "PLAYFIELD X " &NewPFLevel), "_", eNone, eBlink, eNone, 2000, True, snd
  1399. Else 'if the 5x is already lit
  1400. AddScore 50000
  1401. DMD "_", CL(1, "50000"), "_", eNone, eNone, eNone, 2000, True, ""
  1402. End if
  1403. 'In this table I want the multiplier to last until you loose the ball :)
  1404. 'Start the timer to reduce the playfield x every 30 seconds
  1405. 'pfxtimer.Enabled = 0
  1406. 'pfxtimer.Enabled = 1
  1407. End Sub
  1408.  
  1409. ' Set the Playfield Multiplier to the specified level AND set any lights accordingly
  1410.  
  1411. Sub SetPlayfieldMultiplier(Level)
  1412. ' Set the multiplier to the specified level
  1413. PlayfieldMultiplier(CurrentPlayer) = Level
  1414. UpdatePFXLights(Level)
  1415. End Sub
  1416.  
  1417. Sub UpdatePFXLights(Level)
  1418. ' Update the playfield multiplier lights
  1419. Select Case Level
  1420. Case 1:li002.State = 0:li003.State = 0:li004.State = 0:li005.State = 0
  1421. Case 2:li002.State = 1:li003.State = 0:li004.State = 0:li005.State = 0
  1422. Case 3:li002.State = 1:li003.State = 1:li004.State = 0:li005.State = 0
  1423. Case 4:li002.State = 1:li003.State = 1:li004.State = 1:li005.State = 0
  1424. Case 5:li002.State = 1:li003.State = 1:li004.State = 1:li005.State = 1
  1425. End Select
  1426. ' show the multiplier in the DMD?
  1427. End Sub
  1428.  
  1429. Sub AwardExtraBall()
  1430. If NOT bExtraBallWonThisBall Then
  1431. DMD "_", CL(1, ("EXTRA BALL WON")), "_", eNone, eBlink, eNone, 1000, True, SoundFXDOF("fx_Knocker", 122, DOFPulse, DOFKnocker)
  1432. DOF 121, DOFPulse
  1433. ExtraBallsAwards(CurrentPlayer) = ExtraBallsAwards(CurrentPlayer) + 1
  1434. bExtraBallWonThisBall = True
  1435. LightShootAgain.State = 1 'light the shoot again lamp
  1436. GiEffect 2
  1437. LightEffect 2
  1438. END If
  1439. End Sub
  1440.  
  1441. Sub AwardSpecial()
  1442. DMD "_", CL(1, ("EXTRA GAME WON")), "_", eNone, eBlink, eNone, 1000, True, SoundFXDOF("fx_Knocker", 122, DOFPulse, DOFKnocker)
  1443. DOF 121, DOFPulse
  1444. Credits = Credits + 1
  1445. If bFreePlay = False Then DOF 125, DOFOn
  1446. LightEffect 2
  1447. GiEffect 2
  1448. End Sub
  1449.  
  1450. Sub AwardJackpot() 'award a normal jackpot
  1451. DMD CL(0, FormatScore(Jackpot(CurrentPlayer))), CL(1, "JACKPOT"), "bkborder", eBlinkFast, eBlinkFast, eNone, 1000, True, "vo_Jackpot"
  1452. DOF 126, DOFPulse
  1453. AddScore Jackpot(CurrentPlayer)
  1454. LightEffect 2
  1455. GiEffect 2
  1456. End Sub
  1457.  
  1458. Sub AwardMegaJackpot() 'award a Megalodon Jackpot
  1459. DMD CL(0, FormatScore(Jackpot(CurrentPlayer))), CL(1, "MEGALODON JACKPOT"), "d_megalodon", eBlinkFast, eBlinkFast, eNone, 1000, True, "vo_Jackpot"
  1460. DOF 126, DOFPulse
  1461. AddScore MegaJackpot(CurrentPlayer)
  1462. MegaJackpot(CurrentPlayer) = MegaJackpot(CurrentPlayer) + 10000
  1463. MegaSuperJCount = MegaSuperJCount + 1
  1464. LightEffect 2
  1465. GiEffect 2
  1466. End Sub
  1467.  
  1468. Sub AwardSuperMegaJackpot() 'award a SuperMegalodon Jackpot
  1469. MegaSuperJValue = MegaJackpot(CurrentPlayer) * MegaSuperJCount
  1470. DMD CL(0, FormatScore(MegaSuperJValue)), "MEGALODON SUPJACKPOT", "d_megalodon", eBlinkFast, eBlinkFast, eNone, 1000, True, "vo_superjackpot"
  1471. DOF 126, DOFPulse
  1472. AddScore MegaSuperJValue
  1473. LightEffect 2
  1474. GiEffect 2
  1475. End Sub
  1476.  
  1477. Sub AwardSuperJackpot()
  1478. DMD CL(0, FormatScore(SuperJackpot(CurrentPlayer))), CL(1, "SUPER JACKPOT"), "bkborder", eBlinkFast, eBlinkFast, eNone, 1000, True, "vo_superjackpot"
  1479. DOF 126, DOFPulse
  1480. AddScore SuperJackpot(CurrentPlayer)
  1481. LightEffect 2
  1482. GiEffect 2
  1483. End Sub
  1484.  
  1485. Sub AwardSkillshot()
  1486. ResetSkillShotTimer_Timer
  1487. 'show dmd animation
  1488. DMD CL(0, FormatScore(SkillshotValue(CurrentPlayer))), CL(1, ("SKILLSHOT")), "bkborder", eBlinkFast, eBlink, eNone, 1000, True, "fanfare"
  1489. DOF 127, DOFPulse
  1490. Addscore SkillShotValue(CurrentPlayer)
  1491. ' increment the skillshot value with 250.000
  1492. SkillShotValue(CurrentPlayer) = SkillShotValue(CurrentPlayer) + 250000
  1493. 'do some light show
  1494. GiEffect 2
  1495. LightEffect 2
  1496. End Sub
  1497.  
  1498. Sub AwardSuperSkillshot()
  1499. ResetSkillShotTimer_Timer
  1500. 'show dmd animation
  1501. DMD CL(0, FormatScore(SuperSkillshotValue(CurrentPlayer))), CL(1, ("SUPER SKILLSHOT")), "bkborder", eBlinkFast, eBlink, eNone, 1000, True, "fanfare"
  1502. DOF 127, DOFPulse
  1503. Addscore SuperSkillshotValue(CurrentPlayer)
  1504. ' increment the skillshot value with 500.000
  1505. SuperSkillshotValue(CurrentPlayer) = SuperSkillshotValue(CurrentPlayer) + 500000
  1506. 'do some light show
  1507. GiEffect 2
  1508. LightEffect 2
  1509. End Sub
  1510.  
  1511. '*****************************
  1512. ' Load / Save / Highscore
  1513. '*****************************
  1514.  
  1515. Sub Loadhs
  1516. Dim x
  1517. x = LoadValue(cGameName, "HighScore1")
  1518. If(x <> "")Then HighScore(0) = CDbl(x)Else HighScore(0) = 100000 End If
  1519. x = LoadValue(cGameName, "HighScore1Name")
  1520. If(x <> "")Then HighScoreName(0) = x Else HighScoreName(0) = "AAA" End If
  1521. x = LoadValue(cGameName, "HighScore2")
  1522. If(x <> "")then HighScore(1) = CDbl(x)Else HighScore(1) = 100000 End If
  1523. x = LoadValue(cGameName, "HighScore2Name")
  1524. If(x <> "")then HighScoreName(1) = x Else HighScoreName(1) = "BBB" End If
  1525. x = LoadValue(cGameName, "HighScore3")
  1526. If(x <> "")then HighScore(2) = CDbl(x)Else HighScore(2) = 100000 End If
  1527. x = LoadValue(cGameName, "HighScore3Name")
  1528. If(x <> "")then HighScoreName(2) = x Else HighScoreName(2) = "CCC" End If
  1529. x = LoadValue(cGameName, "HighScore4")
  1530. If(x <> "")then HighScore(3) = CDbl(x)Else HighScore(3) = 100000 End If
  1531. x = LoadValue(cGameName, "HighScore4Name")
  1532. If(x <> "")then HighScoreName(3) = x Else HighScoreName(3) = "DDD" End If
  1533. x = LoadValue(cGameName, "Credits")
  1534. If(x <> "")then Credits = CInt(x)Else Credits = 0:If bFreePlay = False Then DOF 125, DOFOff:End If
  1535. x = LoadValue(cGameName, "TotalGamesPlayed")
  1536. If(x <> "")then TotalGamesPlayed = CInt(x)Else TotalGamesPlayed = 0 End If
  1537. End Sub
  1538.  
  1539. Sub Savehs
  1540. SaveValue cGameName, "HighScore1", HighScore(0)
  1541. SaveValue cGameName, "HighScore1Name", HighScoreName(0)
  1542. SaveValue cGameName, "HighScore2", HighScore(1)
  1543. SaveValue cGameName, "HighScore2Name", HighScoreName(1)
  1544. SaveValue cGameName, "HighScore3", HighScore(2)
  1545. SaveValue cGameName, "HighScore3Name", HighScoreName(2)
  1546. SaveValue cGameName, "HighScore4", HighScore(3)
  1547. SaveValue cGameName, "HighScore4Name", HighScoreName(3)
  1548. SaveValue cGameName, "Credits", Credits
  1549. SaveValue cGameName, "TotalGamesPlayed", TotalGamesPlayed
  1550. End Sub
  1551.  
  1552. Sub Reseths
  1553. HighScoreName(0) = "AAA"
  1554. HighScoreName(1) = "BBB"
  1555. HighScoreName(2) = "CCC"
  1556. HighScoreName(3) = "DDD"
  1557. HighScore(0) = 150000
  1558. HighScore(1) = 140000
  1559. HighScore(2) = 130000
  1560. HighScore(3) = 120000
  1561. Savehs
  1562. End Sub
  1563.  
  1564. ' ***********************************************************
  1565. ' High Score Initals Entry Functions - based on Black's code
  1566. ' ***********************************************************
  1567.  
  1568. Dim hsbModeActive
  1569. Dim hsEnteredName
  1570. Dim hsEnteredDigits(3)
  1571. Dim hsCurrentDigit
  1572. Dim hsValidLetters
  1573. Dim hsCurrentLetter
  1574. Dim hsLetterFlash
  1575.  
  1576. Sub CheckHighscore()
  1577. Dim tmp
  1578. tmp = Score(1)
  1579. If Score(2)> tmp Then tmp = Score(2)
  1580. If Score(3)> tmp Then tmp = Score(3)
  1581. If Score(4)> tmp Then tmp = Score(4)
  1582.  
  1583. If tmp> HighScore(1)Then 'add 1 credit for beating the highscore
  1584. Credits = Credits + 1
  1585. DOF 125, DOFOn
  1586. End If
  1587.  
  1588. If tmp> HighScore(3)Then
  1589. PlaySound SoundFXDOF("fx_Knocker", 122, DOFPulse, DOFKnocker)
  1590. DOF 121, DOFPulse
  1591. HighScore(3) = tmp
  1592. 'enter player's name
  1593. HighScoreEntryInit()
  1594. Else
  1595. EndOfBallComplete()
  1596. End If
  1597. End Sub
  1598.  
  1599. Sub HighScoreEntryInit()
  1600. hsbModeActive = True
  1601. PlaySound "vo_enterinitials"
  1602. hsLetterFlash = 0
  1603.  
  1604. hsEnteredDigits(0) = " "
  1605. hsEnteredDigits(1) = " "
  1606. hsEnteredDigits(2) = " "
  1607. hsCurrentDigit = 0
  1608.  
  1609. hsValidLetters = " ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789<" ' < is back arrow
  1610. hsCurrentLetter = 1
  1611. DMDFlush()
  1612. HighScoreDisplayNameNow()
  1613.  
  1614. HighScoreFlashTimer.Interval = 250
  1615. HighScoreFlashTimer.Enabled = True
  1616. End Sub
  1617.  
  1618. Sub EnterHighScoreKey(keycode)
  1619. If keycode = LeftFlipperKey Then
  1620. playsound "fx_Previous"
  1621. hsCurrentLetter = hsCurrentLetter - 1
  1622. if(hsCurrentLetter = 0)then
  1623. hsCurrentLetter = len(hsValidLetters)
  1624. end if
  1625. HighScoreDisplayNameNow()
  1626. End If
  1627.  
  1628. If keycode = RightFlipperKey Then
  1629. playsound "fx_Next"
  1630. hsCurrentLetter = hsCurrentLetter + 1
  1631. if(hsCurrentLetter> len(hsValidLetters))then
  1632. hsCurrentLetter = 1
  1633. end if
  1634. HighScoreDisplayNameNow()
  1635. End If
  1636.  
  1637. If keycode = PlungerKey OR keycode = StartGameKey Then
  1638. if(mid(hsValidLetters, hsCurrentLetter, 1) <> "<")then
  1639. playsound "fx_Enter"
  1640. hsEnteredDigits(hsCurrentDigit) = mid(hsValidLetters, hsCurrentLetter, 1)
  1641. hsCurrentDigit = hsCurrentDigit + 1
  1642. if(hsCurrentDigit = 3)then
  1643. HighScoreCommitName()
  1644. else
  1645. HighScoreDisplayNameNow()
  1646. end if
  1647. else
  1648. playsound "fx_Esc"
  1649. hsEnteredDigits(hsCurrentDigit) = " "
  1650. if(hsCurrentDigit> 0)then
  1651. hsCurrentDigit = hsCurrentDigit - 1
  1652. end if
  1653. HighScoreDisplayNameNow()
  1654. end if
  1655. end if
  1656. End Sub
  1657.  
  1658. Sub HighScoreDisplayNameNow()
  1659. HighScoreFlashTimer.Enabled = False
  1660. hsLetterFlash = 0
  1661. HighScoreDisplayName()
  1662. HighScoreFlashTimer.Enabled = True
  1663. End Sub
  1664.  
  1665. Sub HighScoreDisplayName()
  1666. Dim i
  1667. Dim TempTopStr
  1668. Dim TempBotStr
  1669.  
  1670. TempTopStr = "YOUR NAME:"
  1671. dLine(0) = ExpandLine(TempTopStr, 0)
  1672. DMDUpdate 0
  1673.  
  1674. TempBotStr = " > "
  1675. if(hsCurrentDigit> 0)then TempBotStr = TempBotStr & hsEnteredDigits(0)
  1676. if(hsCurrentDigit> 1)then TempBotStr = TempBotStr & hsEnteredDigits(1)
  1677. if(hsCurrentDigit> 2)then TempBotStr = TempBotStr & hsEnteredDigits(2)
  1678.  
  1679. if(hsCurrentDigit <> 3)then
  1680. if(hsLetterFlash <> 0)then
  1681. TempBotStr = TempBotStr & "_"
  1682. else
  1683. TempBotStr = TempBotStr & mid(hsValidLetters, hsCurrentLetter, 1)
  1684. end if
  1685. end if
  1686.  
  1687. if(hsCurrentDigit <1)then TempBotStr = TempBotStr & hsEnteredDigits(1)
  1688. if(hsCurrentDigit <2)then TempBotStr = TempBotStr & hsEnteredDigits(2)
  1689.  
  1690. TempBotStr = TempBotStr & " < "
  1691. dLine(1) = ExpandLine(TempBotStr, 1)
  1692. DMDUpdate 1
  1693. End Sub
  1694.  
  1695. Sub HighScoreFlashTimer_Timer()
  1696. HighScoreFlashTimer.Enabled = False
  1697. hsLetterFlash = hsLetterFlash + 1
  1698. if(hsLetterFlash = 2)then hsLetterFlash = 0
  1699. HighScoreDisplayName()
  1700. HighScoreFlashTimer.Enabled = True
  1701. End Sub
  1702.  
  1703. Sub HighScoreCommitName()
  1704. HighScoreFlashTimer.Enabled = False
  1705. hsbModeActive = False
  1706.  
  1707. hsEnteredName = hsEnteredDigits(0) & hsEnteredDigits(1) & hsEnteredDigits(2)
  1708. if(hsEnteredName = " ")then
  1709. hsEnteredName = "YOU"
  1710. end if
  1711.  
  1712. HighScoreName(3) = hsEnteredName
  1713. SortHighscore
  1714. EndOfBallComplete()
  1715. End Sub
  1716.  
  1717. Sub SortHighscore
  1718. Dim tmp, tmp2, i, j
  1719. For i = 0 to 3
  1720. For j = 0 to 2
  1721. If HighScore(j) <HighScore(j + 1)Then
  1722. tmp = HighScore(j + 1)
  1723. tmp2 = HighScoreName(j + 1)
  1724. HighScore(j + 1) = HighScore(j)
  1725. HighScoreName(j + 1) = HighScoreName(j)
  1726. HighScore(j) = tmp
  1727. HighScoreName(j) = tmp2
  1728. End If
  1729. Next
  1730. Next
  1731. End Sub
  1732.  
  1733. '*********
  1734. ' LUT
  1735. '*********
  1736.  
  1737. Dim bLutActive, LUTImage
  1738. Sub LoadLUT
  1739. bLutActive = False
  1740. x = LoadValue(cGameName, "LUTImage")
  1741. If(x <> "")Then LUTImage = x Else LUTImage = 0
  1742. UpdateLUT
  1743. End Sub
  1744.  
  1745. Sub SaveLUT
  1746. SaveValue cGameName, "LUTImage", LUTImage
  1747. End Sub
  1748.  
  1749. Sub NextLUT:LUTImage = (LUTImage + 1)MOD 10:UpdateLUT:SaveLUT:End Sub
  1750.  
  1751. Sub UpdateLUT
  1752. Select Case LutImage
  1753. Case 0:table1.ColorGradeImage = "LUT0"
  1754. Case 1:table1.ColorGradeImage = "LUT1"
  1755. Case 2:table1.ColorGradeImage = "LUT2"
  1756. Case 3:table1.ColorGradeImage = "LUT3"
  1757. Case 4:table1.ColorGradeImage = "LUT4"
  1758. Case 5:table1.ColorGradeImage = "LUT5"
  1759. Case 6:table1.ColorGradeImage = "LUT6"
  1760. Case 7:table1.ColorGradeImage = "LUT7"
  1761. Case 8:table1.ColorGradeImage = "LUT8"
  1762. Case 9:table1.ColorGradeImage = "LUT9"
  1763. End Select
  1764. End Sub
  1765.  
  1766. ' *************************************************************************
  1767. ' JP's Reduced Display Driver Functions (based on script by Black)
  1768. ' only 5 effects: none, scroll left, scroll right, blink and blinkfast
  1769. ' 3 Lines, treats all 3 lines as text. 3rd line is just 1 character
  1770. ' Example format:
  1771. ' DMD "text1","text2","backpicture", eNone, eNone, eNone, 250, True, "sound"
  1772. ' Short names:
  1773. ' dq = display queue
  1774. ' de = display effect
  1775. ' *************************************************************************
  1776.  
  1777. Const eNone = 0 ' Instantly displayed
  1778. Const eScrollLeft = 1 ' scroll on from the right
  1779. Const eScrollRight = 2 ' scroll on from the left
  1780. Const eBlink = 3 ' Blink (blinks for 'TimeOn')
  1781. Const eBlinkFast = 4 ' Blink (blinks for 'TimeOn') at user specified intervals (fast speed)
  1782.  
  1783. Const dqSize = 64
  1784.  
  1785. Dim dqHead
  1786. Dim dqTail
  1787. Dim deSpeed
  1788. Dim deBlinkSlowRate
  1789. Dim deBlinkFastRate
  1790.  
  1791. Dim dCharsPerLine(2)
  1792. Dim dLine(2)
  1793. Dim deCount(2)
  1794. Dim deCountEnd(2)
  1795. Dim deBlinkCycle(2)
  1796.  
  1797. Dim dqText(2, 64)
  1798. Dim dqEffect(2, 64)
  1799. Dim dqTimeOn(64)
  1800. Dim dqbFlush(64)
  1801. Dim dqSound(64)
  1802.  
  1803. Dim FlexDMD
  1804. Dim DMDScene
  1805.  
  1806. Sub DMD_Init() 'default/startup values
  1807. If UseFlexDMD Then
  1808. Set FlexDMD = CreateObject("FlexDMD.FlexDMD")
  1809. If Not FlexDMD is Nothing Then
  1810. If FlexDMDHighQuality Then
  1811. FlexDMD.TableFile = Table1.Filename & ".vpx"
  1812. FlexDMD.RenderMode = 2
  1813. FlexDMD.Width = 256
  1814. FlexDMD.Height = 64
  1815. FlexDMD.Clear = True
  1816. FlexDMD.GameName = cGameName
  1817. FlexDMD.Run = True
  1818. Set DMDScene = FlexDMD.NewGroup("Scene")
  1819. DMDScene.AddActor FlexDMD.NewImage("Back", "VPX.bkempty")
  1820. DMDScene.GetImage("Back").SetSize FlexDMD.Width, FlexDMD.Height
  1821. For i = 0 to 40
  1822. DMDScene.AddActor FlexDMD.NewImage("Dig" & i, "VPX.d_empty&dmd=2")
  1823. Digits(i).Visible = False
  1824. Next
  1825. digitgrid.Visible = False
  1826. For i = 0 to 19 ' Top
  1827. DMDScene.GetImage("Dig" & i).SetBounds 8 + i * 12, 6, 12, 22
  1828. Next
  1829. For i = 20 to 39 ' Bottom
  1830. DMDScene.GetImage("Dig" & i).SetBounds 8 + (i - 20) * 12, 34, 12, 22
  1831. Next
  1832. FlexDMD.LockRenderThread
  1833. FlexDMD.Stage.AddActor DMDScene
  1834. FlexDMD.UnlockRenderThread
  1835. Else
  1836. FlexDMD.TableFile = Table1.Filename & ".vpx"
  1837. FlexDMD.RenderMode = 2
  1838. FlexDMD.Width = 128
  1839. FlexDMD.Height = 32
  1840. FlexDMD.Clear = True
  1841. FlexDMD.GameName = cGameName
  1842. FlexDMD.Run = True
  1843. Set DMDScene = FlexDMD.NewGroup("Scene")
  1844. DMDScene.AddActor FlexDMD.NewImage("Back", "VPX.bkempty")
  1845. DMDScene.GetImage("Back").SetSize FlexDMD.Width, FlexDMD.Height
  1846. For i = 0 to 40
  1847. DMDScene.AddActor FlexDMD.NewImage("Dig" & i, "VPX.d_empty&dmd=2")
  1848. Digits(i).Visible = False
  1849. Next
  1850. digitgrid.Visible = False
  1851. For i = 0 to 19 ' Top
  1852. DMDScene.GetImage("Dig" & i).SetBounds 4 + i * 6, 3, 6, 11
  1853. Next
  1854. For i = 20 to 39 ' Bottom
  1855. DMDScene.GetImage("Dig" & i).SetBounds 4 + (i - 20) * 6, 17, 6, 11
  1856. Next
  1857. FlexDMD.LockRenderThread
  1858. FlexDMD.Stage.AddActor DMDScene
  1859. FlexDMD.UnlockRenderThread
  1860. End If
  1861. End If
  1862. End If
  1863.  
  1864. Dim i, j
  1865. DMDFlush()
  1866. deSpeed = 20
  1867. deBlinkSlowRate = 5
  1868. deBlinkFastRate = 2
  1869. dCharsPerLine(0) = 20 'characters lower line
  1870. dCharsPerLine(1) = 20 'characters top line
  1871. dCharsPerLine(2) = 1 'characters back line
  1872. For i = 0 to 2
  1873. dLine(i) = Space(dCharsPerLine(i))
  1874. deCount(i) = 0
  1875. deCountEnd(i) = 0
  1876. deBlinkCycle(i) = 0
  1877. dqTimeOn(i) = 0
  1878. dqbFlush(i) = True
  1879. dqSound(i) = ""
  1880. Next
  1881. For i = 0 to 2
  1882. For j = 0 to 64
  1883. dqText(i, j) = ""
  1884. dqEffect(i, j) = eNone
  1885. Next
  1886. Next
  1887. DMD dLine(0), dLine(1), dLine(2), eNone, eNone, eNone, 25, True, ""
  1888. End Sub
  1889.  
  1890. Sub DMDFlush()
  1891. Dim i
  1892. DMDTimer.Enabled = False
  1893. DMDEffectTimer.Enabled = False
  1894. dqHead = 0
  1895. dqTail = 0
  1896. For i = 0 to 2
  1897. deCount(i) = 0
  1898. deCountEnd(i) = 0
  1899. deBlinkCycle(i) = 0
  1900. Next
  1901. End Sub
  1902.  
  1903. Sub DMDScore()
  1904. Dim tmp, tmp1, tmp1a, tmp1b, tmp2
  1905. if(dqHead = dqTail)Then
  1906. tmp = FL(0, "P" &CurrentPlayer& "B" &Balls, FormatScore(Score(Currentplayer)))
  1907. 'tmp = CL(0, FormatScore(Score(Currentplayer) ) )
  1908. 'tmp1 = CL(1, "PLAYER " & CurrentPlayer & " BALL " & Balls)
  1909. 'tmp1 = FormatScore(Bonuspoints(Currentplayer) ) & " X" &BonusMultiplier(Currentplayer)
  1910. tmp2 = "bkborder"
  1911. Select Case Battle(CurrentPlayer, 0)
  1912. Case 0: 'no battle active then display the Team-up state
  1913. If bLilDPMB Then 'LilDP multiball is active then show the jackpot value
  1914. tmp = RL(0, FormatScore(Score(Currentplayer)))
  1915. tmp1 = RL(1, FormatScore(LilDPJackpot(CurrentPlayer)) & " P" &CurrentPlayer& "B" &Balls)
  1916. tmp2 = "d_lildpmb"
  1917. Else
  1918. tmp1a = Chr(33)&Chr(37 + DazzlePower(CurrentPlayer))&Chr(34)&Chr(37 + ColossusPower(CurrentPlayer))&Chr(35)&Chr(37 + WolverinePower(CurrentPlayer))&Chr(36)&Chr(37 + DominoPower(CurrentPlayer))
  1919. tmp1b = tmp1 & chr(42) & NinjaStars(CurrentPlayer) & chr(44) & Chimichangas(CurrentPlayer) & chr(47) & Weapons(CurrentPlayer)
  1920. tmp1 = FL(1, tmp1a, tmp1b)
  1921. End If
  1922. Case 1 'Juggernaut
  1923. tmp = RL(0, FormatScore(Score(Currentplayer)))
  1924. tmp1a = ShowLife(LifeLeft(CurrentPlayer, 1))
  1925. tmp1b = "P" &CurrentPlayer& "B" &Balls
  1926. if DazzlePower(CurrentPlayer) = 4 Then tmp1b = Chr(33)&tmp1b
  1927. if ColossusPower(CurrentPlayer) = 4 Then tmp1b = Chr(34)&tmp1b
  1928. if WolverinePower(CurrentPlayer) = 4 Then tmp1b = Chr(35)&tmp1b
  1929. if DominoPower(CurrentPlayer) = 4 Then tmp1b = Chr(36)&tmp1b
  1930. tmp1 = FL(1, tmp1a, tmp1b)
  1931. tmp2 = "d_juggernaut"
  1932. Case 2 'Mystique
  1933. tmp = RL(0, FormatScore(Score(Currentplayer)))
  1934. tmp1a = ShowLife(LifeLeft(CurrentPlayer, 2))
  1935. tmp1b = "P" &CurrentPlayer& "B" &Balls
  1936. if DazzlePower(CurrentPlayer) = 4 Then tmp1b = Chr(33)&tmp1b
  1937. if ColossusPower(CurrentPlayer) = 4 Then tmp1b = Chr(34)&tmp1b
  1938. if WolverinePower(CurrentPlayer) = 4 Then tmp1b = Chr(35)&tmp1b
  1939. if DominoPower(CurrentPlayer) = 4 Then tmp1b = Chr(36)&tmp1b
  1940. tmp1 = FL(1, tmp1a, tmp1b)
  1941. tmp2 = "d_mystique"
  1942. Case 3 'Sabretooth
  1943. tmp = RL(0, FormatScore(Score(Currentplayer)))
  1944. tmp1a = ShowLife(LifeLeft(CurrentPlayer, 3))
  1945. tmp1b = "P" &CurrentPlayer& "B" &Balls
  1946. if DazzlePower(CurrentPlayer) = 4 Then tmp1b = Chr(33)&tmp1b
  1947. if ColossusPower(CurrentPlayer) = 4 Then tmp1b = Chr(34)&tmp1b
  1948. if WolverinePower(CurrentPlayer) = 4 Then tmp1b = Chr(35)&tmp1b
  1949. if DominoPower(CurrentPlayer) = 4 Then tmp1b = Chr(36)&tmp1b
  1950. tmp1 = FL(1, tmp1a, tmp1b)
  1951. tmp2 = "d_sabretooth"
  1952. Case 4 'T-Rex
  1953. tmp = RL(0, FormatScore(Score(Currentplayer)))
  1954. tmp1a = ShowLife(LifeLeft(CurrentPlayer, 4))
  1955. tmp1b = "P" &CurrentPlayer& "B" &Balls
  1956. if DazzlePower(CurrentPlayer) = 4 Then tmp1b = Chr(33)&tmp1b
  1957. if ColossusPower(CurrentPlayer) = 4 Then tmp1b = Chr(34)&tmp1b
  1958. if WolverinePower(CurrentPlayer) = 4 Then tmp1b = Chr(35)&tmp1b
  1959. if DominoPower(CurrentPlayer) = 4 Then tmp1b = Chr(36)&tmp1b
  1960. tmp1 = FL(1, tmp1a, tmp1b)
  1961. tmp2 = "d_trex"
  1962. Case 5 'Megalodon
  1963. tmp = RL(0, FormatScore(Score(Currentplayer)))
  1964. tmp1a = ShowLife(LifeLeft(CurrentPlayer, 5))
  1965. tmp1b = "P" &CurrentPlayer& "B" &Balls
  1966. if DazzlePower(CurrentPlayer) = 4 Then tmp1b = Chr(33)&tmp1b
  1967. if ColossusPower(CurrentPlayer) = 4 Then tmp1b = Chr(34)&tmp1b
  1968. if WolverinePower(CurrentPlayer) = 4 Then tmp1b = Chr(35)&tmp1b
  1969. if DominoPower(CurrentPlayer) = 4 Then tmp1b = Chr(36)&tmp1b
  1970. tmp1 = FL(1, tmp1a, tmp1b)
  1971. tmp2 = "d_megalodon"
  1972. Case 6 'Sauron
  1973. tmp = RL(0, FormatScore(Score(Currentplayer)))
  1974. tmp1a = ShowLife(LifeLeft(CurrentPlayer, 6))
  1975. tmp1b = "P" &CurrentPlayer& "B" &Balls
  1976. if DazzlePower(CurrentPlayer) = 4 Then tmp1b = Chr(33)&tmp1b
  1977. if ColossusPower(CurrentPlayer) = 4 Then tmp1b = Chr(34)&tmp1b
  1978. if WolverinePower(CurrentPlayer) = 4 Then tmp1b = Chr(35)&tmp1b
  1979. if DominoPower(CurrentPlayer) = 4 Then tmp1b = Chr(36)&tmp1b
  1980. tmp1 = FL(1, tmp1a, tmp1b)
  1981. tmp2 = "d_sauron"
  1982. Case 7 'MrSinister
  1983. tmp = RL(0, FormatScore(Score(Currentplayer)))
  1984. tmp1a = ShowLife(LifeLeft(CurrentPlayer, 7))
  1985. tmp1b = "P" &CurrentPlayer& "B" &Balls
  1986. if DazzlePower(CurrentPlayer) = 4 Then tmp1b = Chr(33)&tmp1b
  1987. if ColossusPower(CurrentPlayer) = 4 Then tmp1b = Chr(34)&tmp1b
  1988. if WolverinePower(CurrentPlayer) = 4 Then tmp1b = Chr(35)&tmp1b
  1989. if DominoPower(CurrentPlayer) = 4 Then tmp1b = Chr(36)&tmp1b
  1990. tmp1 = FL(1, tmp1a, tmp1b)
  1991. tmp2 = "d_mrsinister"
  1992. End Select
  1993. End If
  1994. DMD tmp, tmp1, tmp2, eNone, eNone, eNone, 25, True, ""
  1995. End Sub
  1996.  
  1997. Function Showlife(n)
  1998. Dim tmp, a
  1999. tmp = INT(n)
  2000. Select Case tmp
  2001. Case 0:a = "mnnnnnnnno"
  2002. Case 1:a = "jnnnnnnnno"
  2003. Case 2:a = "jknnnnnnno"
  2004. Case 3:a = "jkknnnnnno"
  2005. Case 4:a = "jkkknnnnno"
  2006. Case 5:a = "jkkkknnnno"
  2007. Case 6:a = "jkkkkknnno"
  2008. Case 7:a = "jkkkkkknno"
  2009. Case 8:a = "jkkkkkkkno"
  2010. Case 9:a = "jkkkkkkkko"
  2011. Case 10:a = "jkkkkkkkkl"
  2012. End Select
  2013. Showlife = a
  2014. End Function
  2015.  
  2016. Sub DMDScoreNow
  2017. DMDFlush
  2018. DMDScore
  2019. End Sub
  2020.  
  2021. Sub DMD(Text0, Text1, Text2, Effect0, Effect1, Effect2, TimeOn, bFlush, Sound)
  2022. if(dqTail <dqSize)Then
  2023. if(Text0 = "_")Then
  2024. dqEffect(0, dqTail) = eNone
  2025. dqText(0, dqTail) = "_"
  2026. Else
  2027. dqEffect(0, dqTail) = Effect0
  2028. dqText(0, dqTail) = ExpandLine(Text0, 0)
  2029. End If
  2030.  
  2031. if(Text1 = "_")Then
  2032. dqEffect(1, dqTail) = eNone
  2033. dqText(1, dqTail) = "_"
  2034. Else
  2035. dqEffect(1, dqTail) = Effect1
  2036. dqText(1, dqTail) = ExpandLine(Text1, 1)
  2037. End If
  2038.  
  2039. if(Text2 = "_")Then
  2040. dqEffect(2, dqTail) = eNone
  2041. dqText(2, dqTail) = "_"
  2042. Else
  2043. dqEffect(2, dqTail) = Effect2
  2044. dqText(2, dqTail) = Text2 'it is always 1 letter in this table
  2045. End If
  2046.  
  2047. dqTimeOn(dqTail) = TimeOn
  2048. dqbFlush(dqTail) = bFlush
  2049. dqSound(dqTail) = Sound
  2050. dqTail = dqTail + 1
  2051. if(dqTail = 1)Then
  2052. DMDHead()
  2053. End If
  2054. End If
  2055. End Sub
  2056.  
  2057. Sub DMDHead()
  2058. Dim i
  2059. deCount(0) = 0
  2060. deCount(1) = 0
  2061. deCount(2) = 0
  2062. DMDEffectTimer.Interval = deSpeed
  2063.  
  2064. For i = 0 to 2
  2065. Select Case dqEffect(i, dqHead)
  2066. Case eNone:deCountEnd(i) = 1
  2067. Case eScrollLeft:deCountEnd(i) = Len(dqText(i, dqHead))
  2068. Case eScrollRight:deCountEnd(i) = Len(dqText(i, dqHead))
  2069. Case eBlink:deCountEnd(i) = int(dqTimeOn(dqHead) / deSpeed)
  2070. deBlinkCycle(i) = 0
  2071. Case eBlinkFast:deCountEnd(i) = int(dqTimeOn(dqHead) / deSpeed)
  2072. deBlinkCycle(i) = 0
  2073. End Select
  2074. Next
  2075. if(dqSound(dqHead) <> "")Then
  2076. PlaySound(dqSound(dqHead))
  2077. End If
  2078. DMDEffectTimer.Enabled = True
  2079. End Sub
  2080.  
  2081. Sub DMDEffectTimer_Timer()
  2082. DMDEffectTimer.Enabled = False
  2083. DMDProcessEffectOn()
  2084. End Sub
  2085.  
  2086. Sub DMDTimer_Timer()
  2087. Dim Head
  2088. DMDTimer.Enabled = False
  2089. Head = dqHead
  2090. dqHead = dqHead + 1
  2091. if(dqHead = dqTail)Then
  2092. if(dqbFlush(Head) = True)Then
  2093. DMDScoreNow()
  2094. Else
  2095. dqHead = 0
  2096. DMDHead()
  2097. End If
  2098. Else
  2099. DMDHead()
  2100. End If
  2101. End Sub
  2102.  
  2103. Sub DMDProcessEffectOn()
  2104. Dim i
  2105. Dim BlinkEffect
  2106. Dim Temp
  2107.  
  2108. BlinkEffect = False
  2109.  
  2110. For i = 0 to 2
  2111. if(deCount(i) <> deCountEnd(i))Then
  2112. deCount(i) = deCount(i) + 1
  2113.  
  2114. select case(dqEffect(i, dqHead))
  2115. case eNone:
  2116. Temp = dqText(i, dqHead)
  2117. case eScrollLeft:
  2118. Temp = Right(dLine(i), dCharsPerLine(i)- 1)
  2119. Temp = Temp & Mid(dqText(i, dqHead), deCount(i), 1)
  2120. case eScrollRight:
  2121. Temp = Mid(dqText(i, dqHead), (dCharsPerLine(i) + 1)- deCount(i), 1)
  2122. Temp = Temp & Left(dLine(i), dCharsPerLine(i)- 1)
  2123. case eBlink:
  2124. BlinkEffect = True
  2125. if((deCount(i)MOD deBlinkSlowRate) = 0)Then
  2126. deBlinkCycle(i) = deBlinkCycle(i)xor 1
  2127. End If
  2128.  
  2129. if(deBlinkCycle(i) = 0)Then
  2130. Temp = dqText(i, dqHead)
  2131. Else
  2132. Temp = Space(dCharsPerLine(i))
  2133. End If
  2134. case eBlinkFast:
  2135. BlinkEffect = True
  2136. if((deCount(i)MOD deBlinkFastRate) = 0)Then
  2137. deBlinkCycle(i) = deBlinkCycle(i)xor 1
  2138. End If
  2139.  
  2140. if(deBlinkCycle(i) = 0)Then
  2141. Temp = dqText(i, dqHead)
  2142. Else
  2143. Temp = Space(dCharsPerLine(i))
  2144. End If
  2145. End Select
  2146.  
  2147. if(dqText(i, dqHead) <> "_")Then
  2148. dLine(i) = Temp
  2149. DMDUpdate i
  2150. End If
  2151. End If
  2152. Next
  2153.  
  2154. if(deCount(0) = deCountEnd(0))and(deCount(1) = deCountEnd(1))and(deCount(2) = deCountEnd(2))Then
  2155.  
  2156. if(dqTimeOn(dqHead) = 0)Then
  2157. DMDFlush()
  2158. Else
  2159. if(BlinkEffect = True)Then
  2160. DMDTimer.Interval = 10
  2161. Else
  2162. DMDTimer.Interval = dqTimeOn(dqHead)
  2163. End If
  2164.  
  2165. DMDTimer.Enabled = True
  2166. End If
  2167. Else
  2168. DMDEffectTimer.Enabled = True
  2169. End If
  2170. End Sub
  2171.  
  2172. Function ExpandLine(TempStr, id) 'id is the number of the dmd line
  2173. If TempStr = "" Then
  2174. TempStr = Space(dCharsPerLine(id))
  2175. Else
  2176. if(Len(TempStr)> Space(dCharsPerLine(id)))Then
  2177. TempStr = Left(TempStr, Space(dCharsPerLine(id)))
  2178. Else
  2179. if(Len(TempStr) <dCharsPerLine(id))Then
  2180. TempStr = TempStr & Space(dCharsPerLine(id)- Len(TempStr))
  2181. End If
  2182. End If
  2183. End If
  2184. ExpandLine = TempStr
  2185. End Function
  2186.  
  2187. Function FormatScore(ByVal Num) 'it returns a string with commas (as in Black's original font)
  2188. dim i
  2189. dim NumString
  2190.  
  2191. NumString = CStr(abs(Num))
  2192.  
  2193. For i = Len(NumString)-3 to 1 step -3
  2194. if IsNumeric(mid(NumString, i, 1))then
  2195. NumString = left(NumString, i-1) & chr(asc(mid(NumString, i, 1)) + 48) & right(NumString, Len(NumString)- i)
  2196. end if
  2197. Next
  2198. FormatScore = NumString
  2199. End function
  2200.  
  2201. Function FL(id, NumString1, NumString2) 'Fill line
  2202. Dim Temp, TempStr
  2203. Temp = dCharsPerLine(id)- Len(NumString1)- Len(NumString2)
  2204. TempStr = NumString1 & Space(Temp) & NumString2
  2205. FL = TempStr
  2206. End Function
  2207.  
  2208. Function CL(id, NumString) 'center line
  2209. Dim Temp, TempStr
  2210. Temp = (dCharsPerLine(id)- Len(NumString)) \ 2
  2211. TempStr = Space(Temp) & NumString & Space(Temp)
  2212. CL = TempStr
  2213. End Function
  2214.  
  2215. Function RL(id, NumString) 'right line
  2216. Dim Temp, TempStr
  2217. Temp = dCharsPerLine(id)- Len(NumString)
  2218. TempStr = Space(Temp) & NumString
  2219. RL = TempStr
  2220. End Function
  2221.  
  2222. '**************
  2223. ' Update DMD
  2224. '**************
  2225.  
  2226. Sub DMDUpdate(id)
  2227. Dim digit, value
  2228. If UseFlexDMD Then FlexDMD.LockRenderThread
  2229. Select Case id
  2230. Case 0 'top text line
  2231. For digit = 0 to 19
  2232. DMDDisplayChar mid(dLine(0), digit + 1, 1), digit
  2233. Next
  2234. Case 1 'bottom text line
  2235. For digit = 20 to 39
  2236. DMDDisplayChar mid(dLine(1), digit -19, 1), digit
  2237. Next
  2238. Case 2 ' back image - back animations
  2239. If dLine(2) = "" OR dLine(2) = " " Then dLine(2) = "bkempty"
  2240. Digits(40).ImageA = dLine(2)
  2241. If UseFlexDMD Then DMDScene.GetImage("Back").Bitmap = FlexDMD.NewImage("", "VPX." & dLine(2) & "&dmd=2").Bitmap
  2242. End Select
  2243. If UseFlexDMD Then FlexDMD.UnlockRenderThread
  2244. End Sub
  2245.  
  2246. Sub DMDDisplayChar(achar, adigit)
  2247. If achar = "" Then achar = " "
  2248. achar = ASC(achar)
  2249. Digits(adigit).ImageA = Chars(achar)
  2250. If UseFlexDMD Then DMDScene.GetImage("Dig" & adigit).Bitmap = FlexDMD.NewImage("", "VPX." & Chars(achar) & "&dmd=2&add").Bitmap
  2251. End Sub
  2252.  
  2253. '****************************
  2254. ' JP's new DMD using flashers
  2255. '****************************
  2256.  
  2257. Dim Digits, Chars(255), Images(255)
  2258.  
  2259. DMDInit
  2260.  
  2261. Sub DMDInit
  2262. Dim i
  2263. Digits = Array(digit001, digit002, digit003, digit004, digit005, digit006, digit007, digit008, digit009, digit010, _
  2264. digit011, digit012, digit013, digit014, digit015, digit016, digit017, digit018, digit019, digit020, _
  2265. digit021, digit022, digit023, digit024, digit025, digit026, digit027, digit028, digit029, digit030, _
  2266. digit031, digit032, digit033, digit034, digit035, digit036, digit037, digit038, digit039, digit040, _
  2267. digit041)
  2268. For i = 0 to 255:Chars(i) = "d_empty":Next
  2269.  
  2270. Chars(32) = "d_empty"
  2271. Chars(33) = "d_daz" '! dazzle icon
  2272. Chars(34) = "d_col" '" colosus icon
  2273. Chars(35) = "d_wol" '# wonverine icon
  2274. Chars(36) = "d_dom" '$ domino icon
  2275. Chars(37) = "d_Power0" '%
  2276. Chars(38) = "d_Power1" '&
  2277. Chars(39) = "d_Power2" ''
  2278. Chars(40) = "d_Power3" '(
  2279. Chars(41) = "d_Power4" ')
  2280. Chars(42) = "d_star" '* ninja star
  2281. Chars(43) = "d_plus" '+
  2282. Chars(44) = "d_chimi" ' chimichangas
  2283. Chars(45) = "d_minus" '-
  2284. Chars(46) = "d_ot" '.
  2285. Chars(47) = "d_gun" '/ weapons
  2286. Chars(48) = "d_0" '0
  2287. Chars(49) = "d_1" '1
  2288. Chars(50) = "d_2" '2
  2289. Chars(51) = "d_3" '3
  2290. Chars(52) = "d_4" '4
  2291. Chars(53) = "d_5" '5
  2292. Chars(54) = "d_6" '6
  2293. Chars(55) = "d_7" '7
  2294. Chars(56) = "d_8" '8
  2295. Chars(57) = "d_9" '9
  2296. Chars(60) = "d_less" '<
  2297. Chars(61) = "d_equal" '=
  2298. Chars(62) = "d_more" '>
  2299. Chars(64) = "bkempty" '@
  2300. Chars(65) = "d_a" 'A
  2301. Chars(66) = "d_b" 'B
  2302. Chars(67) = "d_c" 'C
  2303. Chars(68) = "d_d" 'D
  2304. Chars(69) = "d_e" 'E
  2305. Chars(70) = "d_f" 'F
  2306. Chars(71) = "d_g" 'G
  2307. Chars(72) = "d_h" 'H
  2308. Chars(73) = "d_i" 'I
  2309. Chars(74) = "d_j" 'J
  2310. Chars(75) = "d_k" 'K
  2311. Chars(76) = "d_l" 'L
  2312. Chars(77) = "d_m" 'M
  2313. Chars(78) = "d_n" 'N
  2314. Chars(79) = "d_o" 'O
  2315. Chars(80) = "d_p" 'P
  2316. Chars(81) = "d_q" 'Q
  2317. Chars(82) = "d_r" 'R
  2318. Chars(83) = "d_s" 'S
  2319. Chars(84) = "d_t" 'T
  2320. Chars(85) = "d_u" 'U
  2321. Chars(86) = "d_v" 'V
  2322. Chars(87) = "d_w" 'W
  2323. Chars(88) = "d_x" 'X
  2324. Chars(89) = "d_y" 'Y
  2325. Chars(90) = "d_z" 'Z
  2326. Chars(94) = "d_up" '^
  2327. ' Chars(95) = '_
  2328. Chars(96) = "d_0a" '0.
  2329. Chars(97) = "d_1a" '1. 'a
  2330. Chars(98) = "d_2a" '2. 'b
  2331. Chars(99) = "d_3a" '3. 'c
  2332. Chars(100) = "d_4a" '4. 'd
  2333. Chars(101) = "d_5a" '5. 'e
  2334. Chars(102) = "d_6a" '6. 'f
  2335. Chars(103) = "d_7a" '7. 'g
  2336. Chars(104) = "d_8a" '8. 'h
  2337. Chars(105) = "d_9a" '9. 'i
  2338. Chars(106) = "d_LifeLon" 'j
  2339. Chars(107) = "d_LifeMon" 'k
  2340. Chars(108) = "d_LifeRon" 'l
  2341. Chars(109) = "d_LifeLoff" 'm
  2342. Chars(110) = "d_LifeMoff" 'n
  2343. Chars(111) = "d_LifeRoff" 'o
  2344. Chars(112) = "" 'p
  2345. Chars(113) = "" 'q
  2346. Chars(114) = "" 'r
  2347. Chars(115) = "" 's
  2348. Chars(116) = "" 't
  2349. Chars(117) = "" 'u
  2350. Chars(118) = "" 'v
  2351. Chars(119) = "" 'w
  2352. Chars(120) = "" 'x
  2353. Chars(121) = "" 'y
  2354. Chars(122) = "" 'z
  2355. Chars(123) = "" '{
  2356. Chars(124) = "" '|
  2357. Chars(125) = "" '}
  2358. Chars(126) = "" '~
  2359. End Sub
  2360.  
  2361. '********************
  2362. ' Real Time updates
  2363. '********************
  2364. 'used for all the real time updates
  2365.  
  2366. Sub Realtime_Timer
  2367. RollingUpdate
  2368. LeftFlipperTop.RotZ = LeftFlipper.CurrentAngle
  2369. RightFlipperTop.RotZ = RightFlipper.CurrentAngle
  2370. ' add any other real time update subs, like gates or diverters, flippers
  2371. End Sub
  2372.  
  2373. ' Flashm 0, Fi001 'backpanel diodes
  2374. ' Flashm 0, Fi002
  2375. ' Flashm 0, Fi003
  2376. ' Flashm 0, Fi004
  2377. ' Flashm 0, Fi005
  2378. ' Flash 0, Fi006
  2379. ' Flash 1, discolight
  2380. ' Flash 2, flasher002 'backwall t-rex
  2381. ' Flash 3, flasher003 'backwall juggernaut
  2382. ' Flash 4, flasher004 'backwall mystique
  2383. ' Flash 5, flasher005 'backwall sabretooth
  2384. ' Flash 6, flasher006 'backwall megalodon
  2385. ' Flash 7, flasher007 'backwall figures
  2386. ' Flash 8, flasher008 'bumper1
  2387. ' Flash 9, flasher009 'bumper2
  2388. ' Flash 10, flasher010 'bumper3
  2389. ' Flash 11, flasher011 'truck
  2390. ' Flash 12, flasher012 'hell house
  2391. ' Flash 13, flasher013 'wolverine
  2392. ' Flash 14, flasher014 'dazzler
  2393.  
  2394. ' Flash 16, flasher016 'domino
  2395. ' Flash 17, flasher017 'colossus
  2396. ' Flashm 18, Spot1 'lil flash when not in disco mode
  2397. ' Flash 18, Spot2
  2398.  
  2399. '********************************************************************************************
  2400. ' Only for VPX 10.2 and higher.
  2401. ' FlashForMs will blink light or a flasher for TotalPeriod(ms) at rate of BlinkPeriod(ms)
  2402. ' When TotalPeriod done, light or flasher will be set to FinalState value where
  2403. ' Final State values are: 0=Off, 1=On, 2=Return to previous State
  2404. '********************************************************************************************
  2405.  
  2406. Sub FlashForMs(MyLight, TotalPeriod, BlinkPeriod, FinalState) 'thanks gtxjoe for the first version
  2407.  
  2408. If TypeName(MyLight) = "Light" Then
  2409.  
  2410. If FinalState = 2 Then
  2411. FinalState = MyLight.State 'Keep the current light state
  2412. End If
  2413. MyLight.BlinkInterval = BlinkPeriod
  2414. MyLight.Duration 2, TotalPeriod, FinalState
  2415. ElseIf TypeName(MyLight) = "Flasher" Then
  2416.  
  2417. Dim steps
  2418.  
  2419. ' Store all blink information
  2420. steps = Int(TotalPeriod / BlinkPeriod + .5) 'Number of ON/OFF steps to perform
  2421. If FinalState = 2 Then 'Keep the current flasher state
  2422. FinalState = ABS(MyLight.Visible)
  2423. End If
  2424. MyLight.UserValue = steps * 10 + FinalState 'Store # of blinks, and final state
  2425.  
  2426. ' Start blink timer and create timer subroutine
  2427. MyLight.TimerInterval = BlinkPeriod
  2428. MyLight.TimerEnabled = 0
  2429. MyLight.TimerEnabled = 1
  2430. ExecuteGlobal "Sub " & MyLight.Name & "_Timer:" & "Dim tmp, steps, fstate:tmp=me.UserValue:fstate = tmp MOD 10:steps= tmp\10 -1:Me.Visible = steps MOD 2:me.UserValue = steps *10 + fstate:If Steps = 0 then Me.Visible = fstate:Me.TimerEnabled=0:End if:End Sub"
  2431. End If
  2432. End Sub
  2433.  
  2434. '******************************************
  2435. ' Change light color - simulate color leds
  2436. ' changes the light color and state
  2437. ' 11 colors: red, orange, amber, yellow...
  2438. '******************************************
  2439. ' in this table this colors are use to keep track of the progress during the modes
  2440.  
  2441. 'colors
  2442. Const red = 10
  2443. Const orange = 9
  2444. Const amber = 8
  2445. Const yellow = 7
  2446. Const darkgreen = 6
  2447. Const green = 5
  2448. Const blue = 4
  2449. Const darkblue = 3
  2450. Const purple = 2
  2451. Const white = 1
  2452. Const teal = 0
  2453.  
  2454. Sub SetLightColor(n, col, stat) 'stat 0 = off, 1 = on, 2 = blink, -1= no change
  2455. Select Case col
  2456. Case red
  2457. n.color = RGB(18, 0, 0)
  2458. n.colorfull = RGB(255, 0, 0)
  2459. Case orange
  2460. n.color = RGB(18, 3, 0)
  2461. n.colorfull = RGB(255, 64, 0)
  2462. Case amber
  2463. n.color = RGB(193, 49, 0)
  2464. n.colorfull = RGB(255, 153, 0)
  2465. Case yellow
  2466. n.color = RGB(18, 18, 0)
  2467. n.colorfull = RGB(255, 255, 0)
  2468. Case darkgreen
  2469. n.color = RGB(0, 8, 0)
  2470. n.colorfull = RGB(0, 64, 0)
  2471. Case green
  2472. n.color = RGB(0, 16, 0)
  2473. n.colorfull = RGB(0, 128, 0)
  2474. Case blue
  2475. n.color = RGB(0, 18, 18)
  2476. n.colorfull = RGB(0, 255, 255)
  2477. Case darkblue
  2478. n.color = RGB(0, 8, 8)
  2479. n.colorfull = RGB(0, 64, 64)
  2480. Case purple
  2481. n.color = RGB(64, 0, 96)
  2482. n.colorfull = RGB(128, 0, 192)
  2483. Case white
  2484. n.color = RGB(255, 197, 143)
  2485. n.colorfull = RGB(255, 252, 224)
  2486. Case teal
  2487. n.color = RGB(1, 64, 62)
  2488. n.colorfull = RGB(2, 128, 126)
  2489. End Select
  2490. If stat <> -1 Then
  2491. n.State = 0
  2492. n.State = stat
  2493. End If
  2494. End Sub
  2495.  
  2496. Sub SetFlashColor(n, col, stat) 'stat 0 = off, 1 = on, -1= no change - no blink for the flashers
  2497. Select Case col
  2498. Case red
  2499. n.color = RGB(255, 0, 0)
  2500. Case orange
  2501. n.color = RGB(255, 64, 0)
  2502. Case amber
  2503. n.color = RGB(255, 153, 0)
  2504. Case yellow
  2505. n.color = RGB(255, 255, 0)
  2506. Case darkgreen
  2507. n.color = RGB(0, 64, 0)
  2508. Case green
  2509. n.color = RGB(0, 128, 0)
  2510. Case blue
  2511. n.color = RGB(0, 255, 255)
  2512. Case darkblue
  2513. n.color = RGB(0, 64, 64)
  2514. Case purple
  2515. n.color = RGB(128, 0, 192)
  2516. Case white
  2517. n.color = RGB(255, 252, 224)
  2518. Case teal
  2519. n.color = RGB(2, 128, 126)
  2520. End Select
  2521. If stat <> -1 Then
  2522. n.Visible = stat
  2523. End If
  2524. End Sub
  2525.  
  2526. '*************************
  2527. ' Rainbow Changing Lights
  2528. '*************************
  2529.  
  2530. Dim RGBStep, RGBFactor, rRed, rGreen, rBlue, RainbowLights
  2531.  
  2532. Sub StartRainbow(n) 'n is a collection
  2533. set RainbowLights = n
  2534. RGBStep = 0
  2535. RGBFactor = 5
  2536. rRed = 255
  2537. rGreen = 0
  2538. rBlue = 0
  2539. RainbowTimer.Enabled = 1
  2540. End Sub
  2541.  
  2542. Sub StopRainbow()
  2543. RainbowTimer.Enabled = 0
  2544. TurnOffArrows
  2545. End Sub
  2546.  
  2547. Sub TurnOffArrows() 'during battles when changing modes
  2548. For each x in aArrows
  2549. x.State = 0
  2550. Next
  2551. For x = 1 to 6
  2552. BattleLights(x) = 0
  2553. Next
  2554. End Sub
  2555.  
  2556. Sub RainbowTimer_Timer 'rainbow led light color changing
  2557. Dim obj
  2558. Select Case RGBStep
  2559. Case 0 'Green
  2560. rGreen = rGreen + RGBFactor
  2561. If rGreen> 255 then
  2562. rGreen = 255
  2563. RGBStep = 1
  2564. End If
  2565. Case 1 'Red
  2566. rRed = rRed - RGBFactor
  2567. If rRed <0 then
  2568. rRed = 0
  2569. RGBStep = 2
  2570. End If
  2571. Case 2 'Blue
  2572. rBlue = rBlue + RGBFactor
  2573. If rBlue> 255 then
  2574. rBlue = 255
  2575. RGBStep = 3
  2576. End If
  2577. Case 3 'Green
  2578. rGreen = rGreen - RGBFactor
  2579. If rGreen <0 then
  2580. rGreen = 0
  2581. RGBStep = 4
  2582. End If
  2583. Case 4 'Red
  2584. rRed = rRed + RGBFactor
  2585. If rRed> 255 then
  2586. rRed = 255
  2587. RGBStep = 5
  2588. End If
  2589. Case 5 'Blue
  2590. rBlue = rBlue - RGBFactor
  2591. If rBlue <0 then
  2592. rBlue = 0
  2593. RGBStep = 0
  2594. End If
  2595. End Select
  2596. For each obj in RainbowLights
  2597. obj.color = RGB(rRed \ 10, rGreen \ 10, rBlue \ 10)
  2598. obj.colorfull = RGB(rRed, rGreen, rBlue)
  2599. Next
  2600. End Sub
  2601.  
  2602. ' ********************************
  2603. ' Table info & Attract Mode
  2604. ' ********************************
  2605.  
  2606. Sub ShowTableInfo
  2607. Dim ii
  2608. 'info goes in a loop only stopped by the credits and the startkey
  2609. If Score(1)Then
  2610. DMD CL(0, "LAST SCORE"), CL(1, "PLAYER 1 " &FormatScore(Score(1))), "", eNone, eNone, eNone, 3000, False, ""
  2611. End If
  2612. If Score(2)Then
  2613. DMD CL(0, "LAST SCORE"), CL(1, "PLAYER 2 " &FormatScore(Score(2))), "", eNone, eNone, eNone, 3000, False, ""
  2614. End If
  2615. If Score(3)Then
  2616. DMD CL(0, "LAST SCORE"), CL(1, "PLAYER 3 " &FormatScore(Score(3))), "", eNone, eNone, eNone, 3000, False, ""
  2617. End If
  2618. If Score(4)Then
  2619. DMD CL(0, "LAST SCORE"), CL(1, "PLAYER 4 " &FormatScore(Score(4))), "", eNone, eNone, eNone, 3000, False, ""
  2620. End If
  2621. DMD "", "", "d_gameover", eNone, eNone, eBlink, 2000, False, ""
  2622. If bFreePlay Then
  2623. DMD "", CL(1, "FREE PLAY"), "", eNone, eBlink, eNone, 2000, False, ""
  2624. Else
  2625. If Credits> 0 Then
  2626. DMD CL(0, "CREDITS " & Credits), CL(1, "PRESS START"), "", eNone, eBlink, eNone, 2000, False, ""
  2627. Else
  2628. DMD CL(0, "CREDITS " & Credits), CL(1, "INSERT COIN"), "", eNone, eBlink, eNone, 2000, False, ""
  2629. End If
  2630. End If
  2631. DMD "", "", "d_jppresents", eNone, eNone, eNone, 3000, False, ""
  2632. DMD "", "", "d_title", eNone, eNone, eNone, 4000, False, "vo_deadpool"
  2633. DMD CL(0, "HIGHSCORES"), Space(dCharsPerLine(1)), "", eScrollLeft, eScrollLeft, eNone, 20, False, ""
  2634. DMD CL(0, "HIGHSCORES"), "", "", eBlinkFast, eNone, eNone, 1000, False, ""
  2635. DMD CL(0, "HIGHSCORES"), "1> " &HighScoreName(0) & " " &FormatScore(HighScore(0)), "", eNone, eScrollLeft, eNone, 2000, False, ""
  2636. DMD "_", "2> " &HighScoreName(1) & " " &FormatScore(HighScore(1)), "", eNone, eScrollLeft, eNone, 2000, False, ""
  2637. DMD "_", "3> " &HighScoreName(2) & " " &FormatScore(HighScore(2)), "", eNone, eScrollLeft, eNone, 2000, False, ""
  2638. DMD "_", "4> " &HighScoreName(3) & " " &FormatScore(HighScore(3)), "", eNone, eScrollLeft, eNone, 2000, False, ""
  2639. DMD Space(dCharsPerLine(0)), Space(dCharsPerLine(1)), "", eScrollLeft, eScrollLeft, eNone, 500, False, ""
  2640. End Sub
  2641.  
  2642. Sub StartAttractMode
  2643. Dim a
  2644. StartRainbow aArrows
  2645. StartLightSeq
  2646. DMDFlush
  2647. ShowTableInfo
  2648. a = RndNbr(2)
  2649. Select Case a
  2650. Case 1:PlaySong "mu_gameover"
  2651. case 2:PlaySong "mu_boom-dp-rap"
  2652. End Select
  2653. End Sub
  2654.  
  2655. Sub StopAttractMode
  2656. StopRainbow
  2657. DMDScoreNow
  2658. LightSeqAttract.StopPlay
  2659. End Sub
  2660.  
  2661. Sub StartLightSeq()
  2662. 'lights sequences
  2663. LightSeqAttract.UpdateInterval = 25
  2664. LightSeqAttract.Play SeqBlinking, , 5, 150
  2665. LightSeqAttract.Play SeqAllOff
  2666. LightSeqAttract.UpdateInterval = 8
  2667. LightSeqAttract.Play SeqUpOn, 50, 1
  2668. LightSeqAttract.UpdateInterval = 8
  2669. LightSeqAttract.Play SeqDownOn, 25, 1
  2670. LightSeqAttract.UpdateInterval = 8
  2671. LightSeqAttract.Play SeqCircleOutOn, 15, 2
  2672. LightSeqAttract.UpdateInterval = 8
  2673. LightSeqAttract.Play SeqUpOn, 25, 1
  2674. LightSeqAttract.UpdateInterval = 8
  2675. LightSeqAttract.Play SeqDownOn, 25, 1
  2676. LightSeqAttract.UpdateInterval = 8
  2677. LightSeqAttract.Play SeqUpOn, 25, 1
  2678. LightSeqAttract.UpdateInterval = 8
  2679. LightSeqAttract.Play SeqDownOn, 25, 1
  2680. LightSeqAttract.UpdateInterval = 10
  2681. LightSeqAttract.Play SeqCircleOutOn, 15, 3
  2682. LightSeqAttract.UpdateInterval = 5
  2683. LightSeqAttract.Play SeqRightOn, 50, 1
  2684. LightSeqAttract.UpdateInterval = 5
  2685. LightSeqAttract.Play SeqLeftOn, 50, 1
  2686. LightSeqAttract.UpdateInterval = 8
  2687. LightSeqAttract.Play SeqRightOn, 50, 1
  2688. LightSeqAttract.UpdateInterval = 8
  2689. LightSeqAttract.Play SeqLeftOn, 50, 1
  2690. LightSeqAttract.UpdateInterval = 8
  2691. LightSeqAttract.Play SeqRightOn, 40, 1
  2692. LightSeqAttract.UpdateInterval = 8
  2693. LightSeqAttract.Play SeqLeftOn, 40, 1
  2694. LightSeqAttract.UpdateInterval = 10
  2695. LightSeqAttract.Play SeqRightOn, 30, 1
  2696. LightSeqAttract.UpdateInterval = 10
  2697. LightSeqAttract.Play SeqLeftOn, 30, 1
  2698. LightSeqAttract.UpdateInterval = 8
  2699. LightSeqAttract.Play SeqRightOn, 25, 1
  2700. LightSeqAttract.UpdateInterval = 8
  2701. LightSeqAttract.Play SeqLeftOn, 25, 1
  2702. LightSeqAttract.UpdateInterval = 8
  2703. LightSeqAttract.Play SeqRightOn, 15, 1
  2704. LightSeqAttract.UpdateInterval = 8
  2705. LightSeqAttract.Play SeqLeftOn, 15, 1
  2706. LightSeqAttract.UpdateInterval = 10
  2707. LightSeqAttract.Play SeqCircleOutOn, 15, 3
  2708. LightSeqAttract.UpdateInterval = 8
  2709. LightSeqAttract.Play SeqLeftOn, 25, 1
  2710. LightSeqAttract.UpdateInterval = 8
  2711. LightSeqAttract.Play SeqRightOn, 25, 1
  2712. LightSeqAttract.UpdateInterval = 8
  2713. LightSeqAttract.Play SeqLeftOn, 25, 1
  2714. LightSeqAttract.UpdateInterval = 8
  2715. LightSeqAttract.Play SeqUpOn, 25, 1
  2716. LightSeqAttract.UpdateInterval = 8
  2717. LightSeqAttract.Play SeqDownOn, 25, 1
  2718. LightSeqAttract.UpdateInterval = 8
  2719. LightSeqAttract.Play SeqUpOn, 25, 1
  2720. LightSeqAttract.UpdateInterval = 8
  2721. LightSeqAttract.Play SeqDownOn, 25, 1
  2722. LightSeqAttract.UpdateInterval = 5
  2723. LightSeqAttract.Play SeqStripe1VertOn, 50, 2
  2724. LightSeqAttract.UpdateInterval = 8
  2725. LightSeqAttract.Play SeqCircleOutOn, 15, 2
  2726. LightSeqAttract.UpdateInterval = 8
  2727. LightSeqAttract.Play SeqStripe1VertOn, 50, 3
  2728. LightSeqAttract.UpdateInterval = 8
  2729. LightSeqAttract.Play SeqLeftOn, 25, 1
  2730. LightSeqAttract.UpdateInterval = 8
  2731. LightSeqAttract.Play SeqRightOn, 25, 1
  2732. LightSeqAttract.UpdateInterval = 8
  2733. LightSeqAttract.Play SeqLeftOn, 25, 1
  2734. LightSeqAttract.UpdateInterval = 8
  2735. LightSeqAttract.Play SeqUpOn, 25, 1
  2736. LightSeqAttract.UpdateInterval = 8
  2737. LightSeqAttract.Play SeqDownOn, 25, 1
  2738. LightSeqAttract.UpdateInterval = 8
  2739. LightSeqAttract.Play SeqCircleOutOn, 15, 2
  2740. LightSeqAttract.UpdateInterval = 8
  2741. LightSeqAttract.Play SeqStripe2VertOn, 50, 3
  2742. LightSeqAttract.UpdateInterval = 8
  2743. LightSeqAttract.Play SeqLeftOn, 25, 1
  2744. LightSeqAttract.UpdateInterval = 8
  2745. LightSeqAttract.Play SeqRightOn, 25, 1
  2746. LightSeqAttract.UpdateInterval = 8
  2747. LightSeqAttract.Play SeqLeftOn, 25, 1
  2748. LightSeqAttract.UpdateInterval = 8
  2749. LightSeqAttract.Play SeqUpOn, 25, 1
  2750. LightSeqAttract.UpdateInterval = 8
  2751. LightSeqAttract.Play SeqDownOn, 25, 1
  2752. LightSeqAttract.UpdateInterval = 8
  2753. LightSeqAttract.Play SeqUpOn, 25, 1
  2754. LightSeqAttract.UpdateInterval = 8
  2755. LightSeqAttract.Play SeqDownOn, 25, 1
  2756. LightSeqAttract.UpdateInterval = 8
  2757. LightSeqAttract.Play SeqStripe1VertOn, 25, 3
  2758. LightSeqAttract.UpdateInterval = 8
  2759. LightSeqAttract.Play SeqStripe2VertOn, 25, 3
  2760. LightSeqAttract.UpdateInterval = 8
  2761. LightSeqAttract.Play SeqUpOn, 15, 1
  2762. LightSeqAttract.UpdateInterval = 8
  2763. LightSeqAttract.Play SeqDownOn, 15, 1
  2764. LightSeqAttract.UpdateInterval = 8
  2765. LightSeqAttract.Play SeqUpOn, 15, 1
  2766. LightSeqAttract.UpdateInterval = 8
  2767. LightSeqAttract.Play SeqDownOn, 15, 1
  2768. LightSeqAttract.UpdateInterval = 8
  2769. LightSeqAttract.Play SeqUpOn, 15, 1
  2770. LightSeqAttract.UpdateInterval = 8
  2771. LightSeqAttract.Play SeqDownOn, 15, 1
  2772. LightSeqAttract.UpdateInterval = 8
  2773. LightSeqAttract.Play SeqRightOn, 15, 1
  2774. LightSeqAttract.UpdateInterval = 8
  2775. LightSeqAttract.Play SeqLeftOn, 15, 1
  2776. LightSeqAttract.UpdateInterval = 8
  2777. LightSeqAttract.Play SeqRightOn, 15, 1
  2778. LightSeqAttract.UpdateInterval = 8
  2779. LightSeqAttract.Play SeqLeftOn, 15, 1
  2780. End Sub
  2781.  
  2782. Sub LightSeqAttract_PlayDone()
  2783. StartLightSeq()
  2784. End Sub
  2785.  
  2786. Sub LightSeqTilt_PlayDone()
  2787. LightSeqTilt.Play SeqAllOff
  2788. End Sub
  2789.  
  2790. Sub LightSeqSkillshot_PlayDone()
  2791. LightSeqSkillshot.Play SeqAllOff
  2792. End Sub
  2793.  
  2794. '***********************************************************************
  2795. ' *********************************************************************
  2796. ' Table Specific Script Starts Here
  2797. ' *********************************************************************
  2798. '***********************************************************************
  2799.  
  2800. ' droptargets, animations, timers, etc
  2801. Sub VPObjects_Init
  2802. End Sub
  2803.  
  2804. ' tables variables and Mode init
  2805. Dim bRotateLights
  2806. Dim UpdateArrowsCount
  2807. Dim Battle(4, 7) 'the first 4 is the current player, contains status of the battle, 0 not started, 1 won, 2 started
  2808. Dim LifeLeft(4, 7) 'life left of the enemies on each battle
  2809. Dim Dead(4, 4) 'dead lights
  2810. Dim Pool(4, 4) 'pool lights
  2811. Dim Boom(4, 4) 'boom lights
  2812. Dim BoomCount
  2813. Dim WeaponLights(4, 6) 'weapon lights
  2814. Dim DiamondLights(4, 6) 'diamond lights
  2815. Dim BumperHits(4)
  2816. Dim lilPos
  2817. Dim bChooseBattle
  2818. Dim bBattleReady
  2819. Dim Battlenr
  2820. Dim WolverinePower(4)
  2821. Dim DazzlePower(4)
  2822. Dim ColossusPower(4)
  2823. Dim DominoPower(4)
  2824. Dim NinjaStars(4) 'bonus, collected Stars
  2825. Dim Chimichangas(4) 'bonus. collected chimichangas
  2826. Dim Weapons(4) 'bonus, collected weapons
  2827. Dim OldCombo
  2828. Dim ComboCount
  2829. Dim ComboValue
  2830. Dim AttackPower
  2831. Dim WolverineValue
  2832. Dim bEndBattleJackpot
  2833. Dim bFirstBattle(4)
  2834. Dim BattlesWon(4)
  2835. Dim BattlesToChoose
  2836. Dim MegaJackpot(4)
  2837. Dim MegaSuperJCount
  2838. Dim MegaSuperJValue
  2839. Dim bLockEnabled
  2840. Dim DominoValue
  2841. Dim ColossusValue
  2842. Dim DazzlerValue
  2843. Dim bLilDPMB
  2844. Dim LilDPHitsNeeded(4)
  2845. Dim LilDPHits
  2846. Dim LilDPJackpot(4)
  2847. Dim LeftSpinnerCount(4)
  2848. Dim bDiscoEnabled
  2849. Dim bDiscoLoopsEnabled
  2850. Dim DiscoLoopsValue(4)
  2851. Dim bDiscoMBEnabled
  2852. Dim DiscoSuperJackpot(4)
  2853. Dim NinjaMBJackpot(4)
  2854. Dim NinjaMBCount 'count the Ninja Multiball jackpots to calculate the super jackpot
  2855. Dim NinjaApocJackpot(4)
  2856. Dim BattleLights(6) 'Arrows
  2857. Dim StarLights(6) 'Arrows
  2858. Dim ChimiChangaLights(6) 'Arrows
  2859. Dim LilDPLights(6) 'Arrows
  2860. Dim NinjaMBLights(6) 'Arrows
  2861. Dim MechSuitLights(6) 'Arrows
  2862. Dim bNinjaMB
  2863. Dim bNinjaMBSJackpot
  2864. Dim bMechSuitMBLight(4)
  2865. Dim bMechSuitMBStarted
  2866. Dim MechMBJackpot(4)
  2867. Dim bMechSuitMBSJackpot
  2868. Dim ChimichangaHits(4)
  2869. Dim ChimichangaHitsNeeded(4)
  2870. Dim ChimichangaValue(4)
  2871. Dim bBerserker
  2872. Dim BerserkerCount(4)
  2873. Dim BerserkerValue(4)
  2874. Dim bKatanaramaTime
  2875. Dim KatanaramaValue(4)
  2876. Dim KatanaramaCount(4)
  2877. Dim bInfoNeeded1(4) 'skillshot
  2878. Dim bInfoNeeded2(4) 'dead
  2879. Dim bInfoNeeded3(4) 'pool
  2880. Dim bInfoNeeded4(4) 'deadpool mystery
  2881. Dim bInfoNeeded5(4) 'deadpool regenerate
  2882. Dim bInfoNeeded6(4) 'top naes bonus x
  2883.  
  2884. Sub Game_Init() 'called at the start of a new game
  2885. Dim i, j
  2886. bExtraBallWonThisBall = False
  2887. TurnOffPlayfieldLights()
  2888. 'Play some Music
  2889.  
  2890. 'Init Variables
  2891. bRotateLights = True
  2892. UpdateArrowsCount = 0
  2893. lilPos = 0
  2894. Battlenr = 1
  2895. bChooseBattle = False
  2896. bEndBattleJackpot = False
  2897. BattlesToChoose = 3
  2898. MegaSuperJCount = 0
  2899. BoomCount = 0
  2900. OldCombo = ""
  2901. ComboCount = 0
  2902. ComboValue = 500000
  2903. AttackPower = 1
  2904. WolverineValue = 1
  2905. bBattleReady = True
  2906. bLockEnabled = True:SwordEffect 1
  2907. DominoValue = 0
  2908. ColossusValue = 1
  2909. DazzlerValue = 0
  2910. bLilDPMB = False 'True during LilDP multiball
  2911. bDiscoEnabled = False
  2912. bDiscoLoopsEnabled = False
  2913. bDiscoMBEnabled = False
  2914. bNinjaMB = False
  2915. bNinjaMBSJackpot = False
  2916. bMechSuitMBStarted = False
  2917. bMechSuitMBSJackpot = False
  2918. bBerserker = False
  2919. bKatanaramaTime = False
  2920. For i = 0 to 4
  2921. BonusMultiplier(i) = 1
  2922. BumperHits(i) = 0
  2923. WolverinePower(i) = 2
  2924. DazzlePower(i) = 2
  2925. ColossusPower(i) = 2
  2926. DominoPower(i) = 2
  2927. BallsInLock(i) = 0 'current player
  2928. SkillshotValue(i) = 250000
  2929. SuperSkillshotValue(i) = 5000000
  2930. PlayfieldMultiplier(i) = 1
  2931. NinjaStars(i) = 0
  2932. Chimichangas(i) = 0
  2933. Weapons(i) = 0
  2934. bFirstBattle(i) = True
  2935. BattlesWon(i) = 0
  2936. MegaJackpot(i) = 50000
  2937. LilDPHitsNeeded(i) = 1
  2938. LilDPJackpot(i) = 500000
  2939. LeftSpinnerCount(i) = 0
  2940. DiscoLoopsValue(i) = 350000
  2941. DiscoSuperJackpot(i) = 500000
  2942. NinjaMBJackpot(i) = 500000
  2943. NinjaApocJackpot(i) = 5000000
  2944. bMechSuitMBLight(i) = False
  2945. MechMBJackpot(i) = 5000000
  2946. ChimichangaHits(i) = 0
  2947. ChimichangaHitsNeeded(i) = 1
  2948. ChimichangaValue(i) = 500000
  2949. BerserkerCount(i) = 0
  2950. BerserkerValue(i) = 50000
  2951. KatanaramaValue(i) = 1000000
  2952. KatanaramaCount(i) = 0
  2953. bInfoNeeded1(i) = True
  2954. bInfoNeeded2(i) = True
  2955. bInfoNeeded3(i) = True
  2956. bInfoNeeded4(i) = True
  2957. bInfoNeeded5(i) = True
  2958. bInfoNeeded6(i) = True
  2959. Next
  2960. For i = 0 to 4
  2961. For j = 0 to 7
  2962. Battle(i, j) = 0
  2963. LifeLeft(i, j) = 10
  2964. Next
  2965. Next
  2966. For i = 0 to 4
  2967. For j = 0 to 4
  2968. Dead(i, j) = 0
  2969. Pool(i, j) = 0
  2970. Boom(i, j) = 0
  2971. Next
  2972. Next
  2973. For i = 0 to 4
  2974. For j = 0 to 6
  2975. DiamondLights(i, j) = 0
  2976. WeaponLights(i, j) = 1
  2977. Next
  2978. Next
  2979. For i = 0 to 6
  2980. BattleLights(i) = 0
  2981. StarLights(i) = 0
  2982. ChimiChangaLights(i) = 0
  2983. LilDPLights(i) = 0
  2984. NinjaMBLights(i) = 0
  2985. MechSuitLights(i) = 0
  2986. Next
  2987. 'Init Delays/Timers
  2988. DiamondLights(1, 1) = 2 'enable the first Diamond light
  2989. DiamondLights(2, 1) = 2
  2990. DiamondLights(3, 1) = 2
  2991. DiamondLights(4, 1) = 2
  2992. UpdateArrows.Enabled = 1
  2993. 'MainMode Init()
  2994. End Sub
  2995.  
  2996. Sub InstantInfo
  2997. Dim tmp
  2998. DMD CL(0, "INSTANT INFO"), "", "", eNone, eNone, eNone, 1000, False, ""
  2999. If Score(1)Then
  3000. DMD CL(0, "PLAYER 1 SCORE"), CL(1, FormatScore(Score(1))), "", eNone, eNone, eNone, 3000, False, ""
  3001. End If
  3002. If Score(2)Then
  3003. DMD CL(0, "PLAYER 2 SCORE"), CL(1, FormatScore(Score(2))), "", eNone, eNone, eNone, 3000, False, ""
  3004. End If
  3005. If Score(3)Then
  3006. DMD CL(0, "PLAYER 3 SCORE"), CL(1, FormatScore(Score(3))), "", eNone, eNone, eNone, 3000, False, ""
  3007. End If
  3008. If Score(4)Then
  3009. DMD CL(0, "PLAYER 4 SCORE"), CL(1, FormatScore(Score(4))), "", eNone, eNone, eNone, 3000, False, ""
  3010. End If
  3011. DMD CL(0, "COLLECTED"), CL(1, NinjaStars(CurrentPlayer) & " NINJA STARS"), "", eNone, eNone, eNone, 1000, False, ""
  3012. DMD CL(0, "COLLECTED"), CL(1, Chimichangas(CurrentPlayer) & " CHIMICHANGAS"), "", eNone, eNone, eNone, 1000, False, ""
  3013. DMD CL(0, "COLLECTED"), CL(1, Weapons(CurrentPlayer) & " WEAPONS"), "", eNone, eNone, eNone, 1000, False, ""
  3014. tmp = 25 - NinjaStars(CurrentPlayer)MOD 25
  3015. DMD CL(0, "COLLECT " &tmp& " STARS"), CL(1, "TO INCREASE PFX"), "", eNone, eNone, eNone, 1000, False, ""
  3016. tmp = 50 - NinjaStars(CurrentPlayer)MOD 50
  3017. DMD CL(0, "COLLECT " &tmp& " STARS"), CL(1, "TO LIT EXTRA BALL"), "", eNone, eNone, eNone, 1000, False, ""
  3018. tmp = 10 - Chimichangas(CurrentPlayer)MOD 10
  3019. DMD CL(0, "COLLECT " &tmp& " CHIMICHA"), CL(1, "TO INCREASE PFX"), "", eNone, eNone, eNone, 1000, False, ""
  3020. tmp = 30 - Weapons(CurrentPlayer)MOD 30
  3021. DMD CL(0, "COLLECT " &tmp& " WEAPONS"), CL(1, "TO LIT EXTRA BALL"), "", eNone, eNone, eNone, 1000, False, ""
  3022. tmp = 50 - Weapons(CurrentPlayer)MOD 50
  3023. DMD CL(0, "COLLECT " &tmp& " WEAPONS"), CL(1, "TO INCREASE PFX"), "", eNone, eNone, eNone, 1000, False, ""
  3024. tmp = 75 - Weapons(CurrentPlayer)MOD 75
  3025. DMD CL(0, "COLLECT " &tmp& " WEAPONS"), CL(1, "TO MECHSUIT MB"), "", eNone, eNone, eNone, 1000, False, ""
  3026. DMD CL(0, "BONUS X"), CL(1, BonusMultiplier(CurrentPlayer)), "", eNone, eNone, eNone, 1000, False, ""
  3027. DMD CL(0, "BALLS LOCKED"), CL(1, BallsInLock(CurrentPLayer)), "", eNone, eNone, eNone, 1000, False, ""
  3028. DMD CL(0, "JACKPOT VALUES"), "", "", eNone, eNone, eNone, 1000, False, ""
  3029. DMD CL(0, "NINJA MB JACKPOT"), CL(1, FormatScore(NinjaMBJackpot(CurrentPlayer))), "", eNone, eNone, eNone, 1000, False, ""
  3030. DMD CL(0, "MEGALODON JACKPOT"), CL(1, FormatScore(MegaJackpot(CurrentPlayer))), "", eNone, eNone, eNone, 1000, False, ""
  3031. DMD CL(0, "MEGALODON SUPJACKPOT"), CL(1, FormatScore(MegaJackpot(CurrentPlayer) * MegaSuperJCount)), "", eNone, eNone, eNone, 1000, False, ""
  3032. DMD CL(0, "LIL DP JACKPOT"), CL(1, FormatScore(LilDPJackpot(CurrentPlayer))), "", eNone, eNone, eNone, 1000, False, ""
  3033. DMD CL(0, "DISCO MB JACKPOT"), CL(1, FormatScore(DiscoSuperJackpot(CurrentPlayer))), "", eNone, eNone, eNone, 1000, False, ""
  3034. DMD CL(0, "MECHSUIT MB JACKPOT"), CL(1, FormatScore(MechMBJackpot(CurrentPlayer))), "", eNone, eNone, eNone, 1000, False, ""
  3035. DMD CL(0, "HIGHEST SCORE"), CL(1, HighScoreName(0) & " " & HighScore(0)), "", eNone, eNone, eNone, 1000, False, ""
  3036. End Sub
  3037.  
  3038. Sub StopMBmodes 'stop multiball modes after loosing the last multibal
  3039. If bLilDPMB Then StopLilDPMB:ResetDropTargets 'this stops the LilDB multiball and reset the targets and lights
  3040. If bDiscoMBEnabled Then StopDiscoMB 'discoMB is on so stop it
  3041. If bNinjaMB Then StopNinjaMB
  3042. If bMechSuitMBStarted Then StopMechSuitMB
  3043. changesong
  3044. End Sub
  3045.  
  3046. Sub StopEndOfBallMode() 'this sub is called after the last ball in play is drained, reset skillshot, modes, timers
  3047. StopCombo
  3048. StopBattle
  3049. If bDiscoLoopsEnabled Then DiscoLoopsTimer_Timer 'stops the discolopp mode
  3050. If bBerserker Then StopBerserker
  3051. If bKatanaramaTime Then StopKatanarama
  3052. End Sub
  3053.  
  3054. Sub ResetNewBallVariables() 'reset variables for a new ball or player
  3055. dim i
  3056. 'turn on or off the needed lights before a new ball is released
  3057. TurnOffPlayfieldLights
  3058. 'lilDp droptargets
  3059. ResetDropTargets
  3060. CloseGates
  3061. 'playfield multipiplier
  3062. pfxtimer.Enabled = 0
  3063. PlayfieldMultiplier(CurrentPlayer) = 1
  3064. UpdatePFXLights(PlayfieldMultiplier(CurrentPlayer))
  3065. If Balls = 1 then 'only on the first ball
  3066. bBattleReady = True
  3067. bLockEnabled = True:SwordEffect 1
  3068. End If
  3069. 'update dead, pool, boom & other lights
  3070. TurnOffArrows
  3071. For i = 0 to 6
  3072. BattleLights(i) = 0
  3073. StarLights(i) = 0
  3074. ChimiChangaLights(i) = 0
  3075. LilDPLights(i) = 0
  3076. Next
  3077. TurnOnTeamUpLights
  3078. End Sub
  3079.  
  3080. Sub TurnOnTeamUpLights
  3081. li073.State = 2
  3082. li040.State = 2
  3083. li074.State = 2
  3084. li072.State = 2
  3085. End Sub
  3086.  
  3087. Sub TurnOffTeamUpLights
  3088. li073.State = 0
  3089. li040.State = 0
  3090. li074.State = 0
  3091. li072.State = 0
  3092. End Sub
  3093.  
  3094. Sub TurnOffPlayfieldLights()
  3095. Dim a
  3096. For each a in aLights
  3097. a.State = 0
  3098. Next
  3099. End Sub
  3100.  
  3101. Sub UpdateLights
  3102. Dim i
  3103. li021.State = Dead(CurrentPlayer, 1)
  3104. li022.State = Dead(CurrentPlayer, 2)
  3105. li023.State = Dead(CurrentPlayer, 3)
  3106. li024.State = Dead(CurrentPlayer, 4)
  3107. li017.State = Pool(CurrentPlayer, 1)
  3108. li018.State = Pool(CurrentPlayer, 2)
  3109. li019.State = Pool(CurrentPlayer, 3)
  3110. li020.State = Pool(CurrentPlayer, 4)
  3111. li006.State = Boom(CurrentPlayer, 1)
  3112. li014.State = Boom(CurrentPlayer, 2)
  3113. li015.State = Boom(CurrentPlayer, 3)
  3114. li016.State = Boom(CurrentPlayer, 4)
  3115. li045.State = WeaponLights(CurrentPlayer, 1)
  3116. li028.State = WeaponLights(CurrentPlayer, 2)
  3117. li042.State = WeaponLights(CurrentPlayer, 3)
  3118. li046.State = WeaponLights(CurrentPlayer, 4)
  3119. li032.State = WeaponLights(CurrentPlayer, 5)
  3120. li033.State = WeaponLights(CurrentPlayer, 6)
  3121. li025.State = DiamondLights(CurrentPlayer, 1)
  3122. li029.State = DiamondLights(CurrentPlayer, 2)
  3123. li026.State = DiamondLights(CurrentPlayer, 3)
  3124. li030.State = DiamondLights(CurrentPlayer, 4)
  3125. li027.State = DiamondLights(CurrentPlayer, 5)
  3126. li031.State = DiamondLights(CurrentPlayer, 6)
  3127. li008.State = Battle(CurrentPLayer, 1)
  3128. li010.State = Battle(CurrentPLayer, 2)
  3129. li011.State = Battle(CurrentPLayer, 3)
  3130. li007.State = Battle(CurrentPLayer, 4)
  3131. li009.State = Battle(CurrentPLayer, 5)
  3132. li012.State = Battle(CurrentPLayer, 6)
  3133. li013.State = Battle(CurrentPLayer, 7)
  3134. If bBattleReady Then
  3135. li056.State = 2
  3136. li070.State = 2
  3137. Else
  3138. li056.State = 0
  3139. li070.State = 0
  3140. End If
  3141. If bLockEnabled Then
  3142. li048.State = 2
  3143. Else
  3144. li048.State = 0
  3145. End If
  3146. If BoomCount> 0 then
  3147. BoomLight.State = 2
  3148. Else
  3149. BoomLight.State = 0
  3150. End If
  3151. If bNinjaMBSJackpot Then
  3152. SetLightColor li058, teal, 2
  3153. ElseIf bSkillShotReady Then
  3154. SetLightColor li058, red, 2
  3155. End If
  3156. If bMultiBallMode Then
  3157. li060.state = 2:li061.State = 2
  3158. Else
  3159. li060.state = 0:li061.State = 0
  3160. End If
  3161. If bMechSuitMBLight(CurrentPlayer)Then
  3162. li047.State = 1
  3163. End If
  3164. End Sub
  3165.  
  3166. Sub UpdateArrows_Timer 'timer change the color of the blinking lights according to the Battle or Mode active
  3167. 'Update other lights
  3168. UpdateLights
  3169. Select Case UpdateArrowsCount
  3170. Case 0 'Battle lights
  3171. Select Case Battle(CurrentPlayer, 0)
  3172. Case 1
  3173. If BattleLights(1) = 2 Then SetlightColor li054, red, 2
  3174. If BattleLights(2) = 2 Then SetlightColor li057, red, 2
  3175. If BattleLights(3) = 2 Then SetlightColor li055, red, 2
  3176. If BattleLights(4) = 2 Then SetlightColor li071, red, 2
  3177. If BattleLights(5) = 2 Then SetlightColor li058, red, 2
  3178. If BattleLights(6) = 2 Then SetlightColor li059, red, 2
  3179. Case 2
  3180. If BattleLights(1) = 2 Then SetlightColor li054, white, 2
  3181. If BattleLights(2) = 2 Then SetlightColor li057, white, 2
  3182. If BattleLights(3) = 2 Then SetlightColor li055, white, 2
  3183. If BattleLights(4) = 2 Then SetlightColor li071, white, 2
  3184. If BattleLights(5) = 2 Then SetlightColor li058, white, 2
  3185. If BattleLights(6) = 2 Then SetlightColor li059, white, 2
  3186. Case 3
  3187. If BattleLights(1) = 2 Then SetlightColor li054, yellow, 2
  3188. If BattleLights(2) = 2 Then SetlightColor li057, yellow, 2
  3189. If BattleLights(3) = 2 Then SetlightColor li055, yellow, 2
  3190. If BattleLights(4) = 2 Then SetlightColor li071, yellow, 2
  3191. If BattleLights(5) = 2 Then SetlightColor li058, yellow, 2
  3192. If BattleLights(6) = 2 Then SetlightColor li059, yellow, 2
  3193. Case 4
  3194. If BattleLights(1) = 2 Then SetlightColor li054, darkgreen, 2
  3195. If BattleLights(2) = 2 Then SetlightColor li057, darkgreen, 2
  3196. If BattleLights(3) = 2 Then SetlightColor li055, darkgreen, 2
  3197. If BattleLights(4) = 2 Then SetlightColor li071, darkgreen, 2
  3198. If BattleLights(5) = 2 Then SetlightColor li058, darkgreen, 2
  3199. If BattleLights(6) = 2 Then SetlightColor li059, darkgreen, 2
  3200. Case 5
  3201. If BattleLights(1) = 1 Then SetlightColor li054, blue, 1
  3202. If BattleLights(2) = 1 Then SetlightColor li057, blue, 1
  3203. If BattleLights(3) = 1 Then SetlightColor li055, blue, 1
  3204. If BattleLights(4) = 1 Then SetlightColor li071, blue, 1
  3205. If BattleLights(5) = 1 Then SetlightColor li058, blue, 1
  3206. If BattleLights(6) = 1 Then SetlightColor li059, blue, 1
  3207. If BattleLights(1) = 2 Then SetlightColor li054, red, 2
  3208. If BattleLights(2) = 2 Then SetlightColor li057, red, 2
  3209. If BattleLights(3) = 2 Then SetlightColor li055, red, 2
  3210. If BattleLights(4) = 2 Then SetlightColor li071, red, 2
  3211. If BattleLights(5) = 2 Then SetlightColor li058, red, 2
  3212. If BattleLights(6) = 2 Then SetlightColor li059, red, 2
  3213. Case 6
  3214. If BattleLights(1) = 2 Then SetlightColor li054, green, 2
  3215. If BattleLights(2) = 2 Then SetlightColor li057, green, 2
  3216. If BattleLights(3) = 2 Then SetlightColor li055, green, 2
  3217. If BattleLights(4) = 2 Then SetlightColor li071, green, 2
  3218. If BattleLights(5) = 2 Then SetlightColor li058, green, 2
  3219. If BattleLights(6) = 2 Then SetlightColor li059, green, 2
  3220. Case 7
  3221. If BattleLights(1) = 2 Then SetlightColor li054, darkblue, 2
  3222. If BattleLights(2) = 2 Then SetlightColor li057, darkblue, 2
  3223. If BattleLights(3) = 2 Then SetlightColor li055, darkblue, 2
  3224. If BattleLights(4) = 2 Then SetlightColor li071, darkblue, 2
  3225. If BattleLights(5) = 2 Then SetlightColor li058, darkblue, 2
  3226. If BattleLights(6) = 2 Then SetlightColor li059, darkblue, 2
  3227. End Select
  3228. Case 1 'Chimichangas
  3229. If ChimiChangaLights(1) = 2 Then SetlightColor li054, orange, 2
  3230. If ChimiChangaLights(2) = 2 Then SetlightColor li057, orange, 2
  3231. If ChimiChangaLights(3) = 2 Then SetlightColor li055, orange, 2
  3232. If ChimiChangaLights(4) = 2 Then SetlightColor li071, orange, 2
  3233. If ChimiChangaLights(5) = 2 Then SetlightColor li058, orange, 2
  3234. If ChimiChangaLights(6) = 2 Then SetlightColor li059, orange, 2
  3235. Case 2 'Lil Deadpool
  3236. If LilDPLights(1) = 2 Then SetlightColor li054, amber, 2
  3237. If LilDPLights(2) = 2 Then SetlightColor li057, amber, 2
  3238. If LilDPLights(3) = 2 Then SetlightColor li055, amber, 2
  3239. If LilDPLights(4) = 2 Then SetlightColor li071, amber, 2
  3240. If LilDPLights(5) = 2 Then SetlightColor li058, amber, 2
  3241. If LilDPLights(6) = 2 Then SetlightColor li059, amber, 2
  3242. Case 3 'Ninja Multiball jackpot lights
  3243. If NinjaMBLights(1) = 2 Then SetlightColor li054, teal, 2
  3244. If NinjaMBLights(2) = 2 Then SetlightColor li057, teal, 2
  3245. If NinjaMBLights(3) = 2 Then SetlightColor li055, teal, 2
  3246. If NinjaMBLights(4) = 2 Then SetlightColor li071, teal, 2
  3247. If NinjaMBLights(5) = 2 Then SetlightColor li058, teal, 2
  3248. If NinjaMBLights(6) = 2 Then SetlightColor li059, teal, 2
  3249. Case 4 'Stars
  3250. If StarLights(1) = 2 Then SetlightColor li054, purple, 2
  3251. If StarLights(2) = 2 Then SetlightColor li057, purple, 2
  3252. If StarLights(3) = 2 Then SetlightColor li055, purple, 2
  3253. If StarLights(4) = 2 Then SetlightColor li071, purple, 2
  3254. If StarLights(5) = 2 Then SetlightColor li058, purple, 2
  3255. If StarLights(6) = 2 Then SetlightColor li059, purple, 2
  3256. Case 5 'Mech Suit Multiball
  3257. If MechSuitLights(1) = 2 Then SetlightColor li054, red, 2
  3258. If MechSuitLights(2) = 2 Then SetlightColor li057, red, 2
  3259. If MechSuitLights(3) = 2 Then SetlightColor li055, red, 2
  3260. If MechSuitLights(4) = 2 Then SetlightColor li071, red, 2
  3261. If MechSuitLights(5) = 2 Then SetlightColor li058, red, 2
  3262. If MechSuitLights(6) = 2 Then SetlightColor li059, red, 2
  3263. End Select
  3264. UpdateArrowsCount = (UpdateArrowsCount + 1)MOD 6
  3265. End Sub
  3266.  
  3267. Sub UpdateSkillShot() 'Setup and updates the skillshot lights
  3268. LightSeqSkillshot.Play SeqAllOff
  3269. DMD CL(0, "HIT LIT LIGHT"), CL(1, "FOR SKILLSHOT"), "", eNone, eNone, eNone, 1500, True, ""
  3270. li050.State = 2
  3271. SetLightColor li058, Red, 2
  3272. End Sub
  3273.  
  3274. Sub ResetSkillShotTimer_Timer 'timer to reset the skillshot lights & variables
  3275. ResetSkillShotTimer.Enabled = 0
  3276. bSkillShotReady = False
  3277. bRotateLights = True
  3278. LightSeqSkillshot.StopPlay
  3279. If Li049.State = 2 Then Li049.State = 0
  3280. If Li050.State = 2 Then Li050.State = 0
  3281. If Li051.State = 2 Then Li051.State = 0
  3282. If Li052.State = 2 Then Li052.State = 0
  3283. Li058.State = 0
  3284. CloseGates
  3285. DMDScoreNow
  3286. End Sub
  3287.  
  3288. ' *********************************************************************
  3289. ' Table Object Hit Events
  3290. '
  3291. ' Any target hit Sub will follow this:
  3292. ' - play a sound
  3293. ' - do some physical movement
  3294. ' - add a score, bonus
  3295. ' - check some variables/Mode this trigger is a member of
  3296. ' - set the "LastSwitchHit" variable in case it is needed later
  3297. ' *********************************************************************
  3298.  
  3299. '*********************************************************
  3300. ' Slingshots has been hit
  3301. ' In this table the slingshots change the outlanes lights
  3302.  
  3303. Dim LStep, RStep
  3304.  
  3305. Sub LeftSlingShot_Slingshot
  3306. If Tilted Then Exit Sub
  3307. PlaySoundAt SoundFXDOF("fx_slingshot", 103, DOFPulse, DOFcontactors), Lemk
  3308. DOF 105, DOFPulse
  3309. LeftSling004.Visible = 1
  3310. Lemk.RotX = 26
  3311. LStep = 0
  3312. LeftSlingShot.TimerEnabled = True
  3313. ' add some points
  3314. AddScore 530
  3315. ' check modes
  3316. StopCombo
  3317. ' add some effect to the table?
  3318. ' remember last trigger hit by the ball
  3319. LastSwitchHit = "LeftSlingShot"
  3320. End Sub
  3321.  
  3322. Sub LeftSlingShot_Timer
  3323. Select Case LStep
  3324. Case 1:LeftSLing004.Visible = 0:LeftSLing003.Visible = 1:Lemk.RotX = 14
  3325. Case 2:LeftSLing003.Visible = 0:LeftSLing002.Visible = 1:Lemk.RotX = 2
  3326. Case 3:LeftSLing002.Visible = 0:Lemk.RotX = -10:LeftSlingShot.TimerEnabled = 0
  3327. End Select
  3328. LStep = LStep + 1
  3329. End Sub
  3330.  
  3331. Sub RightSlingShot_Slingshot
  3332. If Tilted Then Exit Sub
  3333. PlaySoundAt SoundFXDOF("fx_slingshot", 104, DOFPulse, DOFcontactors), Remk
  3334. DOF 106, DOFPulse
  3335. RightSling004.Visible = 1
  3336. Remk.RotX = 26
  3337. RStep = 0
  3338. RightSlingShot.TimerEnabled = True
  3339. ' add some points
  3340. AddScore 530
  3341. ' check modes
  3342. StopCombo
  3343. ' add some effect to the table?
  3344. ' remember last trigger hit by the ball
  3345. LastSwitchHit = "RightSlingShot"
  3346. End Sub
  3347.  
  3348. Sub RightSlingShot_Timer
  3349. Select Case RStep
  3350. Case 1:RightSLing004.Visible = 0:RightSLing003.Visible = 1:Remk.RotX = 14
  3351. Case 2:RightSLing003.Visible = 0:RightSLing002.Visible = 1:Remk.RotX = 2
  3352. Case 3:RightSLing002.Visible = 0:Remk.RotX = -10:RightSlingShot.TimerEnabled = 0
  3353. End Select
  3354. RStep = RStep + 1
  3355. End Sub
  3356.  
  3357. '*********
  3358. ' Rubbers
  3359. '*********
  3360.  
  3361. Sub rlband004_Hit:Addscore 110:End Sub
  3362. Sub rlband003_Hit:Addscore 110:End Sub
  3363. Sub rlband007_Hit:Addscore 110:End Sub
  3364.  
  3365. '***********************
  3366. ' Bumpers - Spawn Ninja
  3367. '***********************
  3368.  
  3369. Sub Bumper1_Hit
  3370. If Tilted Then Exit Sub
  3371. If bSkillShotReady Then ResetSkillShotTimer_Timer
  3372. PlaySoundAt SoundFXDOF("fx_bumper", 107, DOFPulse, DOFContactors), Bumper1
  3373. DOF 138, DOFPulse
  3374. FlashForms Flasher008, 1500, 75, 0
  3375. ' add some points
  3376. AddScore 1000
  3377. ' check for modes
  3378. StopCombo
  3379. Select Case Battle(CurrentPLayer, 0)
  3380. Case 0:PlaySound "sfx_sword1"
  3381. Case 3 'Sabretooth
  3382. Addscore DominoValue
  3383. PlaySound "sfx_hit1"
  3384. CheckBattle
  3385. End Select
  3386.  
  3387. ' remember last trigger hit by the ball
  3388. LastSwitchHit = "Bumper1"
  3389. CheckBumpers
  3390. End Sub
  3391.  
  3392. Sub Bumper2_Hit
  3393. If Tilted Then Exit Sub
  3394. If bSkillShotReady Then ResetSkillShotTimer_Timer
  3395. PlaySoundAt SoundFXDOF("fx_bumper", 108, DOFPulse, DOFContactors), Bumper2
  3396. DOF 138, DOFPulse
  3397. FlashForms Flasher009, 1500, 75, 0
  3398. ' add some points
  3399. AddScore 1000
  3400. ' check for modes
  3401. StopCombo
  3402. Select Case Battle(CurrentPLayer, 0)
  3403. Case 0:PlaySound "sfx_sword2"
  3404. Case 3 'Sabretooth
  3405. Addscore DominoValue
  3406. PlaySound "sfx_hit2"
  3407. CheckBattle
  3408. End Select
  3409. ' remember last trigger hit by the ball
  3410. LastSwitchHit = "Bumper2"
  3411. CheckBumpers
  3412. End Sub
  3413.  
  3414. Sub Bumper3_Hit
  3415. If Tilted Then Exit Sub
  3416. If bSkillShotReady Then ResetSkillShotTimer_Timer
  3417. PlaySoundAt SoundFXDOF("fx_bumper", 109, DOFPulse, DOFContactors), Bumper3
  3418. DOF 138, DOFPulse
  3419. FlashForms Flasher010, 1500, 75, 0
  3420. ' add some points
  3421. AddScore 1000
  3422. ' check for modes
  3423. StopCombo
  3424. Select Case Battle(CurrentPLayer, 0)
  3425. Case 0:PlaySound "sfx_sword3"
  3426. Case 3 'Sabretooth
  3427. Addscore DominoValue
  3428. PlaySound "sfx_hit3"
  3429. CheckBattle
  3430. End Select
  3431. ' remember last trigger hit by the ball
  3432. LastSwitchHit = "Bumper3"
  3433. CheckBumpers
  3434. End Sub
  3435.  
  3436. ' Check the bumper hits - spawn Ninjas
  3437.  
  3438. Sub CheckBumpers()
  3439. ' increase the bumper hit count and increase the bumper value after each 30 hits
  3440. BumperHits(CurrentPlayer) = BumperHits(CurrentPlayer) + 1
  3441. If BumperHits(CurrentPlayer)MOD 10 = 0 Then ' spawn a Ninja Star - purple Arrow light
  3442. SpawnNinja
  3443. End If
  3444. End Sub
  3445.  
  3446. Sub SpawnNinja
  3447. Dim tmp
  3448. tmp = RndNbr(6)
  3449. StarLights(tmp) = 2
  3450. End Sub
  3451.  
  3452. Sub CheckNinjaStars
  3453. NinjaStars(CurrentPlayer) = NinjaStars(CurrentPlayer) + 1
  3454. If NinjaStars(CurrentPlayer)MOD 50 = 0 Then 'light extra ball
  3455. DMD "_", CL(1, "EXTRA BALL IS LIT"), "", eNone, eNone, eNone, 1000, "vo_lildp_xtraball"
  3456. li038.State = 2
  3457. End If
  3458. If NinjaStars(CurrentPlayer)MOD 25 = 0 Then 'increase pfx
  3459. AddPlayfieldMultiplier 1
  3460. End If
  3461. End Sub
  3462.  
  3463. '*******************************
  3464. ' Top lanes: Bonus X /Skillshot
  3465. '*******************************
  3466. ' score 2.500.000, 250.000 or 1000
  3467.  
  3468. Sub Trigger006_Hit
  3469. PlaySoundAt "fx_sensor", Trigger006
  3470. If Tilted Then Exit Sub
  3471. ' check for modes
  3472. StopCombo
  3473. If bSkillShotReady AND li049.State = 2 Then
  3474. AwardSkillshot
  3475. Else
  3476. Addscore 1000
  3477. li049.State = 1
  3478. CheckBonusX
  3479. End If
  3480. ' remember last trigger hit by the ball
  3481. LastSwitchHit = "Trigger006"
  3482. End Sub
  3483.  
  3484. Sub Trigger007_Hit
  3485. PlaySoundAt "fx_sensor", Trigger007
  3486. If Tilted Then Exit Sub
  3487. ' check for modes
  3488. StopCombo
  3489. If bSkillShotReady AND li050.State = 2 Then
  3490. AwardSkillshot
  3491. Else
  3492. Addscore 1000
  3493. li050.State = 1
  3494. CheckBonusX
  3495. End If
  3496. ' remember last trigger hit by the ball
  3497. LastSwitchHit = "Trigger007"
  3498. End Sub
  3499.  
  3500. Sub Trigger008_Hit
  3501. PlaySoundAt "fx_sensor", Trigger008
  3502. If Tilted Then Exit Sub
  3503. ' check for modes
  3504. StopCombo
  3505. If bSkillShotReady AND li051.State = 2 Then
  3506. AwardSkillshot
  3507. Else
  3508. Addscore 1000
  3509. li051.State = 1
  3510. CheckBonusX
  3511. End If
  3512. ' remember last trigger hit by the ball
  3513. LastSwitchHit = "Trigger008"
  3514. End Sub
  3515.  
  3516. Sub Trigger009_Hit
  3517. PlaySoundAt "fx_sensor", Trigger009
  3518. If Tilted Then Exit Sub
  3519. ' check for modes
  3520. StopCombo
  3521. Select Case Battle(CurrentPLayer, 0)
  3522. Case 1
  3523. If li054.State = 2 Then CheckBattle
  3524. End Select
  3525. If bSkillShotReady AND li052.State = 2 Then
  3526. AwardSkillshot
  3527. Else
  3528. Addscore 1000
  3529. li052.State = 1
  3530. CheckBonusX
  3531. End If
  3532. ' remember last trigger hit by the ball
  3533. LastSwitchHit = "Trigger009"
  3534. End Sub
  3535.  
  3536. Sub CheckBonusX
  3537. If Li049.State + Li050.State + Li051.State + Li052.State = 4 Then
  3538. DMD CL(0, "BONUS MULTIPLIER"), CL(1, BonusMultiplier(CurrentPlayer) & "X"), "", eNone, eNone, eNone, 1500, True, "Fanfare"
  3539. AddBonusMultiplier 1
  3540. Addscore 15000
  3541. GiEffect 1
  3542. FlashForMs Li049, 1500, 100, 0
  3543. FlashForMs Li050, 1500, 100, 0
  3544. FlashForMs Li051, 1500, 100, 0
  3545. FlashForMs Li052, 1500, 100, 0
  3546. FlashForms Flasher008, 1500, 100, 0
  3547. FlashForms Flasher009, 1500, 100, 0
  3548. FlashForms Flasher010, 1500, 100, 0
  3549. ElseIf bInfoNeeded6(CurrentPLayer)Then
  3550. PlaySound "vo_completetoplanes"
  3551. bInfoNeeded6(CurrentPLayer) = False
  3552. End IF
  3553. End Sub
  3554.  
  3555. '**************************
  3556. ' Out/inLanes : BOOM lanes
  3557. '**************************
  3558.  
  3559. Sub Trigger001_Hit
  3560. PlaySoundAt "fx_sensor", Trigger001
  3561. If Tilted Then Exit Sub
  3562. ' check for modes
  3563. If bSkillShotReady Then ResetSkillShotTimer_Timer
  3564. If li075.State Then 'Regenerate
  3565. If NOT bExtraBallWonThisBall Then 'same as extra ball
  3566. DMD "_", CL(1, ("REGENERATE")), "_", eNone, eBlink, eNone, 1000, True, SoundFXDOF("fx_Knocker", 122, DOFPulse, DOFKnocker)
  3567. DOF 121, DOFPulse
  3568. ExtraBallsAwards(CurrentPlayer) = ExtraBallsAwards(CurrentPlayer) + 1
  3569. bExtraBallWonThisBall = True
  3570. GiEffect 2
  3571. LightEffect 2
  3572. END If
  3573. End If
  3574. Addscore 5000
  3575. Boom(CurrentPlayer, 1) = 1
  3576. CheckBOOM
  3577. End Sub
  3578.  
  3579. Sub Trigger002_Hit
  3580. PlaySoundAt "fx_sensor", Trigger002
  3581. If Tilted Then Exit Sub
  3582. ' check for modes
  3583. If bSkillShotReady Then ResetSkillShotTimer_Timer
  3584. Addscore 1000
  3585. Boom(CurrentPlayer, 2) = 1
  3586. CheckBOOM
  3587. End Sub
  3588.  
  3589. Sub Trigger003_Hit
  3590. PlaySoundAt "fx_sensor", Trigger003
  3591. If Tilted Then Exit Sub
  3592. ' check for modes
  3593. If bSkillShotReady Then ResetSkillShotTimer_Timer
  3594. Addscore 1000
  3595. Boom(CurrentPlayer, 3) = 1
  3596. CheckBOOM
  3597. End Sub
  3598.  
  3599. Sub Trigger004_Hit
  3600. PlaySoundAt "fx_sensor", Trigger004
  3601. If Tilted Then Exit Sub
  3602. ' check for modes
  3603. If bSkillShotReady Then ResetSkillShotTimer_Timer
  3604. Addscore 5000
  3605. Boom(CurrentPlayer, 4) = 1
  3606. CheckBOOM
  3607. End Sub
  3608.  
  3609. Sub CheckBOOM
  3610. Dim tmp, i
  3611. tmp = 0
  3612. For i = 1 to 4:tmp = tmp + Boom(CurrentPlayer, i):Next
  3613. If tmp = 4 Then
  3614. PlaySound "vo_boombuttonisready"
  3615. BoomCount = BoomCount + 1
  3616. For i = 1 to 4:Boom(CurrentPlayer, i) = 0:Next
  3617. If BoomCount> 3 Then
  3618. SetLightColor BoomLight, red, 2
  3619. Else
  3620. SetLightColor BoomLight, white, 2
  3621. End If
  3622. End If
  3623. End Sub
  3624.  
  3625. Sub BoomHit
  3626. If BoomCount> 0 Then
  3627. PlaySound "vo_boom"
  3628. If Battle(CurrentPlayer, 0)> 0 Then
  3629. LifeLeft(CurrentPlayer, Battle(CurrentPlayer, 0)) = LifeLeft(CurrentPlayer, Battle(CurrentPlayer, 0))- 4
  3630. CheckBattle
  3631. DMDScoreNow
  3632. ElseIf BoomCount> 3 Then 'not in a battle
  3633. Addscore 5000000
  3634. Else
  3635. Addscore 500000
  3636. End If
  3637. BoomCount = BoomCount - 1
  3638. End If
  3639. End Sub
  3640.  
  3641. '*************
  3642. ' Battle lanes
  3643. '*************
  3644. ' also used for combos and other modes
  3645.  
  3646. Sub Trigger011_Hit 'colossus loop
  3647. PlaySoundAt "fx_sensor", Trigger011
  3648. If Tilted Then Exit Sub
  3649. If bSkillShotReady Then ResetSkillShotTimer_Timer
  3650. Addscore 10000
  3651. If li039.State = 2 Then
  3652. li039.State = 0
  3653. AwardSpecial
  3654. End If
  3655. ' check for modes
  3656. If ChimiChangaLights(3) = 2 Then 'collect chimichanga
  3657. ChimiChangaLights(3) = 0:Li055.State = 0
  3658. Collectchimichanga
  3659. End If
  3660. If MechSuitLights(3) = 2 Then 'collect jackpot
  3661. MechSuitLights(3) = 0:Li055.State = 0
  3662. CheckMechSuitMBHits
  3663. End If
  3664. If WeaponLights(CurrentPlayer, 3) = 1 Then 'collect weapon
  3665. WeaponLights(CurrentPlayer, 3) = 0:Li042.State = 0
  3666. CheckWeapons
  3667. End If
  3668. If StarLights(3) = 2 Then 'a ninja star is at that position
  3669. StarLights(3) = 0:Li055.State = 0
  3670. CheckNinjaStars
  3671. End If
  3672. If bNinjaMB AND NinjaMBLights(3) = 2 Then 'Ninja Multiball
  3673. NinjaMBLights(3) = 0:li055.State = 0
  3674. NinjaMBCheckHits
  3675. End If
  3676. If bLilDPMB AND LilDPHits> 8 AND LilDPLights(3) = 2 Then 'second part of the LilDP multiball
  3677. LilDPLights(3) = 0:Li055.State = 0
  3678. LilDPCheckHits
  3679. End If
  3680. Select Case Battle(CurrentPLayer, 0)
  3681. Case 0
  3682. ColossusPower(CurrentPlayer) = ColossusPower(CurrentPlayer) + 1
  3683. CheckColossus
  3684. Case 1, 4, 6, 7
  3685. If BattleLights(3) = 2 Then PlaySound "sfx_hit1":CheckBattle
  3686. Case 5
  3687. If BattleLights(3) = 2 Then
  3688. PlaySound "sfx_hit1":AwardSuperMegaJackpot:CheckBattle
  3689. ElseIf BattleLights(3) = 1 Then
  3690. BattleLights(3) = 0:li055.State = 0:AwardMegaJackpot
  3691. End If
  3692. End Select
  3693. ' remember last trigger hit by the ball
  3694. LastSwitchHit = "Trigger011"
  3695. End Sub
  3696.  
  3697. Sub Trigger010_Hit 'left loop
  3698. PlaySoundAt "fx_sensor", Trigger010
  3699. If Tilted Then Exit Sub
  3700. Addscore 10000
  3701. ' check for modes
  3702. If bKatanaramaTime Then
  3703. Addscore KatanaramaValue(CurrentPlayer)
  3704. DMD " KATANARAMA JACKPOT", CL(1, FormatScore(KatanaramaValue(CurrentPlayer))), "", eNone, eBlink, eNone, 1500, True, "vo_jackpot"
  3705. KatanaramaValue(CurrentPlayer) = KatanaramaValue(CurrentPlayer) + 250000
  3706. End If
  3707. If ChimiChangaLights(1) = 2 Then 'collect chimichanga
  3708. ChimiChangaLights(1) = 0:Li054.State = 0
  3709. Collectchimichanga
  3710. End If
  3711. If MechSuitLights(1) = 2 Then 'collect jackpot
  3712. MechSuitLights(1) = 0:Li054.State = 0
  3713. CheckMechSuitMBHits
  3714. End If
  3715. If WeaponLights(CurrentPlayer, 1) = 1 Then 'collect weapon
  3716. WeaponLights(CurrentPlayer, 1) = 0:li045.State = 0
  3717. CheckWeapons
  3718. End If
  3719. If StarLights(1) = 2 Then 'a ninja star is at that position
  3720. StarLights(1) = 0:li054.State = 0
  3721. CheckNinjaStars
  3722. End If
  3723. If bNinjaMB AND NinjaMBLights(1) = 2 Then 'Ninja Multiball
  3724. NinjaMBLights(1) = 0:li054.State = 0
  3725. NinjaMBCheckHits
  3726. End If
  3727. If bLilDPMB AND LilDPHits> 8 AND LilDPLights(1) = 2 Then 'second part of the LilDP multiball
  3728. LilDPCheckHits
  3729. LilDPLights(1) = 0:li054.State = 0
  3730. End If
  3731. If bDiscoLoopsEnabled AND LastSwitchHit = "Trigger005" Then
  3732. Jackpot(CurrentPlayer) = DiscoLoopsValue(CurrentPlayer)
  3733. DiscoLoopsValue(CurrentPlayer) = DiscoLoopsValue(CurrentPlayer) + 150000
  3734. AwardJackpot
  3735. End If
  3736. If ActiveBall.VelY <0 Then 'ball is going up
  3737. Select Case Battle(CurrentPLayer, 0)
  3738. Case 0
  3739. DazzlePower(CurrentPlayer) = DazzlePower(CurrentPlayer) + 1
  3740. CheckDazzler
  3741. Case 1, 4, 6, 7
  3742. If BattleLights(1) = 2 Then PlaySound "sfx_hit2":CheckBattle
  3743. Case 5
  3744. If BattleLights(1) = 2 Then
  3745. PlaySound "sfx_hit2":AwardSuperMegaJackpot:CheckBattle
  3746. ElseIf BattleLights(1) = 1 Then
  3747. li054.State = 0:BattleLights(1) = 0:AwardMegaJackpot
  3748. End If
  3749. End Select
  3750. End If
  3751. ' remember last trigger hit by the ball
  3752. LastSwitchHit = "Trigger010"
  3753. End Sub
  3754.  
  3755. Sub Trigger005_Hit 'right loop
  3756. PlaySoundAt "fx_sensor", Trigger005
  3757. If Tilted Then Exit Sub
  3758. If bSkillshotReady Then
  3759. bRotateLights = False
  3760. Exit Sub
  3761. Else
  3762. Addscore 10000
  3763. End If
  3764. ' check for modes
  3765. If bKatanaramaTime Then
  3766. Addscore KatanaramaValue(CurrentPlayer)
  3767. DMD " KATANARAMA JACKPOT", CL(1, FormatScore(KatanaramaValue(CurrentPlayer))), "", eNone, eBlink, eNone, 1500, True, "vo_jackpot"
  3768. KatanaramaValue(CurrentPlayer) = KatanaramaValue(CurrentPlayer) + 250000
  3769. End If
  3770. If ChimiChangaLights(6) = 2 Then 'if the chimichanga light is on then collect it
  3771. ChimiChangaLights(6) = 0:Li059.State = 0
  3772. CollectChimichanga
  3773. Else 'count the chimichanga hits
  3774. CheckChimichangaHits
  3775. End If
  3776. If MechSuitLights(6) = 2 Then 'collect jackpot
  3777. MechSuitLights(6) = 0:Li059.State = 0
  3778. CheckMechSuitMBHits
  3779. End If
  3780. If WeaponLights(CurrentPlayer, 6) = 1 Then 'collect weapon
  3781. WeaponLights(CurrentPlayer, 6) = 0:li033.State = 0
  3782. CheckWeapons
  3783. End If
  3784. If StarLights(6) = 2 Then 'a ninja star is at that position
  3785. StarLights(6) = 0:li059.State = 0
  3786. CheckNinjaStars
  3787. End If
  3788. If bNinjaMB AND NinjaMBLights(6) = 2 Then 'Ninja Multiball
  3789. NinjaMBLights(6) = 0:li059.State = 0
  3790. NinjaMBCheckHits
  3791. End If
  3792. If bLilDPMB AND LilDPHits> 8 AND LilDPLights(6) = 2 Then 'second part of the LilDP multiball
  3793. LilDPCheckHits
  3794. li059.State = 0:LilDPLights(6) = 0
  3795. End If
  3796. If bDiscoLoopsEnabled AND LastSwitchHit = "Trigger005" Then
  3797. Jackpot(CurrentPlayer) = DiscoLoopsValue(CurrentPlayer)
  3798. DiscoLoopsValue(CurrentPlayer) = DiscoLoopsValue(CurrentPlayer) + 150000
  3799. AwardJackpot
  3800. End If
  3801. Select Case Battle(CurrentPLayer, 0)
  3802. Case 0
  3803. If bSkillshotReady = False Then
  3804. DominoPower(CurrentPlayer) = DominoPower(CurrentPlayer) + 1
  3805. CheckDomino
  3806. End If
  3807. Case 1, 4, 6, 7
  3808. If BattleLights(6) = 2 Then PlaySound "sfx_hit3":CheckBattle
  3809. Case 5
  3810. If BattleLights(6) = 2 Then
  3811. PlaySound "sfx_hit3":AwardSuperMegaJackpot:CheckBattle
  3812. ElseIf BattleLights(6) = 1 Then
  3813. li059.State = 0:BattleLights(6) = 0:AwardMegaJackpot
  3814. End If
  3815. End Select
  3816. ' remember last trigger hit by the ball
  3817. LastSwitchHit = "Trigger005"
  3818. End Sub
  3819.  
  3820. Sub Trigger012_Hit 'left ramp
  3821. PlaySoundAt "fx_sensor", Trigger012
  3822. If Tilted Then Exit Sub
  3823. If bSkillShotReady Then ResetSkillShotTimer_Timer
  3824. Addscore 10000
  3825. ' check for modes
  3826. If bKatanaramaTime Then
  3827. Addscore KatanaramaValue(CurrentPlayer)
  3828. DMD " KATANARAMA JACKPOT", CL(1, FormatScore(KatanaramaValue(CurrentPlayer))), "", eNone, eNone, eNone, 1500, True, "vo_jackpot"
  3829. KatanaramaValue(CurrentPlayer) = KatanaramaValue(CurrentPlayer) + 250000
  3830. ElseIf DiamondLights(CurrentPLayer, 1) = 2 OR DiamondLights(CurrentPLayer, 3) = 2 OR DiamondLights(CurrentPLayer, 5) = 2 Then
  3831. CheckKatanarama
  3832. End If
  3833. If ChimiChangaLights(2) = 2 Then 'collect chimichanga
  3834. ChimiChangaLights(2) = 0:Li057.State = 0
  3835. Collectchimichanga
  3836. End If
  3837. If MechSuitLights(2) = 2 Then 'collect jackpot
  3838. MechSuitLights(2) = 0:Li057.State = 0
  3839. CheckMechSuitMBHits
  3840. End If
  3841. If WeaponLights(CurrentPlayer, 2) = 1 Then 'collect weapon
  3842. WeaponLights(CurrentPlayer, 2) = 0:li028.State = 0
  3843. CheckWeapons
  3844. End If
  3845. If StarLights(2) = 2 Then 'a ninja star is at that position
  3846. StarLights(2) = 0:li057.State = 0
  3847. CheckNinjaStars
  3848. End If
  3849. If bNinjaMB AND NinjaMBLights(2) = 2 Then 'Ninja Multiball
  3850. NinjaMBLights(2) = 0:li057.State = 0
  3851. NinjaMBCheckHits
  3852. End If
  3853. If bLilDPMB AND LilDPHits> 8 AND LilDPLights(2) = 2 Then 'second part of the LilDP multiball
  3854. LilDPCheckHits
  3855. li057.State = 0:LilDPLights(2) = 0
  3856. End If
  3857. If bDiscoMBEnabled AND li057.State = 2 Then
  3858. SuperJackpot(CurrentPlayer) = DiscoSuperJackpot(CurrentPlayer)
  3859. AwardSuperjackpot
  3860. End If
  3861. CheckCombo "Trigger012"
  3862. Select Case Battle(CurrentPLayer, 0)
  3863. Case 1, 2, 4, 6
  3864. If BattleLights(2) = 2 Then PlaySound "sfx_hit4":CheckBattle
  3865. Case 5
  3866. If BattleLights(2) = 2 Then
  3867. PlaySound "sfx_hit4":AwardSuperMegaJackpot:CheckBattle
  3868. ElseIf BattleLights(2) = 1 Then
  3869. li057.State = 0:BattleLights(2) = 0:AwardMegaJackpot
  3870. End If
  3871. End Select
  3872. ' remember last trigger hit by the ball
  3873. LastSwitchHit = "Trigger012"
  3874. End Sub
  3875.  
  3876. Sub Trigger016_Hit 'just a quote trigger
  3877. Playquote
  3878. End Sub
  3879.  
  3880. Sub Trigger013_Hit 'right ramp
  3881. PlaySoundAt "fx_sensor", Trigger013
  3882. If Tilted Then Exit Sub
  3883. If bSkillShotReady Then
  3884. AwardSuperSkillShot
  3885. Else
  3886. Addscore 10000
  3887. End If
  3888. ' check for modes
  3889. If LastSwitchHit = "Target014" Then 'Increase Playfield multiplier
  3890. AddPlayfieldMultiplier 1
  3891. End If
  3892. If bDiscoMBEnabled AND li058.State = 2 Then
  3893. SuperJackpot(CurrentPlayer) = DiscoSuperJackpot(CurrentPlayer)
  3894. AwardSuperjackpot
  3895. End If
  3896. CheckCombo "Trigger013"
  3897. ' remember last trigger hit by the ball
  3898. LastSwitchHit = "Trigger013"
  3899. End Sub
  3900.  
  3901. Sub Trigger014_Hit 'wolverine loop
  3902. PlaySoundAt "fx_sensor", Trigger014
  3903. If Tilted Then Exit Sub
  3904. If bSkillShotReady Then
  3905. AwardSuperSkillShot
  3906. Else
  3907. Addscore 10000
  3908. End If
  3909. ' check for modes
  3910. If ChimiChangaLights(4) = 2 Then 'collect chimichanga
  3911. ChimiChangaLights(4) = 0:Li071.State = 0
  3912. Collectchimichanga
  3913. End If
  3914. If MechSuitLights(4) = 2 Then 'collect jackpot
  3915. MechSuitLights(4) = 0:Li071.State = 0
  3916. CheckMechSuitMBHits
  3917. End If
  3918. If WeaponLights(CurrentPlayer, 4) = 1 Then 'collect weapon
  3919. WeaponLights(CurrentPlayer, 4) = 0:li046.State = 0
  3920. CheckWeapons
  3921. End If
  3922. If StarLights(4) = 2 Then 'a ninja star is at that position
  3923. StarLights(4) = 0:li071.State = 0
  3924. CheckNinjaStars
  3925. End If
  3926. If bNinjaMB AND NinjaMBLights(4) = 2 Then 'Ninja Multiball
  3927. NinjaMBLights(4) = 0:li071.State = 0
  3928. NinjaMBCheckHits
  3929. End If
  3930. If bLilDPMB AND LilDPHits> 8 AND LilDPLights(4) = 2 Then 'second part of the LilDP multiball
  3931. LilDPCheckHits
  3932. li071.State = 0:LilDPLights(4) = 0
  3933. End If
  3934. CheckCombo "Trigger014"
  3935. Select Case Battle(CurrentPLayer, 0)
  3936. Case 0
  3937. WolverinePower(CurrentPlayer) = WolverinePower(CurrentPlayer) + 1
  3938. CheckWolverine
  3939. Case 2, 4, 6, 7
  3940. If BattleLights(4) = 2 Then PlaySound "sfx_hit1":CheckBattle
  3941. Case 5
  3942. If BattleLights(4) = 2 Then
  3943. PlaySound "sfx_hit1":AwardSuperMegaJackpot:CheckBattle
  3944. ElseIf BattleLights(4) = 1 Then
  3945. li071.State = 0:BattleLights(4) = 0:AwardMegaJackpot
  3946. End If
  3947. End Select
  3948. ' remember last trigger hit by the ball
  3949. LastSwitchHit = "Trigger014"
  3950. End Sub
  3951.  
  3952. Sub Trigger015_Hit 'cross shot
  3953. PlaySoundAt "fx_sensor", Trigger015
  3954. If Tilted Then Exit Sub
  3955. Addscore 10000
  3956. ' check for modes
  3957. If bKatanaramaTime Then
  3958. Addscore KatanaramaValue(CurrentPlayer)
  3959. DMD " KATANARAMA JACKPOT", CL(1, FormatScore(KatanaramaValue(CurrentPlayer))), "", eNone, eNone, eNone, 1500, True, "vo_jackpot"
  3960. KatanaramaValue(CurrentPlayer) = KatanaramaValue(CurrentPlayer) + 250000
  3961. ElseIf DiamondLights(CurrentPLayer, 2) = 2 OR DiamondLights(CurrentPLayer, 4) = 2 OR DiamondLights(CurrentPLayer, 6) = 2 Then
  3962. CheckKatanarama
  3963. End If
  3964. If ChimiChangaLights(5) = 2 Then 'collect chimichanga
  3965. ChimiChangaLights(5) = 0:Li058.State = 0
  3966. Collectchimichanga
  3967. End If
  3968. If MechSuitLights(5) = 2 Then 'collect jackpot
  3969. MechSuitLights(5) = 0:Li058.State = 0
  3970. CheckMechSuitMBHits
  3971. End If
  3972. If WeaponLights(CurrentPlayer, 5) = 1 Then 'collect weapon
  3973. WeaponLights(CurrentPlayer, 5) = 0:li032.State = 0
  3974. CheckWeapons
  3975. End If
  3976. If StarLights(5) = 2 Then 'a ninja star is at that position
  3977. StarLights(5) = 0:li058.State = 0
  3978. CheckNinjaStars
  3979. End If
  3980. If bNinjaMB AND NinjaMBLights(5) = 2 Then 'Ninja Multiball
  3981. NinjaMBLights(5) = 0:li058.State = 0
  3982. NinjaMBCheckHits
  3983. End If
  3984. If bLilDPMB AND LilDPHits> 8 AND LilDPLights(5) = 2 Then 'second part of the LilDP multiball
  3985. LilDPCheckHits
  3986. li058.State = 0:LilDPLights(5) = 0
  3987. End If
  3988. Select Case Battle(CurrentPLayer, 0)
  3989. Case 1, 2, 4, 6
  3990. If BattleLights(5) = 2 Then PlaySound "sfx_hit2":CheckBattle
  3991. Case 5
  3992. If BattleLights(5) = 2 Then
  3993. PlaySound "sfx_hit2":AwardSuperMegaJackpot:CheckBattle
  3994. ElseIf BattleLights(5) = 1 Then
  3995. li058.State = 0:BattleLights(5) = 0:AwardMegaJackpot
  3996. End If
  3997. End Select
  3998. End Sub
  3999.  
  4000. '**************
  4001. ' DEAD targets
  4002. '**************
  4003.  
  4004. Sub Target001_Hit 'lower d
  4005. PlaySoundAtBall "fx_target"
  4006. If Tilted Then Exit Sub
  4007. Addscore 1000
  4008. ' check for modes
  4009. StopCombo
  4010. Select Case Battle(CurrentPlayer, 0)
  4011. Case 0 'no battle active
  4012. Dead(CurrentPlayer, 1) = 1
  4013. CheckDead
  4014. Case 1 'Juggernaut
  4015. If LifeLeft(CurrentPlayer, 1)> 6 Then
  4016. Addscore DominoValue
  4017. PlaySound "sfx_hit1"
  4018. CheckBattle
  4019. End If
  4020. End Select
  4021. ' remember last trigger hit by the ball
  4022. LastSwitchHit = "Target001"
  4023. End Sub
  4024.  
  4025. Sub Target002_Hit 'e
  4026. PlaySoundAtBall "fx_target"
  4027. If Tilted Then Exit Sub
  4028. Addscore 1000
  4029. ' check for modes
  4030. StopCombo
  4031. Select Case Battle(CurrentPlayer, 0)
  4032. Case 0 'no battle active
  4033. Dead(CurrentPlayer, 2) = 1
  4034. CheckDead
  4035. Case 1 'Juggernaut
  4036. If LifeLeft(CurrentPlayer, 1)> 6 Then
  4037. Addscore DominoValue
  4038. PlaySound "sfx_hit2"
  4039. CheckBattle
  4040. End If
  4041. End Select
  4042. ' remember last trigger hit by the ball
  4043. LastSwitchHit = "Target002"
  4044. End Sub
  4045.  
  4046. Sub Target003_Hit 'a
  4047. PlaySoundAtBall "fx_target"
  4048. If Tilted Then Exit Sub
  4049. Addscore 1000
  4050. ' check for modes
  4051. StopCombo
  4052. Select Case Battle(CurrentPlayer, 0)
  4053. Case 0 'no battle active
  4054. Dead(CurrentPlayer, 3) = 1
  4055. CheckDead
  4056. Case 1 'Juggernaut
  4057. If LifeLeft(CurrentPlayer, 1)> 6 Then
  4058. Addscore DominoValue
  4059. PlaySound "sfx_hit3"
  4060. CheckBattle
  4061. End If
  4062. End Select
  4063. ' remember last trigger hit by the ball
  4064. LastSwitchHit = "Target003"
  4065. End Sub
  4066.  
  4067. Sub Target004_Hit 'd
  4068. PlaySoundAtBall "fx_target"
  4069. If Tilted Then Exit Sub
  4070. Addscore 1000
  4071. ' check for modes
  4072. StopCombo
  4073. Select Case Battle(CurrentPlayer, 0)
  4074. Case 0 'no battle active
  4075. Dead(CurrentPlayer, 4) = 1
  4076. CheckDead
  4077. Case 1 'Juggernaut
  4078. If LifeLeft(CurrentPlayer, 1)> 6 Then
  4079. Addscore DominoValue
  4080. PlaySound "sfx_hit4"
  4081. CheckBattle
  4082. End If
  4083. End Select
  4084. ' remember last trigger hit by the ball
  4085. LastSwitchHit = "Target004"
  4086. End Sub
  4087.  
  4088. Sub CheckDead
  4089. Dim tmp, i
  4090. tmp = 0
  4091. For i = 1 to 4:tmp = tmp + Dead(CurrentPLayer, i):Next
  4092. If tmp = 2 AND bInfoNeeded2(CurrentPLayer)AND bBattleready = False Then PlaySound "vo_completedeadtargets":bInfoNeeded2(CurrentPLayer) = False
  4093. If tmp = 4 then 'enable Battle at the scoop
  4094. DMD " BATTLE IS READY ", " AT THE HELLHOUSE ", "", eNone, eNone, eNone, 1000, True, "vo_battleislit"
  4095. Flashforms flasher012, 800, 50, 1
  4096. Addscore 250000
  4097. li056.State = 2
  4098. li070.BlinkInterval = 300:li070.State = 2
  4099. bBattleready = True
  4100. 'reset targets
  4101. For i = 1 to 4:Dead(CurrentPLayer, i) = 0:Next
  4102. ' count how many times Pool targets has been all hit
  4103. Pool(CurrentPLayer, 0) = Pool(CurrentPLayer, 0) + 1
  4104. CheckDeadPool
  4105. End If
  4106. End Sub
  4107.  
  4108. '**************
  4109. ' POOL targets
  4110. '**************
  4111.  
  4112. Sub Target005_Hit 'l
  4113. PlaySoundAtBall "fx_target"
  4114. If Tilted Then Exit Sub
  4115. Addscore 1000
  4116. ' check for modes
  4117. StopCombo
  4118. Select Case Battle(CurrentPlayer, 0)
  4119. Case 0 'no battle active
  4120. Pool(CurrentPlayer, 1) = 1
  4121. CheckPool
  4122. Case 1 'Juggernaut
  4123. If LifeLeft(CurrentPlayer, 1)> 6 Then
  4124. Addscore DominoValue
  4125. PlaySound "sfx_hit1"
  4126. CheckBattle
  4127. End If
  4128. End Select
  4129. ' remember last trigger hit by the ball
  4130. LastSwitchHit = "Target005"
  4131. End Sub
  4132.  
  4133. Sub Target006_Hit 'lower o
  4134. PlaySoundAtBall "fx_target"
  4135. If Tilted Then Exit Sub
  4136. Addscore 1000
  4137. ' check for modes
  4138. StopCombo
  4139. Select Case Battle(CurrentPlayer, 0)
  4140. Case 0 'no battle active
  4141. Pool(CurrentPlayer, 2) = 1
  4142. CheckPool
  4143. Case 1 'Juggernaut
  4144. If LifeLeft(CurrentPlayer, 1)> 6 Then
  4145. Addscore DominoValue
  4146. PlaySound "sfx_hit2"
  4147. CheckBattle
  4148. End If
  4149. End Select
  4150. ' remember last trigger hit by the ball
  4151. LastSwitchHit = "Target006"
  4152. End Sub
  4153.  
  4154. Sub Target007_Hit 'o
  4155. PlaySoundAtBall "fx_target"
  4156. If Tilted Then Exit Sub
  4157. Addscore 1000
  4158. ' check for modes
  4159. StopCombo
  4160. Select Case Battle(CurrentPlayer, 0)
  4161. Case 0 'no battle active
  4162. Pool(CurrentPlayer, 3) = 1
  4163. CheckPool
  4164. Case 1 'Juggernaut
  4165. If LifeLeft(CurrentPlayer, 1)> 6 Then
  4166. Addscore DominoValue
  4167. PlaySound "sfx_hit3"
  4168. CheckBattle
  4169. End If
  4170. End Select
  4171. ' remember last trigger hit by the ball
  4172. LastSwitchHit = "Target007"
  4173. End Sub
  4174.  
  4175. Sub Target008_Hit 'p
  4176. PlaySoundAtBall "fx_target"
  4177. If Tilted Then Exit Sub
  4178. Addscore 1000
  4179. ' check for modes
  4180. StopCombo
  4181. Select Case Battle(CurrentPlayer, 0)
  4182. Case 0 'no battle active
  4183. Pool(CurrentPlayer, 4) = 1
  4184. CheckPool
  4185. Case 1 'Juggernaut
  4186. If LifeLeft(CurrentPlayer, 1)> 6 Then
  4187. Addscore DominoValue
  4188. PlaySound "sfx_hit4"
  4189. CheckBattle
  4190. End If
  4191. End Select
  4192. ' remember last trigger hit by the ball
  4193. LastSwitchHit = "Target008"
  4194. End Sub
  4195.  
  4196. Sub CheckPool
  4197. Dim tmp, i
  4198. tmp = 0
  4199. For i = 1 to 4:tmp = tmp + Pool(CurrentPLayer, i):Next
  4200. If tmp = 2 AND bInfoNeeded3(CurrentPLayer)AND bLockEnabled = False Then PlaySound "vo_completepool-lock":bInfoNeeded3(CurrentPLayer) = False
  4201. If tmp = 4 then 'enable Lock again
  4202. Addscore 250000
  4203. If bLockEnabled = False Then
  4204. DMD "", "", "d_lockislit", eNone, eNone, eBlink, 1500, True, "vo_lockislit"
  4205. bLockEnabled = True
  4206. SwordEffect 1
  4207. End If
  4208. 'reset targets
  4209. For i = 1 to 4:Pool(CurrentPLayer, i) = 0:Next
  4210. ' count how many times Pool targets has been all hit
  4211. Pool(CurrentPLayer, 0) = Pool(CurrentPLayer, 0) + 1
  4212. CheckDeadPool
  4213. End if
  4214. End Sub
  4215.  
  4216. Sub CheckDeadPool 'all targets has been hit
  4217. IF Dead(CurrentPlayer, 0) = 1 OR Pool(CurrentPLayer, 0) = 1 AND bInfoNeeded4(CurrentPLayer)Then bInfoNeeded4(CurrentPLayer) = False:vpmtimer.addtimer 3000, "PlaySound ""vo_completedptargets-mystery"" '"
  4218. IF Dead(CurrentPlayer, 0) = 2 OR Pool(CurrentPLayer, 0) = 2 AND bInfoNeeded5(CurrentPLayer)Then bInfoNeeded5(CurrentPLayer) = False:vpmtimer.addtimer 3000, "PlaySound ""vo_completedptargets-regenerate"" '"
  4219. IF Dead(CurrentPlayer, 0)> 2 AND Pool(CurrentPLayer, 0)> 2 Then
  4220. 'regeneration light
  4221. DMD "_", " REGENERATE IS LIT", "", eNone, eNone, eNone, 1500, True, "vo_regenerateislit"
  4222. li075.State = 1
  4223. ' and reset the counter
  4224. Dead(CurrentPlayer, 0) = 0
  4225. Pool(CurrentPlayer, 0) = 0
  4226. ElseIf Dead(CurrentPlayer, 0)> 1 AND Pool(CurrentPLayer, 0)> 1 Then
  4227. 'enable Mystery light
  4228. DMD "_", " MYSTERY IS LIT", "", eNone, eNone, eNone, 1500, True, "vo_mysteryislit"
  4229. li037.State = 1
  4230. End If
  4231. End Sub
  4232.  
  4233. '*********************
  4234. ' Lil Deadpool targets
  4235. '*********************
  4236.  
  4237. Sub Target009_Dropped 'lil drop 1
  4238. PlaySoundAt "fx_droptarget", Target009
  4239. If Tilted Then Exit Sub
  4240. Addscore 1000
  4241. 'drop down also the right droptarget to avoid ball getting stuck
  4242. Target011.IsDropped = 1
  4243. li036.State = 0
  4244. li034.State = 0
  4245. ' check for modes
  4246. StopCombo
  4247. setlightcolor li044, blue, 2
  4248. setlightcolor li044a, blue, 2
  4249. If bLilDPMB then
  4250. DropDownTargets
  4251. setlightcolor li044, red, 2
  4252. setlightcolor li044a, red, 2
  4253. End If
  4254. ' remember last trigger hit by the ball
  4255. LastSwitchHit = "Target009"
  4256. End Sub
  4257.  
  4258. Sub Target010_Dropped 'lil drop 2
  4259. PlaySoundAt "fx_droptarget", Target010
  4260. If Tilted Then Exit Sub
  4261. Addscore 1000
  4262. 'drop down also the right droptarget to avoid ball getting stuck
  4263. Target011.IsDropped = 1
  4264. li035.State = 0
  4265. li034.State = 0
  4266. ' check for modes
  4267. StopCombo
  4268. setlightcolor li044, blue, 2
  4269. setlightcolor li044a, blue, 2
  4270. If bLilDPMB then
  4271. DropDownTargets
  4272. setlightcolor li044, red, 2
  4273. setlightcolor li044a, red, 2
  4274. End If
  4275. ' remember last trigger hit by the ball
  4276. LastSwitchHit = "Target010"
  4277. End Sub
  4278.  
  4279. Sub Target011_Dropped 'lil drop 3
  4280. PlaySoundAt "fx_droptarget", Target011
  4281. If Tilted Then Exit Sub
  4282. Addscore 1000
  4283. li034.State = 0
  4284. ' check for modes
  4285. StopCombo
  4286. setlightcolor li044, blue, 2
  4287. setlightcolor li044a, blue, 2
  4288. If bLilDPMB then
  4289. DropDownTargets
  4290. setlightcolor li044, red, 2
  4291. setlightcolor li044a, red, 2
  4292. End If
  4293. ' remember last trigger hit by the ball
  4294. LastSwitchHit = "Target011"
  4295. End Sub
  4296.  
  4297. Sub ResetDropTargets
  4298. ' PlaySoundAt "fx_resetdrop", Target010
  4299. PlaySoundAt SoundFXDOF("fx_resetdrop", 119, DOFPulse, DOFcontactors), Target010
  4300. Target009.IsDropped = 0
  4301. Target010.IsDropped = 0
  4302. Target011.IsDropped = 0
  4303. li034.State = 2:li035.State = 2:li036.State = 2 'lilDP
  4304. li044a.State = 0:li044.State = 0
  4305. End Sub
  4306.  
  4307. Sub DropDownTargets 'after the hurry up timer or after the first hit to release the trapped ball
  4308. Target009.IsDropped = 1
  4309. Target010.IsDropped = 1
  4310. Target011.IsDropped = 1
  4311. li034.State = 2:li035.State = 2:li036.State = 2 'lilDP
  4312. LilDPTimer.Enabled = 0
  4313. End Sub
  4314.  
  4315. Sub Target012_Hit 'lil DP Stand up target
  4316. PlaySoundAtBall "fx_target"
  4317. If Tilted Then Exit Sub
  4318. If Spots.Enabled = 0 Then FlashForms spot1, 1000, 50, 0:FlashForms spot2, 1000, 50, 0
  4319. Addscore 10000
  4320. ' check for modes
  4321. StopCombo
  4322. If LilDPHits <10 Then LilDPCheckHits
  4323. lilshake activeball.velY
  4324. ' remember last trigger hit by the ball
  4325. LastSwitchHit = "Target012"
  4326. End Sub
  4327.  
  4328. '***********************
  4329. 'Lil Deadpool Multiball
  4330. '***********************
  4331. ' variabes used bLilDPMB, LilDPHits and LilDPHitsNeeded(4), LilDPJackpot(4)
  4332.  
  4333. Sub LilDPTimer_Timer 'hurry up timer
  4334. LilDPJackpot(CurrentPlayer) = LilDPJackpot(CurrentPlayer)- 5000 * LilDPHitsNeeded(CurrentPlayer)
  4335. If LilDPJackpot(CurrentPlayer) = 250000 Then PlaySound "vo_lildp_multibal"
  4336. If LilDPJackpot(CurrentPlayer) <= 100000 Then
  4337. PlaySound "vo_lildp_timeup"
  4338. LilDPJackpot(CurrentPlayer) = 100000
  4339. Me.Enabled = 0
  4340. DropdownTargets
  4341. End If
  4342. End Sub
  4343.  
  4344. Sub LilDPCheckHits
  4345. LilDPHits = LilDPHits + 1
  4346. ' debug.print LilDPHits
  4347. If LilDPHits <LilDPHitsNeeded(CurrentPlayer)Then
  4348. Select Case RndNbr(6)
  4349. Case 1:PlaySound "vo_lildp_hit1"
  4350. Case 2:PlaySound "vo_lildp_hit2"
  4351. Case 3:PlaySound "vo_lildp_hit3"
  4352. Case 4:PlaySound "vo_lildp_hit4"
  4353. Case 5:PlaySound "vo_lildp_taunt1"
  4354. Case 6:PlaySound "vo_lildp_taunt2"
  4355. End Select
  4356. lighteffect 4
  4357. setlightcolor li044, blue, 2
  4358. setlightcolor li044a, blue, 2
  4359. Exit Sub
  4360. End If
  4361.  
  4362. If LilDPHits = LilDPHitsNeeded(CurrentPlayer)Then
  4363. Select Case RndNbr(6)
  4364. Case 1:PlaySound "vo_lildp_hit1"
  4365. Case 2:PlaySound "vo_lildp_hit2"
  4366. Case 3:PlaySound "vo_lildp_hit3"
  4367. Case 4:PlaySound "vo_lildp_hit4"
  4368. Case 5:PlaySound "vo_lildp_taunt1"
  4369. Case 6:PlaySound "vo_lildp_taunt2"
  4370. End Select
  4371. lighteffect 4
  4372. setlightcolor li044, green, 2
  4373. setlightcolor li044a, green, 2
  4374. Else
  4375.  
  4376. Select Case LilDPHits
  4377. Case 2, 3, 4 'start multiball
  4378. lighteffect 4:PlaySfx
  4379. LilDPHits = 4 'to compensate for required hits 1 or 2
  4380. DMD " LIL DEADPOOL ", " MULTIBALL ", "d_lildpmb", eNone, eNone, eNone, 1500, True, "vo_lildpmb"
  4381. ResetDroptargets
  4382. AddMultiball 1
  4383. bLilDPMB = True
  4384. LilDPJackpot(CurrentPlayer) = 500000 * LilDPHitsNeeded(CurrentPlayer)
  4385. LilDPHitsNeeded(CurrentPlayer) = LilDPHitsNeeded(CurrentPlayer) + 1
  4386. If LilDPHitsNeeded(CurrentPlayer)> 4 Then LilDPHitsNeeded(CurrentPlayer) = 4
  4387. LilDPTimer.Interval = 250 + DazzlerValue * 10
  4388. LilDPTimer.Enabled = 1
  4389. setlightcolor li044, red, 2
  4390. setlightcolor li044a, red, 2
  4391. Case 5, 6, 7, 8 '5 jackpots at the LilDP target
  4392. setlightcolor li044, red, 2
  4393. setlightcolor li044a, red, 2
  4394. lighteffect 4:PlaySfx
  4395. Jackpot(CurrentPLayer) = LilDPJackpot(CurrentPlayer)
  4396. AwardJackpot
  4397. Case 9
  4398. lighteffect 4:PlaySfx
  4399. Jackpot(CurrentPLayer) = LilDPJackpot(CurrentPlayer)
  4400. AwardJackpot
  4401. 'stop the lights at the lilDP target and start the arrow light jackpots
  4402. li034.State = 0:li035.State = 0:li036.State = 0 'lilDP
  4403. li044a.State = 0:li044.State = 0
  4404. 'arrow lights
  4405. For x = 1 to 6:LilDPLights(x) = 2:Next
  4406. Case 10, 11, 12, 13 '5 jackpots
  4407. Jackpot(CurrentPLayer) = LilDPJackpot(CurrentPlayer)
  4408. AwardJackpot
  4409. Case 14 'last jackpot and enabled hurry up on the spinners
  4410. Jackpot(CurrentPLayer) = LilDPJackpot(CurrentPlayer)
  4411. AwardJackpot
  4412. For x = 1 to 6:LilDPLights(x) = 0:Next
  4413. li054.State = 0
  4414. li057.State = 0
  4415. li055.State = 0
  4416. li071.State = 0
  4417. li058.State = 0
  4418. li059.State = 0
  4419. LilDPLights(1) = 2
  4420. LilDPLights(4) = 2
  4421. LilDPSpinner.Interval = 20000 + dazzlerValue * 1000
  4422. LilDPSpinner.Enabled = 1
  4423. Case 15 'called after the hurry up spinner timer is out
  4424. setlightcolor li044, red, 2
  4425. setlightcolor li044a, red, 2
  4426. LilDPHits = 4
  4427. AddPlayFieldMultiplier 1
  4428. End Select
  4429. End If
  4430. End Sub
  4431.  
  4432. Sub StopLilDPMB 'end of LilDP multiball
  4433. LilDPHits = 0
  4434. bLilDPMB = False
  4435. 'LilDPTimer.Enabled = 0
  4436. LilDPSpinner.Enabled = 0
  4437. For x = 1 to 6:LilDPLights(x) = 0:Next
  4438. li054.State = 0
  4439. li057.State = 0
  4440. li055.State = 0
  4441. li071.State = 0
  4442. li058.State = 0
  4443. li059.State = 0
  4444. End Sub
  4445.  
  4446. Sub LilDPSpinner_Timer
  4447. Me.Enabled = 0
  4448. For x = 1 to 6:LilDPLights(x) = 0:Next
  4449. li054.State = 0
  4450. li057.State = 0
  4451. li055.State = 0
  4452. li071.State = 0
  4453. li058.State = 0
  4454. li059.State = 0
  4455. LilDPCheckHits 'go to the next step in LilDP multiball
  4456. End Sub
  4457.  
  4458. '***********************
  4459. 'Lil Deadpool animation
  4460. ' (simple jiggle)
  4461. '***********************
  4462.  
  4463. Sub lilshake(strength)
  4464. lilPos = strength
  4465. lilshakeTimer.Enabled = True
  4466. End Sub
  4467.  
  4468. Sub lilshakeTimer_Timer()
  4469. lildp.Transy = lilPos
  4470. If lilPos = 0 Then Me.Enabled = False:Exit Sub
  4471. If lilPos <0 Then
  4472. lilPos = ABS(lilPos)- 0.1
  4473. Else
  4474. lilPos = - lilPos + 0.1
  4475. End If
  4476. End Sub
  4477.  
  4478. '***************
  4479. ' other targets
  4480. '***************
  4481.  
  4482. Sub Target013_Hit 'colossal jackpot
  4483. PlaySoundAtBall "fx_target"
  4484. If Tilted Then Exit Sub
  4485. ' check for modes
  4486. StopCombo
  4487. If li069.State = 2 Then
  4488. li069.State = 0
  4489. SuperJackpot(CurrentPLayer) = Score(CurrentPlayer) * 0.5 ' 20% of the score
  4490. AwardSuperJackpot
  4491. Else
  4492. Addscore 50000
  4493. End If
  4494. ' remember last trigger hit by the ball
  4495. LastSwitchHit = "Target013"
  4496. End Sub
  4497.  
  4498. Sub Target014_Hit 'snitch
  4499. PlaySoundAtBall "fx_target"
  4500. If Tilted Then Exit Sub
  4501. Addscore 1000
  4502. ' check for modes
  4503. StopCombo
  4504. ' remember last trigger hit by the ball
  4505. LastSwitchHit = "Target014"
  4506. End Sub
  4507.  
  4508. '**********
  4509. ' spinners
  4510. '**********
  4511.  
  4512. Sub Spinner001_Spin 'dazzler
  4513. PlaySoundAt "fx_spinner", Spinner001
  4514. If Tilted Then Exit Sub
  4515. If bBerserker Then
  4516. Addscore BerserkerValue(CurrentPlayer)
  4517. BerserkerValue(CurrentPlayer) = BerserkerValue(CurrentPlayer) + 10000
  4518. Else
  4519. Addscore 1000
  4520. CheckBerserker 'check for the number of hits to start Berserker rage
  4521. End If
  4522. If bLilDPMB AND LilDPHits> 14 Then 'second part of the LilDP multiball
  4523. Addscore 500000
  4524. End If
  4525. If bDiscoEnabled = False Then 'count the spins when not in Disco Mode
  4526. LeftSpinnerCount(CurrentPlayer) = LeftSpinnerCount(CurrentPlayer) + 1
  4527. CheckDisco
  4528. End If
  4529. If bDiscoMBEnabled Then 'increase the Disco Super Jackpot
  4530. DiscoSuperJackpot(CurrentPlayer) = DiscoSuperJackpot(CurrentPlayer) + 100000
  4531. DMD " DISCO SUPERJACKPOT", CL(1, "IS " &FormatScore(DiscoSuperJackpot(CurrentPlayer))), "", eNone, eNone, eNone, 1000, True, ""
  4532. ExchangeRampLights
  4533. End if
  4534. End Sub
  4535.  
  4536. Sub Spinner002_Spin 'wolverine
  4537. PlaySoundAt "fx_spinner", Spinner002
  4538. If Tilted Then Exit Sub
  4539. If bBerserker Then
  4540. Addscore BerserkerValue(CurrentPlayer)
  4541. BerserkerValue(CurrentPlayer) = BerserkerValue(CurrentPlayer) + 10000
  4542. Else
  4543. Addscore 1000
  4544. CheckBerserker 'check for the number of hits to start Berserker rage
  4545. End If
  4546. If bLilDPMB AND LilDPHits> 14 Then 'second part of the LilDP multiball
  4547. Addscore 500000
  4548. End If
  4549. If bDiscoMBEnabled Then 'increase the Disco Super Jackpot
  4550. DiscoSuperJackpot(CurrentPlayer) = DiscoSuperJackpot(CurrentPlayer) + 100000
  4551. DMD "_", CL(1, FormatScore(DiscoSuperJackpot(CurrentPlayer))), "", eNone, eNone, eNone, 1000, True, ""
  4552. ExchangeRampLights
  4553. End if
  4554. Select Case Battle(CurrentPlayer, 0)
  4555. Case 2 'Mystique
  4556. Addscore DominoValue
  4557. End Select
  4558. End Sub
  4559.  
  4560. Sub ExchangeRampLights
  4561. Dim tmp
  4562. tmp = Li057.State
  4563. li057.State = Li058.State
  4564. Li058.State = tmp
  4565. End Sub
  4566.  
  4567. '****************
  4568. ' Top lane Gates
  4569. '****************
  4570.  
  4571. Sub OpenGates
  4572. PlaySoundAt "fx_SolenoidOn", gate3
  4573. gate3.open = True
  4574. gate4.open = True
  4575. End Sub
  4576.  
  4577. Sub CloseGates
  4578. PlaySoundAt "fx_SolenoidOff", gate3
  4579. gate3.open = False
  4580. gate4.open = False
  4581. End Sub
  4582.  
  4583. '*****************
  4584. ' Hell House
  4585. '*****************
  4586.  
  4587. Sub HellHouse_Hit
  4588. PlaySoundAt "fx_hole_enter", HellHouse
  4589. If bSkillShotReady Then ResetSkillShotTimer_Timer
  4590. ' check for modes
  4591. StopCombo
  4592. Addscore 25000
  4593. HellHouse.destroyball
  4594. BallsinHole = BallsInHole + 1
  4595. li056.State = 0
  4596. Flashforms flasher012, 800, 50, 0
  4597. ' check modes
  4598. If bMechSuitMBSJackpot Then
  4599. SuperJackpot(CurrentPLayer) = MechMBJackpot(CurrentPlayer) * 6
  4600. AwardSuperJackpot
  4601. MechMBJackpot(CurrentPlayer) = MechMBJackpot(CurrentPlayer) + 1000000 'increase by 1 million
  4602. ContinueMechSuitMB
  4603. Exit Sub
  4604. End If
  4605. If bMechSuitMBLight(CurrentPlayer)Then 'Start Mech Suit Multiball
  4606. StartMechSuitMB
  4607. Exit Sub
  4608. End If
  4609. If bBattleReady AND bMechSuitMBStarted = False then
  4610. StartChooseBattle 'choose battle will kick out the ball after choosing a battle
  4611. bBattleReady = False
  4612. PlaySong "mu_shooterlane"
  4613. Exit Sub
  4614. End If
  4615. If bEndBattleJackpot Then
  4616. bEndBattleJackpot = False
  4617. Jackpot(CurrentPLayer) = 3000000:AwardJackpot
  4618. End If
  4619. If li041.State Then 'weapon jackpot
  4620. li041.State = 0
  4621. DMD CL(0, "WEAPONS JACKPOT"), CL(1, "1 MILLION"), "", eNone, eBlink, eNone, 2000, True, "fanfare"
  4622. Addscore 1000000
  4623. RelitWeapons
  4624. End If
  4625. If li038.State Then 'extra ball
  4626. li038.State = 0
  4627. AwardExtraBall
  4628. End If
  4629. If li037.State Then 'mystery
  4630. li037.State = 0
  4631. StartMystery
  4632. Exit Sub 'mystery will kick the ball out after it is finished
  4633. End If
  4634. ' Nothing left to do, so kick out the ball
  4635. Flashforms li070, 1500, 50, 0
  4636. vpmtimer.addtimer 1500, "kickBallOut '"
  4637. End Sub
  4638.  
  4639. Sub kickBallOut
  4640. If BallsinHole> 0 Then
  4641. BallsinHole = BallsInHole - 1
  4642. ' PlaySoundAt "fx_popper", HellHouse
  4643. PlaySoundAt SoundFXDOF("fx_popper", 111, DOFPulse, DOFcontactors), HellHouse
  4644. HellHouse.CreateSizedBallWithMass BallSize / 2, BallMass
  4645. HellHouse.kick 164, 30, 1
  4646. Flashforms li070, 500, 50, 0
  4647. Flashforms flasher012, 500, 50, 0
  4648. vpmtimer.addtimer 350, "kickBallOut '"
  4649. End If
  4650. End Sub
  4651.  
  4652. '************************
  4653. ' DISCO lights & Modes
  4654. '************************
  4655. Sub StartDisco
  4656. discolight.visible = 1
  4657. DiscoTimer.Enabled = 1
  4658. bDiscoEnabled = True
  4659. End Sub
  4660.  
  4661. Sub StopDisco
  4662. discolight.visible = 0
  4663. DiscoTimer.Enabled = 0
  4664. bDiscoEnabled = False
  4665. End Sub
  4666.  
  4667. Sub DiscoTimer_Timer
  4668. discoball.rotz = (discoball.rotz + 1)mod 360
  4669. discolight.rotz = (discolight.rotz + 1)mod 360
  4670. End Sub
  4671.  
  4672. Sub CheckDisco
  4673. Select Case LeftSpinnerCount(CurrentPlayer)
  4674. Case 50 'Disco Loops
  4675. DMD "_", CL(1, "DISCO LOOPS"), "", eNone, eNone, eNone, 1500, True, "vo_discoloops"
  4676. StartDisco
  4677. StartSpots
  4678. OpenGates
  4679. DiscoLoopsTimer.Interval = 20000 + DazzlerValue * 1000
  4680. DiscoLoopsTimer.Enabled = 1
  4681. bDiscoLoopsEnabled = True
  4682. ChangeSong
  4683. li053.State = 2
  4684. Case 100 'Disco MB
  4685. DMD "_", CL(1, "DISCO MULTIBALL"), "", eNone, eNone, eNone, 1500, True, "vo_discoloops"
  4686. LeftSpinnerCount(CurrentPlayer) = 0 'and start again counting towards Disco Loops
  4687. StartDisco
  4688. StartSpots
  4689. bDiscoMBEnabled = True
  4690. ChangeSong
  4691. li053.State = 2
  4692. SetlightColor li057, red, 2
  4693. SetlightColor li058, red, 0
  4694. AddMultiball 1
  4695. End Select
  4696. End Sub
  4697.  
  4698. Sub DiscoLoopsTimer_Timer 'the discolopp is over
  4699. DiscoLoopsTimer.Enabled = 0
  4700. StopDisco
  4701. StopSpots
  4702. bDiscoLoopsEnabled = False
  4703. ChangeSong
  4704. If Battle(CurrentPlayer, 0) = 3 OR Battle(CurrentPlayer, 0) = 0 Then CloseGates 'Sabretooth because of the bumpers
  4705. li053.State = 0
  4706. End Sub
  4707.  
  4708. Sub StopDiscoMB 'stop the Disco Multiball
  4709. StopDisco
  4710. StopSpots
  4711. bDiscoMBEnabled = False
  4712. ChangeSong
  4713. li053.State = 0
  4714. li057.State = 0
  4715. li058.State = 0
  4716. End Sub
  4717.  
  4718. '**************
  4719. ' SWORD
  4720. '***************
  4721.  
  4722. Sub SwordEffect(n)
  4723. Select Case n
  4724. Case 0 ' all off
  4725. For each x in aSwordLights:x.State = 0:Next
  4726. Case 1 'updown ball lock activated
  4727. For each x in aSwordLights:x.BlinkInterval = 250:x.BlinkPattern = 10:x.State = 2:Next
  4728. Case 2 'all blink when a ball is locked
  4729. LightSeqSword.UpdateInterval = 20
  4730. LightSeqSword.Play SeqRandom, 7, , 1000
  4731. Case 3 'top down eject balls
  4732. LightSeqSword.UpdateInterval = 8
  4733. LightSeqSword.Play SeqDownOn, 7, 1
  4734. Case 4
  4735. li062.BlinkPattern = "000000100000"
  4736. li063.BlinkPattern = "000001010000"
  4737. li064.BlinkPattern = "000010001000"
  4738. li065.BlinkPattern = "000100000100"
  4739. li066.BlinkPattern = "001000000010"
  4740. li067.BlinkPattern = "010000000001"
  4741. li068.BlinkPattern = "100000000000"
  4742. For each x in aSwordLights:x.BlinkInterval = 125:x.State = 2:Next
  4743. End Select
  4744. End Sub
  4745.  
  4746. '*******************
  4747. ' Rotate Lane Lights
  4748. '*******************
  4749. ' BAM! lights and BOOM lights
  4750.  
  4751. Sub RotateLaneLights(n) 'n is the direction, 1 or 0, left or right
  4752. Dim tmp
  4753. If bRotateLights Then
  4754. If n = 1 Then
  4755. tmp = li049.State
  4756. li049.State = li050.State
  4757. li050.State = li051.State
  4758. li051.State = li052.State
  4759. li052.State = tmp
  4760. tmp = li006.State
  4761. li006.State = li014.State
  4762. li014.State = li015.State
  4763. li015.State = li016.State
  4764. li016.State = tmp
  4765. 'rotate the Boom array too
  4766. tmp = Boom(CurrentPlayer, 1)
  4767. Boom(CurrentPlayer, 1) = Boom(CurrentPlayer, 2)
  4768. Boom(CurrentPlayer, 2) = Boom(CurrentPlayer, 3)
  4769. Boom(CurrentPlayer, 3) = Boom(CurrentPlayer, 4)
  4770. Boom(CurrentPlayer, 4) = tmp
  4771. Else
  4772. tmp = li052.State
  4773. li052.State = li051.State
  4774. li051.State = li050.State
  4775. li050.State = li049.State
  4776. li049.State = tmp
  4777. tmp = li016.State
  4778. li016.State = li015.State
  4779. li015.State = li014.State
  4780. li014.State = li006.State
  4781. li006.State = tmp
  4782. 'rotate the Boom array too
  4783. tmp = Boom(CurrentPlayer, 4)
  4784. Boom(CurrentPlayer, 4) = Boom(CurrentPlayer, 3)
  4785. Boom(CurrentPlayer, 3) = Boom(CurrentPlayer, 2)
  4786. Boom(CurrentPlayer, 2) = Boom(CurrentPlayer, 1)
  4787. Boom(CurrentPlayer, 1) = tmp
  4788. End If
  4789. End If
  4790. End Sub
  4791.  
  4792. Sub UpdateGates(n) '1 is open 0 is closed
  4793. If bskillshotready then
  4794. Gate3.Open = n
  4795. Gate4.Open = n
  4796. End If
  4797. End Sub
  4798.  
  4799. '*********************
  4800. ' BATTLES
  4801. '*********************
  4802. ' Battles((CurrentPlayer), x) = value
  4803. ' x being from 1 to 7, this is 7 battles
  4804. ' x = 0 current running battle number
  4805. ' values 0: not started, 1 finished, 2 ready to start
  4806. ' 7 Battles
  4807. ' 5 Battles to choose
  4808. ' complete 3 to battle Sauron
  4809. ' complete 5 to battle Mr.Sinister
  4810.  
  4811. Sub StartChooseBattle
  4812. DMD " CHOOSE YOUR BATTLE", "", "", eNone, eNone, eNone, 2000, True, "vo_chooseyourbattle"
  4813. bChooseBattle = True
  4814. If BattlesWon(CurrentPlayer)> 2 Then BattlesToChoose = 6
  4815. If BattlesWon(CurrentPlayer)> 5 Then BattlesToChoose = 7
  4816. vpmtimer.addtimer 2000, "UpdateDMDBattle '"
  4817. End Sub
  4818.  
  4819. Sub ChooseBattle(keycode) '5 first battles
  4820. If(keycode = PlungerKey OR keycode = StartGameKey)AND LifeLeft(CurrentPlayer, Battlenr)> 0 Then
  4821. bChooseBattle = False
  4822. StartBattle Battlenr
  4823. End If
  4824. If keycode = LeftFlipperKey Then
  4825. Battlenr = (Battlenr - 1)
  4826. If Battlenr <1 Then Battlenr = BattlesToChoose
  4827. UpdateDMDBattle
  4828. End If
  4829. If keycode = RightFlipperKey Then
  4830. Battlenr = (Battlenr + 1)
  4831. If Battlenr> BattlesToChoose Then Battlenr = 1
  4832. UpdateDMDBattle
  4833. End If
  4834. End Sub
  4835.  
  4836. Sub UpdateDMDBattle
  4837. Dim tmp
  4838. tmp = ShowLife(LifeLeft(CurrentPlayer, Battlenr))
  4839. Select Case Battlenr
  4840. Case 1:DMDFlush:DMD " JUGGERNAUT", tmp, "d_juggernaut", eNone, eNone, eNone, 10000, True, "vo_juggernaut"
  4841. case 2:DMDFlush:DMD " MYSTIQUE", tmp, "d_mystique", eNone, eNone, eNone, 10000, True, "vo_mystique"
  4842. Case 3:DMDFlush:DMD " SABRETOOTH", tmp, "d_sabretooth", eNone, eNone, eNone, 10000, True, "vo_sabretooth"
  4843. Case 4:DMDFlush:DMD " T-REX", tmp, "d_trex", eNone, eNone, eNone, 10000, True, "vo_trex"
  4844. Case 5:DMDFlush:DMD " MEGALODON", tmp, "d_megalodon", eNone, eNone, eNone, 10000, True, "vo_megalodon"
  4845. Case 6:DMDFlush:DMD " SAURON", tmp, "d_sauron", eNone, eNone, eNone, 10000, True, "vo_sauron"
  4846. Case 7:DMDFlush:DMD " MR-SINISTER", tmp, "d_mrsinister", eNone, eNone, eNone, 10000, True, "vo_mrsinister"
  4847. End Select
  4848. End Sub
  4849.  
  4850. Sub StartBattle(n)
  4851. DMDFlush
  4852. TurnOffTeamUpLights
  4853. Battle(CurrentPlayer, 0) = n
  4854. Battle(CurrentPlayer, n) = 2 '0 battle not started, 1 battle finished, 2 battle started
  4855. If bFirstBattle(CurrentPlayer)Then
  4856. AttackPower = 1
  4857. Else
  4858. AttackPower = 0.5 'the battles are now double as hard to complete
  4859. End If
  4860. TurnOffArrows
  4861. ChangeSong
  4862. Select Case Battle(CurrentPlayer, 0)
  4863. Case 1 'Juggernaut
  4864. DMD " SHOOT DP TARGETS", "TO ATTACK JUGGERNAUT", "d_juggernaut", eNone, eNone, eNone, 3000, True, "vo_shootflashingshots"
  4865. If LifeLeft(CurrentPlayer, 1)> 6 Then
  4866. LightSeqDPtargets.Play SeqRandom, 40, , 4000
  4867. Else
  4868. BattleLights(2) = 2:BattleLights(5) = 2
  4869. End If
  4870. Flasher003.visible = 1
  4871. OpenGates
  4872. Case 2 'Mystique
  4873. DMD " SHOOT WHITE SHOTS", " TO ATTACK MYSTIQUE", "d_mystique", eNone, eNone, eNone, 3000, True, "vo_shoot-mystique"
  4874. BattleLights(4) = 2
  4875. Flasher004.visible = 1
  4876. OpenGates
  4877. Case 3 'Sabretooth
  4878. DMD " SHOOT POP BUMPERS", "TO ATTACK SABRETOOTH", "d_sabretooth", eNone, eNone, eNone, 3000, True, "vo_shoot-sabretooth"
  4879. BattleLights(1) = 2:BattleLights(6) = 2
  4880. li001.State = 2
  4881. Flasher005.visible = 1
  4882. CloseGates
  4883. Case 4 'T-Rex
  4884. DMD " SHOOT GREEN SHOTS", " TO ATTACK T-REX", "d_trex", eNone, eNone, eNone, 3000, True, "vo_shootgreenshots-trex"
  4885. Select case RndNbr(6)
  4886. Case 1:BattleLights(1) = 2:BattleLights(2) = 2
  4887. Case 2:BattleLights(2) = 2:BattleLights(4) = 2
  4888. Case 3:BattleLights(4) = 2:BattleLights(5) = 2
  4889. Case 4:BattleLights(5) = 2:BattleLights(6) = 2
  4890. Case 5:BattleLights(6) = 2:BattleLights(3) = 2
  4891. Case 6:BattleLights(3) = 2:BattleLights(1) = 2
  4892. End Select
  4893. Flasher002.visible = 1
  4894. OpenGates
  4895. Case 5 'Megalodon
  4896. DMD " SHOOT RED SHOTS", " TO ATTACK MEGALODON", "d_megalodon", eNone, eNone, eNone, 3000, True, "vo_shootflashingshots"
  4897. For each x in aArrows
  4898. SetLightColor x, blue, 1
  4899. Next
  4900. BattleLights(1) = 1
  4901. BattleLights(2) = 1
  4902. BattleLights(3) = 1
  4903. BattleLights(4) = 1
  4904. BattleLights(5) = 1
  4905. BattleLights(6) = 1
  4906. Select case RndNbr(6)
  4907. Case 1:BattleLights(1) = 2
  4908. Case 2:BattleLights(2) = 2
  4909. Case 3:BattleLights(3) = 2
  4910. Case 4:BattleLights(4) = 2
  4911. Case 5:BattleLights(5) = 2
  4912. Case 6:BattleLights(6) = 2
  4913. End Select
  4914. OpenGates
  4915. Case 6 'Sauron
  4916. DMD " SHOOT GREEN SHOTS", " TO ATTACK SAURON", "d_sauron", eNone, eNone, eNone, 3000, True, "vo_shootgreenshots-sauron"
  4917. AddMultiball 2
  4918. BattleLights(2) = 2
  4919. BattleLights(5) = 2
  4920. OpenGates
  4921. Case 7 'MrSinister
  4922. DMD "SHOOT FLASHING SHOTS", "TO ATTACK MRSINISTER", "d_mrsinister", eNone, eNone, eNone, 3000, True, "vo_shootflashingshots-ifyoudare"
  4923. Select case RndNbr(4)
  4924. Case 1:BattleLights(1) = 2
  4925. Case 2:BattleLights(4) = 2
  4926. Case 3:BattleLights(6) = 2
  4927. Case 4:BattleLights(3) = 2
  4928. End Select
  4929. AddMultiball 1
  4930. OpenGates
  4931. MrSinisterTimer.Interval = 120 + dazzlerValue
  4932. MrSinisterTimer.Enabled = 1
  4933. End Select
  4934. Flashforms li070, 3000, 50, 0
  4935. vpmtimer.addtimer 3000, "KickBallOut '"
  4936. End Sub
  4937.  
  4938. Sub LightSeqDPtargets_PlayDone()
  4939. LightSeqDPtargets.Play SeqRandom, 40, , 4000
  4940. End Sub
  4941.  
  4942. Sub CheckBattle 'called after each target or lane hit to change lights and check for the end of the battle
  4943. Select Case Battle(CurrentPlayer, 0)
  4944. Case 1 'Juggernaut
  4945. LifeLeft(CurrentPlayer, 1) = LifeLeft(CurrentPlayer, 1)- AttackPower * WolverineValue
  4946. If LifeLeft(CurrentPlayer, 1) <= 0 Then 'life is empty, then enabled the kicker to finish the battle
  4947. TurnOffArrows
  4948. SetLightColor li056, red, 2
  4949. WinBattle
  4950. ElseIF LifeLeft(CurrentPlayer, 1) <7 Then 'end the target hits and start the lane hits
  4951. LightSeqDPtargets.StopPlay
  4952. If BattleLights(3) = 2 Then
  4953. TurnOffArrows
  4954. BattleLights(2) = 2:BattleLights(5) = 2
  4955. Else
  4956. TurnOffArrows
  4957. BattleLights(1) = 2:BattleLights(4) = 2:BattleLights(6) = 2
  4958. End If
  4959. End If
  4960. Case 2 'Mystique
  4961. LifeLeft(CurrentPlayer, 2) = LifeLeft(CurrentPlayer, 2)- AttackPower * WolverineValue
  4962. If LifeLeft(CurrentPlayer, 2) <= 0 Then 'life is empty, then enabled the kicker to finish the battle
  4963. TurnOffArrows
  4964. SetLightColor li056, red, 2
  4965. WinBattle
  4966. ElseIF LifeLeft(CurrentPlayer, 2) <8 Then
  4967. BattleLights(2) = 2:BattleLights(4) = 2:BattleLights(5) = 2
  4968. ElseIF LifeLeft(CurrentPlayer, 2) <10 Then
  4969. BattleLights(2) = 2:li071.State = 0:BattleLights(5) = 2
  4970. End If
  4971. Case 3 'Sabretooth
  4972. LifeLeft(CurrentPlayer, 3) = LifeLeft(CurrentPlayer, 3)-(AttackPower / 4) * WolverineValue
  4973. If LifeLeft(CurrentPlayer, 3) <= 0 Then 'life is empty, then enabled the kicker to finish the battle
  4974. TurnOffArrows
  4975. SetLightColor li056, red, 2
  4976. WinBattle
  4977. End If
  4978. Case 4 'T-Rex
  4979. LifeLeft(CurrentPlayer, 4) = LifeLeft(CurrentPlayer, 4)- AttackPower * WolverineValue
  4980. If LifeLeft(CurrentPlayer, 4) <= 0 Then 'life is empty, then enabled the kicker to finish the battle
  4981. TurnOffArrows
  4982. SetLightColor li056, red, 2
  4983. WinBattle
  4984. ElseIF LifeLeft(CurrentPlayer, 4) <10 Then 'change the green arrow
  4985. TurnOffArrows
  4986. Select case RndNbr(6)
  4987. Case 1:BattleLights(1) = 2:BattleLights(2) = 2
  4988. Case 2:BattleLights(2) = 2:BattleLights(4) = 2
  4989. Case 3:BattleLights(4) = 2:BattleLights(5) = 2
  4990. Case 4:BattleLights(5) = 2:BattleLights(6) = 2
  4991. Case 5:BattleLights(6) = 2:BattleLights(3) = 2
  4992. Case 6:BattleLights(3) = 2:BattleLights(1) = 2
  4993. End Select
  4994. End If
  4995. Case 5 'Megalodon
  4996. LifeLeft(CurrentPlayer, 5) = LifeLeft(CurrentPlayer, 5)- AttackPower * WolverineValue
  4997. If LifeLeft(CurrentPlayer, 5) <= 0 Then 'life is empty, then enabled the kicker to finish the battle
  4998. turnOffarrows
  4999. SetLightColor li056, red, 2
  5000. WinBattle
  5001. ElseIF LifeLeft(CurrentPlayer, 5) <10 Then 'change the red blinking arrow
  5002. For each x in aArrows
  5003. SetLightColor x, blue, 1
  5004. Next
  5005. BattleLights(1) = 1
  5006. BattleLights(2) = 1
  5007. BattleLights(3) = 1
  5008. BattleLights(4) = 1
  5009. BattleLights(5) = 1
  5010. BattleLights(6) = 1
  5011. Select case RndNbr(6)
  5012. Case 1:BattleLights(1) = 2
  5013. Case 2:BattleLights(2) = 2
  5014. Case 3:BattleLights(3) = 2
  5015. Case 4:BattleLights(4) = 2
  5016. Case 5:BattleLights(5) = 2
  5017. Case 6:BattleLights(6) = 2
  5018. End Select
  5019. End If
  5020. Case 6 'Sauron
  5021. LifeLeft(CurrentPlayer, 6) = LifeLeft(CurrentPlayer, 6)- AttackPower * WolverineValue
  5022. If LifeLeft(CurrentPlayer, 6) <= 0 Then 'life is empty, then enabled the kicker to finish the battle
  5023. turnOffarrows
  5024. SetLightColor li056, red, 2
  5025. WinBattle
  5026. ElseIF LifeLeft(CurrentPlayer, 5) <3 Then 'enable superjackpot at the colossus target
  5027. li069.State = 2
  5028. ElseIF LifeLeft(CurrentPlayer, 5) <7 Then 'enable superjackpot at the colossus target
  5029. li069.State = 2
  5030. End If
  5031. Case 7 'MrSinister
  5032. LifeLeft(CurrentPlayer, 7) = LifeLeft(CurrentPlayer, 7)- AttackPower * WolverineValue
  5033. If LifeLeft(CurrentPlayer, 7) <= 0 Then 'life is empty, then enabled the kicker to finish the battle
  5034. turnOffarrows
  5035. SetLightColor li056, red, 2
  5036. WinBattle
  5037. ElseIF LifeLeft(CurrentPlayer, 7) <10 Then 'change the darkblue blinking arrow
  5038. TurnOffArrows
  5039. Select case RndNbr(4)
  5040. Case 1:BattleLights(1) = 2
  5041. Case 2:BattleLights(4) = 2
  5042. Case 3:BattleLights(6) = 2
  5043. Case 4:BattleLights(3) = 2
  5044. End Select
  5045. End If
  5046. End Select
  5047. End Sub
  5048.  
  5049. Sub StopBattle 'stops the battle, mostly when you loose the ball, it can be continued
  5050. bEndBattleJackpot = False
  5051. TurnOffArrows
  5052. li056.State = 0
  5053. li070.State = 0
  5054. DMDScoreNow
  5055. Select Case Battle(CurrentPlayer, 0)
  5056. Case 1 'Juggernaut
  5057. LightSeqDPtargets.StopPlay
  5058. Battle(CurrentPlayer, 1) = 0
  5059. Flasher003.visible = 0
  5060. Case 2 'Mystique
  5061. Battle(CurrentPlayer, 2) = 0
  5062. Flasher004.visible = 0
  5063. Case 3 'Sabretooth
  5064. Battle(CurrentPlayer, 3) = 0
  5065. Flasher005.visible = 0
  5066. Case 4 'T-Rex
  5067. Battle(CurrentPlayer, 4) = 0
  5068. Flasher002.visible = 0
  5069. Case 5 'Megalodon
  5070. Battle(CurrentPlayer, 5) = 0
  5071. Flasher006.visible = 0
  5072. Case 6 'Sauron
  5073. Battle(CurrentPlayer, 6) = 0
  5074. Case 7 'MrSinister
  5075. Battle(CurrentPlayer, 7) = 0
  5076. ResetForNewRound
  5077. MrSinisterTimer.Enabled = 0
  5078. End Select
  5079. ResetTeamUps
  5080. Battle(CurrentPlayer, 0) = 0
  5081. CloseGates
  5082. End Sub
  5083.  
  5084. Sub WinBattle
  5085. BattlesWon(CurrentPlayer) = BattlesWon(CurrentPlayer) + 1
  5086. Jackpot(CurrentPlayer) = 500000 * BattlesWon(CurrentPlayer)
  5087. Select Case Battle(CurrentPlayer, 0)
  5088. Case 1 'Juggernaut
  5089. Battle(CurrentPlayer, 1) = 1
  5090. Flasher003.visible = 0
  5091. DMD " JUGGERNAUT", " DEFEATED", "d_juggernaut", eBlink, eNone, eNone, 2000, False, "vo_juggernautdefeated"
  5092. Case 2 'Mystique
  5093. Battle(CurrentPlayer, 2) = 1
  5094. Flasher004.visible = 0
  5095. DMD " MYSTIQUE", " DEFEATED", "d_mystique", eBlink, eNone, eNone, 2000, False, "vo_mystiquedefeated"
  5096. Case 3 'Sabretooth
  5097. Battle(CurrentPlayer, 3) = 1
  5098. li001.State = 0
  5099. Flasher005.visible = 0
  5100. DMD " SABRETOOTH", " DEFEATED", "d_sabretooth", eBlink, eNone, eNone, 2000, False, "vo_sabretoothdefeated"
  5101. Case 4 'T-Rex
  5102. Battle(CurrentPlayer, 4) = 1
  5103. DMD " T-REX", " DEFEATED", "d_trex", eBlink, eNone, eNone, 2000, False, "vo_trexdefeated"
  5104. Flasher002.visible = 0
  5105. Case 5 'Megalodon
  5106. Battle(CurrentPlayer, 5) = 1
  5107. Flasher006.visible = 0
  5108. DMD " MEGALODON", " DEFEATED", "d_megalodon", eBlink, eNone, eNone, 2000, False, "vo_megalodondefeated"
  5109. Case 6 'Sauron
  5110. Battle(CurrentPlayer, 6) = 1
  5111. DMD " SAURON", " DEFEATED", "d_sauron", eBlink, eNone, eNone, 2000, False, "vo_saurondefeated"
  5112. Case 7 'MrSinister
  5113. Jackpot(CurrentPlayer) = 1000000 * BattlesWon(CurrentPlayer)
  5114. Battle(CurrentPlayer, 7) = 1
  5115. DMD " MRSINISTER", " DEFEATED", "d_mrsinister", eBlink, eNone, eNone, 2000, False, "vo_mrsinisterdefeated"
  5116. MrSinisterTimer.Enabled = 0
  5117. ResetForNewRound
  5118. 'turn on the Special light
  5119. li039.State = 2
  5120. End Select
  5121. ResetTeamUps
  5122. Battle(CurrentPlayer, 0) = 0
  5123. bEndBattleJackpot = True
  5124. DMD " SHOOT THE SCOOP", " FOR EXTRA JACKPOT", "", eBlink, eNone, eNone, 2500, True, "vo_shootthescoop"
  5125. li070.BlinkInterval = 300:li070.State = 2
  5126. CloseGates
  5127. ChangeSong
  5128. End Sub
  5129.  
  5130. Sub ResetForNewRound 'reset battles after finishing them
  5131. Dim j
  5132. bFirstBattle(CurrentPlayer) = False
  5133. For j = 0 to 7
  5134. Battle(CurrentPlayer, j) = 0
  5135. LifeLeft(CurrentPlayer, j) = 10
  5136. Next
  5137. End Sub
  5138.  
  5139. Sub MrSinisterTimer_Timer 'timed battle
  5140. StopBattle
  5141. MrSinisterTimer.Enabled = 0
  5142. End Sub
  5143.  
  5144. '***********************
  5145. ' spotflasher animation
  5146. '***********************
  5147.  
  5148. Dim MyPi, SpotStep, SpotDir
  5149. Dim sRGBStep, sRGBFactor, sRed, sGreen, sBlue
  5150.  
  5151. Sub StartSpots
  5152. Spot1.visible = 1
  5153. Spot2.visible = 1
  5154. MyPi = Round(4 * Atn(1), 6) / 90
  5155. SpotStep = 0
  5156. sRGBStep = 0
  5157. sRGBFactor = 5
  5158. sRed = 255
  5159. sGreen = 0
  5160. sBlue = 0
  5161. Spots.Enabled = 1
  5162. End Sub
  5163.  
  5164. Sub StopSpots
  5165. Spot1.visible = 0
  5166. Spot2.visible = 0
  5167. Spots.Enabled = 0
  5168. Spot1.RotZ = 210
  5169. Camera1.RotZ = 210
  5170. Spot2.RotZ = 170
  5171. Camera2.RotZ = 170
  5172. Spot1.color = RGB(255, 252, 224)
  5173. Spot2.color = RGB(255, 252, 224)
  5174. End Sub
  5175.  
  5176. Sub Spots_Timer()
  5177. Spot1.visible = 1
  5178. Spot2.visible = 1
  5179. 'rotate spots
  5180. SpotDir = SIN(SpotStep * MyPi) * 50
  5181. SpotStep = (SpotStep + 1)MOD 360
  5182. Spot1.RotZ = 210 - SpotDir
  5183. Camera1.RotZ = 210 - SpotDir
  5184. Spot2.RotZ = 170 + SpotDir
  5185. Camera2.RotZ = 170 + SpotDir
  5186. ' color the spotlights
  5187. Select Case sRGBStep
  5188. Case 0 'Green
  5189. sGreen = sGreen + sRGBFactor
  5190. If sGreen> 255 then
  5191. sGreen = 255
  5192. sRGBStep = 1
  5193. End If
  5194. Case 1 'Red
  5195. sRed = sRed - sRGBFactor
  5196. If sRed <0 then
  5197. sRed = 0
  5198. sRGBStep = 2
  5199. End If
  5200. Case 2 'Blue
  5201. sBlue = sBlue + sRGBFactor
  5202. If sBlue> 255 then
  5203. sBlue = 255
  5204. sRGBStep = 3
  5205. End If
  5206. Case 3 'Green
  5207. sGreen = sGreen - sRGBFactor
  5208. If sGreen <0 then
  5209. sGreen = 0
  5210. sRGBStep = 4
  5211. End If
  5212. Case 4 'Red
  5213. sRed = sRed + sRGBFactor
  5214. If sRed> 255 then
  5215. sRed = 255
  5216. sRGBStep = 5
  5217. End If
  5218. Case 5 'Blue
  5219. sBlue = sBlue - sRGBFactor
  5220. If sBlue <0 then
  5221. sBlue = 0
  5222. sRGBStep = 0
  5223. End If
  5224. End Select
  5225. Spot1.color = RGB(sRed, sGreen, sBlue)
  5226. Spot2.color = RGB(sRed, sGreen, sBlue)
  5227. End Sub
  5228.  
  5229. '*******************
  5230. ' COMBOS
  5231. '*******************
  5232. ' don't time out
  5233. ' starts at 500K for a 2 way combo and it is doubled on each combo
  5234. ' shots that count as combos:
  5235. ' Left Ramp 1
  5236. ' Wolverine loop 2
  5237. ' Right Ramp 3
  5238. ' 5 combos, supercombo and superdupercombo
  5239.  
  5240. Sub CheckCombo(n)
  5241. If Battle(CurrentPlayer, 0) <> 0 then Exit Sub 'no combos during battles
  5242. If n = OldCombo Then StopCombo:Exit Sub 'repeated shot so stop the combos
  5243.  
  5244. If n = "Trigger013" AND LastSwitchHit = "Trigger010" Then 'NinjaApocalypse
  5245. DMD CL(0, "NINJA"), CL(1, "APOCAYPSE"), "d_ninjamb", eNone, eNone, eNone, 1500, True, "vo_supercombo"
  5246. For x = 1 to 10
  5247. CheckNinjaStars
  5248. Next
  5249. Addscore NinjaApocJackpot(CurrentPLayer)
  5250. NinjaApocJackpot(CurrentPLayer) = NinjaApocJackpot(CurrentPLayer) + 500000
  5251. StopCombo
  5252. Else
  5253. OldCombo = n
  5254. ComboCount = ComboCount + 1
  5255. Select Case ComboCount
  5256. Case 1: 'just starting
  5257. Case 2:DMD "", "", "d_combo", eNone, eNone, eBlink, 1500, True, "vo_combo"
  5258. Case 3:DMD "", "", "d_combo2", eNone, eNone, eBlink, 1500, True, "vo_2xcombo"
  5259. Case 4:DMD "", "", "d_combo3", eNone, eNone, eBlink, 1500, True, "vo_3xcombo"
  5260. Case 5:DMD "", "", "d_combo4", eNone, eNone, eBlink, 1500, True, "vo_4xcombo"
  5261. Case 6:DMD "", "", "d_combo5", eNone, eNone, eBlink, 1500, True, "vo_5xcombo"
  5262. Case 7:DMD CL(0, "SUPER"), CL(1, "COMBO"), "", eNone, eBlink, eNone, 1500, True, "vo_supercombo"
  5263. Case Else:DMD CL(0, "SUPERDUPER"), CL(1, "COMBO"), "", eNone, eBlink, eNone, 1500, True, "vo_superdupercombo"
  5264. End Select
  5265. AddScore ComboValue * ComboCount
  5266. End If
  5267. End Sub
  5268.  
  5269. Sub StopCombo
  5270. ComboCount = 0
  5271. ComboValue = 500000
  5272. OldCombo = ""
  5273. End Sub
  5274.  
  5275. '************
  5276. ' Team ups
  5277. '************
  5278.  
  5279. 'reset team-ups
  5280. Sub ResetTeamUps
  5281. If DazzlePower(CurrentPlayer) = 4 Then DazzlePower(CurrentPlayer) = 0:DazzlerValue = 0
  5282. If ColossusPower(CurrentPlayer) = 4 Then ColossusPower(CurrentPlayer) = 0:ColossusValue = 1
  5283. If WolverinePower(CurrentPlayer) = 4 Then WolverinePower(CurrentPlayer) = 0:WolverineValue = 1
  5284. If DominoPower(CurrentPlayer) = 4 Then DominoPower(CurrentPlayer) = 0:DominoValue = 0
  5285. Flasher013.Visible = 0
  5286. Flasher014.Visible = 0
  5287. Flasher016.Visible = 0
  5288. Flasher017.Visible = 0
  5289. End Sub
  5290.  
  5291. 'dazzler
  5292. Sub CheckDazzler
  5293. If DazzlePower(CurrentPlayer) = 4 Then
  5294. DMD " DAZZLER", " TEAM-UP", "d_dazzler", eNone, eNone, eNone, 1500, True, "vo_dazzlerteamup"
  5295. DazzlerValue = 20 'add 20 extra seconds to any timer or hurry up
  5296. FlashForms Flasher014, 1500, 50, 1
  5297. End If
  5298. If DazzlePower(CurrentPlayer)> 4 Then DazzlePower(CurrentPlayer) = 4
  5299. End Sub
  5300.  
  5301. 'colossus
  5302. Sub CheckColossus
  5303. If ColossusPower(CurrentPlayer) = 4 Then
  5304. DMD " COLOSSUS", " TEAM-UP", "d_colossus", eNone, eNone, eNone, 1500, True, "vo_colossusteamup"
  5305. ColossusValue = 2 'doubles points during battles
  5306. FlashForms Flasher017, 1500, 50, 1
  5307. End If
  5308. If ColossusPower(CurrentPlayer)> 4 Then ColossusPower(CurrentPlayer) = 4
  5309. End Sub
  5310.  
  5311. 'wolverine
  5312. Sub CheckWolverine
  5313. If WolverinePower(CurrentPlayer) = 4 Then
  5314. DMD " WOLVERINE", " TEAM-UP", "d_wolverine", eNone, eNone, eNone, 1500, True, "vo_wolverineteamup"
  5315. WolverineValue = 2 'doubles damage during battles
  5316. FlashForms Flasher013, 1500, 50, 1
  5317. End If
  5318. If WolverinePower(CurrentPlayer)> 4 Then WolverinePower(CurrentPlayer) = 4
  5319. End Sub
  5320.  
  5321. 'domino
  5322. Sub CheckDomino
  5323. If DominoPower(CurrentPlayer) = 4 Then
  5324. DMD " DOMINO", " TEAM-UP", "d_domino", eNone, eNone, eNone, 1500, True, "vo_dominoteamup"
  5325. DominoValue = 10000 '10000 extra points during some battles
  5326. FlashForms Flasher016, 1500, 50, 1
  5327. End If
  5328. If DominoPower(CurrentPlayer)> 4 Then DominoPower(CurrentPlayer) = 4
  5329. End Sub
  5330.  
  5331. '*************
  5332. ' Weapons x
  5333. '*************
  5334. '30 weapons = light extra ball
  5335. '75 weapons = light MechSuit multiball
  5336. '50 weapons = playfield X + 1
  5337.  
  5338. Sub Checkweapons 'increase and check the number of weapons collected
  5339. Weapons(CurrentPlayer) = Weapons(CurrentPlayer) + 1
  5340. If Weapons(CurrentPlayer)MOD 6 = 0 Then li041.State = 2 'jackpot at the Hell house scoop
  5341. If Weapons(CurrentPlayer)MOD 30 = 0 Then 'lit extra ball
  5342. li038.State = 2
  5343. DMD "_", CL(1, "EXTRA BALL IS LIT"), "", eNone, eNone, eNone, 2000, True, "vo_shootscoop-extraball"
  5344. End If
  5345. If Weapons(CurrentPlayer)MOD 75 = 0 Then bMechSuitMBLight(CurrentPlayer) = True 'lit Mech Suit MB, starts at the Hellhouse
  5346. If Weapons(CurrentPlayer)MOD 50 = 0 Then AddPlayfieldMultiplier 1
  5347. FlashForms Flasher007, 1500, 50, 0
  5348. End Sub
  5349.  
  5350. Sub RelitWeapons
  5351. Dim i
  5352. For i = 1 to 6:WeaponLights(CurrentPlayer, i) = 1:Next
  5353. End Sub
  5354. '********************
  5355. ' Mech Suit multiball
  5356. '********************
  5357.  
  5358. Sub StartMechSuitMB
  5359. Dim i
  5360. DMD CL(0, "MECH SUIT"), CL(1, "MULTIBALL"), "", eNone, eNone, eNone, 1500, True, "vo_multiball"
  5361. vpmtimer.addtimer 4000, "AddMultiball 3 '"
  5362. bMechSuitMBLight(CurrentPlayer) = False:li047.State = 2
  5363. bMechSuitMBStarted = true
  5364. ChangeSong
  5365. For i = 1 to 6:MechSuitLights(i) = 2:Next
  5366. vpmtimer.addtimer 1500, "kickBallOut '"
  5367. End Sub
  5368.  
  5369. Sub ContinueMechSuitMB 'after super jackpot
  5370. Dim i
  5371. bMechSuitMBSJackpot = False
  5372. bMechSuitMBLight(CurrentPlayer) = False
  5373. li047.BlinkInterval = 250:li047.State = 0:li047.State = 2
  5374. bMechSuitMBStarted = true
  5375. For i = 1 to 6:MechSuitLights(i) = 2:Next
  5376. vpmtimer.addtimer 1500, "kickBallOut '"
  5377. End Sub
  5378.  
  5379. Sub CheckMechSuitMBHits
  5380. Dim i, tmp
  5381. i = 0:tmp = 0
  5382. Jackpot(Currentplayer) = MechMBJackpot(CurrentPlayer)
  5383. AwardJackpot
  5384. MechMBJackpot(CurrentPlayer) = MechMBJackpot(CurrentPlayer) + 100000 'increment the mech suit mb jackpot
  5385. For i = 1 to 6:tmp = tmp + MechSuitLights(i):next
  5386. If tmp = 0 Then 'turn on the Super Jackpot at HellHouse scoop
  5387. bMechSuitMBSJackpot = true
  5388. li047.BlinkInterval = 125:li047.State = 0:li047.State = 2
  5389. End If
  5390. End Sub
  5391.  
  5392. Sub StopMechSuitMB
  5393. Dim i
  5394. For i = 1 to 6:MechSuitLights(i) = 0:Next
  5395. bMechSuitMBStarted = False
  5396. ChangeSong
  5397. li047.State = 0
  5398. li054.State = 0
  5399. li057.State = 0
  5400. li055.State = 0
  5401. li071.State = 0
  5402. li058.State = 0
  5403. li059.State = 0
  5404. End Sub
  5405.  
  5406. '************************
  5407. ' Ninja Lock & Multiball
  5408. '************************
  5409.  
  5410. ' Uses a virtual lock for easier handling when several players are playing
  5411.  
  5412. Sub Lock_Hit
  5413. Dim i, tmp 'time to kick the ball
  5414. tmp = 1500
  5415. IF bNinjaMBSJackpot Then 'Award Ninja MB Super Jackpot
  5416. SuperJackpot(CurrentPlayer) = NinjaMBJackpot(CurrentPlayer) * 6
  5417. NinjaMBJackpot(CurrentPlayer) = NinjaMBJackpot(CurrentPlayer) + 1000000
  5418. AwardSuperJackpot
  5419. 'reset normal jackpots
  5420. bNinjaMBSJackpot = False
  5421. li058.State = 0
  5422. SwordEffect 0
  5423. For i = 1 to 6:NinjaMBLights(i) = 2:Next
  5424. ElseIf bLockEnabled Then
  5425. BallsInLock(CurrentPLayer) = BallsInLock(CurrentPLayer) + 1
  5426. SwordEffect 2
  5427. Select Case BallsInLock(CurrentPLayer)
  5428. Case 1:DMD "", "", "d_lock1", eNone, eNone, eNone, 1500, True, "vo_ball1locked"
  5429. Case 2:DMD "", "", "d_lock2", eNone, eNone, eNone, 1500, True, "vo_ball2locked"
  5430. Case 3:DMD "", "", "d_lock3", eNone, eNone, eNone, 1500, True, "vo_ball3locked"
  5431. 'Start Ninja Mutiball
  5432. DMD CL(0, "NINJA"), CL(1, "MULTIBALL"), "", eNone, eNone, eNone, 1500, True, "vo_multiball"
  5433. vpmtimer.addtimer 4000, "AddMultiball 2 '"
  5434. BallsInLock(CurrentPLayer) = 0
  5435. bLockEnabled = False
  5436. SwordEffect 0
  5437. bNinjaMB = True
  5438. ChangeSong
  5439. NinjaMBJackpot(CurrentPlayer) = 500000 + 50000 * NinjaStars(CurrentPLayer)
  5440. 'Turn On the Ninja Jacpot Arrows in a teal color
  5441. For i = 1 to 6:NinjaMBLights(i) = 2:Next
  5442. tmp = 3000
  5443. End Select
  5444. End If
  5445. vpmtimer.addtimer tmp, "ExitLock '"
  5446. End Sub
  5447.  
  5448. Sub NinjaMBCheckHits
  5449. Dim i, tmp:i = 0:tmp = 0
  5450. Jackpot(Currentplayer) = NinjaMBJackpot(CurrentPlayer)
  5451. AwardJackpot
  5452. For i = 1 to 6:tmp = tmp + NinjaMBLights(i):next
  5453. If tmp = 0 Then 'turn on the Super Jackpot at the right ramp
  5454. bNinjaMBSJackpot = true
  5455. SwordEffect 4
  5456. End If
  5457. End Sub
  5458.  
  5459. Sub StopNinjaMB 'when loose last multiball
  5460. bNinjaMB = False
  5461. bNinjaMBSJackpot = False
  5462. ChangeSong
  5463. For x = 1 to 6:NinjaMBLights(x) = 0:Next
  5464. li054.State = 0
  5465. li057.State = 0
  5466. li055.State = 0
  5467. li071.State = 0
  5468. li058.State = 0
  5469. li059.State = 0
  5470. SwordEffect 0
  5471. End Sub
  5472.  
  5473. Sub ExitLock
  5474. SwordEffect 3
  5475. PLaySoundAt "fx_kicker", lock
  5476. Lock.kick 180, 3
  5477. End Sub
  5478.  
  5479. '*****************
  5480. ' Chimichangas
  5481. '*****************
  5482. ' chimichangas will also increase the playfield multiplier
  5483.  
  5484. Sub CheckChimichangaHits 'called from the right orbit
  5485. Dim tmp
  5486. ChimichangaHits(CurrentPlayer) = ChimiChangaHits(CurrentPlayer) + 1
  5487. If ChimichangaHits(CurrentPlayer) = ChimichangaHitsNeeded(CurrentPlayer)Then 'spot a chimichanga as an orange light
  5488. Flasher011.Visible = 1
  5489. tmp = RndNbr(6)
  5490. ChimiChangaLights(tmp) = 2
  5491. ChimichangaHits(CurrentPlayer) = 0 'reset count and
  5492. ChimichangaHitsNeeded(CurrentPlayer) = ChimichangaHitsNeeded(CurrentPlayer) + 2 'increase the needed hits to spot a new chimichanga
  5493. Else
  5494. FlashForms flasher011, 500, 50, 0
  5495. End If
  5496. End Sub
  5497.  
  5498. Sub CollectChimichanga
  5499. DMD CL(0, "COLLECTED ONE"), CL(1, "CHIMICHANGA"), "d_chimi2", eNone, eNone, eNone, 1000, True, "sfx17"
  5500. DMD "", CL(1, FormatScore(ChimichangaValue(CurrentPlayer))), "d_chimi2", eNone, eBlink, eNone, 1000, True, ""
  5501. Chimichangas(CurrentPlayer) = Chimichangas(CurrentPlayer) + 1
  5502. ChimichangaValue(CurrentPlayer) = ChimichangaValue(CurrentPlayer) + 100000
  5503. FlashForms flasher011, 1500, 50, 0
  5504. If Chimichangas(CurrentPlayer)MOD 10 = 0 Then AddPlayfieldMultiplier 1
  5505. End Sub
  5506.  
  5507. '*****************
  5508. ' Berserker Rage
  5509. '*****************
  5510. ' spinners timed mode
  5511.  
  5512. Sub StartBerserker
  5513. BerserkerTime.Interval = 20000 + dazzlerValue * 1000
  5514. BerserkerTime.Enabled = 1
  5515. bBerserker = True
  5516. ChangeSong
  5517. End Sub
  5518.  
  5519. Sub StopBerserker
  5520. BerserkerTime.Enabled = 0
  5521. bBerserker = False
  5522. ChangeSong
  5523. BerserkerCount(CurrentPLayer) = 0
  5524. End Sub
  5525.  
  5526. Sub CheckBerserker
  5527. If BerserkerCount(CurrentPLayer) = 25 Then 'Start Berserker Rage
  5528. DMD CL(0, "STARTING"), CL(1, "BERSERKER RAGE"), "", eNone, eNone, eNone, 1500, True, ""
  5529. DMD CL(0, "BERSERKER RAGE"), CL(1, "SHOOT THE SPINNERS"), "", eNone, eNone, eNone, 1500, True, ""
  5530. StartBerserker
  5531. End If
  5532. End Sub
  5533.  
  5534. Sub BerserkerTime_Timer 'stop the Berserker Rage mode
  5535. StopBerserker
  5536. End Sub
  5537.  
  5538. '*******************
  5539. ' Katanarama Time
  5540. '*******************
  5541. ' orbits and ramps timed mode
  5542.  
  5543. Sub StartKatanarama
  5544. KatanaramaTime.Interval = 20000 + dazzlerValue * 1000
  5545. KatanaramaTime.Enabled = 1
  5546. bKatanaramaTime = True
  5547. DiamondLights(CurrentPlayer, 1) = 2
  5548. DiamondLights(CurrentPlayer, 2) = 2
  5549. DiamondLights(CurrentPlayer, 3) = 2
  5550. DiamondLights(CurrentPlayer, 4) = 2
  5551. DiamondLights(CurrentPlayer, 5) = 2
  5552. DiamondLights(CurrentPlayer, 6) = 2
  5553. End Sub
  5554.  
  5555. Sub StopKatanarama
  5556. KatanaramaTime.Enabled = 0
  5557. bKatanaramaTime = False
  5558. KatanaramaCount(CurrentPlayer) = 0
  5559. 'reset diamond lights
  5560. KatanaramaCount(CurrentPlayer) = 0
  5561. DiamondLights(CurrentPlayer, 1) = 2
  5562. DiamondLights(CurrentPlayer, 2) = 0
  5563. DiamondLights(CurrentPlayer, 3) = 0
  5564. DiamondLights(CurrentPlayer, 4) = 0
  5565. DiamondLights(CurrentPlayer, 5) = 0
  5566. DiamondLights(CurrentPlayer, 6) = 0
  5567. End Sub
  5568.  
  5569. Sub CheckKatanarama 'increases the counter and check the lights to start KatanaramaTime
  5570. KatanaramaCount(CurrentPlayer) = KatanaramaCount(CurrentPlayer) + 1
  5571. Select Case KatanaramaCount(CurrentPlayer)
  5572. Case 1
  5573. DiamondLights(CurrentPlayer, 1) = 1
  5574. DiamondLights(CurrentPlayer, 2) = 2
  5575. DMD "1 DIAMOND COLLECTED", "", "d_diamond1", eNone, eNone, eNone, 1000, True, "fanfare"
  5576. Case 2
  5577. DiamondLights(CurrentPlayer, 2) = 1
  5578. DiamondLights(CurrentPlayer, 3) = 2
  5579. DMD "2 DIAMONDS COLLECTED", "", "d_diamond2", eNone, eNone, eNone, 1000, True, "fanfare"
  5580. Case 3
  5581. DiamondLights(CurrentPlayer, 3) = 1
  5582. DiamondLights(CurrentPlayer, 4) = 2
  5583. DMD "3 DIAMONDS COLLECTED", "", "d_diamond3", eNone, eNone, eNone, 1000, True, "fanfare"
  5584. Case 4
  5585. DiamondLights(CurrentPlayer, 4) = 1
  5586. DiamondLights(CurrentPlayer, 5) = 2
  5587. DMD "4 DIAMONDS COLLECTED", "", "d_diamond4", eNone, eNone, eNone, 1000, True, "fanfare"
  5588. Case 5
  5589. DiamondLights(CurrentPlayer, 5) = 1
  5590. DiamondLights(CurrentPlayer, 6) = 2
  5591. DMD "5 DIAMONDS COLLECTED", "", "d_diamond5", eNone, eNone, eNone, 1000, True, "fanfare"
  5592. Case 6 'all diamonds are on, so start katanarama time
  5593. DiamondLights(CurrentPlayer, 6) = 1
  5594. DMD "6 DIAMONDS COLLECTED", "", "d_diamond6", eNone, eNone, eNone, 1000, True, "vo_katanaramaisready"
  5595. DMD CL(0, "STARTING"), CL(1, "KATANARAMA TIME"), "", eNone, eNone, eNone, 1500, True, ""
  5596. DMD CL(0, "KATANARAMA TIME"), CL(1, "SHOOT ORBITS-RAMPS"), "", eNone, eNone, eNone, 1500, True, ""
  5597. StartKatanarama
  5598. End Select
  5599. End Sub
  5600.  
  5601. Sub KatanaramaTime_Timer
  5602. StopKatanarama
  5603. End Sub
  5604.  
  5605. '****************
  5606. ' Mystery award
  5607. '****************
  5608.  
  5609. Sub StartMystery
  5610. DMD " MYSTERY AWARD ", CL(1, "LIGHT LOCK"), "", eNone, eNone, eNone, 100, False, ""
  5611. DMD " MYSTERY AWARD ", CL(1, "DEADPOOL WUZ HERE"), "", eNone, eNone, eNone, 100, False, ""
  5612. DMD " MYSTERY AWARD ", CL(1, "SMALL POINTS"), "", eNone, eNone, eNone, 100, False, ""
  5613. DMD " MYSTERY AWARD ", CL(1, "INFINITE BALLS"), "", eNone, eNone, eNone, 100, False, ""
  5614. DMD " MYSTERY AWARD ", CL(1, "COLLECT X STARS"), "", eNone, eNone, eNone, 100, False, ""
  5615. DMD " MYSTERY AWARD ", CL(1, "NOTHING"), "", eNone, eNone, eNone, 100, False, ""
  5616. DMD " MYSTERY AWARD ", CL(1, "LIGHT EXTRA BALL"), "", eNone, eNone, eNone, 100, False, ""
  5617. DMD " MYSTERY AWARD ", CL(1, "10 PESETAS"), "", eNone, eNone, eNone, 100, False, ""
  5618. DMD " MYSTERY AWARD ", CL(1, "COLLECT X WEAPONS"), "", eNone, eNone, eNone, 100, False, ""
  5619. DMD " MYSTERY AWARD ", CL(1, "SOME POPCORN"), "", eNone, eNone, eNone, 100, False, ""
  5620. DMD " MYSTERY AWARD ", CL(1, "BIG POINTS"), "", eNone, eNone, eNone, 100, False, ""
  5621. DMD " MYSTERY AWARD ", CL(1, "5 POINTS"), "", eNone, eNone, eNone, 100, False, ""
  5622. DMD " MYSTERY AWARD ", CL(1, "LIGHT ADD-A-BALL"), "", eNone, eNone, eNone, 100, False, ""
  5623. DMD " MYSTERY AWARD ", CL(1, "50 MILLIONS"), "", eNone, eNone, eNone, 100, False, ""
  5624. DMD " MYSTERY AWARD ", CL(1, "ADVANCE CHIMICHANGA"), "", eNone, eNone, eNone, 100, False, ""
  5625. DMD " MYSTERY AWARD ", CL(1, "DEFEAT EVERYONE"), "", eNone, eNone, eNone, 100, False, ""
  5626. vpmtimer.addtimer 3000, "ChooseMysteryAward '"
  5627. End Sub
  5628.  
  5629. Sub ChooseMysteryAward
  5630. Dim tmp, tmp2
  5631. tmp = RndNbr(20)
  5632. DMDFlush
  5633. Select case tmp
  5634. Case 1
  5635. DMD " MYSTERY AWARD ", CL(1, "LIGHT LOCK"), "", eNone, eBlink, eNone, 1000, True, "fanfare"
  5636. DMD "", "", "d_lockislit", eNone, eNone, eBlink, 1500, True, "vo_lockislit"
  5637. bLockEnabled = True
  5638. SwordEffect 1
  5639. Case 3
  5640. DMD " MYSTERY AWARD ", CL(1, "COLLECT X STARS"), "", eNone, eBlink, eNone, 1000, True, "fanfare"
  5641. tmp2 = RndNbr(5)
  5642. DMD " MYSTERY AWARD ", CL(1, "COLLECTED " &tmp2& " STARS"), "", eNone, eBlink, eNone, 1500, True, ""
  5643. For x = 1 to tmp2
  5644. CheckNinjaStars
  5645. Next
  5646. Case 4
  5647. DMD " MYSTERY AWARD ", CL(1, "LIGHT EXTRA BALL"), "", eNone, eBlink, eNone, 2500, True, "vo_extraballislit"
  5648. li038.State = 1
  5649. Case 5
  5650. DMD " MYSTERY AWARD ", CL(1, "COLLECT X WEAPONS"), "", eNone, eBlink, eNone, 1000, True, "fanfare"
  5651. tmp2 = RndNbr(10)
  5652. DMD " MYSTERY AWARD ", CL(1, "COLLECTED " &tmp2& " WEAPONS"), "", eNone, eBlink, eNone, 1500, True, ""
  5653. For x = 1 to tmp2
  5654. CheckWeapons
  5655. Next
  5656. Case 6, 12
  5657. DMD " MYSTERY AWARD ", CL(1, "BIG POINTS"), "", eNone, eBlink, eNone, 1000, True, "fanfare"
  5658. tmp2 = 500000 * RndNbr(5)
  5659. DMD " MYSTERY AWARD ", CL(1, FormatScore(tmp2)), "", eNone, eBlink, eNone, 1500, True, ""
  5660. Addscore tmp2
  5661. Case 8
  5662. DMD " MYSTERY AWARD ", CL(1, "COLLECT 1 CHIMICHANGA"), "", eNone, eBlink, eNone, 1000, True, ""
  5663. Collectchimichanga
  5664. Case Else
  5665. DMD " MYSTERY AWARD ", CL(1, "SMALL POINTS"), "", eNone, eBlink, eNone, 1000, True, "fanfare"
  5666. tmp2 = 50000 * RndNbr(5)
  5667. DMD " MYSTERY AWARD ", CL(1, FormatScore(tmp2)), "", eNone, eBlink, eNone, 1500, True, ""
  5668. Addscore tmp2
  5669. End Select
  5670. 'kickout the ball
  5671. Flashforms li070, 2500, 50, 0
  5672. vpmtimer.addtimer 2600, "kickBallOut '"
  5673. End Sub
  5674.  
  5675. 'DMD " ", " ", "", eNone, eNone, eNone, 1000, True, ""
Advertisement
Add Comment
Please, Sign In to add comment