Outhere

Jacks Open Goldchicco_(Gottlieb 1977) 1.0

Jul 21st, 2021
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 48.97 KB | None | 0 0
  1. '
  2. '
  3. ' _ _ ____ _ ______ ___ ____ _____ _ _
  4. ' | | / \ / ___| |/ / ___| / _ \| _ \| ____| \ | |
  5. ' _ | |/ _ \| | | ' /\___ \ | | | | |_) | _| | \| |
  6. ' | |_| / ___ \ |___| . \ ___) | | |_| | __/| |___| |\ |
  7. ' \___/_/ \_\____|_|\_\____/ \___/|_| |_____|_| \_|
  8. '
  9. ' Jacks Open by Gottlieb (1977)
  10. ' Original
  11. ' **** Graphics/Sound/Build/Code by Pinuck ****
  12. '
  13. ' NEW - Updated graphics/lighting/primitives/etc. for VPX by Sliderpoint
  14. ' NEW - New High Score Sticky and additional photo resources from GNance
  15. ' NEW - Score routine fixes by BorgDog
  16. '
  17. '
  18.  
  19. Option Explicit
  20. Randomize
  21.  
  22. Const cGameName = "jacksopen"
  23.  
  24. Const BallSize = 50
  25. Const BallMass = 1
  26.  
  27. '****************************************
  28. ' DECLARATIONS
  29. '****************************************
  30.  
  31. Dim Score, Credits
  32. Dim TargetValue, TargetMode
  33. Dim Target1Down, Target2Down, Target3Down, Target4Down, Target5Down
  34. Dim Target6Down, Target7Down, Target8Down, Target9Down
  35. Dim TopLanesUnlit
  36. Dim B1Lit, B2Lit, B3Lit
  37. Dim bump1, bump2, bump3 ' for bumper animation
  38. Dim T, obj, x
  39. Dim dropsUp ' flag for resetting red drops
  40. Dim BallRelPause, NextBallPause, TiltPause, GameOverPause, MatchPause
  41. Dim ChimesPause, Chimes2Pause, DropResetPause, RedResetPause, SMFadePause, FiveKPause, FiveHPause
  42. Dim PlungerIm
  43. Dim SpecialLit
  44. Dim LROlit : Dim RROlit : Dim LOLlit : Dim ROLlit : Dim LILlit : Dim RILlit ' bottom rollovers and outlanes
  45. Dim BallsRemaining, GameStarted, Tilt, Tilted, Match, CurrentBall
  46. Dim HighScore, LastScore, HighScoreName, PlayerTLA, HSA1, HSA2, HSA3, HSDefault 'HSA=high score alpha (letter)
  47. Dim Free100, Free130, Free170
  48. Dim Score1M, Score100k, Score10k, ScoreK, Score100, Score10, Score1, Scorex 'Define 5 different score values for each reel to use
  49. Dim HSEnterMode, hsLetterFlash, hsEnteredDigits(3), hsCurrentDigit, hsCurrentLetter
  50. Dim Roll, CurrBall, TSCount
  51. Dim DesktopMode: DesktopMode = Table1.ShowDT
  52.  
  53. Const DefaultHighScore = 22420
  54. Const DefaultHSA1 = 25
  55. Const DefaultHSA2 = 25
  56. Const DefaultHSA3 = 26
  57. Const BallsPerGame = 3
  58. Const SMFadeResetValue = 18
  59. Const hsFlashDelay = 4
  60. Const tiltSettle = 80
  61. Const tiltAllow = 3 'how many nudges to tilt
  62.  
  63. On Error Resume Next
  64. ExecuteGlobal GetTextFile("controller.vbs")
  65. If Err Then MsgBox "Can't open controller.vbs"
  66. On Error Goto 0
  67.  
  68. Dim BlinkingLightState(5)
  69.  
  70. 'Const B2STableName="Jacks Open"
  71. 'Dim B2sOn
  72. 'B2SOn = 1 ' Set to 0 to disable B2S backglass, 1 to enable
  73. 'Dim Controller
  74. 'if B2SOn then
  75. ' On Error Resume Next
  76. ' ExecuteGlobal GetTextFile("controller.vbs")
  77. ' If Err Then
  78. ' MsgBox "Can't open controller.vbs"
  79. ' B2SOn = 0
  80. ' End If
  81. ' On Error Goto 0
  82. ' If B2SOn then
  83. ' Set Controller = CreateObject("B2S.Server")
  84. ' Controller.B2SName = B2STableName
  85. ' Controller.Run()
  86. ' If Err Then
  87. ' MsgBox "Can't Load B2S.Server."
  88. ' B2SOn = 0
  89. ' End If
  90. ' End if
  91. 'end if
  92.  
  93. '****************************************
  94. ' TABLE INIT
  95. '****************************************
  96.  
  97. Sub Table1_Init
  98. LoadEM
  99. LoadHighScore
  100. GameStarted = 0
  101. AllLampsOff
  102. If B2SOn then
  103. Controller.B2SSetMatch 34, 0 'match lights off
  104. Controller.B2SSetData 51, 0 'turn off 100k lights
  105. Controller.B2SSetCredits credits
  106. end if
  107. EMReelMatch.setvalue 0
  108. EMReel100k.setvalue 0
  109. LastScoreReels
  110. B1Lit=0:B2Lit=0:B3Lit=0
  111. If Credits <1 then Credits = 0 'credits=0
  112. If credits > 0 Then DOF 142, DOFOn
  113. EMReelCredits.setvalue(Credits)
  114. SaveHighScore
  115. EMReelGO.setvalue 1
  116. roll = 0
  117. Set CurrBall = Drain.CreateBall
  118. Dim ChgLed, iw
  119.  
  120. If Table1.ShowDT = false then
  121. For each iw in BGstuff: iw.Visible = False:Next
  122. Else
  123. For each iw in BGstuff: iw.Visible = True:Next
  124. End If
  125.  
  126. End Sub
  127.  
  128. '****************************************
  129. ' TABLE EXIT
  130. '****************************************
  131. Sub Table1_Exit
  132. If B2SOn Then Controller.Stop
  133. End Sub
  134.  
  135. '****************************************
  136. ' KEYSTROKES
  137. '****************************************
  138.  
  139. Sub Table1_KeyDown(ByVal keycode)
  140. If Gamestarted AND(NOT Tilted) Then
  141. If keycode = LeftFlipperKey Then
  142. PlaySound SoundFXDOF("PNK_MH_Flip_L_up",101,DOFOn,DOFContactors)
  143. LeftFlipper.RotateToEnd
  144. PlaySound "Buzz1",-1,1,.1
  145. end if
  146. If keycode = RightFlipperKey Then
  147. PlaySound SoundFXDOF("PNK_MH_Flip_R_up",102,DOFOn,DOFContactors)
  148. RightFlipper.RotateToEnd
  149. PlaySound "Buzz",-1,1,.1
  150. end if
  151. End If
  152. If keycode = LeftTiltKey Then
  153. Nudge 90, 2
  154. Bump
  155. End If
  156.  
  157. If keycode = RightTiltKey Then
  158. Nudge 270, 2
  159. Bump
  160. End If
  161.  
  162. If keycode = CenterTiltKey Then
  163. Nudge 0, 2
  164. Bump
  165. End If
  166.  
  167. If keycode = LeftMagnaSave Then bLutActive = True
  168. If keycode = RightMagnaSave Then
  169. If bLutActive Then NextLUT: End If
  170. End If
  171.  
  172. If keycode = PlungerKey Then Plunger.Pullback:playsound"plungerpull"
  173. If keycode = StartGameKey AND GameStarted = 0 And Credits > 0 And Not HSEnterMode=true Then StartGame
  174. If keycode = AddCreditKey Then Addcredit:EMReelCredits.setvalue(credits)
  175. If HSEnterMode Then HighScoreProcessKey(keycode)
  176. End Sub
  177.  
  178. Sub Table1_KeyUp(ByVal keycode)
  179. If keycode = LeftMagnaSave Then bLutActive = False
  180. If KeyCode=PlungerKey Then PlaySound"plunger":Plunger.Fire
  181. If Gamestarted AND(NOT Tilted) Then
  182. If keycode = LeftFlipperKey Then
  183. LeftFlipper.RotateToStart
  184. PlaySound SoundFXDOF("PNK_MH_Flip_L_down",101,DOFOff,DOFContactors)
  185. StopSound "Buzz1"
  186. end if
  187. If keycode = RightFlipperKey Then
  188. RightFlipper.RotateToStart
  189. PlaySound SoundFXDOF("PNK_MH_Flip_R_down",102,DOFOff,DOFContactors)
  190. StopSound "Buzz"
  191. end if
  192. End If
  193. End Sub
  194.  
  195.  
  196. '******************************
  197. ' INIT FIRST BALL
  198. '****************************************
  199.  
  200. Sub Initialize
  201. GameOverFlasher.enabled = 0
  202. If B2SOn then Controller.B2SSetGameOver 0
  203. LightTRO1.state=1 : LightTRO2.state=1 : LightTRO3.state=1 : LightTRO4.state=1 ' light suit rollovers
  204. TopLanesUnlit = 0
  205. ResetTargets
  206. SpecialLit = 0
  207. Free100=0 : Free130=0 : Free170 = 0
  208. TargetMode = 1 : LightMode1.state=1 ' reset mode
  209. TargetValue = 1000 ' Target value - starts at 1k, +1k for each lane completed
  210. B1Lit=1:B2Lit=0:B3Lit=1
  211. SMFadePause=6 'LIGHT BUMPERS
  212. Score = 0
  213. BallsRemaining = BallsPerGame + 1 ' first ball
  214. TiltPause = 0
  215. Tilted = 0
  216. Tilt = 0
  217. MatchPause = 0
  218. GameOverPause = 0
  219. NextBallPause = 0
  220. GameStarted = 1
  221. Credits = Credits -1
  222. If credits < 1 Then DOF 142, DOFOff
  223. If B2SOn then
  224. Controller.B2SSetCredits credits
  225. Controller.B2SSetMatch 34, 0 'match lights off
  226. Controller.B2SSetTilt 33, 0
  227. Controller.B2SSetData 51, 0 'turn off 100k lights
  228.  
  229. End if
  230. EMReelCredits.setvalue(credits)
  231. SaveHighScore
  232. EMReelMatch.setvalue 0
  233. BlinkingLogoOnOff(0)
  234. EMReel100k.setvalue 0
  235. EMReelGO.setvalue 0
  236. ' If b2son then controller.B2SSetData 0, 3, 0, 0, 120, "reel" 'reset to zero
  237. ResetScore
  238. PlaySound "MekSound"
  239. End Sub
  240.  
  241. Sub StartGame
  242. Initialize
  243. NextBallPause = 30
  244. End Sub
  245.  
  246. Sub GetSpecial
  247. PlaySound SoundFXDOF("knocker",110,DOFPulse,DOFKnocker)
  248. Credits = Credits + 1
  249. DOF 142, DOFOn
  250. If Credits > 15 Then Credits = 15
  251. If B2SOn then Controller.B2SSetCredits credits
  252. EMReelCredits.setvalue(Credits)
  253. SaveHighScore
  254. End Sub
  255.  
  256. Sub AddCredit
  257. Credits = Credits + 1
  258. DOF 142, DOFOn
  259. PlaySound "coin"
  260. If Credits > 15 Then Credits = 15
  261. If B2SOn then Controller.B2SSetCredits credits
  262. EMReelCredits.setvalue(Credits)
  263. SaveHighScore
  264. End Sub
  265.  
  266. Sub AllLampsOff
  267. LightMode2.state=0 : LightMode3.state=0 : LightMode4.state=0 : LightMode5.state=0
  268. LightLILb.state=1 : LightRILb.state=1 : LightLOLb.state=1 : LightROLb.state=1 : LightLROb.state=1 : LightRROb.state=1
  269. LightLILb.state=0 : LightRILb.state=0 : LightLOLb.state=0 : LightROLb.state=0 : LightLROb.state=0 : LightRROb.state=0
  270. LightTRO1.state=0 : LightTRO2.state=0 : LightTRO3.state=0 : LightTRO4.state=0
  271. Bumper1Light.state = 0 : Bumper2Light.state = 0 : Bumper3Light.state = 0
  272. LROlit=0:RROlit=0:LOLlit=0:ROLlit=0:LILlit=0:RILlit=0
  273. End Sub
  274.  
  275. '****************************************
  276. ' DELAY TIMER LOOP
  277. '****************************************
  278.  
  279. Sub DelayTimer_Timer
  280. If NextBallPause > 0 Then
  281. NextBallPause = NextBallPause - 1
  282. If NextBallPause = 0 Then
  283. BallsRemaining = BallsRemaining - 1
  284. CurrentBall = BallsPerGame - BallsRemaining +1
  285. If BallsRemaining = 0 Then
  286. MatchPause = 20
  287. Else
  288. If B2SOn then Controller.B2ssetballinplay 32, CurrentBall
  289. EMReelBall.SetValue(CurrentBall)
  290. Drain.Kick 65, 20
  291. PlaySound SoundFXDOF("ballrel",109,DOFPulse,DOFContactors)
  292. End If
  293. End If
  294. End If
  295.  
  296. If DropResetPause > 0 Then
  297. DropResetPause = DropResetPause - 1
  298. If DropResetPause = 0 Then
  299. PlaySound SoundFXDOF("dropResetCenter",130,DOFPulse,DOFContactors)
  300. For each obj in Drops
  301. obj.IsDropped=false
  302. Next
  303. End If
  304. End If
  305.  
  306. If RedResetPause > 0 Then
  307. RedResetPause = RedResetPause - 1
  308. If RedResetPause = 0 Then
  309. PlaySound SoundFXDOF("dropResetCenter",130,DOFPulse,DOFContactors)
  310. Target2.IsDropped = True:Target4.IsDropped = True:Target6.IsDropped = True:Target8.IsDropped = True
  311. End If
  312. End If
  313.  
  314. If TiltPause > 0 Then
  315. TiltPause = TiltPause - 1
  316. If TiltPause = 1 Then
  317. Tilt = Tilt - 1
  318. If Tilt > 0 Then
  319. TiltPause = tiltSettle
  320. End If
  321. End If
  322. End If
  323.  
  324. If GameOverPause > 0 Then
  325. GameOverPause = GameOverPause - 1
  326. If GameOverPause = 15 Then
  327. PlaySound "MekSound"
  328. GameStarted = 0
  329. AllLampsOff
  330. SMFadePause=15
  331. End If
  332. If GameOverPause = 0 Then GameOver
  333. End If
  334.  
  335. If MatchPause > 0 then
  336. MatchPause = MatchPause - 1
  337. If MatchPause = 0 then
  338. Match = 10 * (INT(10 * Rnd(1) ) ):If Match < 10 Then Match = "00"
  339. Select Case Match
  340. Case 0
  341. If B2SOn then Controller.B2SSetMatch 34,0 'match
  342. EMReelMatch.setvalue 0
  343. Case "00":
  344. If B2SOn then Controller.B2SSetMatch 34,1 'match
  345. EMReelMatch.setvalue 1
  346. Case 10:
  347. If B2SOn then Controller.B2SSetMatch 34,2
  348. EMReelMatch.setvalue 2
  349. Case 20:
  350. If B2SOn then Controller.B2SSetMatch 34,3
  351. EMReelMatch.setvalue 3
  352. Case 30:
  353. If B2SOn then Controller.B2SSetMatch 34,4
  354. EMReelMatch.setvalue 4
  355. Case 40:
  356. If B2SOn then Controller.B2SSetMatch 34,5
  357. EMReelMatch.setvalue 5
  358. Case 50:
  359. If B2SOn then Controller.B2SSetMatch 34,6
  360. EMReelMatch.setvalue 6
  361. Case 60:
  362. If B2SOn then Controller.B2SSetMatch 34,7
  363. EMReelMatch.setvalue 7
  364. Case 70:
  365. If B2SOn then Controller.B2SSetMatch 34,8
  366. EMReelMatch.setvalue 8
  367. Case 80:
  368. If B2SOn then Controller.B2SSetMatch 34,9
  369. EMReelMatch.setvalue 9
  370. Case 90:
  371. If B2SOn then Controller.B2SSetMatch 34,10
  372. EMReelMatch.setvalue 10
  373. End Select
  374. x = Match
  375. ' MatchTemp.Text= x'debug
  376. If Match = "00" Then x = 0
  377. If x = Score MOD 100 Then
  378. PlaySound SoundFXDOF("knocker",110,DOFPulse,DOFKnocker)
  379. Credits = Credits + 1
  380. DOF 142, DOFOn
  381. If Credits > 15 Then Credits = 15
  382. If B2SOn then Controller.B2SSetCredits credits
  383. EMReelCredits.setvalue(Credits)
  384. SaveHighScore
  385. End If
  386. GameOverPause = 20
  387. End If
  388. End If
  389.  
  390. If FiveKPause > 0 Then
  391. FiveKPause = FiveKPause - 1
  392. If FiveKPause = 12 Then AddScore(1000):PlaySound SoundFXDOF("1000",146,DOFPulse,DOFChimes)
  393. If FiveKPause = 9 Then AddScore(1000):PlaySound SoundFXDOF("1000",146,DOFPulse,DOFChimes)
  394. If FiveKPause = 6 Then AddScore(1000):PlaySound SoundFXDOF("1000",146,DOFPulse,DOFChimes)
  395. If FiveKPause = 3 Then AddScore(1000):PlaySound SoundFXDOF("1000",146,DOFPulse,DOFChimes)
  396. If FiveKPause = 0 Then AddScore(1000):PlaySound SoundFXDOF("1000",146,DOFPulse,DOFChimes)
  397. End If
  398. If FiveHPause > 0 Then
  399. FiveHPause = FiveHPause - 1
  400. If FiveHPause = 12 Then AddScore(100):PlaySound SoundFXDOF("100",145,DOFPulse,DOFChimes)
  401. If FiveHPause = 9 Then AddScore(100):PlaySound SoundFXDOF("100",145,DOFPulse,DOFChimes)
  402. If FiveHPause = 6 Then AddScore(100):PlaySound SoundFXDOF("100",145,DOFPulse,DOFChimes)
  403. If FiveHPause = 3 Then AddScore(100):PlaySound SoundFXDOF("100",145,DOFPulse,DOFChimes)
  404. If FiveHPause = 0 Then AddScore(100):PlaySound SoundFXDOF("100",145,DOFPulse,DOFChimes)
  405. End If
  406. End Sub
  407.  
  408. '****************************************
  409. ' LIGHT TIMER LOOP
  410. '****************************************
  411.  
  412. Sub LightTimer_Timer
  413. If SMFadePause > 0 Then
  414. SMFadePause = SMFadePause - 1
  415. Select Case SMFadePause
  416. Case 15:
  417. Bumper1Light.state = 1
  418. If B2Lit=1 Then:Bumper2Light.state = 1
  419. Bumper3Light.state = 1
  420. If LROlit=1 Then LightLROb.state=1
  421. If RROlit=1 Then LightRROb.state=1
  422. If LOLlit=1 Then LightLOLb.state=1
  423. If ROLlit=1 Then LightROLb.state=1
  424. If LILlit=1 Then LightLILb.state=1
  425. If RILlit=1 Then LightRILb.state=1
  426. Case 14:
  427. Bumper1Light.state = 1
  428. If B2Lit=1 Then:Bumper2Light.state = 1
  429. Bumper3Light.state = 1
  430. If LROlit=1 Then LightLROb.state=0
  431. If RROlit=1 Then LightRROb.state=0
  432. If LOLlit=1 Then LightLOLb.state=0
  433. If ROLlit=1 Then LightROLb.state=0
  434. If LILlit=1 Then LightLILb.state=0
  435. If RILlit=1 Then LightRILb.state=0
  436. Case 13:
  437. Bumper1Light.state = 0
  438. If B2Lit=1 Then:Bumper2Light.state = 0
  439. Bumper3Light.state = 0
  440. If LROlit=1 Then LightLROb.state=1:LightLROb.state=0
  441. If RROlit=1 Then LightRROb.state=1:LightRROb.state=0
  442. If LOLlit=1 Then LightLOLb.state=1:LightLOLb.state=0
  443. If ROLlit=1 Then LightROLb.state=1:LightROLb.state=0
  444. If LILlit=1 Then LightLILb.state=1:LightLILb.state=0
  445. If RILlit=1 Then LightRILb.state=1:LightRILb.state=0
  446. Case 2:
  447. If Gamestarted AND(NOT Tilted) Then
  448. Bumper1Light.state = 1
  449. If B2Lit=1 Then:Bumper2Light.state = 1
  450. Bumper3Light.state = 1
  451. If LROlit=1 Then LightLROb.state=1:LightLROb.state=0
  452. If RROlit=1 Then LightRROb.state=1:LightRROb.state=0
  453. If LOLlit=1 Then LightLOLb.state=1:LightLOLb.state=0
  454. If ROLlit=1 Then LightROLb.state=1:LightROLb.state=0
  455. If LILlit=1 Then LightLILb.state=1:LightLILb.state=0
  456. If RILlit=1 Then LightRILb.state=1:LightRILb.state=0
  457. End If
  458. Case 1:
  459. If Gamestarted AND(NOT Tilted) Then
  460. Bumper1Light.state = 1
  461. If B2Lit=1 Then:Bumper2Light.state = 1
  462. Bumper3Light.state = 1
  463. If LROlit=1 Then LightLROb.state=1
  464. If RROlit=1 Then LightRROb.state=1
  465. If LOLlit=1 Then LightLOLb.state=1
  466. If ROLlit=1 Then LightROLb.state=1
  467. If LILlit=1 Then LightLILb.state=1
  468. If RILlit=1 Then LightRILb.state=1
  469. End If
  470. Case 0:
  471. If Gamestarted AND(NOT Tilted) Then
  472. Bumper1Light.state = 1
  473. If B2Lit=1 Then:Bumper2Light.state = 1
  474. Bumper3Light.state = 1
  475. If LROlit=1 Then LightLROb.state=1
  476. If RROlit=1 Then LightRROb.state=1
  477. If LOLlit=1 Then LightLOLb.state=1
  478. If ROLlit=1 Then LightROLb.state=1
  479. If LILlit=1 Then LightLILb.state=1
  480. If RILlit=1 Then LightRILb.state=1
  481. End If
  482. End Select
  483. Bumper1Light1.state = Bumper1Light.state
  484. Bumper1Light2.state = Bumper1Light.state
  485. Bumper2Light1.state = Bumper2Light.state
  486. Bumper2Light2.state = Bumper2Light.state
  487. Bumper3Light2.state = Bumper3Light.state
  488. Bumper1Light3.state = Bumper1Light.state
  489. Bumper2Light3.state = Bumper2Light.state
  490. Bumper3Light3.state = Bumper3Light.state
  491. Bumper3Light1.state = Bumper3Light.state
  492. End If
  493. If Target2.isdropped Then
  494. Target2LD.state = 1
  495. Else
  496. Target2LD.State = 0
  497. End If
  498.  
  499. If Target3.isdropped Then
  500. Target3LD.state = 1
  501. Else
  502. Target3LD.State = 0
  503. End If
  504.  
  505. If Target4.isdropped Then
  506. Target4LD.state = 1
  507. Else
  508. Target4LD.State = 0
  509. End If
  510.  
  511. If Target5.isdropped Then
  512. Target5LD.state = 1
  513. Else
  514. Target5LD.State = 0
  515. End If
  516. If Target6.isdropped Then
  517. Target6LD.state = 1
  518. Else
  519. Target6LD.State = 0
  520. End If
  521.  
  522. If Target7.isdropped Then
  523. Target7LD.state = 1
  524. Else
  525. Target7LD.State = 0
  526. End If
  527.  
  528. If Target8.isdropped Then
  529. Target8LD.state = 1
  530. Else
  531. Target8LD.State = 0
  532. End If
  533.  
  534. End Sub
  535.  
  536. '****************************************
  537. ' OBJECT HANDLERS
  538. '****************************************
  539.  
  540. Sub Gate_Hit():Playsound "PNK_MH_gate":End Sub
  541. Sub LeftFlipper_Collide(parm):RandomSoundFlipper():End Sub
  542. Sub RightFlipper_Collide(parm):RandomSoundFlipper():End Sub
  543.  
  544. Sub RandomSoundFlipper()
  545. Select Case Int(Rnd*3)+1
  546. Case 1 : PlaySound "PNK_MH_Flip_hit_1"
  547. Case 2 : PlaySound "PNK_MH_Flip_hit_2"
  548. Case 3 : PlaySound "PNK_MH_Flip_hit_3"
  549. End Select
  550. End Sub
  551.  
  552. '****************************************
  553. ' RULES AND SCORING
  554. '****************************************
  555.  
  556. Sub ScoreTimer_timer
  557. EMReelScore1.setvalue(Score10k)
  558. EMReelScore2.setvalue(ScoreK)
  559. EMReelScore3.setvalue(Score100)
  560. EMReelScore4.setvalue(Score10)
  561. EMReelScore5.setvalue(0)
  562. End Sub
  563.  
  564. Sub ResetScore
  565. Scorex = 0
  566. Score10k = 0
  567. ScoreK = 0
  568. Score100 = 0
  569. Score10 = 0
  570. If B2SOn then Controller.B2SSetScorePlayer 1, 0
  571. End Sub
  572.  
  573. Sub AddScore(sumtoadd)
  574. If Tilted=0 Then
  575. Select Case sumtoadd
  576. Case 500:
  577. FiveHPause = 13 '500
  578. Case 2000:
  579. FiveKPause = 4 '5000
  580. Case 3000:
  581. FiveKPause = 7 '5000
  582. Case 4000:
  583. FiveKPause = 10 '5000
  584. Case 5000:
  585. FiveKPause = 13 '5000
  586. Case 10,100,1000:
  587. Score = Score + sumtoadd
  588. ' adjust individual reels
  589. Scorex = Score
  590. Score1M = Int (Scorex/1000000)'Calculate the value for the 1,000,000's digit
  591. Score100K=Int (Scorex/100000)'Calculate the value for the 100,000's digit
  592. Score10K=Int ((Scorex-(Score100k*100000))/10000) 'Calculate the value for the 10,000's digit
  593. ScoreK=Int((Scorex-(Score100k*100000)-(Score10K*10000))/1000) 'Calculate the value for the 1000's digit
  594. Score100=Int((Scorex-(Score100k*100000)-(Score10K*10000)-(ScoreK*1000))/100) 'Calculate the value for the 100's digit
  595. Score10=Int((Scorex-(Score100k*100000)-(Score10K*10000)-(ScoreK*1000)-(Score100*100))/10) 'Calculate the value for the 10's digit
  596. Score1=Int(Scorex-(Score100k*100000)-(Score10K*10000)-(ScoreK*1000)-(Score100*100)-(Score10*10)) 'Calculate the value for the 1's digit
  597. If B2SOn then
  598. Controller.B2SSetScorePlayer 1, scorex
  599. Controller.B2SSetData 51, Score100k 'set 100k lights
  600. End if
  601. EMReel100k.setvalue(Score100k)
  602. If Score >= 100000 AND Free100 <1 then
  603. GetSpecial
  604. Free100 = 1
  605. End If
  606. If Score >= 130000 AND Free130 <1 then
  607. GetSpecial
  608. Free130 = 1
  609. End If
  610. If Score >= 170000 AND Free170 <1 then
  611. GetSpecial
  612. Free170 = 1
  613. End If
  614. If sumtoAdd = 10 Then PlaySound SoundFXDOF("10",144,DOFPulse,DOFChimes)
  615. If sumtoAdd = 100 Then PlaySound SoundFXDOF("100",145,DOFPulse,DOFChimes)
  616. If sumtoAdd = 1000 Then PlaySound SoundFXDOF("1000",146,DOFPulse,DOFChimes)
  617. End Select
  618. End If
  619.  
  620. End Sub
  621.  
  622. Sub Sw10pt_hit(idx)
  623. AddScore(10) '10
  624. End Sub
  625.  
  626. Sub TargetScore_timer()
  627. Select Case TSCount
  628. Case 1:
  629. If LightTRO1.state=0 then AddScore(1000)
  630. Case 2:
  631. If LightTRO2.state=0 then AddScore(1000)
  632. Case 3:
  633. If LightTRO3.state=0 then AddScore(1000)
  634. Case 4:
  635. If LightTRO4.state=0 then AddScore(1000)
  636. Case 5:
  637. CheckTargets
  638. me.enabled=0
  639. End Select
  640. tscount=tscount+1
  641. End Sub
  642.  
  643. Sub CheckTargets
  644. ' mode 1 - going for 2 Jacks (starting mode)
  645. ' mode 2 - going for 3 Queens
  646. ' mode 3 - going for Full House 3 Queens 2 Kings
  647. ' mode 4 - going for Royal Flush Red
  648. ' mode 5 - going for Special (Royal Flush Red)
  649. Select Case TargetMode
  650. Case 1
  651. If Target4Down=True AND Target7Down=True Then
  652. AdvanceMode
  653. End If
  654. Case 2
  655. If Target2Down=True AND Target5Down=True AND Target8Down=True Then
  656. AdvanceMode
  657. End If
  658. Case 3
  659. If Target2Down=True AND Target5Down=True AND Target8Down=True AND Target3Down=True AND Target6Down=True Then
  660. AdvanceMode
  661. End If
  662. Case 4
  663. If Target1Down=True AND Target3Down=True AND Target5Down=True AND Target7Down=True AND Target9Down=True Then
  664. AdvanceMode
  665. End If
  666. Case 5
  667. If Target1Down=True AND Target3Down=True AND Target5Down=True AND Target7Down=True AND Target9Down=True Then
  668. AdvanceMode
  669. End If
  670. End Select
  671. End Sub
  672.  
  673. Sub AdvanceMode
  674. Select Case TargetMode
  675. Case 1:AddScore(5000):ResetTargets:LightMode1.state=0:LightMode2.state=1:TargetMode=2:B2Lit=1:LightLILb.state=1:LightRILb.state=1:LILlit=1:RILlit=1
  676. Case 2:AddScore(5000):ResetTargets:LightMode2.state=0:LightMode3.state=1:TargetMode=3
  677. Case 3:AddScore(5000):ResetTargets:LightMode3.state=0:LightMode4.state=1:TargetMode=4
  678. Case 4:AddScore(5000):ResetReds:LightMode4.state=0:LightMode5.state=1:TargetMode=5:SpecialLit = 1
  679. Case 5:AddScore(5000):ResetReds:GetSpecial
  680. End Select
  681. End Sub
  682.  
  683. Sub ResetReds
  684. Target1Down=False:Target2Down=False:Target3Down=False:Target4Down=False
  685. Target5Down=False:Target6Down=False:Target7Down=False:Target8Down=False:Target9Down=False
  686. DropResetPause = 15
  687. RedResetPause = 25
  688. End Sub
  689.  
  690. Sub ResetTargets
  691. Target1Down=False:Target2Down=False:Target3Down=False:Target4Down=False
  692. Target5Down=False:Target6Down=False:Target7Down=False:Target8Down=False:Target9Down=False
  693. DropResetPause = 15
  694. End Sub
  695.  
  696. '****************************************
  697. ' TARGET HANDLERS
  698. '****************************************
  699.  
  700. Sub Target1_Hit()
  701. If Gamestarted AND(NOT Tilted) Then
  702. Target1Down=True
  703. SMFadePause=SMFadeResetValue
  704. playsound SoundFXDOF("dropLeft",111,DOFPulse,DOFDropTargets)
  705. AddScore (1000)
  706. if targetscore.enabled=false then
  707. TSCount=1
  708. TargetScore.enabled=1
  709. end If
  710. End If
  711. End Sub
  712.  
  713. Sub Target2_Hit()
  714. If Gamestarted AND(NOT Tilted) Then
  715. Target2Down=True
  716. SMFadePause=SMFadeResetValue
  717. playsound SoundFXDOF("dropLeft",111,DOFPulse,DOFDropTargets)
  718. AddScore (1000)
  719. if targetscore.enabled=false then
  720. TSCount=1
  721. TargetScore.enabled=1
  722. end If
  723. End If
  724. End Sub
  725.  
  726. Sub Target3_Hit()
  727. If Gamestarted AND(NOT Tilted) Then
  728. Target3Down=True
  729. SMFadePause=SMFadeResetValue
  730. playsound SoundFXDOF("dropLeft",111,DOFPulse,DOFDropTargets)
  731. AddScore (1000)
  732. if targetscore.enabled=false then
  733. TSCount=1
  734. TargetScore.enabled=1
  735. end If
  736. End If
  737. End Sub
  738.  
  739. Sub Target4_Hit()
  740. If Gamestarted AND(NOT Tilted) Then
  741. Target4Down=True
  742. SMFadePause=SMFadeResetValue
  743. playsound SoundFXDOF("dropCenter",112,DOFPulse,DOFDropTargets)
  744. AddScore (1000)
  745. if targetscore.enabled=false then
  746. TSCount=1
  747. TargetScore.enabled=1
  748. end If
  749. End If
  750. End Sub
  751.  
  752. Sub Target5_Hit()
  753. If Gamestarted AND(NOT Tilted) Then
  754. Target5Down=True
  755. SMFadePause=SMFadeResetValue
  756. playsound SoundFXDOF("dropCenter",112,DOFPulse,DOFDropTargets)
  757. AddScore (1000)
  758. if targetscore.enabled=false then
  759. TSCount=1
  760. TargetScore.enabled=1
  761. end If
  762. End If
  763. End Sub
  764.  
  765. Sub Target6_Hit()
  766. If Gamestarted AND(NOT Tilted) Then
  767. Target6Down=True
  768. SMFadePause=SMFadeResetValue
  769. playsound SoundFXDOF("dropCenter",112,DOFPulse,DOFDropTargets)
  770. AddScore (1000)
  771. if targetscore.enabled=false then
  772. TSCount=1
  773. TargetScore.enabled=1
  774. end If
  775. End If
  776. End Sub
  777.  
  778. Sub Target7_Hit()
  779. If Gamestarted AND(NOT Tilted) Then
  780. Target7Down=True
  781. SMFadePause=SMFadeResetValue
  782. playsound SoundFXDOF("dropRight",113,DOFPulse,DOFDropTargets)
  783. AddScore (1000)
  784. if targetscore.enabled=false then
  785. TSCount=1
  786. TargetScore.enabled=1
  787. end If
  788. End If
  789. End Sub
  790.  
  791. Sub Target8_Hit()
  792. If Gamestarted AND(NOT Tilted) Then
  793. Target8Down=True
  794. SMFadePause=SMFadeResetValue
  795. playsound SoundFXDOF("dropRight",113,DOFPulse,DOFDropTargets)
  796. AddScore (1000)
  797. if targetscore.enabled=false then
  798. TSCount=1
  799. TargetScore.enabled=1
  800. end If
  801. End If
  802. End Sub
  803.  
  804. Sub Target9_Hit()
  805. If Gamestarted AND(NOT Tilted) Then
  806. Target9Down=True
  807. SMFadePause=SMFadeResetValue
  808. playsound SoundFXDOF("dropRight",113,DOFPulse,DOFDropTargets)
  809. AddScore (1000)
  810. if targetscore.enabled=false then
  811. TSCount=1
  812. TargetScore.enabled=1
  813. end If
  814. End If
  815. End Sub
  816.  
  817.  
  818.  
  819. '****************************************
  820. ' TOP ROLLOVERS
  821. '****************************************
  822.  
  823. Sub SwTop1_Hit()
  824. PlaySound "RollOver"
  825. DOF 120, DOFPulse
  826. If Gamestarted AND(NOT Tilted) Then
  827. If LightTRO1.state=1 Then
  828. SMFadePause=SMFadeResetValue
  829. AddScore(5000)
  830. LightTRO1.state=0
  831. LightLROb.state=1 'light bottom light (H=LRO/C=RRO/D=LOL/S=ROL)
  832. LROlit=1
  833. TargetValue = TargetValue+1000
  834. TopLanesUnlit = TopLanesUnlit + 1
  835. CheckTopRollovers()
  836. Else
  837. AddScore(500)
  838. End if
  839. End if
  840. End Sub
  841.  
  842. Sub SwTop2_Hit()
  843. PlaySound "RollOver"
  844. DOF 103, DOFPulse
  845. If Gamestarted AND(NOT Tilted) Then
  846. If LightTRO2.state=1 Then
  847. SMFadePause=SMFadeResetValue
  848. AddScore(5000)
  849. LightTRO2.state=0
  850. LightLOLb.state=1 'light bottom light (H=LRO/C=RRO/D=LOL/S=ROL)
  851. LOLlit=1
  852. TargetValue = TargetValue+1000
  853. TopLanesUnlit = TopLanesUnlit + 1
  854. CheckTopRollovers()
  855. Else
  856. AddScore(500)
  857. End if
  858. End if
  859. End Sub
  860.  
  861. Sub SwTop3_Hit()
  862. PlaySound "RollOver"
  863. DOF 104, DOFPulse
  864. If Gamestarted AND(NOT Tilted) Then
  865. If LightTRO3.state=1 Then
  866. SMFadePause=SMFadeResetValue
  867. AddScore(5000)
  868. LightTRO3.state=0
  869. LightROLb.state=1 'light bottom light (H=LRO/C=RRO/D=LOL/S=ROL)
  870. ROLlit=1
  871. TargetValue = TargetValue+1000
  872. TopLanesUnlit = TopLanesUnlit + 1
  873. CheckTopRollovers()
  874. Else
  875. AddScore(500)
  876. End if
  877. End if
  878. End Sub
  879.  
  880. Sub SwTop4_Hit()
  881. PlaySound "RollOver"
  882. DOF 105, DOFPulse
  883. If Gamestarted AND(NOT Tilted) Then
  884. If LightTRO4.state=1 Then
  885. SMFadePause=SMFadeResetValue
  886. AddScore(5000)
  887. LightTRO4.state=0
  888. LightRROb.state=1 'light bottom light (H=LRO/C=RRO/D=LOL/S=ROL)
  889. RROlit=1
  890. TargetValue = TargetValue+1000
  891. TopLanesUnlit = TopLanesUnlit + 1
  892. CheckTopRollovers()
  893. Else
  894. AddScore(500)
  895. End if
  896. End if
  897. End Sub
  898.  
  899.  
  900. Sub CheckTopRollovers()
  901.  
  902. If TopLanesUnlit = 4 Then
  903. LightTRO1.state=1 : LightTRO2.state=1 : LightTRO3.state=1 : LightTRO4.state=1
  904. LightLROb.state=1:LightLROb.state=0:LightRROb.state=1:LightRROb.state=0:
  905. LightLOLb.state=1:LightLOLb.state=0:LightROLb.state=1:LightROLb.state=0
  906. LROLit=0:RROLit=0:LOLlit=0:ROLlit=0
  907. TargetValue=1000
  908. TopLanesUnlit = 0
  909. AdvanceMode()
  910. End If
  911. End Sub
  912.  
  913. '****************************************
  914. ' BOTTOM ROLLOVERS
  915. '****************************************
  916.  
  917. Sub SwLRO_Hit()
  918. PlaySound "RollOver"
  919. DOF 131, DOFPulse
  920. If LightLROb.state=1 Then
  921. AddScore(1000)
  922. Else
  923. AddScore(100)
  924. End If
  925. End Sub
  926.  
  927. Sub SwRRO_Hit()
  928. PlaySound "RollOver"
  929. DOF 134, DOFPulse
  930. If LightRROb.state=1 Then
  931. AddScore(1000)
  932. Else
  933. AddScore(100)
  934. End If
  935. End Sub
  936.  
  937. Sub SwLIL_Hit()
  938. SwLILPrim.RotX = 135
  939. PlaySound "RollOver"
  940. DOF 132, DOFPulse
  941. If LightLILb.state=1 Then
  942. AddScore(1000)
  943. Else
  944. AddScore(100)
  945. End If
  946. End Sub
  947.  
  948. Sub SwLIL_unHit
  949. SwLILPrim.RotX = 160
  950. End Sub
  951.  
  952. Sub SwRIL_Hit()
  953. SwRILPrim.RotX = 135
  954. PlaySound "RollOver"
  955. DOF 133, DOFPulse
  956. If LightRILb.state=1 Then
  957. AddScore(1000)
  958. Else
  959. AddScore(100)
  960. End If
  961. End Sub
  962.  
  963. Sub SwRIL_unHit
  964. SwRILPrim.RotX = 160
  965. End Sub
  966.  
  967. Sub SwLOL_Hit()
  968. SwLOLPrim.RotX = 135
  969. PlaySound "RollOver"
  970. DOF 131, DOFPulse
  971. If LightLOLb.state=1 Then
  972. AddScore(5000)
  973. Else
  974. AddScore(500)
  975. End If
  976. End Sub
  977.  
  978. Sub SwLOL_unHit
  979. SwLOLPrim.RotX = 160
  980. End Sub
  981.  
  982. Sub SwROL_Hit()
  983. SwROLPrim.RotX = 135
  984. PlaySound "RollOver"
  985. DOF 134, DOFPulse
  986. If LightROLb.state=1 Then
  987. AddScore(5000)
  988. Else
  989. AddScore(500)
  990. End If
  991. End Sub
  992.  
  993. Sub SwRol_unHit
  994. SwROLPrim.RotX = 160
  995. End Sub
  996.  
  997. '****************************************
  998. ' BUMPER HANDLERS
  999. '****************************************
  1000.  
  1001. Sub Bumper1_Hit()
  1002. PlaySound SoundFXDOF("bumperLeft",103, DOFPulse,DOFContactors)
  1003. If B1Lit=1 Then:AddScore(100):Else:AddScore(10):End If
  1004. End Sub
  1005.  
  1006. Sub Bumper2_Hit()
  1007. PlaySound SoundFXDOF("bumperCenter",104, DOFPulse,DOFContactors)
  1008. If B2Lit=1 Then:AddScore(1000):Else:AddScore(100):End If
  1009. End Sub
  1010.  
  1011. Sub Bumper3_Hit()
  1012. PlaySound SoundFXDOF("bumperRight",105, DOFPulse,DOFContactors)
  1013. If B3Lit=1 Then:AddScore(100):Else:AddScore(10):End If
  1014. End Sub
  1015.  
  1016. Sub Rubbers_Hit(idx):RandomSoundRubber():End Sub
  1017.  
  1018. Sub RandomSoundRubber()
  1019. Select Case Int(Rnd*3)+1
  1020. Case 1 : PlaySound "PNK_MH_rubber_hit_1"
  1021. Case 2 : PlaySound "PNK_MH_rubber_hit_2"
  1022. Case 3 : PlaySound "PNK_MH_rubber_hit_3"
  1023. End Select
  1024. End Sub
  1025.  
  1026. Sub Wires_Hit(idx):RandomSoundWire():End Sub
  1027.  
  1028. Sub RandomSoundWire()
  1029. Select Case Int(Rnd*3)+1
  1030. Case 1 : PlaySound "PNK_MH_Wirehit_1"
  1031. Case 2 : PlaySound "PNK_MH_Wirehit_2"
  1032. Case 3 : PlaySound "PNK_MH_Wirehit_3"
  1033. End Select
  1034. End Sub
  1035.  
  1036. '****************************************
  1037. ' DRAIN
  1038. '****************************************
  1039.  
  1040. Sub Drain_Hit:EndOfBall:End Sub 'RollingSoundsOff:SoundTimer.enabled=0:EndOfBall:End Sub
  1041.  
  1042. Sub EndOfBall()
  1043. PlaySound "drain"
  1044. DOF 141, DOFPulse
  1045. SMFadePause=SMFadeResetValue:PlaySound "MekSound"
  1046. 'Enable again if Tilted
  1047. If Tilted Then
  1048. EMReelTILT.SetValue 0
  1049. If B2SOn then Controller.B2SSetTilt 33, 0
  1050. Tilted = 0
  1051. Bumper1.Threshold = 0.75
  1052. Bumper2.Threshold = 0.75
  1053. Bumper3.Threshold = 0.75
  1054. End If
  1055. NextBallPause = 30
  1056. End Sub
  1057.  
  1058. '****************************************
  1059. ' TILT
  1060. '****************************************
  1061.  
  1062. Sub Bump()
  1063. If Gamestarted AND(NOT Tilted) Then
  1064. Tilt = Tilt + 1
  1065. TiltPause = tiltSettle
  1066. If Tilt > tiltAllow Then
  1067. Tilted = 1
  1068. EMReelTILT.SetValue 1
  1069. Tilt = 0
  1070. If B2SOn then Controller.B2SSetTilt 33, 1
  1071. PlaySound "tilt"
  1072. LeftFlipper.RotateToStart:StopSound "PNK_MH_Flip_L_up":StopSound "Buzz1"
  1073. RightFlipper.RotateToStart:StopSound "PNK_MH_Flip_R_up":StopSound "Buzz"
  1074. Bumper1.Threshold = 10
  1075. Bumper2.Threshold = 10
  1076. Bumper3.Threshold = 10
  1077. SMFadePause=SMFadeResetValue
  1078. End If
  1079. TiltPause = 10
  1080. End If
  1081. End Sub
  1082.  
  1083. '****************************************
  1084. ' GAME OVER
  1085. '****************************************
  1086.  
  1087. Sub GameOver
  1088. If B2SOn then
  1089. Controller.B2ssetballinplay 32, 0
  1090. Controller.B2SSetGameOver 1
  1091. end if
  1092. BlinkingLogoOnOff(1)
  1093. GameOverFlasher.enabled = 1
  1094. EMReelGO.setvalue 1
  1095. EMReelBall.setvalue 0
  1096. LeftFlipper.RotateToStart
  1097. RightFlipper.RotateToStart
  1098. If Score > CDbl(HighScore) Then
  1099. GetSpecial
  1100. HighScore=Score:HSA1 = 0:HSA2 = 0:HSA3 = 0:UpdatePostIt
  1101. HighScoreEntryInit()
  1102. End If
  1103. StopSound "buzz"
  1104. StopSound "buzz1"
  1105. LastScore = Score:SaveHighScore
  1106. End Sub
  1107.  
  1108. '****************************************
  1109. ' HSTD + STORED DATA
  1110. '****************************************
  1111. Sub LoadHighScore
  1112. Dim FileObj
  1113. Dim ScoreFile
  1114. Dim TextStr
  1115. Dim SavedDataTemp1 'Credits
  1116. Dim SavedDataTemp2 'LastScore
  1117. Dim SavedDataTemp3 'HighScore
  1118. Dim SavedDataTemp4 'HSA1
  1119. Dim SavedDataTemp5 'HSA2
  1120. Dim SavedDataTemp6 'HSA3
  1121. Set FileObj=CreateObject("Scripting.FileSystemObject")
  1122. If Not FileObj.FolderExists(UserDirectory) then
  1123. Exit Sub
  1124. End if
  1125. If Not FileObj.FileExists(UserDirectory & "JacksOpen.txt") then
  1126. SetDefaultHSTD:UpdatePostIt:SaveHighScore
  1127. Exit Sub
  1128. End if
  1129. Set ScoreFile=FileObj.GetFile(UserDirectory & "JacksOpen.txt")
  1130. Set TextStr=ScoreFile.OpenAsTextStream(1,0)
  1131. If (TextStr.AtEndOfStream=True) then
  1132. SetDefaultHSTD:UpdatePostIt:SaveHighScore
  1133. Exit Sub
  1134. End if
  1135. SavedDataTemp1=TextStr.ReadLine ' credits
  1136. SavedDataTemp2=Textstr.ReadLine ' LastScore
  1137. SavedDataTemp3=Textstr.ReadLine ' HighScore
  1138. SavedDataTemp4=Textstr.ReadLine ' HSA1
  1139. SavedDataTemp5=Textstr.ReadLine ' HSA2
  1140. SavedDataTemp6=Textstr.ReadLine ' HSA3
  1141. TextStr.Close
  1142. Credits = CDbl(SavedDataTemp1)
  1143. LastScore=SavedDataTemp2
  1144. HighScore=SavedDataTemp3
  1145. HSA1=SavedDataTemp4
  1146. HSA2=SavedDataTemp5
  1147. HSA3=SavedDataTemp6
  1148. UpdatePostIt
  1149. Set ScoreFile = Nothing
  1150. Set FileObj = Nothing
  1151. End Sub
  1152.  
  1153. Sub SetDefaultHSTD 'bad data or missing file - reset and resave
  1154. HighScore = DefaultHighScore
  1155. HSA1 = DefaultHSA1
  1156. HSA2 = DefaultHSA2
  1157. HSA3 = DefaultHSA3
  1158. Credits = 0
  1159. LastScore = DefaultHighScore
  1160. SaveHighScore
  1161. End Sub
  1162.  
  1163. Sub LastScoreReels
  1164. Scorex = LastScore
  1165. Score1M=Int (Scorex/1000000)'Calculate the value for the 1,000,000's digit
  1166. Score100K=Int (Scorex/100000)'Calculate the value for the 100,000's digit
  1167. Score10K=Int ((Scorex-(Score100k*100000))/10000) 'Calculate the value for the 10,000's digit
  1168. ScoreK=Int((Scorex-(Score100k*100000)-(Score10K*10000))/1000) 'Calculate the value for the 1000's digit
  1169. Score100=Int((Scorex-(Score100k*100000)-(Score10K*10000)-(ScoreK*1000))/100) 'Calculate the value for the 100's digit
  1170. Score10=Int((Scorex-(Score100k*100000)-(Score10K*10000)-(ScoreK*1000)-(Score100*100))/10) 'Calculate the value for the 10's digit
  1171. Score1=Int(Scorex-(Score100k*100000)-(Score10K*10000)-(ScoreK*1000)-(Score100*100)-(Score10*10)) 'Calculate the value for the 1's digit
  1172.  
  1173. ' residue from B2S exe file, if these seemingly unused lines are removed, the program crashes With
  1174. ' Line:1
  1175. ' Invalid procedure call or agrument: 'Asc"'
  1176.  
  1177. If B2SOn then
  1178. Controller.B2SSetData 0,Score10K 'Display the appropriate digits in the appropriate reel
  1179. Controller.B2SSetData 1,ScoreK
  1180. Controller.B2SSetData 2,Score100
  1181. Controller.B2SSetData 3,Score10
  1182. Controller.B2SSetData 10, 1
  1183. Controller.B2SSetData 11, 1
  1184. Controller.B2SSetData 12, 1
  1185. Controller.B2SSetData 51, Score100k 'set 100k lights
  1186. Controller.B2SSetScorePlayer 1, scorex
  1187. End if
  1188. EMReel100k.setvalue(Score100k)
  1189. End Sub
  1190.  
  1191. Function ImgFromCode(code, digit)
  1192. Dim Image
  1193. if (HighScoreFlashTimer.Enabled = True and hsLetterFlash = 1 and digit = hsCurrentLetter) then
  1194. Image = "postitBL"
  1195. elseif (code + ASC("A") - 1) >= ASC("A") and (code + ASC("A") - 1) <= ASC("Z") then
  1196. Image = "postit" & chr(code + ASC("A") - 1)
  1197. elseif code = 27 Then
  1198. Image = "PostitLT"
  1199. elseif code = 0 Then
  1200. image = "PostitSP"
  1201. Else
  1202. msgbox("Unknown display code: " & code)
  1203. end if
  1204. ImgFromCode = Image
  1205. End Function
  1206.  
  1207. Sub UpdatePostIt
  1208. Dim scoreStr
  1209. Dim length
  1210. scoreStr = cstr(HighScore)
  1211. HS1.image = "PostitBL"
  1212. HS2.image = "PostitBL"
  1213. HS3.image = "PostitBL"
  1214. HS4.image = "PostitBL"
  1215. HS5.image = "PostitBL"
  1216. HS6.image = "PostitBL"
  1217. HS7.image = "PostitBL"
  1218. if len(scoreStr) > 6 Then
  1219. HS1.image = "postit" & mid(scoreStr, 1, 1)
  1220. scoreStr = mid(scoreStr, 2)
  1221. end if
  1222. if len(scoreStr) > 5 Then
  1223. HS2.image = "postit" & mid(scoreStr, 1, 1)
  1224. scoreStr = mid(scoreStr, 2)
  1225. end if
  1226. if len(scoreStr) > 4 Then
  1227. HS3.image = "postit" & mid(scoreStr, 1, 1)
  1228. scoreStr = mid(scoreStr, 2)
  1229. end if
  1230. if len(scoreStr) > 3 Then
  1231. HS4.image = "postit" & mid(scoreStr, 1, 1)
  1232. scoreStr = mid(scoreStr, 2)
  1233. end if
  1234. if len(scoreStr) > 1 Then
  1235. HS5.image = "postit" & mid(scoreStr, 1, 1)
  1236. scoreStr = mid(scoreStr, 2)
  1237. end if
  1238. if len(scoreStr) > 1 Then
  1239. HS6.image = "postit" & mid(scoreStr, 1, 1)
  1240. scoreStr = mid(scoreStr, 2)
  1241. end if
  1242. HS7.image = "postit" & scoreStr
  1243. HSName1.image = ImgFromCode(HSA1, 1)
  1244. HSName2.image = ImgFromCode(HSA2, 2)
  1245. HSName3.image = ImgFromCode(HSA3, 3)
  1246. End Sub
  1247.  
  1248.  
  1249.  
  1250. Sub SaveHighScore
  1251. Dim FileObj
  1252. Dim ScoreFile
  1253. Set FileObj=CreateObject("Scripting.FileSystemObject")
  1254. If Not FileObj.FolderExists(UserDirectory) then
  1255. Exit Sub
  1256. End if
  1257. Set ScoreFile=FileObj.CreateTextFile(UserDirectory & "JacksOpen.txt",True)
  1258. ScoreFile.WriteLine Credits
  1259. ScoreFile.WriteLine LastScore
  1260. ScoreFile.WriteLine HighScore
  1261. ScoreFile.WriteLine HSA1
  1262. ScoreFile.WriteLine HSA2
  1263. ScoreFile.WriteLine HSA3
  1264. ScoreFile.Close
  1265. Set ScoreFile=Nothing
  1266. Set FileObj=Nothing
  1267. End Sub
  1268.  
  1269. Sub HighScoreEntryInit()
  1270. HSA1=0:HSA2=0:HSA3=0
  1271. HSEnterMode = True
  1272. hsCurrentDigit = 0
  1273. hsCurrentLetter = 1:HSA1=1
  1274. HighScoreFlashTimer.Interval = 250
  1275. HighScoreFlashTimer.Enabled = True
  1276. hsLetterFlash = hsFlashDelay
  1277. End Sub
  1278.  
  1279. Sub HighScoreFlashTimer_Timer()
  1280. hsLetterFlash = hsLetterFlash-1
  1281. UpdatePostIt
  1282. If hsLetterFlash=0 then 'switch back
  1283. hsLetterFlash = hsFlashDelay
  1284. end if
  1285. End Sub
  1286.  
  1287.  
  1288. ' ***********************************************************
  1289. ' HS ENTER INITIALS
  1290. ' ***********************************************************
  1291.  
  1292. Sub HighScoreProcessKey(keycode)
  1293. If keycode = LeftFlipperKey Then
  1294. hsLetterFlash = hsFlashDelay
  1295. Select Case hsCurrentLetter
  1296. Case 1:
  1297. HSA1=HSA1-1:If HSA1=-1 Then HSA1=26 'no backspace on 1st digit
  1298. UpdatePostIt
  1299. Case 2:
  1300. HSA2=HSA2-1:If HSA2=-1 Then HSA2=27
  1301. UpdatePostIt
  1302. Case 3:
  1303. HSA3=HSA3-1:If HSA3=-1 Then HSA3=27
  1304. UpdatePostIt
  1305. End Select
  1306. End If
  1307.  
  1308. If keycode = RightFlipperKey Then
  1309. hsLetterFlash = hsFlashDelay
  1310. Select Case hsCurrentLetter
  1311. Case 1:
  1312. HSA1=HSA1+1:If HSA1>26 Then HSA1=0
  1313. UpdatePostIt
  1314. Case 2:
  1315. HSA2=HSA2+1:If HSA2>27 Then HSA2=0
  1316. UpdatePostIt
  1317. Case 3:
  1318. HSA3=HSA3+1:If HSA3>27 Then HSA3=0
  1319. UpdatePostIt
  1320. End Select
  1321. End If
  1322.  
  1323. If keycode = StartGameKey Then
  1324. Select Case hsCurrentLetter
  1325. Case 1:
  1326. hsCurrentLetter=2 'ok to advance
  1327. HSA2=HSA1 'start at same alphabet spot
  1328. Case 2:
  1329. If HSA2=27 Then 'bksp
  1330. HSA2=0
  1331. hsCurrentLetter=1
  1332. Else
  1333. hsCurrentLetter=3 'enter it
  1334. HSA3=HSA2 'start at same alphabet spot
  1335. End If
  1336. Case 3:
  1337. If HSA3=27 Then 'bksp
  1338. HSA3=0
  1339. hsCurrentLetter=2
  1340. Else
  1341. SaveHighScore 'enter it
  1342. HighScoreFlashTimer.Enabled = False
  1343. HSEnterMode = False
  1344. End If
  1345. End Select
  1346. UpdatePostIt
  1347. End If
  1348. End Sub
  1349.  
  1350.  
  1351. Sub GameOverFlasher_Timer()
  1352. Dim FlasherOnOff
  1353. Dim indx
  1354. FlasherOnOff = Int(Rnd*10)
  1355. if FlasherOnOff < 6 then
  1356. If B2SOn then Controller.B2SSetGameOver 1
  1357. Else
  1358. If B2SOn then Controller.B2SSetGameOver 0
  1359. End If
  1360. End Sub
  1361.  
  1362. Sub InitTimer_Timer()
  1363. If B2SOn then Controller.B2SSetScorePlayer 1, LastScore
  1364. InitTimer.enabled = 0
  1365. if LastScore >= 100000 then
  1366. If B2SOn then Controller.B2SSetData 51, 1
  1367. Else
  1368. If B2SOn then Controller.B2SSetData 51, 0
  1369. End If
  1370. BlinkingLogoOnOff(1)
  1371. End Sub
  1372.  
  1373.  
  1374. Sub BlinkingLogoOnOff(BlinkOn)
  1375. Dim BlinkingLight
  1376. BlinkingLogo.enabled = BlinkOn
  1377. for BlinkingLight = 45 to 50
  1378. If B2SOn then
  1379. Controller.B2SSetData BlinkingLight, 1
  1380. End If
  1381. BlinkingLightState(BlinkingLight - 45) = 1
  1382. next
  1383. End Sub
  1384.  
  1385. Sub BlinkingLogo_Timer()
  1386. Dim BlinkingLight, BlinkingRandom
  1387. for BlinkingLight = 45 to 50
  1388. BlinkingRandom = int(Rnd*25)
  1389. if BlinkingLightState(BlinkingLight - 45) = 1 then
  1390. ' if the light is on, turn it off 20% of the time
  1391. if BlinkingRandom < 5 then
  1392. BlinkingLightState(BlinkingLight - 45) = 0
  1393. If B2SOn then
  1394. Controller.B2SSetData BlinkingLight, 0
  1395. End If
  1396. end if
  1397. else
  1398. ' if the light is off, turn it on 40% of the time
  1399. if (BlinkingRandom < 10) then
  1400. BlinkingLightState(BlinkingLight - 45) = 1
  1401. If B2SOn then
  1402. Controller.B2SSetData BlinkingLight, 1
  1403. End if
  1404. end if
  1405. end if
  1406. next
  1407. End Sub
  1408.  
  1409. '*********************************************************************
  1410. ' Positional Sound Playback Functions
  1411. '*********************************************************************
  1412.  
  1413. ' Play a sound, depending on the X,Y position of the table element (especially cool for surround speaker setups, otherwise stereo panning only)
  1414. ' parameters (defaults): loopcount (1), volume (1), randompitch (0), pitch (0), useexisting (0), restart (1))
  1415. ' Note that this will not work (currently) for walls/slingshots as these do not feature a simple, single X,Y position
  1416. Sub PlayXYSound(soundname, tableobj, loopcount, volume, randompitch, pitch, useexisting, restart)
  1417. PlaySound soundname, loopcount, volume, AudioPan(tableobj), randompitch, pitch, useexisting, restart, AudioFade(tableobj)
  1418. End Sub
  1419.  
  1420. ' Similar subroutines that are less complicated to use (e.g. simply use standard parameters for the PlaySound call)
  1421. Sub PlaySoundAt(soundname, tableobj)
  1422. PlaySound soundname, 1, 1, AudioPan(tableobj), 0,0,0, 1, AudioFade(tableobj)
  1423. End Sub
  1424.  
  1425. Sub PlaySoundAtBall(soundname)
  1426. PlaySoundAt soundname, ActiveBall
  1427. End Sub
  1428.  
  1429.  
  1430. '*********************************************************************
  1431. ' Supporting Ball & Sound Functions
  1432. '*********************************************************************
  1433.  
  1434. Function AudioFade(tableobj) ' Fades between front and back of the table (for surround systems or 2x2 speakers, etc), depending on the Y position on the table. "table1" is the name of the table
  1435. Dim tmp
  1436. tmp = tableobj.y * 2 / table1.height-1
  1437. If tmp > 0 Then
  1438. AudioFade = Csng(tmp ^10)
  1439. Else
  1440. AudioFade = Csng(-((- tmp) ^10) )
  1441. End If
  1442. End Function
  1443.  
  1444. Function AudioPan(tableobj) ' Calculates the pan for a tableobj based on the X position on the table. "table1" is the name of the table
  1445. Dim tmp
  1446. tmp = tableobj.x * 2 / table1.width-1
  1447. If tmp > 0 Then
  1448. AudioPan = Csng(tmp ^10)
  1449. Else
  1450. AudioPan = Csng(-((- tmp) ^10) )
  1451. End If
  1452. End Function
  1453.  
  1454. Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed
  1455. Vol = Csng(BallVel(ball) ^2 / 2000)
  1456. End Function
  1457.  
  1458. Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed
  1459. Pitch = BallVel(ball) * 20
  1460. End Function
  1461.  
  1462. Function BallVel(ball) 'Calculates the ball speed
  1463. BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) )
  1464. End Function
  1465.  
  1466.  
  1467. '********************************************************************
  1468. ' JP's VP10 Rolling Sounds (+rothbauerw's Dropping Sounds)
  1469. '********************************************************************
  1470.  
  1471. Const tnob = 5 ' total number of balls
  1472. ReDim rolling(tnob)
  1473. InitRolling
  1474.  
  1475. Sub InitRolling
  1476. Dim i
  1477. For i = 0 to tnob
  1478. rolling(i) = False
  1479. Next
  1480. End Sub
  1481.  
  1482. Sub RollingTimer_Timer()
  1483. Dim BOT, b
  1484. BOT = GetBalls
  1485.  
  1486. ' stop the sound of deleted balls
  1487. For b = UBound(BOT) + 1 to tnob
  1488. rolling(b) = False
  1489. StopSound("fx_ballrolling" & b)
  1490. Next
  1491.  
  1492. ' exit the sub if no balls on the table
  1493. If UBound(BOT) = -1 Then Exit Sub
  1494.  
  1495. For b = 0 to UBound(BOT)
  1496. ' play the rolling sound for each ball
  1497. If BallVel(BOT(b) ) > 1 AND BOT(b).z < 30 Then
  1498. rolling(b) = True
  1499. PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b)), AudioPan(BOT(b)), 0, Pitch(BOT(b)), 1, 0, AudioFade(BOT(b))
  1500. Else
  1501. If rolling(b) = True Then
  1502. StopSound("fx_ballrolling" & b)
  1503. rolling(b) = False
  1504. End If
  1505. End If
  1506.  
  1507. ' play ball drop sounds
  1508. If BOT(b).VelZ < -1 and BOT(b).z < 55 and BOT(b).z > 27 Then 'height adjust for ball drop sounds
  1509. PlaySound "fx_ball_drop" & b, 0, ABS(BOT(b).velz)/17, AudioPan(BOT(b)), 0, Pitch(BOT(b)), 1, 0, AudioFade(BOT(b))
  1510. End If
  1511. Next
  1512. End Sub
  1513.  
  1514. '**********************
  1515. ' Ball Collision Sound
  1516. '**********************
  1517.  
  1518. Sub OnBallBallCollision(ball1, ball2, velocity)
  1519. PlaySound("fx_collide"), 0, Csng(velocity) ^2 / 2000, AudioPan(ball1), 0, Pitch(ball1), 0, 0, AudioFade(ball1)
  1520. End Sub
  1521.  
  1522.  
  1523. '*************
  1524. ' JP'S LUT
  1525. '*************
  1526.  
  1527. Dim bLutActive, LUTImage
  1528. Sub LoadLUT
  1529. Dim x
  1530. x = LoadValue(cGameName, "LUTImage")
  1531. If(x <> "") Then LUTImage = x Else LUTImage = 0
  1532. UpdateLUT
  1533. End Sub
  1534.  
  1535. Sub SaveLUT
  1536. SaveValue cGameName, "LUTImage", LUTImage
  1537. End Sub
  1538.  
  1539. Sub NextLUT: LUTImage = (LUTImage +1 ) MOD 10: UpdateLUT: SaveLUT: End Sub
  1540.  
  1541. Sub UpdateLUT
  1542. Select Case LutImage
  1543. Case 0: table1.ColorGradeImage = "LUT0"
  1544. Case 1: table1.ColorGradeImage = "LUT1"
  1545. Case 2: table1.ColorGradeImage = "LUT2"
  1546. Case 3: table1.ColorGradeImage = "LUT3"
  1547. Case 4: table1.ColorGradeImage = "LUT4"
  1548. Case 5: table1.ColorGradeImage = "LUT5"
  1549. Case 6: table1.ColorGradeImage = "LUT6"
  1550. Case 7: table1.ColorGradeImage = "LUT7"
  1551. Case 8: table1.ColorGradeImage = "LUT8"
  1552. Case 9: table1.ColorGradeImage = "LUT9"
  1553.  
  1554. End Select
  1555. End Sub
  1556.  
  1557.  
  1558. '*****************************************
  1559. ' ninuzzu's FLIPPER SHADOWS
  1560. '*****************************************
  1561.  
  1562. sub FlipperTimer_Timer()
  1563. FlipperLSh.RotZ = LeftFlipper.currentangle
  1564. FlipperRSh.RotZ = RightFlipper.currentangle
  1565. LFPrim.objRotz = LeftFlipper.CurrentAngle
  1566. RFPrim.objRotz= RightFlipper.CurrentAngle
  1567. End Sub
  1568.  
  1569. '*****************************************
  1570. ' ninuzzu's BALL SHADOW
  1571. '*****************************************
  1572.  
  1573. Dim BallShadow
  1574. BallShadow = Array (BallShadow1,BallShadow2,BallShadow3,BallShadow4,BallShadow5)
  1575.  
  1576. Sub BallShadowUpdate_timer()
  1577. Dim BOT, b
  1578. BOT = GetBalls
  1579. ' hide shadow of deleted balls
  1580. If UBound(BOT)<(tnob-1) Then
  1581. For b = (UBound(BOT) + 1) to (tnob-1)
  1582. BallShadow(b).visible = 0
  1583. Next
  1584. End If
  1585. ' exit the Sub if no balls on the table
  1586. If UBound(BOT) = -1 Then Exit Sub
  1587. ' render the shadow for each ball
  1588. For b = 0 to UBound(BOT)
  1589. If BOT(b).X < Table1.Width/2 Then
  1590. BallShadow(b).X = ((BOT(b).X) - (Ballsize/6) + ((BOT(b).X - (Table1.Width/2))/21)) + 6
  1591. Else
  1592. BallShadow(b).X = ((BOT(b).X) + (Ballsize/6) + ((BOT(b).X - (Table1.Width/2))/21)) - 6
  1593. End If
  1594. ballShadow(b).Y = BOT(b).Y + 4
  1595. If BOT(b).Z > 20 Then
  1596. BallShadow(b).visible = 1
  1597. Else
  1598. BallShadow(b).visible = 0
  1599. End If
  1600. Next
  1601. End Sub
  1602.  
  1603.  
  1604. '************************************
  1605. ' What you need to add to your table
  1606. '************************************
  1607.  
  1608. ' a timer called RollingTimer. With a fast interval, like 10
  1609. ' one collision sound, in this script is called fx_collide
  1610. ' as many sound files as max number of balls, with names ending with 0, 1, 2, 3, etc
  1611. ' for ex. as used in this script: fx_ballrolling0, fx_ballrolling1, fx_ballrolling2, fx_ballrolling3, etc
  1612.  
  1613.  
  1614. '******************************************
  1615. ' Explanation of the rolling sound routine
  1616. '******************************************
  1617.  
  1618. ' sounds are played based on the ball speed and position
  1619.  
  1620. ' the routine checks first for deleted balls and stops the rolling sound.
  1621.  
  1622. ' The For loop goes through all the balls on the table and checks for the ball speed and
  1623. ' if the ball is on the table (height lower than 30) then then it plays the sound
  1624. ' otherwise the sound is stopped, like when the ball has stopped or is on a ramp or flying.
  1625.  
  1626. ' The sound is played using the VOL, AUDIOPAN, AUDIOFADE and PITCH functions, so the volume and pitch of the sound
  1627. ' will change according to the ball speed, and the AUDIOPAN & AUDIOFADE functions will change the stereo position
  1628. ' according to the position of the ball on the table.
  1629.  
  1630.  
  1631. '**************************************
  1632. ' Explanation of the collision routine
  1633. '**************************************
  1634.  
  1635. ' The collision is built in VP.
  1636. ' You only need to add a Sub OnBallBallCollision(ball1, ball2, velocity) and when two balls collide they
  1637. ' will call this routine. What you add in the sub is up to you. As an example is a simple Playsound with volume and paning
  1638. ' depending of the speed of the collision.
  1639.  
  1640.  
  1641. Sub Pins_Hit (idx)
  1642. PlaySound "pinhit_low", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall)
  1643. End Sub
  1644.  
  1645. Sub Targets_Hit (idx)
  1646. PlaySound "target", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall)
  1647. End Sub
  1648.  
  1649. Sub Metals_Thin_Hit (idx)
  1650. PlaySound "metalhit_thin", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  1651. End Sub
  1652.  
  1653. Sub Metals_Medium_Hit (idx)
  1654. PlaySound "metalhit_medium", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  1655. End Sub
  1656.  
  1657. Sub Metals2_Hit (idx)
  1658. PlaySound "metalhit2", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  1659. End Sub
  1660.  
  1661. Sub Gates_Hit (idx)
  1662. PlaySound "Gate5", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  1663. End Sub
  1664.  
  1665. Sub Spinner_Spin
  1666. PlaySound "fx_spinner", 0, .25, AudioPan(Spinner), 0.25, 0, 0, 1, AudioFade(Spinner)
  1667. End Sub
  1668.  
  1669. Sub Rubbers_Hit(idx)
  1670. dim finalspeed
  1671. finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
  1672. If finalspeed > 20 then
  1673. PlaySound "fx_rubber2", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  1674. End if
  1675. If finalspeed >= 6 AND finalspeed <= 20 then
  1676. RandomSoundRubber()
  1677. End If
  1678. End Sub
  1679.  
  1680. Sub Posts_Hit(idx)
  1681. dim finalspeed
  1682. finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
  1683. If finalspeed > 16 then
  1684. PlaySound "fx_rubber2", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  1685. End if
  1686. If finalspeed >= 6 AND finalspeed <= 16 then
  1687. RandomSoundRubber()
  1688. End If
  1689. End Sub
  1690.  
  1691. Sub RandomSoundRubber()
  1692. Select Case Int(Rnd*3)+1
  1693. Case 1 : PlaySound "rubber_hit_1", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  1694. Case 2 : PlaySound "rubber_hit_2", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  1695. Case 3 : PlaySound "rubber_hit_3", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  1696. End Select
  1697. End Sub
  1698.  
  1699. Sub LeftFlipper_Collide(parm)
  1700. RandomSoundFlipper()
  1701. End Sub
  1702.  
  1703. Sub RightFlipper_Collide(parm)
  1704. RandomSoundFlipper()
  1705. End Sub
  1706.  
  1707. Sub RandomSoundFlipper()
  1708. Select Case Int(Rnd*3)+1
  1709. Case 1 : PlaySound "flip_hit_1", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  1710. Case 2 : PlaySound "flip_hit_2", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  1711. Case 3 : PlaySound "flip_hit_3", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  1712. End Select
  1713. End Sub
  1714.  
  1715.  
  1716. ' Thalamus : Exit in a clean and proper way
  1717. Sub Table1_exit()
  1718. Controller.Pause = False
  1719. Controller.Stop
  1720. End Sub
  1721.  
  1722.  
Advertisement
Add Comment
Please, Sign In to add comment