Guest User

Untitled

a guest
Feb 18th, 2018
404
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Option Explicit
  2. Randomize
  3.  
  4. '---------- UltraDMD Unique Table Color preference -------------
  5. Dim DMDColor, DMDColorSelect, UseFullColor
  6. Dim DMDPosition, DMDPosX, DMDPosY, DMDSize, DMDWidth, DMDHeight
  7.  
  8.  
  9. UseFullColor = "True" ' "True" / "False"
  10. DMDColorSelect = "Red" ' Rightclick on UDMD window to get full list of colours
  11.  
  12. DMDPosition = False ' Use Manual DMD Position, True / False
  13. DMDPosX = 100 ' Position in Decimal
  14. DMDPosY = 40 ' Position in Decimal
  15.  
  16. DMDSize = False ' Use Manual DMD Size, True / False
  17. DMDWidth = 512 ' Width in Decimal
  18. DMDHeight = 128 ' Height in Decimal
  19.  
  20. 'Note open Ultradmd and right click on window to get the various sizes in decimal
  21.  
  22. GetDMDColor
  23. Sub GetDMDColor
  24. Dim WshShell,filecheck,directory
  25. Set WshShell = CreateObject("WScript.Shell")
  26. If DMDSize then
  27. WshShell.RegWrite "HKCU\Software\UltraDMD\w",DMDWidth,"REG_DWORD"
  28. WshShell.RegWrite "HKCU\Software\UltraDMD\h",DMDHeight,"REG_DWORD"
  29. End if
  30. If DMDPosition then
  31. WshShell.RegWrite "HKCU\Software\UltraDMD\x",DMDPosX,"REG_DWORD"
  32. WshShell.RegWrite "HKCU\Software\UltraDMD\y",DMDPosY,"REG_DWORD"
  33. End if
  34. WshShell.RegWrite "HKCU\Software\UltraDMD\fullcolor",UseFullColor,"REG_SZ"
  35. WshShell.RegWrite "HKCU\Software\UltraDMD\color",DMDColorSelect,"REG_SZ"
  36. End Sub
  37. '---------------------------------------------------
  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. Const cGameName = "nudge_test"
  52. 'Const UseFullColor = "True" 'Use Color DMD (True / False)
  53. 'Const DMDColorSelect = "Azure" 'Rightclick on UDMD window to get full list of colors
  54.  
  55. Dim Ballsize,BallMass
  56. Ballsize = 50
  57. BallMass = (Ballsize^3)/125000
  58.  
  59.  
  60.  
  61. ' Define any Constants
  62. Const TableName = "goldorak"
  63. Const myVersion = "1.0.2"
  64. Const MaxPlayers = 4 ' from 1 to 4
  65. Const BallSaverTime = 10 ' in seconds
  66. Const MaxMultiplier = 5 ' limit to 5x in this game
  67. Const BallsPerGame = 3 ' 3 or 5
  68. Const MaxMultiballs = 5 ' max number of balls during multiballs
  69.  
  70. ' Define Global Variables
  71. Dim PlayersPlayingGame
  72. Dim CurrentPlayer
  73. Dim Credits
  74. Dim BonusPoints(4)
  75. Dim BonusHeldPoints(4)
  76. Dim BonusMultiplier(4)
  77. Dim bBonusHeld
  78. Dim BallsRemaining(4)
  79. Dim ExtraBallsAwards(4)
  80. Dim Score(4)
  81. Dim HighScore(4)
  82. Dim HighScoreName(4)
  83. Dim Jackpot
  84. Dim SuperJackpot
  85. Dim Tilt
  86. Dim TiltSensitivity
  87. Dim Tilted
  88. Dim TotalGamesPlayed
  89. Dim mBalls2Eject
  90. Dim SkillshotValue(4)
  91. Dim bAutoPlunger
  92. Dim bInstantInfo
  93. Dim bAttractMode
  94. Dim ComboValue
  95.  
  96. ' Define Game Control Variables
  97. Dim LastSwitchHit
  98. Dim BallsOnPlayfield
  99. Dim BallsInLock
  100. Dim BallsInHole
  101.  
  102. ' Define Game Flags
  103. Dim bFreePlay
  104. Dim bGameInPlay
  105. Dim bOnTheFirstBall
  106. Dim bBallInPlungerLane
  107. Dim bBallSaverActive
  108. Dim bBallSaverReady
  109. Dim bMultiBallMode
  110. Dim bMusicOn
  111. Dim bSkillshotReady
  112. Dim bExtraBallWonThisBall
  113. Dim bJustStarted
  114.  
  115. ' core.vbs variables
  116. Dim plungerIM 'used mostly as an autofire plunger
  117.  
  118.  
  119. ' //////////////////////
  120. ' B2S Light Show
  121. ' cause i mean everyone loves a good light show
  122. ' 1 = top right art
  123. ' 2 = left robot guy
  124. ' 3 = right robot guy
  125. ' 4 = title
  126. ' 5 = animation
  127. ' 6 = Lightning
  128. ' /////////////////////
  129.  
  130. Dim b2sstep
  131. b2sstep = 0
  132. 'b2sflash.enabled = 0
  133. Dim b2satm
  134.  
  135. Sub startB2S(aB2S)
  136. b2sflash.enabled = 1
  137. b2satm = ab2s
  138. End Sub
  139.  
  140. Sub b2sflash_timer
  141. If B2SOn Then
  142. b2sstep = b2sstep + 1
  143. Select Case b2sstep
  144. Case 0
  145. Controller.B2SSetData b2satm, 0
  146. Case 1
  147. Controller.B2SSetData b2satm, 1
  148. Case 2
  149. Controller.B2SSetData b2satm, 0
  150. Case 3
  151. Controller.B2SSetData b2satm, 1
  152. Case 4
  153. Controller.B2SSetData b2satm, 0
  154. Case 5
  155. Controller.B2SSetData b2satm, 1
  156. Case 6
  157. Controller.B2SSetData b2satm, 0
  158. Case 7
  159. Controller.B2SSetData b2satm, 1
  160. Case 8
  161. Controller.B2SSetData b2satm, 0
  162. b2sstep = 0
  163. b2sflash.enabled = 0
  164. End Select
  165. End If
  166. End Sub
  167.  
  168. ' /////////////////
  169. ' END b2s
  170. ' well that was quick, tacos anyone?
  171. ' /////////////////
  172.  
  173.  
  174. ' *********************************************************************
  175. ' Visual Pinball Defined Script Events
  176. ' *********************************************************************
  177.  
  178. '*DOF method for non rom controller tables by Arngrim****************
  179. '*******Use DOF 1**, 1 to activate a ledwiz output*******************
  180. '*******Use DOF 1**, 0 to deactivate a ledwiz output*****************
  181. '*******Use DOF 1**, 2 to pulse a ledwiz output**********************
  182. Sub DOF(dofevent, dofstate)
  183. If dofstate = 2 Then
  184. Controller.B2SSetData dofevent, 1:Controller.B2SSetData dofevent, 0
  185. Else
  186. Controller.B2SSetData dofevent, dofstate
  187. End If
  188. End Sub
  189.  
  190. Sub Table1_Init()
  191. LoadEM
  192. Dim i
  193. Randomize
  194.  
  195. 'Impulse Plunger as autoplunger
  196. Const IMPowerSetting = 45 ' Plunger Power
  197. Const IMTime = 1.1 ' Time in seconds for Full Plunge
  198. Set plungerIM = New cvpmImpulseP
  199. With plungerIM
  200. .InitImpulseP swplunger, IMPowerSetting, IMTime
  201. .Random 1.5
  202. .InitExitSnd SoundFX("fx_kicker", DOFContactors), SoundFX("fx_solenoid", DOFContactors)
  203. .CreateEvents "plungerIM"
  204. End With
  205.  
  206. vpmtimer.AddTimer 1000, "PlaySound ""fx_sys11_bootup"" '"
  207. vpmtimer.AddTimer 2700, "PlaySound ""fx_sys11_bootup"" '"
  208.  
  209. ' Misc. VP table objects Initialisation, droptargets, animations...
  210. VPObjects_Init
  211.  
  212. ' load saved values, highscore, names, jackpot
  213. Loadhs
  214.  
  215. ' Initalise the DMD display
  216. DMD_Init
  217.  
  218. ' freeplay or coins
  219. bFreePlay = False 'we dont want coins
  220.  
  221. ' Init main variables and any other flags
  222. bAttractMode = False
  223. bOnTheFirstBall = False
  224. bBallInPlungerLane = False
  225. bBallSaverActive = False
  226. bBallSaverReady = False
  227. bMultiBallMode = False
  228. bGameInPlay = False
  229. bAutoPlunger = False
  230. bMusicOn = True
  231. BallsOnPlayfield = 0
  232. BallsInLock = 0
  233. BallsInHole = 0
  234. LastSwitchHit = ""
  235. Tilt = 0
  236. TiltSensitivity = 6
  237. Tilted = False
  238. bJustStarted = True
  239. bInstantInfo = False
  240. BHit = 0
  241. ' set any lights for the attract mode
  242. GiOff
  243. vpmtimer.AddTimer 8000, "StartAttractMode '"
  244.  
  245. End Sub
  246.  
  247.  
  248. '******
  249. ' Keys
  250. '******
  251.  
  252. Sub Table1_KeyDown(ByVal Keycode)
  253. If Keycode = AddCreditKey Then
  254. Credits = Credits + 1
  255. DOF 140, DOFOn
  256. If(Tilted = False) Then
  257. PlaySound "goldrake voce"
  258. DMDFlush
  259. DMD "DMD meta.gif", " ", "", 2800
  260. DMD "black.jpg", "_", " CREDITS " &credits, 500
  261. PlaySound "fx_coin"
  262. If NOT bGameInPlay Then ShowTableInfo
  263. DOF 322, DOFOn 'DOF MX - Credits in, Ready to Start Game - ON
  264. End If
  265. End If
  266.  
  267. If keycode = PlungerKey Then
  268. plungerIM.AutoFire
  269. If (Bulb30.State = 2) Then
  270. addscore 50000
  271. Playsound "goldrake voce"
  272. BrazosL.enabled = 1
  273. BrazosR.enabled = 1
  274. GiEffect 2
  275. FlashEffect 2
  276. LightEffect 1
  277. FireFlash.State = 0
  278. ' maglio.moveto maglio.tx-330, maglio.ty, maglio.tz-350, +700
  279. ' maglio2.moveto maglio2.tx+350, maglio2.ty, maglio2.tz-650, 900
  280. ' Timermaglio.set true , 700
  281. ' Timerholo.set true , 450
  282. Explosion()
  283. ' Holo3.frame 1,26
  284. ' Holo4.frame 1,26
  285. flashforms flasher2,2000, 50, 0
  286. flashforms flasher6, 2000, 50, 0
  287. ' playsound "goldrake maglio"
  288. Bulb30.State = 0
  289. ' DMDframe.set true, 4000
  290. ' DispDmd1.QueueText "[f6][edge4][y5]SPECIAL KEY1[y17]PRESSED 50.000", deNone, 3000, True
  291. ' DispDmd2.QueueText "[f6][edge4][y5]SPECIAL KEY1[y17]PRESSED 50.000", deNone, 3000, True
  292. DMD "Bomba.gif", " ", "", 3000
  293. DMDFLush
  294. DMDBlink "black.jpg", "SPECIAL KEY", "PRESSED 50.000" , 200, 20
  295. End If
  296. End If
  297.  
  298. If hsbModeActive Then
  299. EnterHighScoreKey(keycode)
  300. Exit Sub
  301. End If
  302.  
  303. ' Table specific
  304.  
  305. ' Normal flipper action
  306.  
  307. If bGameInPlay AND NOT Tilted Then
  308.  
  309. If keycode = LeftTiltKey Then Nudge 90, 6:PlaySound "fx_nudge", 0, 1, -0.1, 0.25:CheckTilt
  310. If keycode = RightTiltKey Then Nudge 270, 6:PlaySound "fx_nudge", 0, 1, 0.1, 0.25:CheckTilt
  311. If keycode = CenterTiltKey Then Nudge 0, 7:PlaySound "fx_nudge", 0, 1, 1, 0.25:CheckTilt
  312.  
  313. If keycode = LeftFlipperKey Then SolLFlipper 1:InstantInfoTimer.Enabled = True
  314. If keycode = RightFlipperKey Then SolRFlipper 1:InstantInfoTimer.Enabled = True
  315.  
  316. If keycode = StartGameKey Then
  317. If((PlayersPlayingGame <MaxPlayers) AND(bOnTheFirstBall = True) ) Then
  318.  
  319. If(bFreePlay = True) Then
  320. PlayersPlayingGame = PlayersPlayingGame + 1
  321. TotalGamesPlayed = TotalGamesPlayed + 1
  322. DMDFlush
  323. DMD "black.jpg", " ", PlayersPlayingGame & " PLAYERS", 500
  324. PlaySound "so_fanfare1"
  325. Else
  326. If(Credits> 0) then
  327. PlayersPlayingGame = PlayersPlayingGame + 1
  328. TotalGamesPlayed = TotalGamesPlayed + 1
  329. Credits = Credits - 1
  330. DMDFlush
  331. DMD "black.jpg", " ", PlayersPlayingGame & " PLAYERS", 500
  332. PlaySound "so_fanfare1"
  333. Else
  334. ' Not Enough Credits to start a game.
  335. DOF 140, DOFOff
  336. DMDFlush
  337. DMD "black.jpg", "CREDITS " &credits, "INSERT COIN", 500
  338. PlaySound "so_nocredits"
  339. End If
  340. End If
  341. End If
  342. End If
  343. Else ' If (GameInPlay)
  344.  
  345. If keycode = StartGameKey Then
  346. If(bFreePlay = True) Then
  347. If(BallsOnPlayfield = 0) Then
  348. ResetForNewGame()
  349. End If
  350. Else
  351. If(Credits> 0) Then
  352. If(BallsOnPlayfield = 0) Then
  353. Credits = Credits - 1
  354. ResetForNewGame()
  355. End If
  356. Else
  357. ' Not Enough Credits to start a game.
  358. DOF 140, DOFOff
  359. DMDFlush
  360. DMD "black.jpg", "CREDITS " &credits, "INSERT COIN", 500
  361. ShowTableInfo
  362. End If
  363. End If
  364. End If
  365. End If ' If (GameInPlay)
  366. End Sub
  367.  
  368. Sub Table1_KeyUp(ByVal keycode)
  369.  
  370.  
  371. If hsbModeActive Then
  372. Exit Sub
  373. End If
  374.  
  375. ' Table specific
  376.  
  377. If bGameInPLay AND NOT Tilted Then
  378. If keycode = LeftFlipperKey Then
  379. SolLFlipper 0
  380. InstantInfoTimer.Enabled = False
  381. If bInstantInfo Then
  382. DMDScoreNow
  383. bInstantInfo = False
  384. End If
  385. End If
  386. If keycode = RightFlipperKey Then
  387. SolRFlipper 0
  388. InstantInfoTimer.Enabled = False
  389. If bInstantInfo Then
  390. DMDScoreNow
  391. bInstantInfo = False
  392. End If
  393. End If
  394. End If
  395. End Sub
  396.  
  397.  
  398. Sub InstantInfoTimer_Timer
  399. InstantInfoTimer.Enabled = False
  400. bInstantInfo = True
  401. DMDFlush
  402. UltraDMDTimer.Enabled = 1
  403. End Sub
  404.  
  405. Sub InstantInfo
  406. DMD "HighScores.gif", "", "", 2500
  407. Dim X
  408. ' Jackpot = 250000 (Score(CurrentPlayer) / 10, 0)
  409. DMD "black.jpg", "", "INSTANT INFO", 500
  410. x = LoadValue(TableName, "HighScore1")
  411. If(x <> "") Then HighScore(0) = CDbl(x) Else HighScore(0) = 100000 End If
  412. End Sub
  413.  
  414.  
  415.  
  416. '*************
  417. ' Pause Table
  418. '*************
  419.  
  420. Sub table1_Paused
  421. End Sub
  422.  
  423. Sub table1_unPaused
  424. End Sub
  425.  
  426. Sub table1_Exit
  427. Savehs
  428. Controller.Stop
  429. End Sub
  430.  
  431. '********************
  432. ' Special JP Flippers
  433. '********************
  434.  
  435. Sub SolLFlipper(Enabled)
  436. If Enabled Then
  437. PlaySound SoundFXDOF("fx_flipperup", 101, DOFOn, DOFFlippers), 0, 1, -0.05, 0.15
  438. LeftFlipper.RotateToEnd
  439. RotateLaneLightsLeft
  440. Else
  441. PlaySound SoundFXDOF("fx_flipperdown", 101, DOFOff, DOFFlippers), 0, 1, -0.05, 0.15
  442. LeftFlipper.RotateToStart
  443. End If
  444. End Sub
  445.  
  446. Sub SolRFlipper(Enabled)
  447. If Enabled Then
  448. PlaySound SoundFXDOF("fx_flipperup", 102, DOFOn, DOFFlippers), 0, 1, 0.05, 0.15
  449. RightFlipper.RotateToEnd
  450. RotateLaneLightsRight
  451.  
  452.  
  453. Else
  454. PlaySound SoundFXDOF("fx_flipperdown", 102, DOFOff, DOFFlippers), 0, 1, 0.05, 0.15
  455. RightFlipper.RotateToStart
  456. End If
  457. End Sub
  458.  
  459. ' flippers hit Sound
  460.  
  461. Sub LeftFlipper_Collide(parm)
  462. PlaySound "fx_rubber_flipper", 0, parm / 10, -0.05, 0.25
  463. End Sub
  464.  
  465. Sub RightFlipper_Collide(parm)
  466. PlaySound "fx_rubber_flipper", 0, parm / 10, 0.05, 0.25
  467. End Sub
  468.  
  469.  
  470. Sub UpdateFlipperLogo_Timer
  471. LFLogo.RotY = LeftFlipper.CurrentAngle
  472. RFlogo.RotY = RightFlipper.CurrentAngle
  473. End Sub
  474.  
  475.  
  476. Sub RotateLaneLightsLeft
  477. Dim TempState
  478. TempState = SP1.State
  479. SP1.State = SP2.State
  480. SP2.State = SP3.State
  481. SP3.State = SP4.State
  482. SP4.State = TempState
  483. End Sub
  484.  
  485. Sub RotateLaneLightsRight
  486. Dim TempState
  487. TempState = SP4.State
  488. SP4.State = SP3.State
  489. SP3.State = SP2.State
  490. SP2.State = SP1.State
  491. SP1.State = TempState
  492. End Sub
  493.  
  494. '*********
  495. ' TILT
  496. '*********
  497. 'NOTE: The TiltDecreaseTimer Subtracts .01 from the "Tilt" variable every round
  498.  
  499. Sub CheckTilt 'Called when table is nudged
  500. Tilt = Tilt + TiltSensitivity 'Add to tilt count
  501. TiltDecreaseTimer.Enabled = True
  502. If(Tilt> TiltSensitivity) AND(Tilt <15) Then 'show a warning
  503. DMDFlush
  504. DMD "black.jpg", " ", "CAREFUL!", 800
  505. DOF 131, DOFPulse
  506. DOF 311, DOFPulse 'DOF MX - Tilt Warning
  507. End if
  508. If Tilt> 15 Then 'If more that 15 then TILT the table
  509. Tilted = True
  510. 'display Tilt
  511. DMDFlush
  512. DMD "black.jpg", " ", "TILT!", 99999
  513. Playsound "tilt"
  514. DMDFlush
  515. DMD "black.jpg", " ", "TILT!", 99999
  516. Playsound "tilt"
  517. DOF 310, DOFPulse 'DOF MX - TILT
  518. DOF 127, DOFOff 'DOF - Beacon - OFF
  519. DisableTable True
  520. TiltRecoveryTimer.Enabled = True 'start the Tilt delay to check for all the balls to be drained
  521. End If
  522. End Sub
  523.  
  524. Sub TiltDecreaseTimer_Timer
  525. ' DecreaseTilt
  526. If Tilt> 0 Then
  527. Tilt = Tilt - 0.1
  528. Else
  529. TiltDecreaseTimer.Enabled = False
  530. End If
  531. End Sub
  532.  
  533. Sub DisableTable(Enabled)
  534. If Enabled Then
  535. 'turn off GI and turn off all the lights
  536. GiOff
  537. 'Disable slings, bumpers etc
  538. LeftFlipper.RotateToStart
  539. RightFlipper.RotateToStart
  540.  
  541.  
  542. LeftSlingshot.Disabled = 1
  543. RightSlingshot.Disabled = 1
  544. Else
  545. 'turn back on GI and the lights
  546. GiOn
  547. 'Bumper1.Force = 6
  548. LeftSlingshot.Disabled = 0
  549. RightSlingshot.Disabled = 0
  550.  
  551. 'clean up the buffer display
  552. DMDFlush
  553. End If
  554. End Sub
  555.  
  556. Sub TiltRecoveryTimer_Timer()
  557. ' if all the balls have been drained then..
  558. If(BallsOnPlayfield = 0) Then
  559. ' do the normal end of ball thing (this doesn't give a bonus if the table is tilted)
  560. EndOfBall()
  561. Me.Enabled = False
  562. End If
  563. ' else retry (checks again in another second or so)
  564. End Sub
  565.  
  566. '********************
  567. ' Music as wav sounds
  568. '********************
  569.  
  570.  
  571. Dim Song
  572. Song = ""
  573.  
  574. Sub PlaySong(name)
  575. If bMusicOn Then
  576. If Song <> name Then
  577. StopSound Song
  578. Song = name
  579. If Song = "mu_end" Then
  580. PlaySound Song, 0, 0.1 'this last number is the volume, from 0 to 1
  581. Else
  582. PlaySound Song, -1, 0.1 'this last number is the volume, from 0 to 1
  583. End If
  584. End If
  585. End If
  586. End Sub
  587.  
  588.  
  589.  
  590. '**********************
  591. ' GI effects
  592. ' independent routine
  593. ' it turns on the gi
  594. ' when there is a ball
  595. ' in play
  596. '**********************
  597.  
  598. Dim OldGiState
  599. OldGiState = -1 'start witht the Gi off
  600.  
  601. Sub ChangeGi(col) 'changes the gi color
  602. Dim bulb
  603. For each bulb in aGILights
  604. SetLightColor bulb, col, -1
  605. Next
  606. End Sub
  607.  
  608. Sub GIUpdateTimer_Timer
  609. Dim tmp, obj
  610. tmp = Getballs
  611. If UBound(tmp) <> OldGiState Then
  612. OldGiState = Ubound(tmp)
  613. If UBound(tmp) = -1 Then
  614. GiOff
  615. Else
  616. Gion
  617. End If
  618. End If
  619. End Sub
  620.  
  621. Sub GiOn
  622. DOF 126, DOFOn
  623. Dim bulb
  624. For each bulb in aGiLights
  625. bulb.State = 1
  626. Next
  627. Table1.ColorGradeImage = "ColorGradeLUT256x16_ConSat"
  628. End Sub
  629.  
  630. Sub GiOff
  631. DOF 126, DOFOff
  632. Dim bulb
  633. For each bulb in aGiLights
  634. bulb.State = 0
  635. Next
  636. Table1.ColorGradeImage = "ColorGradeLUT256x16_ConSatDark"
  637. End Sub
  638.  
  639. ' GI & light sequence effects
  640.  
  641. Sub GiEffect(n)
  642. Select Case n
  643. Case 0 'all off
  644. LightSeqGi.Play SeqAlloff
  645. Case 1 'all blink
  646. LightSeqGi.UpdateInterval = 4
  647. LightSeqGi.Play SeqBlinking, , 5, 100
  648. Case 2 'random
  649. LightSeqGi.UpdateInterval = 10
  650. LightSeqGi.Play SeqRandom, 5, , 1000
  651. Case 3 'upon
  652. LightSeqGi.UpdateInterval = 4
  653. LightSeqGi.Play SeqUpOn, 5, 1
  654. Case 4 ' left-right-left
  655. LightSeqGi.UpdateInterval = 5
  656. LightSeqGi.Play SeqLeftOn, 10, 1
  657. LightSeqGi.UpdateInterval = 5
  658. LightSeqGi.Play SeqRightOn, 10, 1
  659. End Select
  660. End Sub
  661.  
  662. Sub LightEffect(n)
  663. Select Case n
  664. Case 0 ' all off
  665. LightSeqInserts.Play SeqAlloff
  666. Case 1 'all blink
  667. LightSeqInserts.UpdateInterval = 10
  668. LightSeqInserts.Play SeqBlinking, , 10, 10
  669. Case 2 'random
  670. LightSeqInserts.UpdateInterval = 10
  671. LightSeqInserts.Play SeqRandom, 50, , 1000
  672. Case 3 'upon
  673. LightSeqInserts.UpdateInterval = 4
  674. LightSeqInserts.Play SeqUpOn, 10, 1
  675. Case 4 ' left-right-left
  676. LightSeqInserts.UpdateInterval = 5
  677. LightSeqInserts.Play SeqLeftOn, 10, 1
  678. LightSeqInserts.UpdateInterval = 5
  679. LightSeqInserts.Play SeqRightOn, 10, 1
  680. End Select
  681. End Sub
  682.  
  683. ' Flasher Effects using lights
  684.  
  685. Dim FEStep, FEffect
  686. FEStep = 0
  687. FEffect = 0
  688.  
  689. Sub FlashEffect(n)
  690. Dim ii
  691. Select case n
  692. Case 0 ' all off
  693. LightSeqFlasher.Play SeqAlloff
  694. Case 1 'all blink
  695. LightSeqFlasher.UpdateInterval = 10
  696. LightSeqFlasher.Play SeqBlinking, , 10, 10
  697. Case 2 'random
  698. LightSeqFlasher.UpdateInterval = 10
  699. LightSeqFlasher.Play SeqRandom, 50, , 1000
  700. Case 3 'upon
  701. LightSeqFlasher.UpdateInterval = 4
  702. LightSeqFlasher.Play SeqUpOn, 10, 1
  703. Case 4 ' left-right-left
  704. LightSeqFlasher.UpdateInterval = 5
  705. LightSeqFlasher.Play SeqLeftOn, 10, 1
  706. LightSeqFlasher.UpdateInterval = 5
  707. LightSeqFlasher.Play SeqRightOn, 10, 1
  708. End Select
  709. End Sub
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716. Sub GameTimer_Timer()
  717. RollingUpdate
  718. 'BallShadowUpdate
  719.  
  720. If Lame <= 0 Then
  721. LameAnimTimerOff.enabled = 0
  722. Lame = 0
  723. End If
  724. If Lame >= 45 Then
  725. LameAnimTimer.enabled = 0
  726. LameAnimTimerS.enabled = 1
  727. vpmtimer.addtimer 700, "LameAnimTimerOff.enabled = 1 '"
  728. vpmtimer.addtimer 750, "LameAnimTimerOffS '"
  729. End If
  730.  
  731.  
  732. If ActarusA = True And ActarusY >= 345 Then ActarusY = 0: ActarusA = False: ActarusMoveA.enabled = 0
  733. If ActarusB = True And ActarusY >= 235 Then ActarusY = 0: ActarusB = False: ActarusMoveB.enabled = 0
  734. If ActarusC = True And ActarusY >= 427 Then ActarusY = 0: ActarusC = False: ActarusMoveC.enabled = 0
  735.  
  736.  
  737. if GolgothRotateD >= 2000 Then
  738. GolgothRotateTimer.enabled = 0
  739. GolgothRotateD = 0
  740. End If
  741.  
  742. 'Boomeran
  743. If boomerD <= 0 Then
  744. TimerboomerOff.enabled = 0
  745. boomerD = 0
  746. End If
  747.  
  748. If boomerD >= 400 Then
  749. Timerboomer.enabled = 0
  750. vpmtimer.addtimer 200, "TimerboomerOff.enabled = 1 '"
  751. End If
  752.  
  753.  
  754. 'BrazosL
  755. If BrazosLD <= 1 Then
  756. BrazosLOff.enabled = 0
  757. BrazosLD = 0
  758. maglio2.Y = 1548
  759. maglio2.X = 136
  760. maglio2.Z = 107
  761. End If
  762.  
  763. If BrazosLD >= 250 Then
  764. BrazosL.enabled = 0
  765. BrazosLOff.enabled = 1
  766. End If
  767.  
  768. 'BrazosR
  769. If BrazosRD <= 1 Then
  770. BrazosROff.enabled = 0
  771. BrazosRD = 0
  772. maglio1.X = 807
  773. maglio1.Y = 1581
  774. maglio1.Z = 107
  775. End If
  776.  
  777. If BrazosRD >= 300 Then
  778. BrazosR.enabled = 0
  779. BrazosROff.enabled = 1
  780. End If
  781.  
  782. If A6.state = 0 Then
  783. A6P.image = "plasticYellow"
  784. End If
  785. If A6.state = 1 Then
  786. A6P.image = "PlasticWhite"
  787. End If
  788. If A7.state = 0 Then
  789. A7P.image = "plasticYellow"
  790. End If
  791. If A7.state = 1 Then
  792. A7P.image = "PlasticWhite"
  793. End If
  794. If A8.state = 0 Then
  795. A8P.image = "plasticYellow"
  796. End If
  797. If A8.state = 1 Then
  798. A8P.image = "PlasticWhite"
  799. End If
  800.  
  801. End Sub
  802.  
  803.  
  804.  
  805. ' *********************************************************************
  806. ' Supporting Ball & Sound Functions
  807. ' *********************************************************************
  808.  
  809. Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed
  810. Vol = Csng(BallVel(ball) ^2 / 1500)
  811. End Function
  812.  
  813. Function Pan(ball) ' Calculates the pan for a ball based on the X position on the table. "table1" is the name of the table
  814. Dim tmp
  815. tmp = ball.x * 2 / table1.width-1
  816. If tmp> 0 Then
  817. Pan = Csng(tmp ^10)
  818. Else
  819. Pan = Csng(-((- tmp) ^10) )
  820. End If
  821. End Function
  822.  
  823. Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed
  824. Pitch = BallVel(ball) * 20
  825. End Function
  826.  
  827. Function BallVel(ball) 'Calculates the ball speed
  828. BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) )
  829. End Function
  830.  
  831. '*****************************************
  832. ' JP's VP10 Rolling Sounds
  833. '*****************************************
  834.  
  835. Const tnob = 20 ' total number of balls
  836. Const lob = 0 'number of locked balls
  837. ReDim rolling(tnob)
  838. InitRolling
  839.  
  840. Sub InitRolling
  841. Dim i
  842. For i = 0 to tnob
  843. rolling(i) = False
  844. Next
  845. End Sub
  846.  
  847. Sub RollingUpdate()
  848. Dim BOT, b, ballpitch
  849. BOT = GetBalls
  850.  
  851. ' stop the sound of deleted balls
  852. For b = UBound(BOT) + 1 to tnob
  853. rolling(b) = False
  854. StopSound("fx_ballrolling" & b)
  855. Next
  856.  
  857. ' exit the sub if no balls on the table
  858. If UBound(BOT) = -1 Then Exit Sub 'there no extra balls on this table
  859.  
  860. ' play the rolling sound for each ball
  861. For b = lob to UBound(BOT)
  862. If BallVel(BOT(b) )> 1 Then
  863. If BOT(b).z <30 Then
  864. ballpitch = Pitch(BOT(b) )
  865. Else
  866. ballpitch = Pitch(BOT(b) ) * 50
  867. End If
  868. rolling(b) = True
  869. PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) ), Pan(BOT(b) ), 0, ballpitch, 1, 0
  870. Else
  871. If rolling(b) = True Then
  872. StopSound("fx_ballrolling" & b)
  873. rolling(b) = False
  874. End If
  875. End If
  876. Next
  877. End Sub
  878.  
  879. '**********************
  880. ' Ball Collision Sound
  881. '**********************
  882.  
  883. Sub OnBallBallCollision(ball1, ball2, velocity)
  884. PlaySound("fx_collide"), 0, Csng(velocity) ^2 / 2000, Pan(ball1), 0, Pitch(ball1), 0, 0
  885. End Sub
  886.  
  887.  
  888.  
  889.  
  890. '******************************
  891. ' Diverse Collection Hit Sounds
  892. '******************************
  893.  
  894. Sub aMetals_Hit(idx):PlaySound "fx_MetalHit", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  895. Sub aRubber_Pins_Hit(idx):PlaySound "fx_postrubber", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  896. Sub aPlastics_Hit(idx):PlaySound "fx_PlasticHit", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  897. Sub aGates_Hit(idx):PlaySound "fx_Gate", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  898. Sub aWoods_Hit(idx):PlaySound "fx_Woodhit", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  899.  
  900. Sub aRubber_Bands_Hit(idx):PlaySound "fx_rubber_band", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  901. Sub aRubber_Posts_Hit(idx):PlaySound "fx_rubber", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  902.  
  903.  
  904.  
  905.  
  906.  
  907. ' Some quotes from the 2 first movies
  908.  
  909. Sub PlayQuote_timer() 'one quote each 2 minutes
  910. Dim Quote
  911. Quote = "gb_quote" & INT(RND * 56) + 1
  912. PlaySound Quote
  913. End Sub
  914.  
  915. ' Ramp Soundss
  916. Sub RHelp_Hit()
  917. PlaySound "fx_ballrampdrop", 0, 1, pan(ActiveBall)
  918. End Sub
  919.  
  920. Sub RHelp2_Hit()
  921. StopSound "fx_metalrolling"
  922. PlaySound "fx_ballrampdrop", 0, 1, pan(ActiveBall)
  923. End Sub
  924.  
  925. Sub LHelp1_Hit()
  926. StopSound "fx_metalrolling"
  927. PlaySound "fx_ballrampdrop", 0, 1, pan(ActiveBall)
  928. End Sub
  929.  
  930. Sub Trigger212121_hit()
  931. StopSound "fx_metalrolling"
  932. PlaySound "fx_metalrolling", 0, 1, pan(ActiveBall)
  933. End Sub
  934.  
  935.  
  936. ' *********************************************************************
  937. ' User Defined Script Events
  938. ' *********************************************************************
  939.  
  940. ' Initialise the Table for a new Game
  941. '
  942. Sub ResetForNewGame()
  943. Dim i
  944.  
  945. 'Animaciones
  946. ActarusP.RotY = ActarusP.RotY = -45
  947. ActarusTimer360.enabled = 0
  948. AlabardaAnimOff
  949. diskoAnim
  950. DMDSmallSequence 0, 0
  951.  
  952. bGameInPLay = True
  953. PlaySong "GamePlay"
  954. 'resets the score display, and turn off attrack mode
  955. StopAttractMode
  956. GiOn
  957.  
  958. If B2SOn Then Controller.B2SSetData 1,1
  959.  
  960. TotalGamesPlayed = TotalGamesPlayed + 1
  961. CurrentPlayer = 1
  962. PlayersPlayingGame = 1
  963. bOnTheFirstBall = True
  964. For i = 1 To MaxPlayers
  965. Score(i) = 0
  966. BonusPoints(i) = 0
  967. BonusHeldPoints(i) = 0
  968. BonusMultiplier(i) = 1
  969. BallsRemaining(i) = BallsPerGame
  970. ExtraBallsAwards(i) = 0
  971. Next
  972.  
  973. ' initialise any other flags
  974. Tilt = 0
  975. ComboM = 0
  976. ' initialise Game variables
  977. Game_Init()
  978.  
  979. ' you may wish to start some music, play a sound, do whatever at this point
  980.  
  981. vpmtimer.addtimer 3500, "FirstBall '"
  982. End Sub
  983. ' This is used to delay the start of a game to allow any attract sequence to
  984. ' complete. When it expires it creates a ball for the player to start playing with
  985.  
  986. Sub FirstBall
  987. ' reset the table for a new ball
  988. ResetForNewPlayerBall()
  989. ' create a new ball in the shooters lane
  990. CreateNewBall()
  991. 'MiniDMD
  992. vpmtimer.addtimer 1500, "IntroSmallDMD '"
  993. End Sub
  994.  
  995. ' (Re-)Initialise the Table for a new ball (either a new ball after the player has
  996. ' lost one or we have moved onto the next player (if multiple are playing))
  997.  
  998. Sub ResetForNewPlayerBall()
  999. ' make sure the correct display is upto date
  1000. AddScore 0
  1001.  
  1002. ' set the current players bonus multiplier back down to 1X
  1003. SetBonusMultiplier 1
  1004.  
  1005. ' reset any drop targets, lights, game modes etc..
  1006. 'LightShootAgain.State = 0
  1007. ' Bonus = 0
  1008. bExtraBallWonThisBall = False
  1009. ResetNewBallLights()
  1010.  
  1011. 'This is a new ball, so activate the ballsaver
  1012. bBallSaverReady = True
  1013.  
  1014. 'and the skillshot
  1015. 'bSkillShotReady = True 'no skillshot in this game
  1016.  
  1017. 'Change the music ?
  1018.  
  1019. 'Reset any table specific
  1020. ' TargetBonus = 0
  1021. ' BumperBonus = 0
  1022. ' PokemonBonus = 0
  1023. ' HoleBonus = 0
  1024. ' EggBonus = 0
  1025.  
  1026.  
  1027.  
  1028. ' Bumperlanes reset:
  1029. FlashForMs bulb17, 100, 10, 0 'off
  1030. FlashForMs bulb25, 100, 10, 0 'off
  1031.  
  1032.  
  1033.  
  1034. End Sub
  1035.  
  1036. ' Create a new ball on the Playfield
  1037.  
  1038. Sub CreateNewBall()
  1039. ' create a ball in the plunger lane kicker.
  1040. BallRelease.CreateSizedball BallSize / 2
  1041. ' UpdateBallImage
  1042. ' There is a (or another) ball on the playfield
  1043. BallsOnPlayfield = BallsOnPlayfield + 1
  1044.  
  1045. ' kick it out..
  1046. PlaySound SoundFXDOF("fx_Ballrel", 114, DOFPulse, DOFContactors), 0, 1, 0.1, 0.1
  1047. BallRelease.Kick 90, 4
  1048.  
  1049. ' if there is 2 or more balls then set the multibal flag (remember to check for locked balls and other balls used for animations)
  1050. ' set the bAutoPlunger flag to kick the ball in play automatically
  1051. If BallsOnPlayfield > 1 Then
  1052. bMultiBallMode = True
  1053. DOF 127, DOFOn 'Beacon ON
  1054. bAutoPlunger = True
  1055. 'ChangeSong
  1056. ' PlaySong "Multiball"
  1057. End If
  1058. End Sub
  1059.  
  1060. ' Add extra balls to the table with autoplunger
  1061. ' Use it as AddMultiball 4 to add 4 extra balls to the table
  1062.  
  1063. Sub AddMultiball(nballs)
  1064. mBalls2Eject = mBalls2Eject + nballs
  1065. CreateMultiballTimer.Enabled = True
  1066. End Sub
  1067.  
  1068. ' Eject the ball after the delay, AddMultiballDelay
  1069. Sub CreateMultiballTimer_Timer()
  1070. ' wait if there is a ball in the plunger lane
  1071. If bBallInPlungerLane Then
  1072. Exit Sub
  1073. Else
  1074. CreateNewBall()
  1075. mBalls2Eject = mBalls2Eject -1
  1076. If mBalls2Eject = 0 Then 'if there are no more balls to eject then stop the timer
  1077. Me.Enabled = False
  1078. End If
  1079. End If
  1080. End Sub
  1081.  
  1082. ' The Player has lost his ball (there are no more balls on the playfield).
  1083. ' Handle any bonus points awarded
  1084. '
  1085. Sub EndOfBall()
  1086. Dim BonusDelayTime
  1087. ' the first ball has been lost. From this point on no new players can join in
  1088. bOnTheFirstBall = False
  1089.  
  1090. ' only process any of this if the table is not tilted. (the tilt recovery
  1091. ' mechanism will handle any extra balls or end of game)
  1092. If(Tilted = False) Then
  1093. Dim AwardPoints, TotalBonus
  1094. AwardPoints = 0:TotalBonus = 0
  1095.  
  1096. DMDBlink "black.jpg", " ", " LOST BALL ", 100, 20
  1097. LightEffect 1
  1098. FlashEffect 1
  1099. ' add in any bonus points (multipled by the bonus multiplier)
  1100. AwardPoints = BonusPoints(CurrentPlayer) * BonusMultiplier(CurrentPlayer)
  1101. AddScore AwardPoints
  1102. debug.print "Bonus Points = " & AwardPoints
  1103. 'DMD_DisplaySceneEx "DMD1.png", "AWARD: " & BonusPoints(CurrentPlayer), 15, 4, "Bonus", -1, -1, UltraDMD_Animation_None, 1000, UltraDMD_Animation_None
  1104. 'DMD_DisplaySceneEx "DMD1.png", "", 15, 4, "", -1, -1, UltraDMD_Animation_None, 5, UltraDMD_Animation_None
  1105. 'this table uses several bonus
  1106.  
  1107. ' DMD CenterLine(0, FormatScore(TotalBonus) ), CenterLine(1, "TOTAL BONUS " & " X" & BonusMultiplier(CurrentPlayer) ), 0, eBlinkFast, eNone, eNone, 1000, True, ""
  1108. ' TotalBonus = TotalBonus * BonusMultiplier(CurrentPlayer)
  1109.  
  1110. ' add a bit of a delay to allow for the bonus points to be shown & added up
  1111. BonusDelayTime = 3000
  1112. vpmtimer.addtimer BonusDelayTime, "Addscore TotalBonus '"
  1113. Else
  1114. 'no bonus to count so move quickly to the next stage
  1115. BonusDelayTime = 100
  1116. End If
  1117. ' start the end of ball timer which allows you to add a delay at this point
  1118. vpmtimer.addtimer BonusDelayTime, "EndOfBall2 '"
  1119. End Sub
  1120.  
  1121. ' The Timer which delays the machine to allow any bonus points to be added up
  1122. ' has expired. Check to see if there are any extra balls for this player.
  1123. ' if not, then check to see if this was the last ball (of the currentplayer)
  1124. '
  1125. Sub EndOfBall2()
  1126. ' if were tilted, reset the internal tilted flag (this will also
  1127. ' set TiltWarnings back to zero) which is useful if we are changing player LOL
  1128. Tilted = False
  1129. Tilt = 0
  1130. DisableTable False 'enable again bumpers and slingshots
  1131.  
  1132. ' has the player won an extra-ball ? (might be multiple outstanding)
  1133. If(ExtraBallsAwards(CurrentPlayer) <> 0) Then
  1134. debug.print "Extra Ball"
  1135. DMDBlink "black.jpg", " ", "Extra Ball", 100, 20
  1136. ' yep got to give it to them
  1137. ExtraBallsAwards(CurrentPlayer) = ExtraBallsAwards(CurrentPlayer) - 1
  1138.  
  1139. ' if no more EB's then turn off any shoot again light
  1140. If(ExtraBallsAwards(CurrentPlayer) = 0) Then
  1141. FlashForMs ShootAgainLightF, 100, 10, 0 'off
  1142. ShootAgainLight.State = 0
  1143. playsound "Shootagain"
  1144. End If
  1145.  
  1146. ' You may wish to do a bit of a song AND dance at this point
  1147.  
  1148. ' Create a new ball in the shooters lane
  1149. CreateNewBall()
  1150. Else ' no extra balls
  1151.  
  1152. BallsRemaining(CurrentPlayer) = BallsRemaining(CurrentPlayer) - 1
  1153.  
  1154. ' was that the last ball ?
  1155. If(BallsRemaining(CurrentPlayer) <= 0) Then
  1156. debug.print "No More Balls, High Score Entry"
  1157. If B2SOn Then Controller.B2SSetData 1,0
  1158. ' Submit the currentplayers score to the High Score system
  1159. CheckHighScore()
  1160. ' you may wish to play some music at this point
  1161.  
  1162. Else
  1163.  
  1164. ' not the last ball (for that player)
  1165. ' if multiple players are playing then move onto the next one
  1166. EndOfBallComplete()
  1167. End If
  1168. End If
  1169. End Sub
  1170.  
  1171. ' This function is called when the end of bonus display
  1172. ' (or high score entry finished) AND it either end the game or
  1173. ' move onto the next player (or the next ball of the same player)
  1174. '
  1175. Sub EndOfBallComplete()
  1176. Dim NextPlayer
  1177.  
  1178. 'debug.print "EndOfBall - Complete"
  1179.  
  1180. ' are there multiple players playing this game ?
  1181. If(PlayersPlayingGame> 1) Then
  1182. ' then move to the next player
  1183. NextPlayer = CurrentPlayer + 1
  1184. ' are we going from the last player back to the first
  1185. ' (ie say from player 4 back to player 1)
  1186. If(NextPlayer> PlayersPlayingGame) Then
  1187. NextPlayer = 1
  1188. End If
  1189. Else
  1190. NextPlayer = CurrentPlayer
  1191. End If
  1192.  
  1193. 'debug.print "Next Player = " & NextPlayer
  1194.  
  1195. ' is it the end of the game ? (all balls been lost for all players)
  1196. If((BallsRemaining(CurrentPlayer) <= 0) AND(BallsRemaining(NextPlayer) <= 0) ) Then
  1197. ' you may wish to do some sort of Point Match free game award here
  1198. ' generally only done when not in free play mode
  1199.  
  1200. ' set the machine into game over mode
  1201. EndOfGame()
  1202. BHit = 0
  1203. ' you may wish to put a Game Over message on the desktop/backglass
  1204.  
  1205. Else
  1206. ' set the next player
  1207. CurrentPlayer = NextPlayer
  1208.  
  1209. ' make sure the correct display is up to date
  1210. AddScore 0
  1211.  
  1212. ' reset the playfield for the new player (or new ball)
  1213. ResetForNewPlayerBall()
  1214.  
  1215. ' AND create a new ball
  1216. CreateNewBall()
  1217.  
  1218. ' play a sound if more than 1 player
  1219. If PlayersPlayingGame> 1 Then
  1220. PlaySound "vo_player" &CurrentPlayer
  1221. DMD "black.jpg", " ", "PLAYER " &CurrentPlayer, 800
  1222. End If
  1223. End If
  1224. End Sub
  1225.  
  1226. ' This function is called at the End of the Game, it should reset all
  1227. ' Drop targets, AND eject any 'held' balls, start any attract sequences etc..
  1228.  
  1229. Sub EndOfGame()
  1230. 'debug.print "End Of Game"
  1231. bGameInPLay = False
  1232. ' just ended your game then play the end of game tune
  1233. If NOT bJustStarted Then
  1234. 'PlaySong "m_end"
  1235. End If
  1236.  
  1237. BHit = 0
  1238.  
  1239. bJustStarted = False
  1240. ' ensure that the flippers are down
  1241. SolLFlipper 0
  1242. SolRFlipper 0
  1243.  
  1244. ' terminate all Mode - eject locked balls
  1245. ' most of the Mode/timers terminate at the end of the ball
  1246. 'PlayQuote.Enabled = 0
  1247. ' show game over on the DMD
  1248. StopSound "mu_GamePlay"
  1249. DMD "black.jpg", " ", "GAME OVER", 1500
  1250.  
  1251. ' set any lights for the attract mode
  1252. GiOff
  1253. StartAttractMode
  1254.  
  1255. ActarusTimer360.enabled = 1
  1256. diskoAnimOff
  1257. ' you may wish to light any Game Over Light you may have
  1258. End Sub
  1259.  
  1260. Function Balls
  1261. Dim tmp
  1262. tmp = BallsPerGame - BallsRemaining(CurrentPlayer) + 1
  1263. If tmp > BallsPerGame Then
  1264. Balls = BallsPerGame
  1265. Else
  1266. Balls = tmp
  1267. End If
  1268. End Function
  1269.  
  1270. ' *********************************************************************
  1271. ' Drain / Plunger Functions
  1272. ' *********************************************************************
  1273.  
  1274. ' lost a ball ;-( check to see how many balls are on the playfield.
  1275. ' if only one then decrement the remaining count AND test for End of game
  1276. ' if more than 1 ball (multi-ball) then kill of the ball but don't create
  1277. ' a new one
  1278. '
  1279. Sub Drain_Hit()
  1280. startB2S(5)
  1281. 'GolgothRotateTimer.enabled = 0
  1282. if ballsonplayfield = 2 and ShootAgainLight.state = 0 then
  1283. 'DMDframe.set true, 1
  1284. J1.state = 0
  1285. J2.state = 0
  1286. J3.state = 0
  1287. J4.state = 0
  1288.  
  1289. StopSound Song:Song = ""
  1290. PlaySong "mu_GamePlay"
  1291. 'playmusic 1, "GAMEPLAY2songs", true
  1292. 'effectmusic 1, fadeoutandpause, 0, 10
  1293. 'musicin.set true, 100
  1294. 'duringMULTIBALL.stopplay
  1295. ExtraBall.state = 2
  1296. 'hologram.frame 211
  1297. end if
  1298.  
  1299. if ballsonplayfield = 2 and ShootAgainLight.state = 1 then
  1300. 'DMDframe.set true, 1
  1301. J1.state = 0
  1302. J2.state = 0
  1303. J3.state = 0
  1304. J4.state = 0
  1305.  
  1306. StopSound Song:Song = ""
  1307. PlaySong "mu_GamePlay"
  1308. 'playmusic 1, "GAMEPLAY2songs", true
  1309. 'effectmusic 1, fadeoutandpause, 0, 10
  1310. 'musicin.set true, 100
  1311. 'duringMULTIBALL.stopplay
  1312. ExtraBall.state = 2
  1313. 'hologram.frame 211
  1314. end if
  1315.  
  1316.  
  1317. ' Destroy the ball
  1318. Drain.DestroyBall
  1319. BallsOnPlayfield = BallsOnPlayfield - 1
  1320. ' pretend to knock the ball into the ball storage mech
  1321. PlaySound "fx_drain"
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327. ' if there is a game in progress AND it is not Tilted
  1328. If(bGameInPLay = True) AND(Tilted = False) Then
  1329.  
  1330. ' is the ball saver active,
  1331. If(bBallSaverActive = True) Then
  1332.  
  1333. ' yep, create a new ball in the shooters lane
  1334. ' we use the Addmultiball in case the multiballs are being ejected
  1335. AddMultiball 1
  1336. ' we kick the ball with the autoplunger
  1337. bAutoPlunger = True
  1338. ' you may wish to put something on a display or play a sound at this point
  1339. ' DMD_DisplaySceneEx "DMD1.png", "", 14, 2, "BALL SAVED", -1, -1, UltraDMD_Animation_ScrollOnUp, 1200, UltraDMD_Animation_ScrollOffDown
  1340. GiEffect 2
  1341. FlashEffect 2
  1342. DMDBlink "black.jpg", " ", " BALL SAVED ", 150, 20
  1343. Else
  1344. ' cancel any multiball if on last ball (ie. lost all other balls)
  1345. If(BallsOnPlayfield = 1) Then
  1346. ' AND in a multi-ball??
  1347. If(bMultiBallMode = True) then
  1348. ' not in multiball mode any more
  1349. bMultiBallMode = False
  1350. DOF 127, DOFOff 'DOF - Beacon - OFF
  1351. ' ChangeGi "white"
  1352. ' you may wish to change any music over at this point and
  1353. ' turn off any multiball specific lights
  1354. ' ResetJackpotLights
  1355. 'ChangeSong
  1356. ' PlaySong "GamePlay"
  1357.  
  1358. End If
  1359. End If
  1360.  
  1361. ' was that the last ball on the playfield
  1362. If(BallsOnPlayfield = 0) Then
  1363. ' handle the end of ball (change player, high score entry etc..)
  1364.  
  1365. EndOfBall()
  1366. ' End Modes and timers
  1367. ' If bCatchemMode Then StopCatchem_Timer
  1368. ' If bcoinfrenzy Then StopCoinFrenzyTimer_Timer
  1369. ' If bPikachuTargetMode Then PikachuTargetTimer_Timer
  1370. ' If bCharizardMode Then StopCharizardTimer_Timer
  1371. ' If bRampBonus Then StopRampBonusTimer_Timer
  1372. ' If bLoopBonus Then StopLoopBonusTimer_Timer
  1373. if kickbacklit.state = 0 Then
  1374. kickbacktargets()
  1375. End If
  1376. End If
  1377. End If
  1378. End If
  1379. End Sub
  1380.  
  1381. ' The Ball has rolled out of the Plunger Lane and it is pressing down the trigger in the shooters lane
  1382. ' Check to see if a ball saver mechanism is needed and if so fire it up.
  1383.  
  1384.  
  1385. Sub ballrelease_UnHit
  1386. DMD "BallRelease.gif", "", "", 1000
  1387. End Sub
  1388.  
  1389.  
  1390.  
  1391.  
  1392. Sub swPlungerRest_Hit()
  1393. startB2S(6)
  1394. 'debug.print "ball in plunger lane"
  1395. ' some sound according to the ball position
  1396. PlaySound "fx_sensor", 0, 1, 0.15, 0.25
  1397. bBallInPlungerLane = True
  1398. ' turn on Launch light is there is one
  1399. LaunchLight.State = 2
  1400.  
  1401. 'be sure to update the Scoreboard after the animations, if any
  1402. UltraDMDScoreTimer.Enabled = 1
  1403.  
  1404. ' kick the ball in play if the bAutoPlunger flag is on
  1405. If bAutoPlunger Then
  1406. 'debug.print "autofire the ball"
  1407. PlungerIM.AutoFire
  1408. DOF 114, DOFPulse
  1409. DOF 115, DOFPulse
  1410. DOF 318, DOFPulse 'DOF MX - Autoplunger - Launch Ball
  1411. bAutoPlunger = False
  1412. End If
  1413. DOF 141, DOFOn
  1414. DOF 317, DOFOn 'DOF MX - Ball is ready to Launch - ON
  1415. ' if there is a need for a ball saver, then start off a timer
  1416. ' only start if it is ready, and it is currently not running, else it will reset the time period
  1417. If(bBallSaverReady = True) AND(BallSaverTime <> 0) And(bBallSaverActive = False) Then
  1418. EnableBallSaver BallSaverTime
  1419. End If
  1420. 'Start the Selection of the skillshot if ready
  1421. If bSkillShotReady Then
  1422. swPlungerRest.TimerEnabled = 1 ' this is a new ball, so show the launch ball if inactive for 6 seconds
  1423. UpdateSkillshot()
  1424. End If
  1425. ' remember last trigger hit by the ball.
  1426. LastSwitchHit = "swPlungerRest"
  1427. End Sub
  1428.  
  1429.  
  1430. ' The ball is released from the plunger turn off some flags and check for skillshot
  1431.  
  1432. Sub swPlungerRest_UnHit()
  1433. bBallInPlungerLane = False
  1434. DMD "PlungerLane.gif", "", "", 2500
  1435. swPlungerRest.TimerEnabled = 0 'stop the launch ball timer if active
  1436. If bSkillShotReady Then
  1437. ResetSkillShotTimer.Enabled = 1
  1438. End If
  1439. If NOT bMultiballMode Then
  1440. 'PlaySong "mu_GamePlay"
  1441. End If
  1442. LaserKickP.TransY = 100
  1443. Playsound "bumper_retro"
  1444. End Sub
  1445.  
  1446.  
  1447. ' swPlungerRest timer to show the "launch ball" if the player has not shot the ball during 6 seconds
  1448.  
  1449. Sub swPlungerRest_Timer
  1450. DMD "black.jpg", "Player "&CurrentPlayer, "let's play", 3000
  1451. swPlungerRest.TimerEnabled = 0
  1452. End Sub
  1453.  
  1454.  
  1455. Sub EnableBallSaver(seconds)
  1456. 'debug.print "Ballsaver started"
  1457. ' set our game flag
  1458. bBallSaverActive = True
  1459. bBallSaverReady = False
  1460. ' start the timer
  1461. BallSaverTimerExpired.Interval = 1000 * seconds
  1462. BallSaverTimerExpired.Enabled = True
  1463. BallSaverSpeedUpTimer.Interval = 1000 * seconds -(1000 * seconds) / 3
  1464. BallSaverSpeedUpTimer.Enabled = True
  1465. ' if you have a ball saver light you might want to turn it on at this point (or make it flash)
  1466. ShootAgainLight.BlinkInterval = 160
  1467. SetLightColor ShootAgainLight, green, 2
  1468. End Sub
  1469.  
  1470. ' The ball saver timer has expired. Turn it off AND reset the game flag
  1471. '
  1472. Sub BallSaverTimerExpired_Timer()
  1473. 'debug.print "Ballsaver ended"
  1474. BallSaverTimerExpired.Enabled = False
  1475. ' clear the flag
  1476. bBallSaverActive = False
  1477. ' if you have a ball saver light then turn it off at this point
  1478. ShootAgainLight.State = 0
  1479. End Sub
  1480.  
  1481. Sub BallSaverSpeedUpTimer_Timer()
  1482. 'debug.print "Ballsaver Speed Up Light"
  1483. BallSaverSpeedUpTimer.Enabled = False
  1484. ' Speed up the blinking
  1485. ShootAgainLight.BlinkInterval = 80
  1486. ShootAgainLight.State = 2
  1487. End Sub
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495. ' *********************************************************************
  1496. ' Supporting Score Functions
  1497. ' *********************************************************************
  1498.  
  1499. ' Add points to the score AND update the score board
  1500. '
  1501. Sub AddScore(points)
  1502. If(Tilted = False) Then
  1503. ' add the points to the current players score variable
  1504. Score(CurrentPlayer) = Score(CurrentPlayer) + points' * BallType
  1505. ' update the score displays
  1506. DMDScore
  1507. End if
  1508.  
  1509. ' you may wish to check to see if the player has gotten a replay
  1510. End Sub
  1511.  
  1512. ' Add bonus to the bonuspoints AND update the score board
  1513. '
  1514. Sub AddBonus(points)
  1515. If(Tilted = False) Then
  1516. ' add the bonus to the current players bonus variable
  1517. BonusPoints(CurrentPlayer) = BonusPoints(CurrentPlayer) + points
  1518. ' update the score displays
  1519. DMDScore
  1520. End if
  1521.  
  1522. ' you may wish to check to see if the player has gotten a replay
  1523. End Sub
  1524.  
  1525. Sub AddCoin(n)
  1526. If(Tilted = False) Then
  1527. ' add the coins to the current players coin variable
  1528. Coins(CurrentPlayer) = Coins(CurrentPlayer) + n
  1529. ' update the score displays
  1530. DMDScore
  1531. End if
  1532.  
  1533. ' check if there is enough coins to enable the update ball
  1534. If Coins(CurrentPlayer) > 249 Then
  1535. BallUpdateLight.State = 2
  1536. Else
  1537. BallUpdateLight.State = 0
  1538. End If
  1539. End Sub
  1540.  
  1541. ' Add some points to the current Jackpot.
  1542. '
  1543. Sub AddJackpot(points)
  1544. ' Jackpots only generally increment in multiball mode AND not tilted
  1545. ' but this doesn't have to be the case
  1546. If(Tilted = False) Then
  1547.  
  1548. If(bMultiBallMode = True) Then
  1549. Jackpot = Jackpot + points
  1550. ' you may wish to limit the jackpot to a upper limit, ie..
  1551. ' If (Jackpot >= 6000) Then
  1552. ' Jackpot = 6000
  1553. ' End if
  1554. End if
  1555. End if
  1556. End Sub
  1557.  
  1558. ' Will increment the Bonus Multiplier to the next level
  1559. '
  1560. Sub IncrementBonusMultiplier()
  1561. Dim NewBonusLevel
  1562.  
  1563. ' if not at the maximum bonus level
  1564. if(BonusMultiplier(CurrentPlayer) < MaxMultiplier) then
  1565. ' then set it the next next one AND set the lights
  1566. NewBonusLevel = BonusMultiplier(CurrentPlayer) + 1
  1567. SetBonusMultiplier(NewBonusLevel)
  1568. End if
  1569. End Sub
  1570.  
  1571. ' Set the Bonus Multiplier to the specified level AND set any lights accordingly
  1572. '
  1573. Sub SetBonusMultiplier(Level)
  1574. ' Set the multiplier to the specified level
  1575. BonusMultiplier(CurrentPlayer) = Level
  1576.  
  1577. ' If the multiplier is 1 then turn off all the bonus lights
  1578. If(BonusMultiplier(CurrentPlayer) = 1) Then
  1579. ' LightBonus2x.State = 0
  1580. ' LightBonus3x.State = 0
  1581. ' LightBigBonus.State = 0
  1582. Else
  1583. ' there is a bonus, turn on all the lights upto the current level
  1584. If(BonusMultiplier(CurrentPlayer) >= 2) Then
  1585. If(BonusMultiplier(CurrentPlayer) >= 2) Then
  1586. ' LightBonus2x.state = 1
  1587. End If
  1588. If(BonusMultiplier(CurrentPlayer) >= 3) Then
  1589. ' LightBonus3x.state = 1
  1590. End If
  1591. If(BonusMultiplier(CurrentPlayer) >= 4) Then
  1592. ' LightBigBonus.state = 1
  1593. End If
  1594. End If
  1595. ' etc..
  1596. End If
  1597. End Sub
  1598.  
  1599. Sub IncrementBonus(Amount)
  1600. Dim Value
  1601. AddBonus Amount * 1000
  1602. Bonus = Bonus + Amount
  1603. End Sub
  1604.  
  1605. Sub AwardSpecial()
  1606. DMDBlink "black.jpg", " ", "EXTRA GAME WON", 100, 10
  1607. Credits = Credits + 1
  1608. GiEffect 1
  1609. LightEffect 1
  1610. End Sub
  1611.  
  1612.  
  1613. '*****************************
  1614. ' Load / Save / Highscore
  1615. '*****************************
  1616.  
  1617. Sub Loadhs
  1618. Dim x
  1619. x = LoadValue(TableName, "HighScore1")
  1620. If(x <> "") Then HighScore(0) = CDbl(x) Else HighScore(0) = 100000 End If
  1621.  
  1622. x = LoadValue(TableName, "HighScore1Name")
  1623. If(x <> "") Then HighScoreName(0) = x Else HighScoreName(0) = "AAA" End If
  1624.  
  1625. x = LoadValue(TableName, "HighScore2")
  1626. If(x <> "") then HighScore(1) = CDbl(x) Else HighScore(1) = 100000 End If
  1627.  
  1628. x = LoadValue(TableName, "HighScore2Name")
  1629. If(x <> "") then HighScoreName(1) = x Else HighScoreName(1) = "BBB" End If
  1630.  
  1631. x = LoadValue(TableName, "HighScore3")
  1632. If(x <> "") then HighScore(2) = CDbl(x) Else HighScore(2) = 100000 End If
  1633.  
  1634. x = LoadValue(TableName, "HighScore3Name")
  1635. If(x <> "") then HighScoreName(2) = x Else HighScoreName(2) = "CCC" End If
  1636.  
  1637. x = LoadValue(TableName, "HighScore4")
  1638. If(x <> "") then HighScore(3) = CDbl(x) Else HighScore(3) = 100000 End If
  1639.  
  1640. x = LoadValue(TableName, "HighScore4Name")
  1641. If(x <> "") then HighScoreName(3) = x Else HighScoreName(3) = "DDD" End If
  1642.  
  1643. x = LoadValue(TableName, "Credits")
  1644. If(x <> "") then Credits = CInt(x) Else Credits = 0 End If
  1645.  
  1646. 'x = LoadValue(TableName, "Jackpot")
  1647. 'If(x <> "") then Jackpot = CDbl(x) Else Jackpot = 200000 End If
  1648. x = LoadValue(TableName, "TotalGamesPlayed")
  1649. If(x <> "") then TotalGamesPlayed = CInt(x) Else TotalGamesPlayed = 0 End If
  1650. End Sub
  1651.  
  1652. Sub Savehs
  1653. SaveValue TableName, "HighScore1", HighScore(0)
  1654. SaveValue TableName, "HighScore1Name", HighScoreName(0)
  1655. SaveValue TableName, "HighScore2", HighScore(1)
  1656. SaveValue TableName, "HighScore2Name", HighScoreName(1)
  1657. SaveValue TableName, "HighScore3", HighScore(2)
  1658. SaveValue TableName, "HighScore3Name", HighScoreName(2)
  1659. SaveValue TableName, "HighScore4", HighScore(3)
  1660. SaveValue TableName, "HighScore4Name", HighScoreName(3)
  1661. SaveValue TableName, "Credits", Credits
  1662. 'SaveValue TableName, "Jackpot", Jackpot
  1663. SaveValue TableName, "TotalGamesPlayed", TotalGamesPlayed
  1664. End Sub
  1665.  
  1666. ' ***********************************************************
  1667. ' High Score Initals Entry Functions - based on Black's code
  1668. ' ***********************************************************
  1669.  
  1670. Dim hsbModeActive
  1671. Dim hsEnteredName
  1672. Dim hsEnteredDigits(3)
  1673. Dim hsCurrentDigit
  1674. Dim hsValidLetters
  1675. Dim hsCurrentLetter
  1676. Dim hsLetterFlash
  1677.  
  1678. Sub CheckHighscore()
  1679. Dim tmp
  1680. tmp = Score(1)
  1681.  
  1682. If Score(2)> tmp Then tmp = Score(2)
  1683. If Score(3)> tmp Then tmp = Score(3)
  1684. If Score(4)> tmp Then tmp = Score(4)
  1685.  
  1686. If tmp> HighScore(1) Then 'add 1 credit for beating the highscore
  1687. AwardSpecial
  1688. End If
  1689.  
  1690. If tmp> HighScore(3) Then
  1691. vpmtimer.addtimer 2000, "PlaySound ""goldrake voce"" '"
  1692. HighScore(3) = tmp
  1693. 'enter player's name
  1694. HighScoreEntryInit()
  1695. DOF 403, DOFPulse 'DOF MX - Hi Score
  1696. Else
  1697. EndOfBallComplete()
  1698. End If
  1699. End Sub
  1700.  
  1701. Sub HighScoreEntryInit()
  1702. hsbModeActive = True
  1703. PlaySound "fx_knocker"
  1704. hsLetterFlash = 0
  1705.  
  1706. hsEnteredDigits(0) = "A"
  1707. hsEnteredDigits(1) = "A"
  1708. hsEnteredDigits(2) = "A"
  1709. hsCurrentDigit = 0
  1710.  
  1711. hsValidLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ<+-0123456789" ' < is used to delete the last letter
  1712. hsCurrentLetter = 1
  1713. DMDFlush
  1714. DMDId "hsc", "Enter.png", "YOUR NAME:", " ", 999999
  1715. HighScoreDisplayName()
  1716. End Sub
  1717.  
  1718. Sub EnterHighScoreKey(keycode)
  1719. If keycode = LeftFlipperKey Then
  1720. Playsound "fx_Previous"
  1721. hsCurrentLetter = hsCurrentLetter - 1
  1722. if(hsCurrentLetter = 0) then
  1723. hsCurrentLetter = len(hsValidLetters)
  1724. end if
  1725. HighScoreDisplayName()
  1726. End If
  1727.  
  1728. If keycode = RightFlipperKey Then
  1729. Playsound "fx_Next"
  1730. hsCurrentLetter = hsCurrentLetter + 1
  1731. if(hsCurrentLetter> len(hsValidLetters) ) then
  1732. hsCurrentLetter = 1
  1733. end if
  1734. HighScoreDisplayName()
  1735. End If
  1736.  
  1737. If keycode = StartGameKey OR keycode = PlungerKey Then
  1738. if(mid(hsValidLetters, hsCurrentLetter, 1) <> "<") then
  1739. playsound "fx_Enter"
  1740. hsEnteredDigits(hsCurrentDigit) = mid(hsValidLetters, hsCurrentLetter, 1)
  1741. hsCurrentDigit = hsCurrentDigit + 1
  1742. if(hsCurrentDigit = 3) then
  1743. HighScoreCommitName()
  1744. else
  1745. HighScoreDisplayName()
  1746. end if
  1747. else
  1748. playsound "fx_Esc"
  1749. hsEnteredDigits(hsCurrentDigit) = " "
  1750. if(hsCurrentDigit> 0) then
  1751. hsCurrentDigit = hsCurrentDigit - 1
  1752. end if
  1753. HighScoreDisplayName()
  1754. end if
  1755. end if
  1756. End Sub
  1757.  
  1758. Sub HighScoreDisplayName()
  1759. Dim i, TempStr
  1760.  
  1761. TempStr = " >"
  1762. if(hsCurrentDigit> 0) then TempStr = TempStr & hsEnteredDigits(0)
  1763. if(hsCurrentDigit> 1) then TempStr = TempStr & hsEnteredDigits(1)
  1764. if(hsCurrentDigit> 2) then TempStr = TempStr & hsEnteredDigits(2)
  1765.  
  1766. if(hsCurrentDigit <> 3) then
  1767. if(hsLetterFlash <> 0) then
  1768. TempStr = TempStr & "_"
  1769. else
  1770. TempStr = TempStr & mid(hsValidLetters, hsCurrentLetter, 1)
  1771. end if
  1772. end if
  1773.  
  1774. if(hsCurrentDigit <1) then TempStr = TempStr & hsEnteredDigits(1)
  1775. if(hsCurrentDigit <2) then TempStr = TempStr & hsEnteredDigits(2)
  1776.  
  1777. TempStr = TempStr & "< "
  1778. DMDMod "hsc", "YOUR NAME:", Mid(TempStr, 2, 5), 999999
  1779. End Sub
  1780.  
  1781. Sub HighScoreCommitName()
  1782. hsbModeActive = False
  1783. 'PlaySong "m_end"
  1784. hsEnteredName = hsEnteredDigits(0) & hsEnteredDigits(1) & hsEnteredDigits(2)
  1785. if(hsEnteredName = " ") then
  1786. hsEnteredName = "YOU"
  1787. end if
  1788.  
  1789. HighScoreName(3) = hsEnteredName
  1790. SortHighscore
  1791. DMDFlush
  1792. EndOfBallComplete()
  1793. End Sub
  1794.  
  1795. Sub SortHighscore
  1796. Dim tmp, tmp2, i, j
  1797. For i = 0 to 3
  1798. For j = 0 to 2
  1799. If HighScore(j) <HighScore(j + 1) Then
  1800. tmp = HighScore(j + 1)
  1801. tmp2 = HighScoreName(j + 1)
  1802. HighScore(j + 1) = HighScore(j)
  1803. HighScoreName(j + 1) = HighScoreName(j)
  1804. HighScore(j) = tmp
  1805. HighScoreName(j) = tmp2
  1806. End If
  1807. Next
  1808. Next
  1809. End Sub
  1810.  
  1811.  
  1812.  
  1813. '***********************************************************************************
  1814. ' JPS DMD - very simple DMD routines using UltraDMD
  1815. '***********************************************************************************
  1816.  
  1817. Dim UltraDMD
  1818.  
  1819. ' DMD using UltraDMD calls
  1820.  
  1821. Sub DMD(background, toptext, bottomtext, duration)
  1822. UltraDMD.DisplayScene00 background, toptext, 15, bottomtext, 15, 14, duration, 14
  1823. UltraDMDScoreTimer.Enabled = 1 'to show the score after the animation/message
  1824. End Sub
  1825.  
  1826. Sub DMDBlink(background, toptext, bottomtext, duration, nblinks) 'blinks the lower text nblinks times
  1827. Dim i
  1828. For i = 1 to nblinks
  1829. UltraDMD.DisplayScene00 background, toptext, 15, bottomtext, 15, 14, duration, 14
  1830. Next
  1831.  
  1832. UltraDMDScoreTimer.Enabled = 1 'to show the score after the animation/message
  1833. End Sub
  1834.  
  1835. Sub DMDScore
  1836. If NOT UltraDMD.IsRendering Then
  1837. UltraDMD.SetScoreboardBackgroundImage "DMD.jpg", 15, 15
  1838. UltraDMD.DisplayScoreboard PlayersPlayingGame, CurrentPlayer, Score(1), Score(2), Score(3), Score(4), "Player " & CurrentPlayer, "Ball " & Balls
  1839. Else
  1840. UltraDMDScoreTimer.Enabled = 1
  1841. End If
  1842.  
  1843. End Sub
  1844.  
  1845. Sub DMDScoreNow
  1846. DMDFlush
  1847. DMDScore
  1848. End Sub
  1849.  
  1850. Sub DMDFLush
  1851. UltraDMDTimer.Enabled = 0
  1852. UltraDMDScoreTimer.Enabled = 0
  1853. UltraDMD.CancelRendering
  1854. UltraDMD.Clear
  1855. End Sub
  1856.  
  1857. Sub DMDScrollCredits(background, text, duration)
  1858. UltraDMD.ScrollingCredits background, text, 15, 14, duration, 14
  1859. End Sub
  1860.  
  1861. Sub DMDId(id, background, toptext, bottomtext, duration)
  1862. UltraDMD.DisplayScene00ExwithID id, False, background, toptext, 15, 0, bottomtext, 15, 0, 14, duration, 14
  1863. End Sub
  1864.  
  1865. Sub DMDMod(id, toptext, bottomtext, duration)
  1866. UltraDMD.ModifyScene00Ex id, toptext, bottomtext, duration
  1867. End Sub
  1868.  
  1869. Sub UltraDMDTimer_Timer() 'used for repeating the attrack mode and the instant info.
  1870. If bInstantInfo Then
  1871. InstantInfo
  1872. ElseIf bAttractMode Then
  1873. ShowTableInfo
  1874. End If
  1875. End Sub
  1876.  
  1877. Sub UltraDMDScoreTimer_Timer()
  1878. If NOT UltraDMD.IsRendering Then
  1879. DMDScoreNow
  1880. End If
  1881. End Sub
  1882.  
  1883.  
  1884.  
  1885.  
  1886. Sub DMD_Init
  1887. Set UltraDMD = CreateObject("UltraDMD.DMDObject")
  1888. If UltraDMD is Nothing Then
  1889. MsgBox "No UltraDMD found. This table will NOT run without it."
  1890. Exit Sub
  1891. End If
  1892.  
  1893. UltraDMD.Init
  1894. If Not UltraDMD.GetMajorVersion = 1 Then
  1895. MsgBox "Incompatible Version of UltraDMD found."
  1896. Exit Sub
  1897. End If
  1898.  
  1899. If UltraDMD.GetMinorVersion <1 Then
  1900. MsgBox "Incompatible Version of UltraDMD found. Please update to version 1.1 or newer."
  1901. Exit Sub
  1902. End If
  1903.  
  1904. Dim fso:Set fso = CreateObject("Scripting.FileSystemObject")
  1905. Dim curDir:curDir = fso.GetAbsolutePathName(".")
  1906.  
  1907. Dim DirName
  1908. DirName = curDir& "\" &TableName& ".UltraDMD"
  1909.  
  1910. If Not fso.FolderExists(DirName) Then _
  1911. Msgbox "UltraDMD userfiles directory '" & DirName & "' does not exist." & CHR(13) & "No graphic images will be displayed on the DMD"
  1912. UltraDMD.SetProjectFolder DirName
  1913.  
  1914. ' wait for the animation to end
  1915. While UltraDMD.IsRendering = True
  1916. WEnd
  1917.  
  1918. ' Show ROM version number
  1919. DMDBlink "black.jpg", " ", " ", 1000,2
  1920. DMD "black.jpg", "Goldorak", "ROM VERS " &myVersion, 2000
  1921.  
  1922. End Sub
  1923.  
  1924.  
  1925.  
  1926.  
  1927.  
  1928. ' ********************************
  1929. ' Table info & Attract Mode
  1930. ' ********************************
  1931.  
  1932. Sub ShowTableInfo
  1933. Dim i
  1934.  
  1935.  
  1936. 'info goes in a loop only stopped by the credits and the startkey
  1937. If Score(1) Then
  1938. DMD "black.jpg", "PLAYER 1", Score(1), 3000
  1939. End If
  1940. If Score(2) Then
  1941. DMD "black.jpg", "PLAYER 2", Score(2), 3000
  1942. End If
  1943. If Score(3) Then
  1944. DMD "black.jpg", "PLAYER 3", Score(3), 3000
  1945. End If
  1946. If Score(4) Then
  1947. DMD "black.jpg", "PLAYER 4", Score(4), 3000
  1948. End If
  1949.  
  1950. 'coins or freeplay
  1951. If bFreePlay Then
  1952. DMD "black.jpg", " ", "FREE PLAY", 2500
  1953. DMD "introCompleta3.wmv", "", "", 109500
  1954. DMD "DMD.jpg", "", "", 2000
  1955. Else
  1956. If Credits> 0 Then
  1957. DMD "black.jpg", " CREDITS " &credits, " PRESS START ", 2000
  1958. DOF 140, DOFOn
  1959. Else
  1960. DMD "black.jpg", " CREDITS " &credits, " INSERT COIN ", 2000
  1961. DOF 140, DOFOff
  1962. End If
  1963. DMD "introCompleta3.wmv", "", "", 109500
  1964. DMD "HighScores.gif", "", "", 2500
  1965. End If
  1966.  
  1967. DMD "black.jpg", "HIGHSCORES", "1> " & HighScoreName(0) & " " & FormatNumber(HighScore(0), 0, , , -1), 3000
  1968. DMD "black.jpg", "HIGHSCORES", "2> " & HighScoreName(1) & " " & FormatNumber(HighScore(1), 0, , , -1), 3000
  1969. DMD "black.jpg", "HIGHSCORES", "3> " & HighScoreName(2) & " " & FormatNumber(HighScore(2), 0, , , -1), 3000
  1970. DMD "black.jpg", "HIGHSCORES", "4> " & HighScoreName(3) & " " & FormatNumber(HighScore(3), 0, , , -1), 3000
  1971. End Sub
  1972.  
  1973.  
  1974. Sub StartAttractMode()
  1975. DOF 323, DOFOn 'DOF MX - Attract Mode ON
  1976. bAttractMode = True
  1977. UltraDMDTimer.Enabled = 1
  1978. StartLightSeq
  1979. ShowTableInfo
  1980. 'Animaciones
  1981. ActarusTimer360.enabled = 1
  1982. AlabardaAnim()
  1983. 'Start SmallDMD
  1984. vpmtimer.AddTimer 25000, "IntroSmallDMD '"
  1985. End Sub
  1986.  
  1987. Sub StopAttractMode()
  1988. DOF 323, DOFOff 'DOF MX - Attract Mode Off
  1989. bAttractMode = False
  1990. DMDScoreNow
  1991. LightSeqAttract.StopPlay
  1992. LightSeqFlasher.StopPlay
  1993. 'StopSong
  1994. End Sub
  1995.  
  1996.  
  1997.  
  1998.  
  1999. '********************************************************************************************
  2000. ' Only for VPX 10.2 and higher.
  2001. ' FlashForMs will blink light or a flasher for TotalPeriod(ms) at rate of BlinkPeriod(ms)
  2002. ' When TotalPeriod done, light or flasher will be set to FinalState value where
  2003. ' Final State values are: 0=Off, 1=On, 2=Return to previous State
  2004. '********************************************************************************************
  2005.  
  2006. Sub FlashForMs(MyLight, TotalPeriod, BlinkPeriod, FinalState) 'thanks gtxjoe for the first myVersion
  2007.  
  2008. If TypeName(MyLight) = "Light" Then
  2009.  
  2010. If FinalState = 2 Then
  2011. FinalState = MyLight.State 'Keep the current light state
  2012. End If
  2013. MyLight.BlinkInterval = BlinkPeriod
  2014. MyLight.Duration 2, TotalPeriod, FinalState
  2015. ElseIf TypeName(MyLight) = "Flasher" Then
  2016.  
  2017. Dim steps
  2018.  
  2019. ' Store all blink information
  2020. steps = Int(TotalPeriod / BlinkPeriod + .5) 'Number of ON/OFF steps to perform
  2021. If FinalState = 2 Then 'Keep the current flasher state
  2022. FinalState = ABS(MyLight.Visible)
  2023. End If
  2024. MyLight.UserValue = steps * 10 + FinalState 'Store # of blinks, and final state
  2025.  
  2026. ' Start blink timer and create timer subroutine
  2027. MyLight.TimerInterval = BlinkPeriod
  2028. MyLight.TimerEnabled = 0
  2029. MyLight.TimerEnabled = 1
  2030. 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"
  2031. End If
  2032. End Sub
  2033.  
  2034.  
  2035. '******************************************
  2036. ' Change light color - simulate color leds
  2037. ' changes the light color and state
  2038. ' 10 colors: red, orange, amber, yellow...
  2039. '******************************************
  2040. ' in this table this colors are use to keep track of the progress during the acts and battles
  2041.  
  2042. 'colors
  2043. Dim red, orange, amber, yellow, darkgreen, green, blue, darkblue, purple, white
  2044.  
  2045. red = 10
  2046. orange = 9
  2047. amber = 8
  2048. yellow = 7
  2049. darkgreen = 6
  2050. green = 5
  2051. blue = 4
  2052. darkblue = 3
  2053. purple = 2
  2054. white = 1
  2055.  
  2056. Sub SetLightColor(n, col, stat)
  2057. Select Case col
  2058. Case 0
  2059. n.color = RGB(18, 0, 0)
  2060. n.colorfull = RGB(255, 0, 0)
  2061. Case red
  2062. n.color = RGB(18, 0, 0)
  2063. n.colorfull = RGB(255, 0, 0)
  2064. Case orange
  2065. n.color = RGB(18, 3, 0)
  2066. n.colorfull = RGB(255, 64, 0)
  2067. Case amber
  2068. n.color = RGB(193, 49, 0)
  2069. n.colorfull = RGB(255, 153, 0)
  2070. Case yellow
  2071. n.color = RGB(18, 18, 0)
  2072. n.colorfull = RGB(255, 255, 0)
  2073. Case darkgreen
  2074. n.color = RGB(0, 8, 0)
  2075. n.colorfull = RGB(0, 64, 0)
  2076. Case green
  2077. n.color = RGB(0, 18, 0)
  2078. n.colorfull = RGB(0, 255, 0)
  2079. Case blue
  2080. n.color = RGB(0, 18, 18)
  2081. n.colorfull = RGB(0, 255, 255)
  2082. Case darkblue
  2083. n.color = RGB(0, 8, 8)
  2084. n.colorfull = RGB(0, 64, 64)
  2085. Case purple
  2086. n.color = RGB(128, 0, 128)
  2087. n.colorfull = RGB(255, 0, 255)
  2088. Case white
  2089. n.color = RGB(255, 252, 224)
  2090. n.colorfull = RGB(193, 91, 0)
  2091. Case white
  2092. n.color = RGB(255, 252, 224)
  2093. n.colorfull = RGB(193, 91, 0)
  2094. End Select
  2095. If stat <> -1 Then
  2096. n.State = 0
  2097. n.State = stat
  2098. End If
  2099. End Sub
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107. Sub StartLightSeq()
  2108. 'lights sequences
  2109. LightSeqAttract.UpdateInterval = 25
  2110. LightSeqAttract.Play SeqBlinking, , 5, 150
  2111. LightSeqAttract.Play SeqRandom, 40, , 4000
  2112. LightSeqAttract.Play SeqAllOff
  2113. LightSeqAttract.UpdateInterval = 8
  2114. LightSeqAttract.Play SeqUpOn, 50, 1
  2115. LightSeqAttract.UpdateInterval = 8
  2116. LightSeqAttract.Play SeqDownOn, 25, 1
  2117. LightSeqAttract.UpdateInterval = 8
  2118. LightSeqAttract.Play SeqCircleOutOn, 15, 2
  2119. LightSeqAttract.UpdateInterval = 8
  2120. LightSeqAttract.Play SeqUpOn, 25, 1
  2121. LightSeqAttract.UpdateInterval = 8
  2122. LightSeqAttract.Play SeqDownOn, 25, 1
  2123. LightSeqAttract.UpdateInterval = 8
  2124. LightSeqAttract.Play SeqUpOn, 25, 1
  2125. LightSeqAttract.UpdateInterval = 8
  2126. LightSeqAttract.Play SeqDownOn, 25, 1
  2127. LightSeqAttract.UpdateInterval = 10
  2128. LightSeqAttract.Play SeqCircleOutOn, 15, 3
  2129. LightSeqAttract.UpdateInterval = 5
  2130. LightSeqAttract.Play SeqRightOn, 50, 1
  2131. LightSeqAttract.UpdateInterval = 5
  2132. LightSeqAttract.Play SeqLeftOn, 50, 1
  2133. LightSeqAttract.UpdateInterval = 8
  2134. LightSeqAttract.Play SeqRightOn, 50, 1
  2135. LightSeqAttract.UpdateInterval = 8
  2136. LightSeqAttract.Play SeqLeftOn, 50, 1
  2137. LightSeqAttract.UpdateInterval = 8
  2138. LightSeqAttract.Play SeqRightOn, 40, 1
  2139. LightSeqAttract.UpdateInterval = 8
  2140. LightSeqAttract.Play SeqLeftOn, 40, 1
  2141. LightSeqAttract.UpdateInterval = 10
  2142. LightSeqAttract.Play SeqRightOn, 30, 1
  2143. LightSeqAttract.UpdateInterval = 10
  2144. LightSeqAttract.Play SeqLeftOn, 30, 1
  2145. LightSeqAttract.UpdateInterval = 8
  2146. LightSeqAttract.Play SeqRightOn, 25, 1
  2147. LightSeqAttract.UpdateInterval = 8
  2148. LightSeqAttract.Play SeqLeftOn, 25, 1
  2149. LightSeqAttract.UpdateInterval = 8
  2150. LightSeqAttract.Play SeqRightOn, 15, 1
  2151. LightSeqAttract.UpdateInterval = 8
  2152. LightSeqAttract.Play SeqLeftOn, 15, 1
  2153. LightSeqAttract.UpdateInterval = 10
  2154. LightSeqAttract.Play SeqCircleOutOn, 15, 3
  2155. LightSeqAttract.UpdateInterval = 8
  2156. LightSeqAttract.Play SeqLeftOn, 25, 1
  2157. LightSeqAttract.UpdateInterval = 8
  2158. LightSeqAttract.Play SeqRightOn, 25, 1
  2159. LightSeqAttract.UpdateInterval = 8
  2160. LightSeqAttract.Play SeqLeftOn, 25, 1
  2161. LightSeqAttract.UpdateInterval = 8
  2162. LightSeqAttract.Play SeqUpOn, 25, 1
  2163. LightSeqAttract.UpdateInterval = 8
  2164. LightSeqAttract.Play SeqDownOn, 25, 1
  2165. LightSeqAttract.UpdateInterval = 8
  2166. LightSeqAttract.Play SeqUpOn, 25, 1
  2167. LightSeqAttract.UpdateInterval = 8
  2168. LightSeqAttract.Play SeqDownOn, 25, 1
  2169. LightSeqAttract.UpdateInterval = 5
  2170. LightSeqAttract.Play SeqStripe1VertOn, 50, 2
  2171. LightSeqAttract.UpdateInterval = 8
  2172. LightSeqAttract.Play SeqCircleOutOn, 15, 2
  2173. LightSeqAttract.UpdateInterval = 8
  2174. LightSeqAttract.Play SeqStripe1VertOn, 50, 3
  2175. LightSeqAttract.UpdateInterval = 8
  2176. LightSeqAttract.Play SeqLeftOn, 25, 1
  2177. LightSeqAttract.UpdateInterval = 8
  2178. LightSeqAttract.Play SeqRightOn, 25, 1
  2179. LightSeqAttract.UpdateInterval = 8
  2180. LightSeqAttract.Play SeqLeftOn, 25, 1
  2181. LightSeqAttract.UpdateInterval = 8
  2182. LightSeqAttract.Play SeqUpOn, 25, 1
  2183. LightSeqAttract.UpdateInterval = 8
  2184. LightSeqAttract.Play SeqDownOn, 25, 1
  2185. LightSeqAttract.UpdateInterval = 8
  2186. LightSeqAttract.Play SeqCircleOutOn, 15, 2
  2187. LightSeqAttract.UpdateInterval = 8
  2188. LightSeqAttract.Play SeqStripe2VertOn, 50, 3
  2189. LightSeqAttract.UpdateInterval = 8
  2190. LightSeqAttract.Play SeqLeftOn, 25, 1
  2191. LightSeqAttract.UpdateInterval = 8
  2192. LightSeqAttract.Play SeqRightOn, 25, 1
  2193. LightSeqAttract.UpdateInterval = 8
  2194. LightSeqAttract.Play SeqLeftOn, 25, 1
  2195. LightSeqAttract.UpdateInterval = 8
  2196. LightSeqAttract.Play SeqUpOn, 25, 1
  2197. LightSeqAttract.UpdateInterval = 8
  2198. LightSeqAttract.Play SeqDownOn, 25, 1
  2199. LightSeqAttract.UpdateInterval = 8
  2200. LightSeqAttract.Play SeqUpOn, 25, 1
  2201. LightSeqAttract.UpdateInterval = 8
  2202. LightSeqAttract.Play SeqDownOn, 25, 1
  2203. LightSeqAttract.UpdateInterval = 8
  2204. LightSeqAttract.Play SeqStripe1VertOn, 25, 3
  2205. LightSeqAttract.UpdateInterval = 8
  2206. LightSeqAttract.Play SeqStripe2VertOn, 25, 3
  2207. LightSeqAttract.UpdateInterval = 8
  2208. LightSeqAttract.Play SeqUpOn, 15, 1
  2209. LightSeqAttract.UpdateInterval = 8
  2210. LightSeqAttract.Play SeqDownOn, 15, 1
  2211. LightSeqAttract.UpdateInterval = 8
  2212. LightSeqAttract.Play SeqUpOn, 15, 1
  2213. LightSeqAttract.UpdateInterval = 8
  2214. LightSeqAttract.Play SeqDownOn, 15, 1
  2215. LightSeqAttract.UpdateInterval = 8
  2216. LightSeqAttract.Play SeqUpOn, 15, 1
  2217. LightSeqAttract.UpdateInterval = 8
  2218. LightSeqAttract.Play SeqDownOn, 15, 1
  2219. LightSeqAttract.UpdateInterval = 8
  2220. LightSeqAttract.Play SeqRightOn, 15, 1
  2221. LightSeqAttract.UpdateInterval = 8
  2222. LightSeqAttract.Play SeqLeftOn, 15, 1
  2223. LightSeqAttract.UpdateInterval = 8
  2224. LightSeqAttract.Play SeqRightOn, 15, 1
  2225. LightSeqAttract.UpdateInterval = 8
  2226. LightSeqAttract.Play SeqLeftOn, 15, 1
  2227. End Sub
  2228.  
  2229. Sub LightSeqAttract_PlayDone()
  2230. StartLightSeq()
  2231. End Sub
  2232.  
  2233. Sub LightSeqTilt_PlayDone()
  2234. LightSeqTilt.Play SeqAllOff
  2235. End Sub
  2236.  
  2237. Sub LightSeqSkillshot_PlayDone()
  2238. LightSeqSkillshot.Play SeqAllOff
  2239. End Sub
  2240.  
  2241.  
  2242. '***********************************************************************
  2243. ' *********************************************************************
  2244. ' Table Specific Script Starts Here
  2245. ' *********************************************************************
  2246. '***********************************************************************
  2247.  
  2248.  
  2249. ' tables walls and animations
  2250. Sub VPObjects_Init
  2251. End Sub
  2252.  
  2253.  
  2254. '**************
  2255. 'Animates Toys
  2256. '**************
  2257.  
  2258. 'Actarus
  2259. Sub ActarusTimer360_Timer
  2260. ActarusP.RotY = ActarusP.RotY + 5
  2261. End Sub
  2262.  
  2263.  
  2264.  
  2265.  
  2266. Dim ActarusA, ActarusB, ActarusC, ActarusY
  2267.  
  2268.  
  2269. Sub ActarusMoveA_Timer
  2270. ActarusP.RotY = 0
  2271. ActarusA = True
  2272. ActarusY = ActarusY + 5
  2273. ActarusP.RotY = ActarusY
  2274. End Sub
  2275.  
  2276. Sub ActarusMoveB_Timer
  2277. ActarusP.RotY = 0
  2278. ActarusB = True
  2279. ActarusY = ActarusY + 5
  2280. ActarusP.RotY = ActarusY
  2281. End Sub
  2282.  
  2283. Sub ActarusMoveC_Timer
  2284. ActarusP.RotY = 0
  2285. ActarusC = True
  2286. ActarusY = ActarusY + 5
  2287. ActarusP.RotY = ActarusY
  2288. End Sub
  2289.  
  2290.  
  2291.  
  2292. 'GolgothRotate
  2293. Dim GolgothRotateD: GolgothRotateD = 0
  2294. Sub GolgothRotateTimer_Timer
  2295. GolgothRotateD = GolgothRotateD + 5
  2296. GolgothRotate.RotY = GolgothRotateD
  2297. End Sub
  2298.  
  2299.  
  2300.  
  2301.  
  2302. 'Alabarda
  2303. Sub AlabardaTimer_Timer
  2304. Alabarda.RotY = Alabarda.RotY + 10
  2305. If PlayersPlayingGame Then
  2306. vpmtimer.addtimer 1000, "AlabardaAnimOff '"
  2307. End If
  2308. End Sub
  2309.  
  2310. Sub AlabardaAnim
  2311. AlabardaTimer.enabled = 1
  2312. End Sub
  2313.  
  2314. Sub AlabardaAnimOff
  2315. AlabardaTimer.enabled = 0
  2316. End Sub
  2317.  
  2318.  
  2319. 'disko
  2320. Sub diskoTimer_Timer
  2321. disko.RotY = disko.RotY + 5
  2322. End Sub
  2323.  
  2324. Sub diskoAnim
  2325. diskoTimer.enabled = 1
  2326. End Sub
  2327.  
  2328. Sub diskoAnimOff
  2329. diskoTimer.enabled = 0
  2330. End Sub
  2331.  
  2332.  
  2333. 'Boomeran
  2334. Dim boomerD
  2335. sub Timerboomer_Timer()
  2336. boomer.transZ = boomer.transZ - 1
  2337. boomerD = boomerD + 1
  2338. End Sub
  2339.  
  2340. Sub TimerboomerOff_Timer
  2341. Timerboomer.enabled = 0
  2342. boomerD = boomerD - 1
  2343. boomer.transZ = boomer.transZ + 1
  2344. End Sub
  2345.  
  2346.  
  2347.  
  2348.  
  2349. 'Brazos
  2350. Dim BrazosLD
  2351. sub BrazosL_Timer()
  2352. maglio2.Y = 1548
  2353. maglio2.X = 136
  2354. maglio2.Z = 107
  2355. maglio2.transZ = maglio2.transZ + 1
  2356. maglio2.transX = maglio2.transX - 1
  2357. BrazosLD = BrazosLD + 1
  2358. End Sub
  2359.  
  2360. Sub BrazosLOff_Timer
  2361. BrazosL.enabled = 0
  2362. maglio2.transZ = maglio2.transZ - 1
  2363. maglio2.transX = maglio2.transX + 1
  2364. BrazosLD = BrazosLD - 1
  2365. End Sub
  2366.  
  2367.  
  2368. Dim BrazosRD
  2369. sub BrazosR_Timer()
  2370. maglio1.X = 807
  2371. maglio1.Y = 1581
  2372. maglio1.Z = 107
  2373. maglio1.transZ = maglio1.transZ + 1
  2374. maglio1.transX = maglio1.transX - 1
  2375. BrazosRD = BrazosRD + 1
  2376. End Sub
  2377.  
  2378. Sub BrazosROff_Timer
  2379. BrazosR.enabled = 0
  2380. maglio1.transZ = maglio1.transZ - 1
  2381. maglio1.transX = maglio1.transX + 1
  2382. BrazosRD = BrazosRD - 1
  2383. End Sub
  2384.  
  2385.  
  2386.  
  2387. 'SmallDMD
  2388. Dim HPos, HPosEnd
  2389. Sub DMDSmalltimer_timer()
  2390. DMDSmall.imageA = "goldr"& Hpos
  2391. If Hpos < HposEnd Then
  2392. HPos = HPos + 1
  2393. Else
  2394. DMDSmalltimer.enabled = 0
  2395. DMDSmall.Visible = 0
  2396. End If
  2397. end Sub
  2398.  
  2399. Sub DMDSmallSequence(FrameStart, FrameEnd)
  2400. HPos = FrameStart
  2401. HPosEnd = FrameEnd
  2402. DMDSmalltimer.enabled = 1
  2403. DMDSmall.Visible = 1
  2404. End Sub
  2405.  
  2406. Sub IntroSmallDMD()
  2407. DMDSmallSequence 0, 210
  2408. End Sub
  2409.  
  2410. Sub Explosion()
  2411. DMDSmallSequence 211, 236
  2412. End Sub
  2413.  
  2414. Sub Game_Init()
  2415. bExtraBallWonThisBall = False
  2416. TurnOffPlayfieldLights()
  2417. 'Play some Music
  2418. 'ChangeSong
  2419. PlaySong "mu_GamePlay"
  2420. 'Init Variables
  2421. Jackpot = 250000
  2422. DMDFlush
  2423. DMDSmallSequence 0,0
  2424. playsound "soundfxchair"
  2425.  
  2426. Lockdiverter.RotateToStart
  2427. kickback.enabled = 1
  2428. KickBackDiverter.RotateToStart
  2429.  
  2430. A1.state = 2
  2431. A2.state = 2
  2432. A3.state = 0
  2433. A4.state = 0
  2434. A5.state = 0
  2435. A6.state = 0
  2436. 'FlashForMs A6F, 100, 10, 0 'off
  2437. A7.state = 0
  2438. 'FlashForMs A7F, 100, 10, 0 'off
  2439. A8.state = 0
  2440. 'FlashForMs A8F, 100, 10, 0 'off
  2441. Ak.state = 0
  2442. AKL.state = 0
  2443. 'FlashForMs AKL, 100, 10, 0 'off
  2444. Ab.state = 0
  2445.  
  2446. B1.state = 2
  2447. B2.state = 0
  2448. B3.state = 0
  2449. B4.state = 0
  2450. B5.state = 0
  2451.  
  2452. J1.state = 0
  2453. J2.state = 0
  2454. J3.state = 0
  2455. J4.state = 0
  2456.  
  2457. ExtraBall.state = 0
  2458.  
  2459. kickbacklit.state = 1
  2460. ActivateKickbak.state = 0
  2461. kickbacktargets1.Isdropped = 1
  2462. kickbacktargets2.Isdropped = 1
  2463.  
  2464. SP1.state = 0
  2465. SP2.state = 0
  2466. SP3.state = 0
  2467. SP4.state = 0
  2468.  
  2469.  
  2470. 'DispDmd1.QueueText "[il1][sf1]"
  2471. 'DispDmd2.QueueText "[il1][sf1]"
  2472. 'hologram.frame 211
  2473. DMDBlink "black.jpg", " ", " GOLDRAKE READY ", 50, 50
  2474.  
  2475.  
  2476. ''attractseq.stopplay
  2477. 'flasher2.state = 0
  2478. FlashForMs flasher2, 1000, 10, 0 'off
  2479. 'flasher6.state = 0
  2480. FlashForMs flasher6, 1000, 10, 0 'off
  2481. End Sub
  2482.  
  2483.  
  2484.  
  2485.  
  2486. Sub TurnOffPlayfieldLights()
  2487. Dim a
  2488. For each a in aLights
  2489. a.State = 0
  2490. Next
  2491. End Sub
  2492.  
  2493. Sub ResetNewBallLights()
  2494. ' LightArrow1.State = 2
  2495. ' LightArrow6.State = 2
  2496. ' l53.State = 2
  2497. End Sub
  2498.  
  2499.  
  2500. Sub UpdateSkillShot() 'Updates the skillshot light
  2501. LightSeqSkillshot.Play SeqAllOff
  2502. 'DMDFlush
  2503. End Sub
  2504.  
  2505.  
  2506. ' *********************************************************************
  2507. ' Table Object Hit Events
  2508. '
  2509. ' Any target hit Sub will follow this:
  2510. ' - play a sound
  2511. ' - do some physical movement
  2512. ' - add a score, bonus
  2513. ' - check some variables/modes this trigger is a member of
  2514. ' - set the "LastSwicthHit" variable in case it is needed later
  2515. ' *********************************************************************
  2516.  
  2517. ' Slingshots has been hit
  2518.  
  2519. Dim LStep, RStep
  2520.  
  2521. Sub LeftSlingShot_Slingshot
  2522. If Tilted Then Exit Sub
  2523. startB2S(6)
  2524. PlaySound SoundFXDOF("fx_slingshot", 103, DOFPulse, DOFContactors), 0, 1, -0.05, 0.05
  2525. DOF 104, DOFPulse
  2526. DOF 300, DOFPulse 'DOF MX - Left Slingshot
  2527. LeftSling4.Visible = 1:LeftSling1.Visible = 0
  2528. Lemk.RotX = 26
  2529. LStep = 0
  2530. LeftSlingShot.TimerEnabled = True
  2531. ' add some points
  2532. AddScore 500
  2533. ' add some effect to the table?
  2534. Gi2.State = 0
  2535. ' remember last trigger hit by the ball
  2536. LastSwitchHit = "LeftSlingShot"
  2537. FlashForms SlingFlashL, 1000, 50, 0
  2538. FlashForms SlingFlashL1, 1000, 50, 0
  2539. BrazosL.enabled = 1
  2540. End Sub
  2541.  
  2542. Sub LeftSlingShot_Timer
  2543. Select Case LStep
  2544. Case 1:LeftSLing4.Visible = 0:LeftSLing3.Visible = 1:Lemk.RotX = 14
  2545. Case 2:LeftSLing3.Visible = 0:LeftSLing2.Visible = 1:Lemk.RotX = 2
  2546. Case 3:LeftSLing2.Visible = 0:LeftSling1.Visible = 1:Lemk.RotX = -10:Gi2.State = 1:LeftSlingShot.TimerEnabled = False
  2547. End Select
  2548. LStep = LStep + 1
  2549. End Sub
  2550.  
  2551. Sub RightSlingShot_Slingshot
  2552. startB2S(1)
  2553. If Tilted Then Exit Sub
  2554. PlaySound SoundFXDOF("fx_slingshot", 105, DOFPulse, DOFContactors), 0, 1, 0.05, 0.05
  2555. DOF 106, DOFPulse
  2556. DOF 301, DOFPulse 'DOF MX - Right Slingshot
  2557. RightSling4.Visible = 1:RightSling1.Visible = 0
  2558. Remk.RotX = 26
  2559. RStep = 0
  2560. RightSlingShot.TimerEnabled = True
  2561. ' add some points
  2562. AddScore 500
  2563. ' add some effect to the table?
  2564. Gi1.State = 0
  2565. ' remember last trigger hit by the ball
  2566. LastSwitchHit = "RightSlingShot"
  2567. FlashForms SlingFlashR, 1000, 50, 0
  2568. FlashForms SlingFlashR1, 1000, 50, 0
  2569. BrazosR.enabled = 1
  2570. End Sub
  2571.  
  2572. Sub RightSlingShot_Timer
  2573. Select Case RStep
  2574. Case 1:RightSLing4.Visible = 0:RightSLing3.Visible = 1:Remk.RotX = 14
  2575. Case 2:RightSLing3.Visible = 0:RightSLing2.Visible = 1:Remk.RotX = 2
  2576. Case 3:RightSLing2.Visible = 0:RightSLing1.Visible = 1:Remk.RotX = -10:Gi1.State = 1:RightSlingShot.TimerEnabled = False
  2577. End Select
  2578. RStep = RStep + 1
  2579. End Sub
  2580.  
  2581.  
  2582.  
  2583.  
  2584. ' LANE SWITCH SCRIPT (& Flipper scripting)
  2585.  
  2586.  
  2587. dim tempstateherolights 'to rotate lights
  2588.  
  2589.  
  2590. Sub LeftInLaneTrigger_Hit()
  2591. startB2S(2)
  2592. Addscore(1000)
  2593. If bMultiBallMode then Exit Sub
  2594. if SP1.state = 1 and SP2.state = 0 and SP3.state = 1 and SP4.state = 1 then
  2595. EnableBallSaver 10
  2596. SP1.state = 0
  2597. SP2.state = 0
  2598. SP3.state = 0
  2599. SP4.state = 0
  2600. playsound "soundFX15"
  2601. DOF 145, DOFPulse
  2602. DOF 315, DOFPulse 'DOF MX - Left Inner Lane
  2603. FlashForms SlingFlashL, 1000, 50, 0
  2604. FlashForms SlingFlashL1, 1000, 50, 0
  2605. FlashForms SlingFlashR, 1000, 50, 0
  2606. FlashForms SlingFlashR1, 1000, 50, 0
  2607.  
  2608. end if
  2609. If (SP2.State=0) then
  2610. SP2.State=1
  2611. End If
  2612.  
  2613. End Sub
  2614.  
  2615.  
  2616. Sub RightInLaneTrigger_Hit()
  2617. startB2S(3)
  2618. Addscore 1000
  2619. If bMultiBallMode then Exit Sub
  2620. if SP1.state = 1 and SP2.state = 1 and SP3.state = 0 and SP4.state = 1 then
  2621.  
  2622. ' set our game flag
  2623. ' bBallSaverActive = TRUE
  2624. ' ' start the timer
  2625. ' BallSaverTimer.Enabled = FALSE
  2626. ' BallSaverTimer.Interval = constBallSaverTime
  2627. ' BallSaverTimer.Enabled = TRUE
  2628. ' ' if you have a ball saver light you might want to turn it on at this
  2629. ' ' point (or make it flash)
  2630. ' ShootAgainLight.State = 2
  2631. EnableBallSaver 10
  2632. SP1.state = 0
  2633. SP2.state = 0
  2634. SP3.state = 0
  2635. SP4.state = 0
  2636. playsound "soundFX15"
  2637. DOF 147, DOFPulse
  2638. DOF 316, DOFPulse 'DOF MX - Right Inner Lane
  2639. FlashForms SlingFlashL, 1000, 50, 0
  2640. FlashForms SlingFlashL1, 1000, 50, 0
  2641. FlashForms SlingFlashR, 1000, 50, 0
  2642. FlashForms SlingFlashR1, 1000, 50, 0
  2643. end if
  2644. If (SP3.State=0) then
  2645. SP3.State=1
  2646. End If
  2647. End Sub
  2648.  
  2649.  
  2650.  
  2651. Sub LeftOutLaneTrigger_Hit()
  2652. startB2S(5)
  2653. AddScore 5000
  2654. If bMultiBallMode then Exit Sub
  2655. if SP1.state = 0 and SP2.state = 1 and SP3.state = 1 and SP4.state = 1 then
  2656.  
  2657. ' set our game flag
  2658. ' bBallSaverActive = TRUE
  2659. ' ' start the timer
  2660. ' BallSaverTimer.Enabled = FALSE
  2661. ' BallSaverTimer.Interval = constBallSaverTime
  2662. ' BallSaverTimer.Enabled = TRUE
  2663. ' ' if you have a ball saver light you might want to turn it on at this
  2664. ' ' point (or make it flash)
  2665. ' ShootAgainLight.State = 2
  2666. EnableBallSaver 10
  2667. SP1.state = 0
  2668. SP2.state = 0
  2669. SP3.state = 0
  2670. SP4.state = 0
  2671. playsound "soundFX15"
  2672. DOF 144, DOFPulse
  2673. DOF 313, DOFPulse 'DOF MX - Left Outer Lane
  2674. FlashForms SlingFlashL, 1000, 50, 0
  2675. FlashForms SlingFlashL1, 1000, 50, 0
  2676. FlashForms SlingFlashR, 1000, 50, 0
  2677. FlashForms SlingFlashR1, 1000, 50, 0
  2678. end if
  2679. If (SP1.State=0) Then
  2680. SP1.State=1
  2681. End If
  2682. LastSwitchHit = "LeftOutLaneTrigger"
  2683. End Sub
  2684.  
  2685.  
  2686. Sub RightOutLaneTrigger_Hit()
  2687. startB2S(5)
  2688. AddScore 5000
  2689. If bMultiBallMode then Exit Sub
  2690. if SP1.state = 1 and SP2.state = 1 and SP3.state = 1 and SP4.state = 0 then
  2691.  
  2692. ' set our game flag
  2693. ' bBallSaverActive = TRUE
  2694. ' ' start the timer
  2695. ' BallSaverTimer.Enabled = FALSE
  2696. ' BallSaverTimer.Interval = constBallSaverTime
  2697. ' BallSaverTimer.Enabled = TRUE
  2698. ' ' if you have a ball saver light you might want to turn it on at this
  2699. ' ' point (or make it flash)
  2700. ' ShootAgainLight.State = 2
  2701. EnableBallSaver 10
  2702. SP1.state = 0
  2703. SP2.state = 0
  2704. SP3.state = 0
  2705. SP4.state = 0
  2706. playsound "soundFX15"
  2707. DOF 148, DOFPulse
  2708. DOF 314, DOFPulse 'DOF MX - Right Outer Lane
  2709. FlashForms SlingFlashL, 1000, 50, 0
  2710. FlashForms SlingFlashL1, 1000, 50, 0
  2711. FlashForms SlingFlashR, 1000, 50, 0
  2712. FlashForms SlingFlashR1, 1000, 50, 0
  2713. end if
  2714. If (SP4.State=0) then
  2715. SP4.State=1
  2716. End If
  2717. LastSwitchHit = "RightOutLaneTrigger"
  2718. End Sub
  2719.  
  2720.  
  2721.  
  2722.  
  2723.  
  2724.  
  2725.  
  2726.  
  2727. '-----------------------------------------------------
  2728. '**************************************************************************
  2729. 'timed circular 4 flashers:
  2730. 'integrate this in script somewhere (1000 or 2000 must be VARIATED!!!)
  2731. 'fltimer1.set true, 1
  2732. 'fltimer2.set true, 2000
  2733.  
  2734.  
  2735. sub fltimer1_Timer()
  2736. fltimer1.enabled = false
  2737. FlashForms SlingFlashL, 100, 50, 0
  2738. FlashForms SlingFlashL1, 100, 50, 0
  2739. FlashForms flasher2, 1000, 50, 0
  2740. FlashForms flasher6, 1000, 50, 0
  2741. FlashForms flasher7, 1000, 50, 0
  2742. FlashForms flasher7b, 1000, 50, 0
  2743.  
  2744. 'flasher1.BlinkInterval = 65
  2745. 'flasher2.BlinkInterval = 65
  2746. 'flasher6.BlinkInterval = 65
  2747. 'flasher7.BlinkInterval = 65
  2748.  
  2749. 'flasher1.state = bulbblink
  2750. 'flasher2.state = bulbblink
  2751. 'flasher6.state = bulbblink
  2752. 'flasher7.state = bulbblink
  2753. end sub
  2754.  
  2755. sub fltimer2_Timer()
  2756. fltimer2.enabled = false
  2757. FlashForms SlingFlashR, 100, 50, 0
  2758. FlashForms SlingFlashR1, 100, 50, 0
  2759. FlashForms flasher2, 1000, 50, 0
  2760. FlashForms flasher6, 1000, 50, 0
  2761. FlashForms flasher7, 1000, 50, 0
  2762. FlashForms flasher7b, 1000, 50, 0
  2763. end sub
  2764.  
  2765.  
  2766.  
  2767. 'timed circular 8 jackpot flashers:
  2768. 'integrate this in script somewhere (1000 or 2000 must be VARIATED!!!)
  2769. 'fltimerA.set true, 1
  2770. 'fltimerB.set true, 2000
  2771.  
  2772.  
  2773. sub fltimerA_Timer()
  2774. fltimerA.enabled = false
  2775.  
  2776. FlashForms SlingFlashL, 1000, 50, 0
  2777. FlashForms SlingFlashL1, 1000, 50, 0
  2778. FlashForms flasher2, 1000, 50, 0
  2779. FlashForms flasher3, 1000, 50, 0
  2780. FlashForms flasher4, 1000, 50, 0.
  2781. FlashForms flasher4b, 1000, 50, 0
  2782. FlashForms SlingFlashR, 1000, 50, 0
  2783. FlashForms SlingFlashR1, 1000, 50, 0
  2784. FlashForms flasher6, 1000, 50, 0
  2785. FlashForms flasher7, 1000, 50, 0
  2786. FlashForms flasher7b, 1000, 50, 0
  2787. FlashForms flasher8, 1000, 50, 0
  2788. FlashForms flasher8b, 1000, 50, 0
  2789. FlashForms flasher9, 1000, 50, 0
  2790. FlashForms flasher9b, 1000, 50, 0
  2791.  
  2792.  
  2793. FlashForms SlingFlashL, 1000, 50, 0
  2794. FlashForms SlingFlashL1, 1000, 50, 0
  2795. FlashForms flasher2, 1000, 50, 0
  2796. FlashForms flasher3, 1000, 50, 0
  2797. FlashForms flasher4, 1000, 50, 0
  2798. FlashForms flasher4b, 1000, 50, 0
  2799. FlashForms SlingFlashR, 1000, 50, 0
  2800. FlashForms SlingFlashR1, 1000, 50, 0
  2801. FlashForms flasher6, 1000, 50, 0
  2802. FlashForms flasher7, 1000, 50, 0
  2803. FlashForms flasher7b, 1000, 50, 0
  2804. FlashForms flasher8, 1000, 50, 0
  2805. FlashForms flasher8b, 1000, 50, 0
  2806. FlashForms flasher9, 1000, 50, 0
  2807. FlashForms flasher9b, 1000, 50, 0
  2808.  
  2809. FlashForms SlingFlashL, 1000, 50, 0
  2810. FlashForms SlingFlashL1, 1000, 50, 0
  2811. FlashForms flasher2, 1000, 50, 0
  2812. FlashForms flasher3, 1000, 50, 0
  2813. FlashForms flasher4, 1000, 50, 0
  2814. FlashForms flasher4b, 1000, 50, 0
  2815. FlashForms SlingFlashR, 1000, 50, 0
  2816. FlashForms SlingFlashR1, 1000, 50, 0
  2817. FlashForms flasher6, 1000, 50, 0
  2818. FlashForms flasher7, 1000, 50, 0
  2819. FlashForms flasher7b, 1000, 50, 0
  2820. FlashForms flasher8, 1000, 50, 0
  2821. FlashForms flasher8b, 1000, 50, 0
  2822. FlashForms flasher9, 1000, 50, 0
  2823. FlashForms flasher9b, 1000, 50, 0
  2824.  
  2825. FlashForms SlingFlashL, 1000, 50, 0
  2826. FlashForms SlingFlashL1, 1000, 50, 0
  2827. FlashForms flasher2, 1000, 50, 0
  2828. FlashForms flasher3, 1000, 50, 0
  2829. FlashForms flasher4, 1000, 50, 0
  2830. FlashForms flasher4b, 1000, 50, 0
  2831. FlashForms SlingFlashR, 1000, 50, 0
  2832. FlashForms SlingFlashR1, 1000, 50, 0
  2833. FlashForms flasher6, 1000, 50, 0
  2834. FlashForms flasher7, 1000, 50, 0
  2835. FlashForms flasher7b, 1000, 50, 0
  2836. FlashForms flasher8, 1000, 50, 0
  2837. FlashForms flasher8b, 1000, 50, 0
  2838. FlashForms flasher9, 1000, 50, 0
  2839. FlashForms flasher9b, 1000, 50, 0
  2840.  
  2841.  
  2842. 'SlingFlashL.blinkpattern = "10001000"
  2843. 'flasher2.blinkpattern = "01000000"
  2844. 'flasher7.blinkpattern = "00100100"
  2845. 'SlingFlashR.blinkpattern = "00010000"
  2846. 'flasher4.blinkpattern = "10000100"
  2847. 'flasher3.blinkpattern = "01000000"
  2848. 'flasher8.blinkpattern = "00101000"
  2849. 'flasher9.blinkpattern = "00010001"
  2850.  
  2851. 'SlingFlashL.BlinkInterval = 65
  2852. 'flasher2.BlinkInterval = 65
  2853. 'flasher7.BlinkInterval = 65
  2854. 'SlingFlashR.BlinkInterval = 65
  2855. 'flasher4.BlinkInterval = 65
  2856. 'flasher3.BlinkInterval = 65
  2857. 'flasher8.BlinkInterval = 65
  2858. 'flasher9.BlinkInterval = 65
  2859.  
  2860. 'SlingFlashL.state = bulbblink
  2861. 'flasher2.state = bulbblink
  2862. 'flasher7.state = bulbblink
  2863. 'SlingFlashR.state = bulbblink
  2864. 'flasher4.state = bulbblink
  2865. 'flasher3.state = bulbblink
  2866. 'flasher8.state = bulbblink
  2867. 'flasher9.state = bulbblink
  2868. end sub
  2869.  
  2870. sub fltimerB_Timer()
  2871. fltimerB.enabled = false
  2872. 'flasher1.state = bulboff
  2873. 'flasher2.state = bulboff
  2874. 'flasher7.state = bulboff
  2875. 'SlingFlashR.state = bulboff
  2876. 'flasher4.state = bulboff
  2877. 'flasher3.state = bulboff
  2878. 'flasher8.state = bulboff
  2879. 'flasher9.state = bulboff
  2880.  
  2881.  
  2882.  
  2883. FlashForms SlingFlashL, 1000, 50, 0
  2884. FlashForms SlingFlashL1, 1000, 50, 0
  2885. FlashForms flasher2, 1000, 50, 0
  2886. FlashForms flasher3, 1000, 50, 0
  2887. FlashForms flasher4, 1000, 50, 0
  2888. FlashForms flasher4b, 1000, 50, 0
  2889. FlashForms SlingFlashR, 1000, 50, 0
  2890. FlashForms SlingFlashR1, 1000, 50, 0
  2891. FlashForms flasher6, 1000, 50, 0
  2892. FlashForms flasher7, 1000, 50, 0
  2893. FlashForms flasher7b, 1000, 50, 0
  2894. FlashForms flasher8, 1000, 50, 0
  2895. FlashForms flasher8b, 1000, 50, 0
  2896. FlashForms flasher9, 1000, 50, 0
  2897. FlashForms flasher9b, 1000, 50, 0
  2898. end sub
  2899.  
  2900.  
  2901.  
  2902.  
  2903. 'Kick it back:
  2904.  
  2905. sub kickbacktargets1_hit()
  2906. startB2S(5)
  2907. If Tilted Then Exit Sub
  2908. addscore 750
  2909. PlaySound "DropTargetHit"
  2910. kickbacktargets()
  2911. LastSwitchHit = "kickbacktargets1"
  2912. end sub
  2913.  
  2914. sub kickbacktargets2_hit()
  2915. startB2S(5)
  2916. If Tilted Then Exit Sub
  2917. addscore 750
  2918. PlaySound "DropTargetHit"
  2919. kickbacktargets()
  2920. LastSwitchHit = "kickbacktargets2"
  2921. end sub
  2922.  
  2923.  
  2924. Sub kickbacktargets()
  2925. if (kickbacktargets1.isdropped + kickbacktargets2.isdropped = 1) then
  2926. addscore 1500
  2927. PlaySound "fx_droptarget"
  2928. DMD "black.jpg", "GOLDORAK LEFT", "OUTLANE CLOSED", 1500
  2929. kickback.enabled = 1
  2930. playsound "newsfx02"
  2931. playsound "laser10"
  2932. kickbacklit.state = 1
  2933. ActivateKickbak.state = 0
  2934. KickBackDiverter.RotateToStart
  2935. Else
  2936. kickback.enabled = 0
  2937. kickbacklit.state = 0
  2938. kickbacktargets1.Isdropped = 0
  2939. kickbacktargets2.Isdropped = 0
  2940. KickBackDiverter.RotateToEnd
  2941. end if
  2942. end sub
  2943.  
  2944.  
  2945. sub kickback_hit()
  2946. startB2S(6)
  2947. if kickbacklit.state = 1 then
  2948. kickbacklit.state = 0
  2949. FlashForms SlingFlashL, 1000, 50, 0
  2950. FlashForms SlingFlashL1, 1000, 50, 0
  2951. FlashForms SlingFlashR, 1000, 50, 0
  2952. FlashForms SlingFlashR1, 1000, 50, 0
  2953. kickback.kick 0, 45
  2954. playsound "kickbackfx"
  2955. kickbacktargets1.isdropped = 0
  2956. kickbacktargets2.isdropped = 0
  2957. ActivateKickbak.state = 2
  2958. addscore 2500
  2959. Timerboomer.enabled = 1
  2960. KickBackDiverter.RotateToEnd
  2961. Else
  2962. Kickback.kick 110, 8
  2963. end if
  2964. LastSwitchHit = "kickback"
  2965. end sub
  2966.  
  2967.  
  2968.  
  2969.  
  2970.  
  2971. '**************************************************************************
  2972. '-----Small things---------------
  2973.  
  2974.  
  2975. sub timeractarus_Timer()
  2976. timeractarus.enabled = false
  2977. DispDmd1.Text = "[f6][edge4][b][y8]PRESS 1 TO PLAY[/b]"
  2978. DispDmd2.Text = "[f6][edge4][b][y8]PRESS 1 TO PLAY[/b]"
  2979. end sub
  2980.  
  2981.  
  2982.  
  2983. dim StopEgo
  2984. sub Trigger28_hit '..out
  2985. startB2S(6)
  2986. StopEgo=true
  2987. end sub
  2988. Sub Trigger32_Hit() '..in
  2989. startB2S(1)
  2990. If BallsOnPlayfield = 1 then
  2991. if StopEgo=false then
  2992. playsound "goldrake raggio ant" '..in
  2993.  
  2994. DMD "black.jpg", "_", " ANTIGRAVITY BEAM ", 1500
  2995. ' DispDmd1.QueueText "[f6][b][edge4][y4]ANTIGRAVITY[y17]BEAM[/b]",, seScrollRight, 2000, True
  2996. ' DispDmd2.QueueText "[f6][b][edge4][y4]ANTIGRAVITY[y17]BEAM[/b]",, seScrollRight, 2000, True
  2997. end if
  2998. if StopEgo=true then
  2999. StopEgo=false
  3000. PlaySound "'''''''" '..out
  3001. end if
  3002.  
  3003. End If
  3004. End Sub
  3005.  
  3006.  
  3007. dim StopEgo2
  3008. sub Trigger35_hit '..out
  3009. startB2S(6)
  3010. StopEgo2=true
  3011. end sub
  3012. Sub Trigger36_Hit() '..in
  3013. If BallsOnPlayfield = 1 then
  3014. if StopEgo2=false then
  3015. playsound "goldrake raggi las" '..in
  3016. DMD "black.jpg", "_", " LASER BEAM ", 1500
  3017. ' DispDmd1.QueueText "[f6][edge4][b][y8]LASER BEAM[/b]", seScrollLeft, 2000, True
  3018. ' DispDmd2.QueueText "[f6][edge4][b][y8]LASER BEAM[/b]", seScrollLeft, 2000, True
  3019. end if
  3020. if StopEgo2=true then
  3021. StopEgo2=false
  3022. PlaySound "" '..out
  3023. end if
  3024. End If
  3025. End Sub
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039. sub trigger1_hit()
  3040. If Tilted Then Exit Sub
  3041. playsound "laser05"
  3042. 'alabarta.rotatexz -300, 345
  3043. AlabardaAnim
  3044. end sub
  3045.  
  3046. sub trigger39_hit()
  3047. If Tilted Then Exit Sub
  3048. AlabardaAnim
  3049. end sub
  3050.  
  3051.  
  3052. Sub trigger14_hit()
  3053. startB2S(1)
  3054. If Tilted Then Exit Sub
  3055. addscore 500
  3056. playsound "laser05"
  3057. If LastSwitchHit = "Trigger2" Then 'give combo
  3058. ComboValue = 5000 + Round(Score(CurrentPlayer) / 10, 0)
  3059. DMDBlink "black.jpg", "COMBO", ComboValue, 100, 10
  3060. AddScore ComboValue
  3061. ComboM = ComboM + 1
  3062. CheckComboMultiball
  3063. End If
  3064. LastSwitchHit = "trigger14"
  3065. End Sub
  3066.  
  3067.  
  3068.  
  3069. Sub trigger2_hit()
  3070. startB2S(4)
  3071. If Tilted Then Exit Sub
  3072. addscore 500
  3073. playsound "laser05"
  3074. If LastSwitchHit = "Trigger14" Then 'give combo
  3075. ComboValue = 5000 + Round(Score(CurrentPlayer) / 10, 0)
  3076. DMDBlink "black.jpg", "COMBO", ComboValue, 100, 10
  3077. AddScore ComboValue
  3078. ComboM = ComboM + 1
  3079. CheckComboMultiball
  3080. End If
  3081. LastSwitchHit = "Trigger2"
  3082. End Sub
  3083.  
  3084. Sub Trigger3_hit()
  3085. PlaySound "fx_centrifugue2"
  3086. End Sub
  3087.  
  3088.  
  3089.  
  3090. sub trigger16_hit()
  3091. If Tilted Then Exit Sub
  3092. addscore 500
  3093. end sub
  3094.  
  3095. sub trigger15_hit()
  3096. startB2S(2)
  3097. If Tilted Then Exit Sub
  3098. addscore 500
  3099. If B4.state = 2 Then
  3100. StopSound "RotorStart2"
  3101. DMD "SpinSaucer.wmv", "", "", 4500
  3102. End If
  3103. If B2SOn Then Controller.B2SSetData 3,0:Controller.B2SSetData 2,1
  3104. LastSwitchHit = "Trigger15"
  3105. end sub
  3106.  
  3107.  
  3108. sub trigger18_hit()
  3109. startB2S(4)
  3110. If Tilted Then Exit Sub
  3111. If B2SOn Then Controller.B2SSetData 2,0:Controller.B2SSetData 3,1
  3112. addscore 500
  3113. end sub
  3114.  
  3115. sub trigger17_hit()
  3116. If Tilted Then Exit Sub
  3117. If B2SOn Then Controller.B2SSetData 2,0:Controller.B2SSetData 3,1
  3118. playsound "RotorStart2"
  3119. addscore 500
  3120. FlashForMs flasher6, 100, 10, 0 'off
  3121. DMD "black.jpg", "_", " HAND BEAM ", 1500
  3122. 'GolgothRotateTimer.enabled = 0
  3123. 'playSound "RotateLoop"
  3124. LastSwitchHit = "Trigger17"
  3125. end sub
  3126.  
  3127. sub GolgothRotatetrigger_hit()
  3128. If B2SOn Then Controller.B2SSetData 2,0:Controller.B2SSetData 3,1
  3129. playSound "RotateLoop"
  3130. GolgothRotateTimer.enabled = 1
  3131.  
  3132. If bMultiBallMode Then
  3133. Lockdiverter.RotateToStart
  3134. Else
  3135. if B4.state = 0 And B5.state = 0 Then Lockdiverter.RotateToStart
  3136. if B4.state = 2 And B5.state = 0 Then Lockdiverter.RotateToEnd
  3137. if B4.state = 1 And B5.state = 2 Then Lockdiverter.RotateToEnd
  3138. End If
  3139. End Sub
  3140.  
  3141.  
  3142.  
  3143. sub trigger27_hit()
  3144. If Tilted Then Exit Sub
  3145. playsound "goldrake rientro"
  3146. 'DispDmd1.QueueText "[f6][edge4][b][y8]GOLDRAKE BACK[/b]", deNone , 2000, True
  3147. 'DispDmd2.QueueText "[f6][edge4][b][y8]GOLDRAKE BACK[/b]", deNone , 2000, True
  3148. DMD "black.jpg", "_", "GOLDRAKE BACK", 1800
  3149. end sub
  3150.  
  3151. sub trigger40_hit()
  3152. If Tilted Then Exit Sub
  3153. playsound "goldrake rientro"
  3154. 'DispDmd1.QueueText "[f6][edge4][b][y8]GOLDRAKE BACK[/b]", deNone , 2000, True
  3155. 'DispDmd2.QueueText "[f6][edge4][b][y8]GOLDRAKE BACK[/b]", deNone , 2000, True
  3156. DMD "black.jpg", "_", "GOLDRAKE BACK", 1500
  3157. end sub
  3158.  
  3159.  
  3160. sub trigger42_hit()
  3161. If Tilted Then Exit Sub
  3162. FlashForms SlingFlashR, 1000, 50, 0
  3163. FlashForms SlingFlashR1, 1000, 50, 0
  3164. 'playmusic 2, "goldrake avanti", false
  3165. 'DMDframe.set true, 2500
  3166. 'dmdsec 32, 38, "[f11][edge4]", 150 '------- goldrake go
  3167. 'dmdsec 32, 38, "[f11][edge4]", 150
  3168. end sub
  3169.  
  3170.  
  3171.  
  3172. sub trigger12_hit()
  3173. If Tilted Then Exit Sub
  3174. FlashForms bulb9, 1000, 50, 0
  3175. FlashForms bulb10, 1000, 50, 0
  3176. end sub
  3177.  
  3178. sub Atarget1_hit()
  3179. startB2S(1)
  3180. If Tilted Then Exit Sub
  3181. playsound "laser05"
  3182. addscore 1500
  3183. LastSwitchHit = "Atarget1"
  3184. end sub
  3185.  
  3186. sub Atarget2_hit()
  3187. startB2S(6)
  3188. If Tilted Then Exit Sub
  3189. playsound "laser05"
  3190. addscore 1500
  3191. LastSwitchHit = "Atarget2"
  3192. end sub
  3193.  
  3194.  
  3195. sub trigger7_hit()
  3196. startB2S(1)
  3197. LaserKickP.TransY = 0
  3198. If Tilted Then Exit Sub
  3199. FlashForms SlingFlashR, 1000, 50, 0
  3200. FlashForms SlingFlashR1, 1000, 50, 0
  3201. playsound "soundFX13"
  3202. ' turn off LaunchLight
  3203. LaunchLight.State = 0
  3204. end sub
  3205.  
  3206. sub trigger7_Unhit()
  3207. playsound "ActarusGoldorakGoA"
  3208. end sub
  3209.  
  3210.  
  3211. sub trigger24_hit()
  3212. If Tilted Then Exit Sub
  3213. FlashForms UFOflasher, 1000, 50, 0
  3214. playsound "soundFX13"
  3215. end sub
  3216.  
  3217.  
  3218.  
  3219. '--------------------BUMPERS SCRIPT:
  3220.  
  3221.  
  3222.  
  3223. Dim BHit
  3224. Sub Bumper_Hit()
  3225. startB2S(6)
  3226. BHit = BHit + 1
  3227. If (Bulb30.State = 2) Then Exit Sub
  3228. ' Add Score, Bonus or Jackpot
  3229. ' Play Sound
  3230. ' DispDmd1.QueueText "[f6][edge4][b][y5]" & BHit & " / 15[y17]HIT FOR ATTACK", deNone, 2000, True
  3231. ' DispDmd2.QueueText "[f6][edge4][b][y5]" & BHit & " / 15[y17]HIT FOR ATTACK", deNone, 2000, True
  3232. ' DMDFLush
  3233. DMD "black.jpg", "_", " " & BHit & " HIT FOR ATTACK", 800
  3234. If (BHit = 15) Then
  3235. Bulb30.State = 2
  3236. 'Timerbutton.set true , 3000
  3237. vpmtimer.addtimer 3000, "Timerbutton.enabled = 1'"
  3238. ' DMDframe.set true, 6200
  3239. BHit = 0
  3240. End If
  3241. End Sub
  3242.  
  3243.  
  3244.  
  3245.  
  3246. sub Timerbutton_Timer()
  3247. Timerbutton.enabled = 0
  3248. playsound "gold fx push"
  3249. 'DispDmd1.QueueText "[f6][edge4][b][y4]PRESS SPECIAL[y17]KEY1 FOR ATTACK[/b]", deNone, 5000, True
  3250. 'DispDmd2.QueueText "[f6][edge4][b][y4]PRESS SPECIAL[y17]KEY1 FOR ATTACK[/b]", deNone, 5000, True
  3251. DMDFLush
  3252. DMDBlink "black.jpg", "PRESS FIREBOTTON", " FOR ATTACK ", 500, 10
  3253. FireFlash.State = 2
  3254. Playsound "gold fx push"
  3255. vpmtimer.addtimer 5000, "TimerbuttonOff'"
  3256. End Sub
  3257.  
  3258.  
  3259.  
  3260. sub TimerbuttonOff
  3261. If (Bulb30.State = 0) Then Exit Sub
  3262. FireFlash.State = 0
  3263. Timerbutton.enabled = 0
  3264. Bulb30.State = 0
  3265. BHit = 0
  3266. End Sub
  3267.  
  3268.  
  3269. sub Bumper1_hit()
  3270. startB2S(1)
  3271. PlaySound SoundFXDOF("fx_bumper", 107, DOFPulse, DOFContactors), 0, 1, pan(ActiveBall)
  3272. DOF 110, DOFPulse
  3273. DOF 302, DOFPulse 'DOF MX - Bumper 1
  3274. If Tilted Then Exit Sub
  3275. addscore 1000
  3276. If Bulb30.State = 2 Then Exit Sub
  3277. BHit = BHit + 1
  3278. DMDFLush
  3279. DMD "bumper1.jpg", "_", " " & BHit & " HIT FOR ATTACK", 500
  3280. FlashForms flasher2, 1000, 50, 0
  3281. FlashForms bulb17, 1000, 50, 0
  3282. FlashForms BumperLight, 100, 50, 0
  3283. If (BHit = 15) Then
  3284. Bulb30.State = 2
  3285. Timerbutton.enabled = 1
  3286. BHit = 0
  3287. End If
  3288.  
  3289. end sub
  3290.  
  3291. sub bumper2_hit()
  3292. startB2S(4)
  3293. PlaySound SoundFXDOF("fx_bumper", 109, DOFPulse, DOFContactors), 0, 1, pan(ActiveBall)
  3294. DOF 111, DOFPulse
  3295. DOF 303, DOFPulse 'DOF MX - Bumper 2If Tilted Then Exit Sub
  3296. addscore 1000
  3297. If Bulb30.State = 2 Then Exit Sub
  3298. BHit = BHit + 1
  3299. DMDFLush
  3300. DMD "bumper2.jpg", "_", " " & BHit & " HIT FOR ATTACK", 500
  3301. FlashForms flasher6, 1000, 50, 0
  3302. FlashForms bulb25, 100, 50, 0
  3303. FlashForms BumperLight, 100, 50, 0
  3304. If (BHit = 15) Then
  3305. Bulb30.State = 2
  3306. Timerbutton.enabled = 1
  3307. BHit = 0
  3308. End If
  3309. end sub
  3310.  
  3311. sub bumper3_hit()
  3312. startB2S(3)
  3313. PlaySound SoundFXDOF("fx_bumper", 108, DOFPulse, DOFContactors), 0, 1, pan(ActiveBall)
  3314. DOF 112, DOFPulse
  3315. DOF 304, DOFPulse 'DOF MX - Bumper 3addscore 1000
  3316. If Bulb30.State = 2 Then Exit Sub
  3317. BHit = BHit + 1
  3318. DMDFLush
  3319. DMD "bumper3.jpg", "_", " " & BHit & " HIT FOR ATTACK", 500
  3320. FlashForms flasher2, 1000, 50, 0
  3321. FlashForms BumperLight, 100, 50, 0
  3322. If (BHit = 15) Then
  3323. Bulb30.State = 2
  3324. Timerbutton.enabled = 1
  3325. BHit = 0
  3326. End If
  3327. end sub
  3328.  
  3329.  
  3330.  
  3331.  
  3332. '***************************************************************************************
  3333. '--------------------Ramp & Golgoth Multiball------------------------------------------
  3334.  
  3335.  
  3336. '---Ramp entry (only for effects):
  3337. sub Rampentry_hit()
  3338.  
  3339. FlashForms flasher3, 1000, 50, 0
  3340. playsound "soundFX11", 0.8
  3341. end sub
  3342.  
  3343. '---initiate Ramp:
  3344. sub LeftRampTarget_hit()
  3345. DOF 142, DOFPulse
  3346. startB2S(6)
  3347. If Tilted Then Exit Sub
  3348. playsound "soundFX21b"
  3349. if A1.state = 2 and A2.state = 1 and ballsonplayfield = 1 then
  3350. A1.state = 1
  3351. A3.state = 2
  3352. fltimer1.enabled = 1
  3353. vpmtimer.addtimer 2000, "fltimer2.enabled = 1'"'fltimerB.set true, 2000
  3354. 'scoreupdate = false
  3355. 'flushdmdtimer.set true , 2000
  3356. 'DispDmd1.QueueText "[f6][xc][y5]- SHOOT RAMP -[y18]- 10.000 -", deFlip, 2000, True
  3357. 'DispDmd2.QueueText "[f6][xc][y5]- SHOOT RAMP -[y18]- 10.000 -", deFlip, 2000, True
  3358. DMD "black.jpg", "_", " SHOOT RAMP ", 1500
  3359. FlashForms flasher3, 1000, 50, 0
  3360. end if
  3361. if A1.state = 1 and A2.state = 1 and ballsonplayfield = 1 then
  3362. addscore 20000
  3363. end if
  3364. if A1.state = 2 and A2.state = 2 and ballsonplayfield = 1 then
  3365. A1.state = 1
  3366. addscore 5000
  3367. end if
  3368. LastSwitchHit = "LeftRampTarget"
  3369. end sub
  3370.  
  3371.  
  3372. sub RightRampTarget_hit()
  3373. DOF 143, DOFPulse
  3374. startB2S(1)
  3375. If Tilted Then Exit Sub
  3376. playsound "fx actarus2"
  3377. if A1.state = 1 and A2.state = 2 and ballsonplayfield = 1 then
  3378. A2.state = 1
  3379. A3.state = 2
  3380. fltimer1.enabled = 1
  3381. vpmtimer.addtimer 2000, "fltimer2.enabled = 1'"'fltimerB.set true, 2000
  3382. 'scoreupdate = false
  3383. 'flushdmdtimer.set true , 2000
  3384. 'DispDmd1.QueueText "[f6][xc][y5]SHOOT RAMP[y18]10.000", deFlip, 2000, True
  3385. 'DispDmd2.QueueText "[f6][xc][y5]SHOOT RAMP[y18]10.000", deFlip, 2000, True
  3386. DMD "black.jpg", "_", " SHOOT RAMP ", 1500
  3387. FlashForms flasher3, 1000, 50, 0
  3388. end if
  3389. if A1.state = 1 and A2.state = 1 and ballsonplayfield = 1 then
  3390. addscore 20000
  3391. end if
  3392. if A1.state = 2 and A2.state = 2 and ballsonplayfield = 1 then
  3393. A1.state = 1
  3394. addscore 5000
  3395. end if
  3396. LastSwitchHit = "RightRampTarget"
  3397. end sub
  3398.  
  3399. sub RightRampTarget_Unhit
  3400. playsound "soundFX02b"
  3401. End Sub
  3402.  
  3403. '---Ramp trigger to Golgothkicker1 & 2 (initiate only ONE time):
  3404.  
  3405. sub ramptrigger_hit()
  3406.  
  3407. if ballsonplayfield = 4 then
  3408. addscore 250000
  3409. fltimerA.enabled = 1
  3410. vpmtimer.addtimer 2000, "fltimerB.enabled = 1'"'fltimerB.set true, 2000
  3411. playsound "JackpotFX2"
  3412. ' GOLDORAK JACKPOT:
  3413. 'scoreupdate = false
  3414. 'flushdmdtimer.set true , 2100
  3415. 'DMDframe.set true, 2500
  3416. 'dmdsec 32, 44, "[f8][edge4]", 150 '------- ramp
  3417. 'dmdsec 32, 44, "[f8][edge4]", 150
  3418. DMDFLush
  3419. DMD "DMDJackpot.gif", "", "", 2000
  3420. end if
  3421. if ballsonplayfield = 3 then
  3422. addscore 250000
  3423. fltimerA.enabled = 1
  3424. vpmtimer.addtimer 2000, "fltimerB.enabled = 1'"'fltimerB.set true, 2000
  3425. playsound "JackpotFX2"
  3426. ' GOLDORAK JACKPOT:
  3427. 'scoreupdate = false
  3428. 'flushdmdtimer.set true , 2100
  3429. 'DMDframe.set true, 2500
  3430. 'dmdsec 32, 44, "[f8][edge4]", 150 '------- ramp
  3431. 'dmdsec 32, 44, "[f8][edge4]", 150
  3432. DMDFLush
  3433. DMD "DMDJackpot.gif", "", "", 2000
  3434. end if
  3435. if ballsonplayfield = 2 then
  3436. addscore 250000
  3437. fltimerA.enabled = 1
  3438. vpmtimer.addtimer 2000, "fltimerB.enabled = 1'"'fltimerB.set true, 2000
  3439. playsound "JackpotFX2"
  3440. ' GOLDORAK JACKPOT:
  3441. 'scoreupdate = false
  3442. 'flushdmdtimer.set true , 2100
  3443. 'DMDframe.set true, 2500
  3444. 'dmdsec 32, 44, "[f8][edge4]", 150 '------- ramp
  3445. 'dmdsec 32, 44, "[f8][edge4]", 150
  3446. DMDFLush
  3447. DMD "DMDJackpot.gif", "", "", 2000
  3448. end if
  3449.  
  3450. if Ab.state = 2 and ballsonplayfield = 1 then
  3451. addscore 150000
  3452. FlashForMs flasher2, 400, 10, 0 'off
  3453. FlashForMs flasher6, 400, 10, 0 'off
  3454. FlashForMs bulb9, 2000, 10, 0 'off
  3455. FlashForMs bulb10, 2000, 10, 0 'off
  3456. playsound "soundFX08", 0.6
  3457. 'scoreupdate = false
  3458. 'flushdmdtimer.set true , 2600
  3459. 'DMDframe.set true, 2500
  3460. 'DispDmd1.QueueText "[f6][edge4][b][y8]LOCK IS LIT[/b]", deNone, 2000, True
  3461. 'DispDmd2.QueueText "[f6][edge4][b][y8]LOCK IS LIT[/b]", deNone, 2000, True
  3462. DMDFLush
  3463. DMD "girugiru.gif", "", "", 1500
  3464. DMD "black.jpg", "_", " LOCK IS LIT ", 1000
  3465. end if
  3466.  
  3467. if A3.state = 1 and A4.state = 1 and A5.state = 2 and ballsonplayfield = 1 then
  3468. A5.state = 1
  3469. A6.state = 2
  3470. 'FlashForMs A6, 1, 500, 1 'blink
  3471. Ab.state = 2
  3472. addscore 150000
  3473. FlashForMs bulb9, 2000, 10, 0 'off
  3474. FlashForMs bulb10, 2000, 10, 0 'off
  3475. 'scoreupdate = false
  3476. 'flushdmdtimer.set true , 2600
  3477. 'DMDframe.set true, 2500
  3478. DMDFLush
  3479. DMD "girugiru.gif", "", "", 1500
  3480. 'DispDmd1.QueueText "[f6][edge4][b][y8]LOCK IS LIT[/b]", deNone, 2000, True
  3481. 'DispDmd2.QueueText "[f6][edge4][b][y8]LOCK IS LIT[/b]", deNone, 2000, True
  3482. DMD "black.jpg", "_", "LOCK IS LIT", 1000
  3483.  
  3484. fltimerA.enabled = 1
  3485. vpmtimer.addtimer 2000, "fltimerB.enabled = 1'"'fltimerB.set true, 2000
  3486. 'effectmusic 1, fadeoutandpause, 0, 1
  3487. 'musicin.set true, 3000
  3488. 'playsound "goldrake prof"
  3489. end if
  3490.  
  3491.  
  3492. if A3.state = 1 and A4.state = 2 and A5.state = 0 and ballsonplayfield = 1 then
  3493. A4.state = 1
  3494. A5.state = 2
  3495. addscore 100000
  3496. FlashForMs bulb9, 2000, 10, 0 'off
  3497. FlashForMs bulb10, 2000, 10, 0 'off
  3498. 'scoreupdate = false
  3499. 'flushdmdtimer.set true , 2600
  3500. 'DMDframe.set true, 3000
  3501. DMDFLush
  3502. DMD "girugiru.gif", "", "", 1000
  3503. 'dmdsec 32, 39, "[f16][edge4]", 200 '------- goldrake drill
  3504. 'dmdsec 32, 39, "[f16][edge4]", 200
  3505. fltimer1.enabled = 1
  3506. vpmtimer.addtimer 2000, "fltimer2.enabled = 1'"'fltimerB.set true, 2000
  3507. 'effectmusic 1, fadeoutandpause, 0, 1
  3508. 'musicin.set true, 3000
  3509. playsound "goldrake maria"
  3510. end if
  3511.  
  3512.  
  3513. if A3.state = 2 and A4.state = 0 and A5.state = 0 and ballsonplayfield = 1 then
  3514. A3.state = 1
  3515. A4.state = 2
  3516. addscore 50000
  3517. FlashForMs bulb9, 2000, 10, 0 'off
  3518. FlashForMs bulb10, 2000, 10, 0 'off
  3519. DMDSmallSequence 119, 130
  3520. 'scoreupdate = false
  3521. 'flushdmdtimer.set true , 2600
  3522. 'DMDframe.set true, 3000
  3523. DMDFLush
  3524. DMD "girugiru.gif", "", "", 1000
  3525. 'dmdsec 32, 38, "[f15][edge4]", 200 '------- goldrake alcoor
  3526. 'dmdsec 32, 38, "[f15][edge4]", 200
  3527. fltimer1.enabled = 1
  3528. vpmtimer.addtimer 2000, "fltimer2.enabled = 1'"'fltimerB.set true, 2000
  3529. 'effectmusic 1, fadeoutandpause, 0, 1
  3530. 'musicin.set true, 3000
  3531. playsound "goldrake alcoor"
  3532. end if
  3533.  
  3534.  
  3535. if A3.state = 0 and ballsonplayfield = 1 then
  3536. addscore 25000
  3537. FlashForMs flasher2, 400, 10, 0 'off
  3538. FlashForMs flasher6, 400, 10, 0 'off
  3539. FlashForMs bulb9, 2000, 10, 0 'off
  3540. FlashForMs bulb10, 2000, 10, 0 'off
  3541. playsound "soundFX08", 0.6
  3542. 'scoreupdate = false
  3543. 'flushdmdtimer.set true , 2600
  3544. 'DMDframe.set true, 2500
  3545. 'DispDmd1.QueueText "[f6][edge4][b][y4]GOLDRAKE ATLAS[y17]UFO ROBOT[/b]", deNone, 2000, True
  3546. 'DispDmd2.QueueText "[f6][edge4][b][y4]GOLDRAKE ATLAS[y17]UFO ROBOT[/b]", deNone, 2000, True
  3547. DMDFLush
  3548. DMD "Transform.gif", "", "", 1000
  3549. DMD "black.jpg", "GOLDRAKE ATLAS", "UFO ROBOT", 1500
  3550. end if
  3551.  
  3552. If LastSwitchHit = "ramptrigger" Then 'give combo
  3553. ComboValue = 5000 + Round(Score(CurrentPlayer) / 10, 0)
  3554. DMDBlink "black.jpg", "COMBO", ComboValue, 100, 10
  3555. AddScore ComboValue
  3556. ComboM = ComboM + 1
  3557. CheckComboMultiball
  3558. End If
  3559.  
  3560. LastSwitchHit = "ramptrigger"
  3561. end sub
  3562.  
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568. '---Golgothkicker1 & 2 (initiated by ramp):
  3569. sub Golgothkicker1_hit()
  3570. startB2S(5)
  3571. Golgothkicker1Fake.enabled = 0
  3572. playsound "rballfall2"
  3573. ActarusMoveB.enabled = 1
  3574. playsound "soundfxchair"
  3575. if ballsonplayfield = 4 then
  3576. addscore 250000
  3577. fltimerA.enabled = 1
  3578. vpmtimer.addtimer 1000, "fltimerB.enabled = 1'"'fltimerB.set true, 2000
  3579. playsound "JackpotFX1"
  3580. ' Golodorak JACKPOT 2:
  3581. 'scoreupdate = false
  3582. 'flushdmdtimer.set true , 4100
  3583. 'DMDframe.set true, 4000
  3584. 'DispDmd1.QueueText "[il1][sf15][ef50]", deNone, 4000, FALSE
  3585. 'DispDmd2.QueueText "[il1][sf15][ef50]", deNone, 4000, FALSE
  3586. DMDFLush
  3587. DMD "DMDJackpotG.gif", "", "", 3000
  3588. Golgothkicker2timer.Interval = 1000
  3589. Golgothkicker2timer.enabled = True
  3590. 'vpmtimer.addtimer 800, "Golgothkicker2timer '" ' Golgothkicker2timer.Interval = 1000
  3591. end if
  3592.  
  3593. if ballsonplayfield = 3 then
  3594. addscore 250000
  3595. fltimerA.enabled = 1
  3596. vpmtimer.addtimer 1000, "fltimerB.enabled = 1'"'fltimerB.set true, 2000
  3597. playsound "JackpotFX1"
  3598. ' Golodorak JACKPOT 2:
  3599. 'scoreupdate = false
  3600. 'flushdmdtimer.set true , 4100
  3601. 'DMDframe.set true, 4000
  3602. 'DispDmd1.QueueText "[il1][sf15][ef50]", deNone, 4000, FALSE
  3603. 'DispDmd2.QueueText "[il1][sf15][ef50]", deNone, 4000, FALSE
  3604. DMDFLush
  3605. DMD "DMDJackpotG.gif", "", "", 3000
  3606. Golgothkicker2timer.Interval = 1000
  3607. Golgothkicker2timer.enabled = True
  3608. 'vpmtimer.addtimer 800, "Golgothkicker2timer '" ' Golgothkicker2timer.Interval = 1000
  3609. end if
  3610.  
  3611. if ballsonplayfield = 2 then
  3612. addscore 250000
  3613. fltimerA.enabled = 1
  3614. vpmtimer.addtimer 1000, "fltimerB.enabled = 1'"'fltimerB.set true, 2000
  3615. playsound "JackpotFX1"
  3616. ' Golodorak JACKPOT 2:
  3617. 'scoreupdate = false
  3618. 'flushdmdtimer.set true , 4100
  3619. 'DMDframe.set true, 4000
  3620. 'DispDmd1.QueueText "[il1][sf15][ef50]", deNone, 4000, FALSE
  3621. 'DispDmd2.QueueText "[il1][sf15][ef50]", deNone, 4000, FALSE
  3622. DMDFLush
  3623. DMD "DMDJackpotG.gif", "", "", 3000
  3624. 'Golgothkicker1.destroyball
  3625. 'Golgothkicker1.kick 350, 10
  3626. Golgothkicker2timer.Interval = 1000
  3627. Golgothkicker2timer.enabled = True
  3628. 'vpmtimer.addtimer 800, "Golgothkicker2timer '" ' Golgothkicker2timer.Interval = 1000
  3629. end if
  3630.  
  3631.  
  3632. if A6.state = 1 and A7.state = 1 and A8.state = 2 and ballsonplayfield = 1 then
  3633. 'Multiball GO
  3634. 'StopAllMusic
  3635. 'Song = "bgout_GoldorakThemeInstrumental" & ".mp3"
  3636. 'PlayMusic Song
  3637. bMultiBallMode = True
  3638. StopSound Song:Song = ""
  3639. PlaySong "mu_Multiball"
  3640. DMDFLush
  3641. DMD "Multiball.wmv", "", "", 4500
  3642. IntroSmallDMD()
  3643. A1.state = 2
  3644. A2.state = 2
  3645. A3.state = 0
  3646. A4.state = 0
  3647. A5.state = 0
  3648. A6.state = 0
  3649. 'FlashForMs A6, 100, 10, 0 'off
  3650. A7.state = 0
  3651. 'FlashForMs A7, 100, 10, 0 'off
  3652. A8.state = 0
  3653. 'FlashForMs A8, 100, 10, 0 'off
  3654. Ak.state = 0
  3655. 'FlashForMs AKL, 100, 10, 0 'off
  3656. Ab.state = 0
  3657. addscore 500000
  3658. ballsonplayfield = 4
  3659. 'playsound "MainTheme"
  3660. Golgothkicker2timer.Interval = 4000
  3661. Golgothkicker2timer.enabled = True
  3662. 'vpmtimer.addtimer 4000, "Golgothkicker2timer '" ' Golgothkicker2timer.Interval = 1000
  3663. Golgothkicker3timer.Interval = 5000
  3664. Golgothkicker3timer.enabled = True
  3665. 'vpmtimer.addtimer 5000, "Golgothkicker3timer '" ' Golgothkicker2timer.Interval = 1000
  3666. Golgothkicker4timer.Interval = 6000
  3667. Golgothkicker4timer.enabled = True
  3668. 'vpmtimer.addtimer 6000, "Golgothkicker4timer '" ' Golgothkicker2timer.Interval = 1000
  3669. Golgothkicker5timer.Interval = 7000
  3670. Golgothkicker5timer.enabled = True
  3671. 'vpmtimer.addtimer 4000, "Golgothkicker5timer '" ' Golgothkicker2timer.Interval = 1000
  3672.  
  3673. 'scoreupdate = false
  3674. 'flushdmdtimer.set true , 2600
  3675. 'DMDframe.set true, 2500
  3676. 'DispDmd1.QueueText "[f6][xc][y5]MULTIBALL[y18]500.000", deFlip, 2000, True
  3677. 'DispDmd2.QueueText "[f6][xc][y5]MULTIBALL[y18]500.000", deFlip, 2000, True
  3678. 'DMDBlink "black.jpg", " ", "MULTIBALL", 200, 20
  3679. fltimerA.enabled = 1
  3680. vpmtimer.addtimer 6100, "fltimerB.enabled = 1'"'fltimerB.set true, 2000
  3681. 'effectmusic 1, fadeoutandpause, 0, 1
  3682. 'musicin.set true, 4000
  3683. playsound "VilainVegaMaitre"
  3684. 'duringMULTIBALL.play seqalloff
  3685. J1.state = 2
  3686. J2.state = 2
  3687. J3.state = 2
  3688. J4.state = 2
  3689. 'hologram.frame 1, 211, 1
  3690. end if
  3691.  
  3692.  
  3693. if A6.state = 1 and A7.state = 2 and A8.state = 0 and ballsonplayfield = 1 then
  3694. A7.state = 1
  3695. 'FlashForMs A7, 200, 10, 3 'on
  3696. A8.state = 2
  3697. 'FlashForMs A8, 1, 500, 1 'blink
  3698. 'Multiball READY
  3699. Ab.state = 2
  3700. addscore 150000
  3701. Golgothkicker2timer.Interval = 1000
  3702. Golgothkicker2timer.enabled = True
  3703. 'vpmtimer.addtimer 1000, "Golgothkicker5timer '" ' Golgothkicker2timer.Interval = 1000
  3704. 'scoreupdate = false
  3705. 'flushdmdtimer.set true , 2600
  3706. 'DMDframe.set true, 2500
  3707. 'DispDmd1.QueueText "[il1][sf79][ef95]", deNone, 2500, FALSE
  3708. 'DispDmd2.QueueText "[il1][sf79][ef95]", deNone, 2500, FALSE
  3709. 'DispDmd1.QueueText "[f6][xc][y5]BALL 2 LOCKED[y18]150.000", deFlip, 2000, True
  3710. 'DispDmd2.QueueText "[f6][xc][y5]BALL 2 LOCKED[y18]150.000", deFlip, 2000, True
  3711. DMD "black.jpg", " ", "BALL 2 LOCKED", 2000
  3712. fltimerA.enabled = 1
  3713. vpmtimer.addtimer 1000, "fltimerB.enabled = 1'"'fltimerB.set true, 2000
  3714. 'effectmusic 1, fadeoutandpause, 0, 1
  3715. 'musicin.set true, 2000
  3716. playsound "ActarusMetamorphose"
  3717. end if
  3718.  
  3719.  
  3720. if A6.state = 2 and A7.state = 0 and A8.state = 0 and ballsonplayfield = 1 then
  3721. A6.state = 1
  3722. 'FlashForMs A6, 200, 10, 3 'on
  3723. A7.state = 2
  3724. 'FlashForMs A7, 1, 500, 1 'blink
  3725. Ab.state = 2
  3726. addscore 150000
  3727. 'Golgothkicker1.destroyball
  3728. 'Golgothkicker1.kick 350, 10
  3729. Golgothkicker2timer.Interval = 1000
  3730. Golgothkicker2timer.enabled = True
  3731. 'vpmtimer.addtimer 1000, "Golgothkicker5timer '" ' Golgothkicker2timer.Interval = 1000
  3732. 'scoreupdate = false
  3733. 'flushdmdtimer.set true , 2600
  3734. 'DMDframe.set true, 2500
  3735. 'DispDmd1.QueueText "[il1][sf79][ef95]", deNone, 2500, FALSE
  3736. 'DispDmd2.QueueText "[il1][sf79][ef95]", deNone, 2500, FALSE
  3737. 'DispDmd1.QueueText "[f6][xc][y5]BALL 1 LOCKED[y18]150.000", deFlip, 2000, True
  3738. 'DispDmd2.QueueText "[f6][xc][y5]BALL 1 LOCKED[y18]150.000", deFlip, 2000, True
  3739. DMD "black.jpg", " ", "BALL 1 LOCKED", 2000
  3740. fltimerA.enabled = 1
  3741. vpmtimer.addtimer 1500, "fltimerB.enabled = 1'"'fltimerB.set true, 2000
  3742. 'effectmusic 1, fadeoutandpause, 0, 1
  3743. 'musicin.set true, 3000
  3744. playsound "Actarus01"
  3745. end if
  3746.  
  3747.  
  3748. if Ab.state = 0 and ballsonplayfield = 1 then
  3749. addscore 10000
  3750. Ak.state = 1
  3751. 'FlashForMs AKL, 200, 10, 3 'on
  3752. vpmtimer.addtimer 1000, "Golgothkicker1timer '" 'Golgothkicker1timer.Interval = 1000
  3753. playsound "soundFXkicker1"
  3754. end if
  3755.  
  3756. LastSwitchHit = "Golgothkicker1"
  3757. end sub
  3758.  
  3759.  
  3760.  
  3761. Sub Golgothkicker1_UnHit
  3762. vpmtimer.addtimer 500, "Golgothkicker1Fake.enabled = 1 '"
  3763. vpmtimer.addtimer 500, "Golgothkicker1.Kick 370, 20 '"
  3764. End Sub
  3765.  
  3766.  
  3767. sub Golgothkicker1timer()
  3768.  
  3769. Golgothkicker1.kick 230, 45, 1.5
  3770. FlashForms AKL, 1000, 50, 0
  3771. FlashForms flasher8, 1000, 50, 0
  3772. FlashForms flasher8b, 1000, 50, 0
  3773. FlashForms flasher7, 1000, 50, 0
  3774. FlashForms flasher7b, 1000, 50, 0
  3775. playsound "soundfx17"
  3776. end sub
  3777.  
  3778.  
  3779. sub Golgothkicker2timer_Timer()
  3780. Golgothkicker2timer.enabled = False
  3781. Golgothkicker1.Kick 370, 20
  3782. FlashForms flasher8, 1000, 50, 0
  3783. FlashForms flasher8b, 1000, 50, 0
  3784. If ballsonplayfield = 1 Then
  3785. DMDBlink "black.jpg", " ", "GO FOR MULTIBALL", 100, 20
  3786. End If
  3787. end sub
  3788.  
  3789.  
  3790. sub Golgothkicker3timer_Timer()
  3791. Golgothkicker3timer.enabled = False
  3792. playsound "soundfx17"
  3793. Golgothkicker2.createball
  3794. Golgothkicker2.Kick 0, 50, 1.5
  3795. FlashForms flasher8, 1000, 50, 0
  3796. FlashForms flasher8b, 1000, 50, 0
  3797. end sub
  3798.  
  3799. sub Golgothkicker4timer_Timer()
  3800. Golgothkicker4timer.enabled = False
  3801. playsound "soundfx17"
  3802. Golgothkicker2.createball
  3803. Golgothkicker2.Kick 0, 50, 1.5
  3804. FlashForms flasher8, 1000, 50, 0
  3805. FlashForms flasher8b, 1000, 50, 0
  3806. end sub
  3807.  
  3808. sub Golgothkicker5timer_Timer()
  3809. Golgothkicker5timer.enabled = False
  3810. playsound "soundfx17"
  3811. Golgothkicker2.createball
  3812. Golgothkicker2.Kick 0, 50, 1.5
  3813. FlashForms flasher8, 1000, 50, 0
  3814. FlashForms flasher8b, 1000, 50, 0
  3815. EnableBallSaver 15
  3816. end sub
  3817.  
  3818.  
  3819. Sub Golgothkicker2_Hit
  3820. Golgothkicker2.Kick 0, 50, 1.5
  3821. playsound "soundfx17"
  3822. end sub
  3823.  
  3824. Sub Golgothkicker2_UnHit
  3825. playsound "fx_vukout_LAH"
  3826. AlabardaAnim
  3827. end sub
  3828.  
  3829.  
  3830. '***************************************************************************************
  3831. '-----EXTRA BALL SCRIPT (after multiball drain EXTRA BALL blinks for the target)--------
  3832.  
  3833.  
  3834.  
  3835. Sub Target3_hit()
  3836. startB2S(1)
  3837. PlaySound "fx_rubber"
  3838. addscore 5000
  3839. if ExtraBall.state = 2 then
  3840. ExtraBall.state = 0
  3841. ExtraBallsAwards(CurrentPlayer) = ExtraBallsAwards(CurrentPlayer) + 1 ' awards extra ball to current player
  3842. FlashForMs ShootAgainLightF, 200, 10, 1 'on
  3843. 'ShootAgainLight.state = 1
  3844. addscore 25000
  3845. 'effectmusic 1, fadeoutandpause, 0, 1
  3846. 'musicin.set true, 2000
  3847. playsound "goldrake pioggia di fuoco"
  3848. 'scoreupdate = false
  3849. 'flushdmdtimer.set true , 2600
  3850. 'DMDframe.set true, 2500
  3851. 'DispDmd1.QueueText "[f6][edge4][b][y4]EXTRA BALL[y17]]25.000[/b]", deFlip, 2000, True
  3852. 'DispDmd2.QueueText "[f6][edge4][b][y4]EXTRA BALL[y17]]25.000[/b]", deFlip, 2000, True
  3853. DMDBlink "black.jpg", " ", "EXTRA BALL", 100, 20
  3854. FlashEffect 2
  3855. end if
  3856. LastSwitchHit = "Target3"
  3857. End Sub
  3858.  
  3859.  
  3860.  
  3861.  
  3862.  
  3863. '***************************************************************************************
  3864. '-----ORBIT SCRIPT-----------------------------------------------------------------------
  3865. sub Orbit_hit()
  3866. ' MARIA FREED JACKPOT during Multiball (if ballsonpf = 2 3 4):
  3867. if ballsonplayfield = 4 then
  3868. addscore 1000000
  3869. playsound "soundOrbit"
  3870. 'scoreupdate = false
  3871. 'flushdmdtimer.set true , 4100
  3872. 'DMDframe.set true, 4000
  3873. DMDFLush
  3874. DMD "DMDJackpotM.gif", "", "", 2000
  3875. 'DispDmd1.QueueText "[il1][sf51][ef70]", deNone, 4000, FALSE
  3876. 'DispDmd2.QueueText "[il1][sf51][ef70]", deNone, 4000, FALSE
  3877. end if
  3878. if ballsonplayfield = 3 then
  3879. addscore 500000
  3880. playsound "soundOrbit"
  3881. 'scoreupdate = false
  3882. 'flushdmdtimer.set true , 4100
  3883. 'DMDframe.set true, 4000
  3884. DMDFLush
  3885. DMD "DMDJackpotM.gif", "", "", 2000
  3886. 'DispDmd1.QueueText "[il1][sf51][ef70]", deNone, 4000, FALSE
  3887. 'DispDmd2.QueueText "[il1][sf51][ef70]", deNone, 4000, FALSE
  3888. end if
  3889. if ballsonplayfield = 2 then
  3890. addscore 250000
  3891. playsound "soundOrbit"
  3892. 'scoreupdate = false
  3893. 'flushdmdtimer.set true , 4100
  3894. 'DMDframe.set true, 4000
  3895. DMDFLush
  3896. DMD "DMDJackpotM.gif", "", "", 2000
  3897. 'DispDmd1.QueueText "[il1][sf51][ef70]", deNone, 4000, FALSE
  3898. 'DispDmd2.QueueText "[il1][sf51][ef70]", deNone, 4000, FALSE
  3899. end if
  3900. if ballsonplayfield = 1 then
  3901. addscore 15000
  3902. playsound "soundOrbit"
  3903. fltimer1.enabled = true
  3904. vpmtimer.addtimer 1000, "fltimer2.enabled = 1 '" 'fltimer2.enabled = true
  3905. end if
  3906. end sub
  3907.  
  3908.  
  3909.  
  3910. '***************************************************************************************
  3911. '---ACTARUS 2 BALL SCRIPT-----------------------------------------------------------------------
  3912.  
  3913.  
  3914. '---Lockhole script-------
  3915.  
  3916. sub lockhole_hit()
  3917. playsound "rballfall"
  3918. if ballsonplayfield = 4 then
  3919. lockhole.Kick 80,5
  3920. end if
  3921. if ballsonplayfield = 3 then
  3922. lockhole.Kick 80,5
  3923. end if
  3924. if ballsonplayfield = 2 then
  3925. lockhole.Kick 80,5
  3926. end if
  3927.  
  3928.  
  3929.  
  3930. if B4.state = 1 and B5.state = 2 and ballsonplayfield = 1 then
  3931. B1.state = 2
  3932. B2.state = 0
  3933. B3.state = 0
  3934. B4.state = 0
  3935. B5.state = 0
  3936. playsound "goldrake music"
  3937. 'duringMULTIBALL.play seqalloff
  3938. J1.state = 2
  3939. J2.state = 2
  3940. J3.state = 2
  3941. J4.state = 2
  3942.  
  3943. lockhole.Kick 80,5
  3944. FlashForMs flasher9, 100, 10, 0 'off
  3945. FlashForms flasher9b, 100, 10, 0
  3946. vpmtimer.addtimer 3000, "ball1out '"
  3947. vpmtimer.addtimer 4000, "ball2out '"
  3948. addscore 250000
  3949. 'effectmusic 1, fadeoutandpause, 0, 1
  3950. 'musicin.set true, 2000
  3951. playsound "goldrake Missile"
  3952. 'scoreupdate = false
  3953. 'flushdmdtimer.set true , 2600
  3954. 'DMDframe.set true, 2500
  3955.  
  3956. 'DispDmd1.QueueText "[f6][edge4][b][y4]MULTIBALL[y17]150.000[/b]", deFlip, 2000, True
  3957. 'DispDmd2.QueueText "[f6][edge4][b][y4]MULTIBALL[y17]150.000[/b]", deFlip, 2000, True
  3958. 'DMDBlink "black.jpg", " ", "MULTIBALL", 200, 20
  3959. bMultiBallMode = True
  3960. IntroSmallDMD
  3961. StopSound Song:Song = ""
  3962. PlaySong "mu_Multiball"
  3963. DMDFLush
  3964. DMD "Multiball.wmv", "", "", 4500
  3965. fltimerA.enabled = 1
  3966. vpmtimer.addtimer 2000, "fltimerB.enabled = 1 '"
  3967. 'hologram.frame 1, 211, 1
  3968. end if
  3969.  
  3970. if B4.state = 2 and B5.state = 0 and ballsonplayfield = 1 then
  3971. B4.state = 1
  3972. B5.state = 2
  3973. lockhole.Kick 80,5
  3974. FlashForMs flasher9, 100, 10, 0 'off
  3975. FlashForMs flasher9b, 100, 10, 0 'off
  3976. ActaruskicktorampTimer.interval = 2000
  3977. ActaruskicktorampTimer.enabled = True
  3978. 'vpmtimer.addtimer 2000, "Actaruskicktoramp '"'Actaruskicktoramp.set true, 2000
  3979. addscore 150000
  3980. 'effectmusic 1, fadeoutandpause, 0, 1
  3981. 'musicin.set true, 2000
  3982. 'playsound "goldrake lame rotanti"
  3983. 'lama.moveto lama.tx-260, lama.ty, lama.tz+550, +900
  3984. 'lama2.moveto lama2.tx+220, lama2.ty, lama2.tz+670, +800
  3985. 'lama.rotatexz 800
  3986. 'lama2.rotatexz 800
  3987. 'Timerlama.set true , 2200
  3988. LameAnimOn
  3989. FlashForMs flasher2, 100, 10, 0 'off
  3990. FlashForMs flasher6, 100, 10, 0 'off
  3991. 'scoreupdate = false
  3992. 'flushdmdtimer.set true , 2600
  3993. 'DMDframe.set true, 2500
  3994. 'DispDmd1.QueueText "[f6][edge4][b][y4]BALL 1 LOCKED[y17]75.000[/b]", deFlip, 2000, True
  3995. 'DispDmd2.QueueText "[f6][edge4][b][y4]BALL 1 LOCKED[y17]75.000[/b]", deFlip, 2000, True
  3996. 'DMD "black.jpg", " ", "BALL 1 LOCKED", 2000
  3997.  
  3998. fltimerA.enabled = 1
  3999. vpmtimer.addtimer 2000, "fltimerB.enabled = 1 '"
  4000. end if
  4001.  
  4002. end sub
  4003.  
  4004.  
  4005. Sub LockholeFake_Hit
  4006. if ballsonplayfield = 4 then
  4007. LockholeFake.Kick 0,5
  4008. vpmtimer.addtimer 700, "Actaruskicker1.kick 0, 25, 1.5 '"
  4009. end if
  4010. if ballsonplayfield = 3 then
  4011. LockholeFake.Kick 80,5
  4012. vpmtimer.addtimer 700, "Actaruskicker1.kick 0, 25, 1.5 '"
  4013. end if
  4014. if ballsonplayfield = 2 then
  4015. LockholeFake.Kick 0,5
  4016. vpmtimer.addtimer 700, "Actaruskicker1.kick 0, 25, 1.5 '"
  4017. end if
  4018. End Sub
  4019.  
  4020. Sub closediverter_hit
  4021. ' GolgothRotateTimer.enabled = 0
  4022. End Sub
  4023.  
  4024.  
  4025. Dim Lame
  4026. Sub LameAnimOn()
  4027. DMDSmallSequence 67, 92
  4028. LameAnimTimer.enabled = 1
  4029. End Sub
  4030.  
  4031.  
  4032. Sub LameAnimTimer_Timer
  4033. Lama1.rotY = Lama1.rotY - 1
  4034. Lama2.rotY = Lama2.rotY + 1
  4035. Lame = Lame + 1
  4036. End Sub
  4037.  
  4038. Sub LameAnimTimerOff_Timer
  4039. LameAnimTimerS.enabled = 0
  4040. LameAnimTimer.enabled = 0
  4041. Lame = Lame - 1
  4042. Lama1.rotY = Lama1.rotY + 1
  4043. Lama2.rotY = Lama2.rotY - 1
  4044. End Sub
  4045.  
  4046.  
  4047. Sub LameAnimTimerS_Timer
  4048. Lama1.visible = 0 :Lama2.visible = 0
  4049. Lama1B.visible = 1 :Lama2B.visible = 1
  4050. Lama1B.rotY = Lama1B.rotY + 3
  4051. Lama2B.rotY = Lama2B.rotY - 3
  4052. End Sub
  4053.  
  4054. Sub LameAnimTimerOffS()
  4055. Lama1B.rotY = 0
  4056. Lama2B.rotY = 0
  4057. Lama1.visible = 1 :Lama2.visible = 1
  4058. Lama1B.visible = 0 :Lama2B.visible = 0
  4059. End Sub
  4060.  
  4061. '---ACTARUS kicker (initiates Lock in LOCKHOLE)-----
  4062.  
  4063.  
  4064.  
  4065. Sub Actaruskicker1_hit()
  4066. If B2SOn Then Controller.B2SSetData 5,0:Controller.B2SSetData 5,1
  4067. 'DMD "DMD meta.gif", "", "", 2800
  4068. ActarusKicker1Fake.enabled = 0
  4069. playsound "fx_kicker-enter"
  4070. 'ActarusKicker1.destroyball
  4071.  
  4072. if ballsonplayfield = 4 then
  4073. FlashForMs flasher9, 1000, 10, 0 'off
  4074. FlashForMs flasher9b, 1000, 10, 0 'off
  4075. ActarusKicker1.kick 285, 10
  4076. ActaruskicktorampTimer.Interval = 2000
  4077. ActaruskicktorampTimer.Enabled = True
  4078. 'vpmtimer.addtimer 1000, "Actaruskicktoramp '"
  4079. vpmtimer.addtimer 2100, "ActarusKicker1Fake.enabled = 1 '"
  4080. addscore 50000
  4081. end if
  4082.  
  4083. if ballsonplayfield = 3 then
  4084. FlashForMs flasher9, 1000, 10, 0 'off
  4085. FlashForMs flasher9b, 1000, 10, 0 'off
  4086. ActarusKicker1.kick 285, 10
  4087. ActaruskicktorampTimer.Interval = 2000
  4088. ActaruskicktorampTimer.Enabled = True
  4089. 'vpmtimer.addtimer 1000, "Actaruskicktoramp '"
  4090. vpmtimer.addtimer 2100, "ActarusKicker1Fake.enabled = 1 '"
  4091. addscore 50000
  4092. end if
  4093.  
  4094. if ballsonplayfield = 2 then
  4095. FlashForMs flasher9, 1000, 10, 0 'off
  4096. FlashForMs flasher9b, 1000, 10, 0 'off
  4097. ActarusKicker1.kick 285, 10
  4098. ActaruskicktorampTimer.Interval = 2000
  4099. ActaruskicktorampTimer.Enabled = True
  4100. 'vpmtimer.addtimer 1000, "Actaruskicktoramp '"
  4101. vpmtimer.addtimer 2100, "ActarusKicker1Fake.enabled = 1 '"
  4102. addscore 50000
  4103. end if
  4104.  
  4105.  
  4106. if B1.state = 1 and B2.state = 1 and B3.state = 1 and ballsonplayfield = 1 then
  4107. playsound "soundfxchair"
  4108. addscore 25000
  4109. Bulb5.state = 1
  4110. Bulb5L.state = 1
  4111. ActaruskickstRaight.interval = 1000
  4112. ActaruskickstRaight.enabled = True
  4113. 'vpmtimer.addtimer 1000, "Actaruskickstraight '"
  4114. 'vpmtimer.addtimer 1000, "Actaruskickstraight '"
  4115. playsound "soundFXkicker1"
  4116. 'scoreupdate = false
  4117. 'flushdmdtimer.set true , 4100
  4118. 'DMDframe.set true, 4000
  4119. 'DispDmd1.QueueText "[il1][sf71][ef78][rf71]", deNone, 4000, FALSE
  4120. 'DispDmd2.QueueText "[il1][sf71][ef78][rf71]", deNone, 4000, FALSE
  4121. DMDSmallSequence 162, 171
  4122. DMD "Black.jpg", " ", "LOCK IS LIT", 2000
  4123. end if
  4124.  
  4125. if B1.state = 1 and B2.state = 1 and B3.state = 2 and ballsonplayfield = 1 then
  4126. playsound "soundfxchair"
  4127. B3.state = 1
  4128. B4.state = 2
  4129. Lockdiverter.RotateToEnd
  4130. addscore 2000
  4131. FlashForMs flasher9, 1000, 10, 0 'off
  4132. FlashForMs flasher9b, 1000, 10, 0 'off
  4133. 'effectmusic 1, fadeoutandpause, 0, 1
  4134. 'musicin.set true, 2000
  4135. playsound "goldrake tuono"
  4136. ActarusKicker1.kick 285, 10
  4137. ActaruskicktorampTimer.Interval = 2000
  4138. ActaruskicktorampTimer.Enabled = True
  4139. 'vpmtimer.addtimer 1000, "Actaruskicktoramp '"
  4140. vpmtimer.addtimer 2100, "ActarusKicker1Fake.enabled = 1 '"
  4141. 'scoreupdate = false
  4142. 'flushdmdtimer.set true , 4100
  4143. 'DMDframe.set true, 4000
  4144. DMDSmallSequence 162, 171
  4145. DMD "Black.jpg", " ", "LOCK IS LIT", 2000
  4146. 'fltimerA.set true, 1
  4147. 'fltimerB.set true, 2000
  4148. fltimerA.enabled = 1
  4149.  
  4150. end if
  4151.  
  4152. if B1.state = 1 and B2.state = 2 and B3.state = 0 and ballsonplayfield = 1 then
  4153. playsound "soundfxchair"
  4154. B2.state = 1
  4155. B3.state = 2
  4156. addscore 20000
  4157. FlashForMs flasher9, 1000, 10, 0 'off
  4158. FlashForMs flasher9b, 1000, 10, 0 'off
  4159. ActarusKicker1.kick 285, 10
  4160. ActaruskicktorampTimer.Interval = 2000
  4161. ActaruskicktorampTimer.Enabled = True
  4162. 'vpmtimer.addtimer 1000, "Actaruskicktoramp '"
  4163. vpmtimer.addtimer 2100, "ActarusKicker1Fake.enabled = 1 '"
  4164. 'scoreupdate = false
  4165. 'flushdmdtimer.set true , 4100
  4166. 'DMDframe.set true, 4000
  4167. 'DispDmd1.QueueText "[il1][sf71][ef78][rf71]", deNone, 4000, FALSE
  4168. 'DispDmd2.QueueText "[il1][sf71][ef78][rf71]", deNone, 4000, FALSE
  4169. end if
  4170.  
  4171. if B1.state = 2 and B2.state = 0 and B3.state = 0 and ballsonplayfield = 1 then
  4172. playsound "soundfxchair"
  4173. B1.state = 1
  4174. B2.state = 2
  4175. addscore 15000
  4176. Bulb5.state = 1
  4177. Bulb5L.state = 1
  4178. ActaruskickstRaight.interval = 1000
  4179. ActaruskickstRaight.enabled = True
  4180. 'vpmtimer.addtimer 1000, "Actaruskickstraight '"
  4181. playsound "soundFXkicker1"
  4182. 'scoreupdate = false
  4183. 'flushdmdtimer.set true , 4100
  4184. 'DMDframe.set true, 4000
  4185. 'DispDmd1.QueueText "[il1][sf71][ef78][rf71]", deNone, 4000, FALSE
  4186. 'DispDmd2.QueueText "[il1][sf71][ef78][rf71]", deNone, 4000, FALSE
  4187. DMDSmallSequence 131, 141
  4188. end if
  4189.  
  4190. LastSwitchHit = "ActarusKicker1"
  4191. end sub
  4192.  
  4193.  
  4194. Sub ActarusKicker1_UnHit
  4195. Actaruskicker2.kick 0, 45, 1.5
  4196. End Sub
  4197.  
  4198.  
  4199. sub Timerbulb_Timer()
  4200. Timerbulb.enabled = 0
  4201. gi4.state = 1
  4202. gi3.state = 1
  4203. gi5.state = 1
  4204. gi6.state = 1
  4205. End Sub
  4206.  
  4207.  
  4208.  
  4209.  
  4210.  
  4211.  
  4212. '---Kickout Timers-------
  4213. sub ActaruskickstRaight_Timer()
  4214. '---straight if B1 or B3 or B5 blink
  4215. ActaruskickstRaight.enabled = False
  4216. playsound "fx_kicker"
  4217. ActarusMoveA.enabled = 1
  4218. Actaruskicker1.Kick 0, 25, 1.5
  4219. Bulb5.state = 0
  4220. Bulb5L.state = 0
  4221. playsound "soundfx17"
  4222. vpmtimer.addtimer 2100, "ActarusKicker1Fake.enabled = 1 '"
  4223. end sub
  4224.  
  4225.  
  4226.  
  4227. sub ActaruskicktorampTimer_Timer()
  4228. ActaruskicktorampTimer.enabled = False
  4229. ActarusMoveC.enabled = 1
  4230. playsound "soundfxchair"
  4231. '---if B2 or B4 blink & during Multiball
  4232. Actaruskicker2.kick 0, 45, 1.5
  4233. FlashForMs flasher9, 100, 10, 0 'off
  4234. FlashForMs flasher9b, 100, 10, 0 'off
  4235. playsound "soundfx17"
  4236. end sub
  4237.  
  4238.  
  4239.  
  4240. '---2 Ball Multiball Timers-------
  4241. sub ball1out()
  4242. playsound "soundfx17"
  4243. 'Actaruskicker2.createball
  4244. Actaruskicker2.kick 0, 45, 1.5
  4245. vpmtimer.addtimer 500, "Actaruskicker1.kick 0, 25, 1.5 '"
  4246. FlashForMs flasher9, 100, 10, 0 'off
  4247. FlashForMs flasher9b, 100, 10, 0 'off
  4248. EnableBallSaver 15
  4249. end sub
  4250.  
  4251.  
  4252. sub ball2out
  4253. playsound "soundfx17"
  4254. Actaruskicker2.createball
  4255. Actaruskicker2.kick 0, 45, 1.5
  4256. vpmtimer.addtimer 700, "Actaruskicker1.kick 0, 25, 1.5 '"
  4257. FlashForMs flasher9, 100, 10, 0 'off
  4258. FlashForMs flasher9b, 100, 10, 0 'off
  4259. BallsOnPlayfield = 2
  4260. end sub
  4261.  
  4262. Dim ComboM
  4263. Sub CheckComboMultiball()
  4264. If bMultiBallMode then Exit Sub
  4265.  
  4266. If ComboM = 3 Then
  4267. DMD "Black.jpg", ComboM &" Combos-> 7 More For", "MULTIBALL", 2000
  4268. End If
  4269.  
  4270. If ComboM = 6 Then
  4271. DMD "Black.jpg", ComboM &" Combos-> 4 More For", "MULTIBALL", 2000
  4272. End If
  4273.  
  4274. If ComboM = 9 Then
  4275. DMD "Black.jpg", ComboM &" Combos-> 1 More For", "MULTIBALL", 2000
  4276. End If
  4277.  
  4278. If ComboM = 10 Then
  4279. ComboM = 0
  4280. DMD ".jpg", ComboM &" Combos Ready For", "MULTIBALL", 2000
  4281. vpmtimer.addtimer 3000, "ComboMultiball '"
  4282. End If
  4283. End Sub
  4284.  
  4285. Sub ComboMultiball()
  4286. StopSound Song:Song = ""
  4287. PlaySong "mu_Multiball"
  4288. AddMultiball 3
  4289. DMDSmallSequence 144, 188
  4290. DMD "ComboMultiball.wmv", "", "", 1150
  4291. End Sub
  4292.  
  4293.  
  4294. Sub StopAllMusic:EndMusic:End Sub
RAW Paste Data