Arngrim

Untitled

Mar 13th, 2018
619
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 49.34 KB | None | 0 0
  1. Option Explicit
  2. Randomize
  3.  
  4. Const BallSize = 50
  5. Const BallMass = 1.5
  6.  
  7. Dim Controller,B2SController,objShell,PopupMessage
  8. Dim B2SOn, B2SOnALT, DOFeffects(9)
  9.  
  10. Dim DesktopMode:DesktopMode = Table1.ShowDT
  11. Dim UseVPMDMD:UseVPMDMD = DesktopMode
  12.  
  13. ' Rom Name
  14. Const cGameName = "spagb_100"
  15.  
  16. '
  17. Const B2ScGameName = "spagb_100b2s"
  18.  
  19. LoadCore
  20. LoadSPAController
  21.  
  22. ' Standard Options
  23. Const UseSolenoids = 1
  24. Const UseLamps = 0
  25. Const UseSync = 0
  26. Const HandleMech = 0
  27.  
  28. ' Standard Sounds
  29. Const SSolenoidOn = "fx_Solenoid"
  30. Const SSolenoidOff = ""
  31.  
  32. 'Dip Switches / Options Menu
  33. Private vpmDips
  34. Set vpmShowDips = GetRef("GBShowDips")
  35.  
  36. Private Sub GBShowDips
  37. If Not IsObject(vpmDips) Then ' First time
  38. Set vpmDips = New cvpmDips
  39. With vpmDips
  40. .AddForm 100, 240, "DIP Switches"
  41. .AddFrame 0, 0, 180, "Country", &H1b,_
  42. Array("USA", &H00,_
  43. "Austria", &H01,_
  44. "Belgium", &H02,_
  45. "Canada 1", &H03,_
  46. "Netherlands", &H04,_
  47. "Finland", &H05,_
  48. "France", &H06,_
  49. "Germany", &H07,_
  50. "Italy", &H08,_
  51. "Denmark", &H09,_
  52. "Norway", &H0a,_
  53. "Sweden", &H0b,_
  54. "Switzerland", &H0c,_
  55. "Australia", &H0d,_
  56. "UK", &H0e,_
  57. "Greece", &H0f,_
  58. "New Zealand", &H10,_
  59. "Spain", &H12,_
  60. "S.Africa", &H14,_
  61. "Japan", &H15,_
  62. "Croatia", &H16,_
  63. "Middle East", &H17,_
  64. "Taiwan", &H18,_
  65. "Russia", &H19,_
  66. "Canada 2", &H1a)
  67. End With
  68. End If
  69. vpmDips.ViewDips
  70. End Sub
  71.  
  72. '************************************************************************
  73. ' INIT TABLE
  74. '************************************************************************
  75.  
  76. Dim bsTrough, bsLSaucer, bsRPopper, bsLock, dtLeft, dtRight, plungerIM, mLeftSling, mRightSling
  77.  
  78. Sub Table1_Init
  79. vpmInit Me
  80. With Controller
  81. .GameName = cGameName
  82. If Err Then MsgBox "Can't start Game " & cGameName & vbNewLine & Err.Description:Exit Sub
  83. .SplashInfoLine = "Ghostbusters LE (Stern 2016)"
  84. .HandleKeyboard = 0
  85. .ShowTitle = 0
  86. .ShowDMDOnly = 1
  87. .ShowFrame = 0
  88. .HandleMechanics = 0
  89. .Hidden = DesktopMode
  90. On Error Resume Next
  91. .Run GetPlayerHWnd
  92. If Err Then MsgBox Err.Description
  93. On Error Goto 0
  94. End With
  95.  
  96. ' Main Timer init
  97. PinMAMETimer.Interval = PinMAMEInterval
  98. PinMAMETimer.Enabled = 1
  99.  
  100. ' Nudging
  101. vpmNudge.TiltSwitch = 86
  102. vpmNudge.Sensitivity = 5
  103. vpmNudge.TiltObj = Array(sw49, sw50, sw51, sw7, sw8)
  104.  
  105. 'Trough
  106. Set bsTrough = New cvpmTrough
  107. With bsTrough
  108. .Size = 6
  109. .InitSwitches Array(20, 19, 18, 17, 16, 15)
  110. .InitExit BallRelease, 90, 5
  111. .InitEntrySounds "fx_drain", "", ""
  112. .InitExitSounds SoundFX(SSolenoidOn,DOFContactors), SoundFX("ballrelease",DOFContactors)
  113. .Balls = 6
  114. .CreateEvents "bsTrough", Drain
  115. End With
  116.  
  117. 'Auto Plunger
  118. Set plungerIM = New cvpmImpulseP
  119. With plungerIM
  120. .InitImpulseP sw22, 55, 0.5
  121. .Switch 22
  122. .Random 0.05
  123. .InitExitSnd SoundFX("AutoPlunger",DOFContactors), SoundFX(SSolenoidOn,DOFContactors)
  124. .CreateEvents "plungerIM"
  125. End With
  126.  
  127. 'Left Scoop
  128. Set bsLSaucer = new cvpmSaucer
  129. With bsLSaucer
  130. .InitKicker ScoopEject, 34, 0, 30, 1.56
  131. .InitExitVariance 0, 2
  132. .InitSounds "LeftHole", SoundFX(SSolenoidOn,DOFContactors), SoundFX("kicker_out_left",DOFContactors)
  133. .CreateEvents "bsLSaucer", ScoopEject
  134. End With
  135.  
  136. 'Right Popper
  137. Set bsRPopper = new cvpmSaucer
  138. With bsRPopper
  139. .InitKicker SubwayEject, 63, 270, 30, 1.56
  140. .InitSounds "RightHole", SoundFX(SSolenoidOn,DOFContactors), SoundFX("kicker_out_right",DOFContactors)
  141. .CreateEvents "bsRPopper", SubwayEject
  142. End With
  143.  
  144. 'SubwayLock
  145. Set bsLock = New cvpmTrough
  146. With bsLock
  147. .Size = 3
  148. .InitSwitches Array(62, 61, 60)
  149. .InitExit SubwayLockOut, 130, 10
  150. .InitExitSounds SoundFX(SSolenoidOn,DOFContactors), SoundFX("fx_popper",DOFContactors)
  151. .Balls = 0
  152. .CreateEvents "bsLock", SubwayLockIn
  153. End With
  154.  
  155. 'Left Drop Target
  156. Set dtLeft = New cvpmDropTarget
  157. With dtLeft
  158. .InitDrop sw65, 65
  159. .Initsnd SoundFX("fx_DropTargetDown",DOFDropTargets), SoundFX("fx_DropTargetUp",DOFDropTargets)
  160. End With
  161.  
  162. 'Right Drop Target
  163. Set dtRight = New cvpmDropTarget
  164. With dtRight
  165. .InitDrop sw66, 66
  166. .Initsnd SoundFX("fx_DropTargetDown",DOFDropTargets), SoundFX("fx_DropTargetUp",DOFDropTargets)
  167. End With
  168.  
  169. 'Magna Slings
  170. Set mLeftSling = New cvpmMagnet
  171. With mLeftSling
  172. .InitMagnet LeftMagnaSling, 55 ' Left Magna Sling Strength (adjust to taste)
  173. .GrabCenter = True: .Size = 195
  174. .CreateEvents "mLeftSling"
  175. End With
  176.  
  177. Set mRightSling = New cvpmMagnet
  178. With mRightSling
  179. .InitMagnet RightMagnaSling, 55 ' Right Magna Sling Strength (adjust to taste)
  180. .GrabCenter = True: .Size = 195
  181. .CreateEvents "mRightSling"
  182. End With
  183.  
  184. 'UpPost/Diverter
  185. DiverterOn.IsDropped=1
  186. UpPost.IsDropped=1
  187.  
  188. 'Captive Balls
  189. kickerinit.createball
  190. kickerinit.kick 0,0
  191. kickerinit1.createball
  192. kickerinit1.kick 0,0
  193. kickerinit2.createball
  194. kickerinit2.kick 0,0
  195. kickerinit3.createball
  196. kickerinit3.kick 0,0
  197. kickerinit4.createball
  198. kickerinit4.kick 0,0
  199. kickerinit5.createball
  200. kickerinit5.kick 0,0
  201. Controller.Switch(28) = True
  202. Controller.Switch(29) = True
  203. Controller.Switch(30) = True
  204.  
  205. Dim bulb
  206. If DesktopMode Then
  207. For each bulb in StayPuftFlasher: bulb.intensity = 20 : Next
  208. SideRails.Visible = True
  209. Else
  210. For each bulb in StayPuftFlasher: bulb.intensity = 10 : Next
  211. SideRails.Visible = False
  212. End If
  213.  
  214. End Sub
  215.  
  216. '************************************************************************
  217. ' KEYS MAPPING
  218. '************************************************************************
  219.  
  220. Sub Table1_KeyDown(ByVal Keycode)
  221. If keycode = LeftFlipperKey Then Controller.Switch(9) = True
  222. If keycode = RightFlipperKey Then Controller.Switch(10) = True
  223. If KeyCode = PlungerKey Then Plunger.Pullback: PlaySoundAt "fx_PlungerPull", Plunger
  224. If keycode = StartGameKey Then Controller.Switch(78) = True
  225. If keycode = keyFront Then Controller.Switch(79) = True 'Tournament mode mapped to key 2
  226.  
  227. If keycode = keyInsertCoin1 Then vpmTimer.AddTimer 750,"vpmTimer.PulseSw 81'" : PlaysoundAt "fx_Coin", Drain 'Coin door chute #1
  228. If keycode = keyInsertCoin2 Then vpmTimer.AddTimer 750,"vpmTimer.PulseSw 82'" : PlaysoundAt "fx_Coin", Drain 'Coin door chute #2
  229. If keycode = keyInsertCoin3 Then vpmTimer.AddTimer 750,"vpmTimer.PulseSw 83'" : PlaysoundAt "fx_Coin", Drain 'Coin door chute #3
  230. If keycode = keyInsertCoin4 Then vpmTimer.AddTimer 750,"vpmTimer.PulseSw 84'" : PlaysoundAt "fx_Coin", Drain 'Coin door chute #4
  231.  
  232. If keycode = keyCancel Then Controller.Switch(0) = True
  233. If keycode = keyDown Then Controller.Switch(-1) = True
  234. If keycode = keyUp Then Controller.Switch(-2) = True
  235. If keycode = keyEnter Then Controller.Switch(-3) = True
  236.  
  237. ' If keycode = keySlamDoorHit Then Controller.Switch(89) = True 'Slam Tilt
  238. ' If keycode = keyCoinDoor Then Controller.Switch(106) = True 'Playfield power interlock
  239.  
  240. If keycode = keyBangBack Then vpmNudge.DoNudge 0, 6
  241. If keycode = LeftTiltKey Then vpmNudge.DoNudge 75, 2:PlaySoundAt SoundFX("fx_nudge", 0), sw1
  242. If keycode = RightTiltKey Then vpmNudge.DoNudge 285, 2:PlaySoundAt SoundFX("fx_nudge", 0), sw6
  243. If keycode = CenterTiltKey Then vpmNudge.DoNudge 0, 2:PlaySoundAt SoundFX("fx_nudge", 0), Drain
  244.  
  245. If KeyCode = RightMagnaSave OR KeyCode = LeftMagnaSave Then Controller.Switch(76) = True 'LockBar Button (Optional)
  246. If KeyCode = keyVPMVolume Then vpmVol
  247. if keycode = 33 then SolShaker true
  248. End Sub
  249.  
  250. Sub Table1_KeyUp(ByVal Keycode)
  251. If keycode = LeftFlipperKey Then Controller.Switch(9) = False
  252. If keycode = RightFlipperKey Then Controller.Switch(10) = False
  253. If KeyCode = PlungerKey Then Plunger.Fire: StopSound "fx_PlungerPull":PlaySoundAt "fx_Plunger", Plunger
  254. If keycode = StartGameKey Then Controller.Switch(78) = False
  255. If keycode = keyFront Then Controller.Switch(79) = False 'Tournament mode mapped to key 2
  256.  
  257. If keycode = keyCancel Then Controller.Switch(0) = False
  258. If keycode = keyDown Then Controller.Switch(-1) = False
  259. If keycode = keyUp Then Controller.Switch(-2) = False
  260. If keycode = keyEnter Then Controller.Switch(-3) = False
  261.  
  262. ' If keycode = keySlamDoorHit Then Controller.Switch(89) = False 'Slam Tilt
  263. ' If keycode = keyCoinDoor Then Controller.Switch(106) = False 'Playfield power interlock
  264.  
  265. If KeyCode = RightMagnaSave OR KeyCode = LeftMagnaSave Then Controller.Switch(76) = False 'LockBar Button (Optional)
  266.  
  267. If KeyCode = keyShowOpts Then 'F1 - Show VPM options
  268. Controller.Pause = True
  269. Controller.ShowOptsDialog GetPlayerHWnd
  270. Controller.Pause = False
  271. End If
  272.  
  273. If KeyCode = keyShowKeys Then Controller.Pause = True : vpmShowHelp : Controller.Pause = False 'F2 - Show Keys
  274. If KeyCode = keyReset Then Controller.Stop : BeginModal : Controller.Run : vpmTimer.Reset : EndModal 'F3 - Reset Emulation
  275. If KeyCode = keyFrame Then Controller.LockDisplay = Not Controller.LockDisplay 'F4 - Toggle Window Lock
  276. If KeyCode = keyDoubleSize Then Controller.DoubleSize = Not Controller.DoubleSize 'F5 - Toggle displaysize
  277. If KeyCode = keyShowDips Then 'F6 - Show Dip Switch / Options Menu
  278. If IsObject(vpmShowDips) Then Controller.Pause = True : vpmShowDips : Controller.Pause = False
  279. End If
  280. End Sub
  281.  
  282. ' Help Window
  283. vpmSystemHelp = "Stern GB keys:" & vbNewLine &_
  284. vpmKeyName(StartGameKey) & vbTab & "Start Game" & vbNewLine &_
  285. vpmKeyName(keyFront) & vbTab & "Tournament Mode" & vbNewLine &_
  286. vpmKeyName(keyInsertCoin1) & vbTab & "Insert Coin #1" & vbNewLine &_
  287. vpmKeyName(keyInsertCoin2) & vbTab & "Insert Coin #2" & vbNewLine &_
  288. vpmKeyName(keyInsertCoin3) & vbTab & "Insert Coin #3" & vbNewLine &_
  289. vpmKeyName(keyInsertCoin4) & vbTab & "Insert Coin #4" & vbNewLine &_
  290. vpmKeyName(keyCancel) & vbTab & "Service Back" & vbNewLine &_
  291. vpmKeyName(keyDown) & vbTab & "Service Minus" & vbNewLine &_
  292. vpmKeyName(keyUp) & vbTab & "Service Plus" & vbNewLine &_
  293. vpmKeyName(keyEnter) & vbTab & "Service Select"
  294.  
  295. Sub Table1_Paused:Controller.Pause = True:End Sub
  296. Sub Table1_UnPaused:Controller.Pause = False:End Sub
  297. Sub Table1_Exit:Controller.Stop:End Sub
  298.  
  299. '************************************************************************
  300. ' SOLENOIDS MAPPING
  301. '************************************************************************
  302.  
  303. SolCallBack(1) = "SolTrough" 'Trough
  304. SolCallBack(2) = "SolAutoPlungerIM" 'AutoPlunger
  305. SolCallback(3) = "SolLFlipper" 'Left Flipper
  306. SolCallback(4) = "SolRFlipper" 'Right Flipper
  307. SolCallback(5)= "SolMiniMagnet mLeftSling," 'Left Sling Magnet
  308. SolCallback(6)= "SolMiniMagnet mRightSling," 'Right Sling Magnet
  309. SolCallback(7)= "SolShaker" 'Shaker Motor
  310. SolCallback(10)= "SolLeftEject" 'Left Scoop
  311. SolCallback(11)= "SolLockPost" 'Lock Post (Captive Ball)
  312. SolCallback(12)= "SolUpPost" 'Up Post (Spinner)
  313. 'SolCallback(14)= "" 'Left Bumper
  314. 'SolCallback(15)= "" 'Right Bumper
  315. 'SolCallback(16)= "" 'Bottom Bumper
  316. SolCallback(18)= "vpmSolGate Gate1, SoundFXDOFALT(""ElGate"",127,DOFPulse,DOFContactors)," 'Electric Gate
  317. SolCallback(20)= "SolSubwayDiverter" 'Subway Diverter
  318. SolCallback(21)= "SolSubwayLock" 'Subway Lock
  319. SolCallback(22)= "SolSubwayEject" 'Subway Eject
  320. SolCallback(24)= "SolRaiseLDrop" 'Left Drop Target Up
  321. SolCallback(25)= "SolLowerLDrop" 'Left Drop Target Down
  322. SolCallback(26)= "SolRaiseRDrop" 'Right Drop Target Up
  323. SolCallback(27)= "SolLowerRDrop" 'Right Drop Target Down
  324. SolCallback(30)= "vpmSolSound SoundFXDOFALT(""fx_knocker"",124,DOFPulse,DOFKnocker)," 'Knocker
  325. 'SolCallback(31)= "" 'Ticket Meter
  326. 'SolCallback(32)= "" 'Ticket Dispenser
  327.  
  328. '************************************************************************
  329. ' BALL TROUGH
  330. '************************************************************************
  331. Sub SolTrough(Enabled)
  332. If Enabled Then
  333. DOFALT 120, DOFPulse
  334. bsTrough.ExitSol_On
  335. If BsTrough.Balls Then vpmTimer.PulseSw 21
  336. End If
  337. End Sub
  338.  
  339. '************************************************************************
  340. ' AUTOPLUNGER
  341. '************************************************************************
  342. Sub SolAutoPlungerIM(Enabled)
  343. If Enabled Then
  344. DOFALT 120, DOFPulse
  345. DOFALT 121, DOFPulse
  346. PlungerIM.AutoFire
  347. End If
  348. End Sub
  349.  
  350. '************************************************************************
  351. ' FLIPPERS
  352. '************************************************************************
  353. Sub SolLFlipper(Enabled)
  354. If Enabled Then
  355. PlaySoundAt SoundFXDOFALT("fx_flipperup",101,DOFOn,DOFFlippers), LeftFlipper
  356. LeftFlipper.RotateToEnd
  357. Else
  358. PlaySoundAt SoundFXDOFALT("fx_flipperdown",101,DOFOff,DOFFlippers), RightFlipper
  359. LeftFlipper.RotateToStart
  360. End If
  361. End Sub
  362.  
  363. Sub SolRFlipper(Enabled)
  364. If Enabled Then
  365. PlaySoundAt SoundFXDOFALT("fx_flipperup",102,DOFOn,DOFFlippers), LeftFlipper
  366. RightFlipper.RotateToEnd
  367. Else
  368. PlaySoundAt SoundFXDOFALT("fx_flipperdown",102,DOFOff,DOFFlippers), RightFlipper
  369. RightFlipper.RotateToStart
  370. End If
  371. End Sub
  372.  
  373. '************************************************************************
  374. ' MAGNA SLINGS
  375. '************************************************************************
  376.  
  377. Sub SolMiniMagnet(aMag, enabled)
  378. If enabled Then
  379. PlayLoopSoundAtVol SoundFXDOFALT("fx_magnet",122,DOFOn,DOFShaker), aMag, 1
  380. aMag.MagnetOn = True : aMag.Update: aMag.MagnetOn = False 'Fast Pulse
  381. Else
  382. DOFALT 122, DOFOff
  383. StopSound "fx_magnet"
  384. End If
  385. End Sub
  386.  
  387. '************************************************************************
  388. ' SHAKER MOTOR
  389. '************************************************************************
  390. Sub SolShaker(Enabled)
  391. If Enabled Then
  392. DOFALT 123, DOFOn
  393. cBall.VelX = 0.5 : cBall.VelY = 0.5 : osce=3 : slbreak = .5 'shake toys
  394. Else
  395. DOFALT 123, DOFOff
  396. End If
  397. End Sub
  398.  
  399. '************************************************************************
  400. ' LEFT SCOOP
  401. '************************************************************************
  402.  
  403. Sub SolLeftEject(enabled)
  404. If Enabled Then
  405. DOFALT 125, DOFPulse
  406. DOFALT 121, DOFPulse
  407. bsLSaucer.ExitSol_On
  408. sw34.Enabled=0
  409. vpmTimer.AddTimer 200, "sw34.Enabled=1 '"
  410. End If
  411. End Sub
  412.  
  413. '************************************************************************
  414. ' CAPTIVEBALL LOCK POST
  415. '************************************************************************
  416. Sub SolLockPost(Enabled)
  417. If enabled Then
  418. DOFALT 126, DOFPulse
  419. LockPost.IsDropped=1:PlaySoundAt SoundFX("fx_postdown",DOFContactors),sw31
  420. Else
  421. DOFALT 126, DOFPulse
  422. LockPost.IsDropped=0:PlaySoundAt SoundFX("fx_postup",DOFContactors), sw31
  423. End If
  424. End Sub
  425.  
  426. '************************************************************************
  427. ' BALL TROUGH
  428. '************************************************************************
  429. Sub SolSubwayLock(Enabled)
  430. If Enabled Then
  431. DOFALT 129, DOFPulse
  432. bsLock.ExitSol_On
  433. End If
  434. End Sub
  435.  
  436. '************************************************************************
  437. ' SPINNER POST
  438. '************************************************************************
  439. Sub SolUpPost(Enabled)
  440. If enabled Then
  441. DOFALT 126, DOFPulse
  442. UpPost.IsDropped=0:PlaySoundAt SoundFX("fx_postup",DOFContactors), sw36
  443. Else
  444. DOFALT 126, DOFPulse
  445. UpPost.IsDropped=1:PlaySoundAt SoundFX("fx_postdown",DOFContactors),sw36
  446. End If
  447. End Sub
  448.  
  449. '************************************************************************
  450. ' SUBWAY
  451. '************************************************************************
  452.  
  453. Sub kicker3_hit
  454. StopSound "fx_wireramp_enter": PlaysoundAt "fx_wireramp_exit", ActiveBall: me.destroyball
  455. Me.TimerInterval=300: Me.TimerEnabled=1
  456. End Sub
  457.  
  458. Sub kicker3_timer
  459. Me.TimerEnabled = 0
  460. kicker2.createSizedBallWithMass BallSize/2, BallMass:kicker2.kick 180,30
  461. End Sub
  462.  
  463. Sub SubwaySnd_Hit: PlaySoundAt "Subway_enter", ActiveBall : End Sub
  464.  
  465. Sub SolSubwayDiverter(Enabled)
  466. If Enabled Then
  467. DOFALT 128, DOFPulse
  468. DiverterOff.IsDropped=1:DiverterOn.IsDropped=0:PlaySoundAt SoundFX("DiverterOn",DOFContactors),SubwayLockIn
  469. Else
  470. DOFALT 128, DOFPulse
  471. DiverterOff.IsDropped=0:DiverterOn.IsDropped=1:PlaySoundAt SoundFX("DiverterOff",DOFContactors),SubwayLockIn
  472. End If
  473. End Sub
  474.  
  475. Sub SolSubwayEject(enabled)
  476. If Enabled Then
  477. DOFALT 130, DOFPulse
  478. DOFALT 121, DOFPulse
  479. bsRPopper.ExitSol_On
  480. sw63.Enabled=0
  481. vpmTimer.AddTimer 200, "sw63.Enabled=1 '"
  482. End If
  483. End Sub
  484.  
  485. '************************************************************************
  486. ' SLIMER MOVE
  487. '************************************************************************
  488.  
  489. ' 71-72-73 slimer encoder wheel
  490.  
  491. Dim CurSlimerPos:CurSlimerPos = 0
  492. Const SlimerSpeed = 0.33
  493. dim LastMotorTime:LastMotorTime = 0
  494. dim lastMotorDirection:lastMotorDirection = 0
  495.  
  496. sub slimerbracket_timer()
  497. If LampState(281) <92 Then
  498. ' Don't move directly to ROM position - move incrementally towards it.
  499. if CurSlimerPos < (LampState(281)*1.85)-110-SlimerSpeed then
  500. CurSlimerPos = CurSlimerPos + SlimerSpeed
  501. LastMotorTime = Timer
  502. if lastMotorDirection <> -1 Then
  503. ChangeSlimerDirection -1
  504. end if
  505. Elseif CurSlimerPos > (LampState(281)*1.85)-110 then
  506. CurSlimerPos = CurSlimerPos - SlimerSpeed
  507. LastMotorTime = Timer
  508. if lastMotorDirection <> 1 Then
  509. ChangeSlimerDirection 1
  510. end if
  511. Elseif LastMotorTime > 0 and Timer > LastMotorTime + 0.08 then
  512. ChangeSlimerDirection 0
  513. LastMotorTime = 0
  514. Else
  515.  
  516. End If
  517.  
  518. slimerB.rotz=CurSlimerPos
  519. slimer.rotz=slimerb.rotz
  520.  
  521. slimer.X=((280* dCOS(slimerB.rotZ+90))+310)
  522. slimer.y=(270* dSIN(slimerB.rotZ+90))+500
  523. slimer.z=((slimer.y/2.7)*-1)+400
  524.  
  525. SlimerLight.x=slimer.x
  526. SlimerLight.y=slimer.y
  527.  
  528. SlimerLighta.x=slimer.x
  529. SlimerLighta.y=slimer.y
  530. slimerlighta.BulbHaloHeight = slimer.z
  531.  
  532. slimershadow.x=slimer.x
  533. slimershadow.y=slimer.y
  534. slimershadow.rotz=(slimer.rotz-90)/1.2
  535. slimershadow.size_y=abs(slimer.roty*1.2)+10
  536. slimershadow.x=((slimershadow.x-(slimer.z))+100)+slimer.roty
  537.  
  538. SlimerOscUpdate:SlimerPlasticHit
  539.  
  540. dim xx : For each xx in SLWalls:xx.IsDropped=1:Next
  541.  
  542. Dim WallPos:WallPos = int((CurSlimerPos + 45) / 5.2)
  543.  
  544. if WallPos>=0 and WallPos < SLWalls.Count Then
  545. SLWalls(WallPos).IsDropped=0
  546. end if
  547. else ' Stop motor sound
  548. osce=1:osc=0
  549. StopSound "SlimerMotor"
  550. DOFALT 138, DOFOff
  551. End If
  552. end Sub
  553.  
  554. sub ChangeSlimerDirection(cur)
  555. if (lastMotorDirection = -1 and cur = 1) or (lastMotorDirection = 1 and cur= -1) then ' big change in direction - oscillate high intensity
  556. osce=2:osc=0
  557. ' debug.print "Shift"
  558. elseif cur = 0 then ' Stop
  559. osce=1:osc=0
  560. StopSound "SlimerMotor"
  561. DOFALT 138, DOFOff
  562. ' debug.print "Stop"
  563. Else ' Start
  564. osce=.5:osc=0
  565. PlayLoopSoundAtVol SoundFXDOFALT("SlimerMotor",138,DOFOn,DOFGear), slimer, 0.25
  566. ' debug.print "Start"
  567. end if
  568. lastMotorDirection = cur
  569. end sub
  570.  
  571. '************************************************************************
  572. ' SLIMER LEFT PLASTIC HIT
  573. '************************************************************************
  574. Dim cdir
  575.  
  576. Sub SlimerPlasticHit()
  577. if lastMotorDirection=-1 and (slimerB.rotz>45 or slimerB.rotz<15) then cdir=-1:slimer.objroty=0
  578. if lastMotorDirection=1 and (slimerB.rotz>45 or slimerB.rotz<15) then cdir=1:slimer.objroty=0
  579.  
  580. if (cdir=-1) and (slimerB.rotz>15 and slimerB.rotz<45) then slimer.objroty=-((slimerB.rotz-15)*2.6)
  581. if (cdir=-1) and (slimerB.rotz>45 and slimerB.rotz<46) then osce=2
  582.  
  583. if (cdir=1) and (slimerB.rotz>15 and slimerB.rotz<48) then slimer.objroty=((45-(slimerB.rotz))*3.2)
  584. if (cdir=1) and (slimerB.rotz>14 and slimerB.rotz<15) then osce=4
  585. end sub
  586.  
  587. '************************************************************************
  588. ' SLIMER OSCILLATION
  589. '************************************************************************
  590. dim osc,oscE:oscE=1
  591.  
  592. sub SlimerOscUpdate()
  593. if CurSlimerPos > -55 and CurSlimerPos < -53 Then
  594. ' Ghost "bumps" into play area, also stunts hit shaking
  595. osce=2
  596. slbreak=0
  597. end if
  598. dim doupdate:doupdate = false
  599. if osce>0 then
  600. osc=osc+1
  601. oscE=osce-0.03
  602. doupdate = true
  603. end if
  604. if slbreak>0 then
  605. slbreak=slbreak-0.03
  606. slrotx=slrotx+1
  607. doupdate = true
  608. end if
  609. if doupdate then
  610. slimer.roty=(dsin(osc*45)*3)*oscE
  611. slimer.rotx=slimer.roty + (dCos (slrotx*15)*45)*slbreak
  612. Else
  613. If Timer>cWait Then
  614. slimer.roty= (dsin(osc*45)*3)*oscE + (cball.x - ckicker.x)*10
  615. slimer.rotx= slimer.roty + (dCos (slrotx*15)*45)*slbreak + (0.33-(ckicker.y - cball.y))*10
  616. End If
  617. End If
  618. end sub
  619.  
  620. '************************************************************************
  621. ' SLIMER Hit
  622. '************************************************************************
  623. dim slrotx,slbreak
  624.  
  625. sub SlWalls_hit(idx)
  626. vpmtimer.pulseSw 68
  627. Slwalls(idx).isdropped=1
  628. PlaySound("fx_collide"), 0, Csng(BallVel(ActiveBall)) ^2 / 1000, Pan(ActiveBall), 0, -10000, 0, 0, AudioFade(ActiveBall)
  629. slbreak=Csng(BallVel(ActiveBall) ^2 / 500)
  630. if slbreak > 1.5 then slbreak = 1.5
  631. slrotx=1
  632. end Sub
  633.  
  634. '************************************************************************
  635. ' TOYS SHAKE ON NUDGE
  636. '************************************************************************
  637.  
  638. Dim mMagnet, cBall
  639.  
  640. Sub WobbleMagnet_Init
  641. Set mMagnet = new cvpmMagnet
  642. With mMagnet
  643. .InitMagnet WobbleMagnet, 2
  644. .Size = 100
  645. .CreateEvents mMagnet
  646. .MagnetOn = True
  647. End With
  648. Set cBall = ckicker.createball:ckicker.Kick 0,1:mMagnet.addball cball
  649. End Sub
  650.  
  651. Dim cWait: cWait = Timer +10 'wait 10 seconds
  652.  
  653. Sub ShakeTimer_Timer
  654. If Timer>cWait Then
  655. staypuft.rotx=180 + (0.33-(ckicker.y - cball.y))*2
  656. staypuft.roty=(cball.x - ckicker.x)*4
  657. End If
  658. end Sub
  659.  
  660. '************************************************************************
  661. ' SCOLERI'S DROP TARGETS
  662. '************************************************************************
  663.  
  664. Sub SolRaiseLDrop(enabled)
  665. If enabled Then dtLeft.SolDropUp True: l112a.visible = True:DOFALT 119, DOFPulse
  666. End Sub
  667.  
  668. Sub SolRaiseRDrop(enabled)
  669. If enabled Then dtRight.SolDropUp True: l113a.visible = True:DOFALT 119, DOFPulse
  670. End Sub
  671.  
  672. Sub SolLowerLDrop(enabled)
  673. If enabled Then dtLeft.SolDropDown True: l112a.visible = False:DOFALT 119, DOFPulse
  674. End Sub
  675.  
  676. Sub SolLowerRDrop(enabled)
  677. If enabled Then dtRight.SolDropDown True: l113a.visible = False:DOFALT 119, DOFPulse
  678. End Sub
  679.  
  680. '************************************************************************
  681. ' SWITCHES
  682. '************************************************************************
  683.  
  684. 'rollovers
  685. Sub sw1_hit: Controller.Switch(1) = 1 : PlaySoundAt "fx_sensor",ActiveBall:End Sub
  686. Sub sw1_unhit:Controller.Switch(1) = 0: End Sub
  687.  
  688. Sub sw2_hit: Controller.Switch(2) = 1 : PlaySoundAt "fx_sensor",ActiveBall:End Sub
  689. Sub sw2_unhit:Controller.Switch(2) = 0: End Sub
  690.  
  691. Sub sw3_hit: Controller.Switch(3) = 1 : PlaySoundAt "fx_sensor",ActiveBall:End Sub
  692. Sub sw3_unhit:Controller.Switch(3) = 0: End Sub
  693.  
  694. Sub sw4_hit: Controller.Switch(4) = 1 : PlaySoundAt "fx_sensor",ActiveBall:End Sub
  695. Sub sw4_unhit:Controller.Switch(4) = 0: End Sub
  696.  
  697. Sub sw5_hit: Controller.Switch(5) = 1 : PlaySoundAt "fx_sensor",ActiveBall:End Sub
  698. Sub sw5_unhit:Controller.Switch(5) = 0: End Sub
  699.  
  700. Sub sw6_hit: Controller.Switch(6) = 1 : PlaySoundAt "fx_sensor",ActiveBall:End Sub
  701. Sub sw6_unhit:Controller.Switch(6) = 0: End Sub
  702.  
  703. Sub sw52_hit: Controller.Switch(52) = 1 : PlaySoundAt "fx_sensor",ActiveBall:End Sub
  704. Sub sw52_unhit:Controller.Switch(52) = 0: End Sub
  705.  
  706. Sub sw54_hit: Controller.Switch(54) = 1 : PlaySoundAt "fx_sensor",ActiveBall:DOFALT 134, DOFOn:End Sub
  707. Sub sw54_unhit:Controller.Switch(54) = 0: DOFALT 134, DOFOff : End Sub
  708.  
  709. Sub sw55_hit: Controller.Switch(55) = 1 : PlaySoundAt "fx_sensor",ActiveBall:DOFALT 135, DOFOn:End Sub
  710. Sub sw55_unhit:Controller.Switch(55) = 0: DOFALT 135, DOFOff : End Sub
  711.  
  712. Sub sw56_hit: Controller.Switch(56) = 1 : PlaySoundAt "fx_sensor",ActiveBall:DOFALT 131, DOFOn:End Sub
  713. Sub sw56_unhit:Controller.Switch(56) = 0: DOFALT 131, DOFOff : End Sub
  714.  
  715. Sub sw57_hit: Controller.Switch(57) = 1 : PlaySoundAt "fx_sensor",ActiveBall:DOFALT 132, DOFOn:End Sub
  716. Sub sw57_unhit:Controller.Switch(57) = 0: DOFALT 132, DOFOff : End Sub
  717.  
  718. Sub sw58_hit: Controller.Switch(58) = 1 : PlaySoundAt "fx_sensor",ActiveBall:DOFALT 133, DOFOn:End Sub
  719. Sub sw58_unhit:Controller.Switch(58) = 0: DOFALT 133, DOFOff : End Sub
  720.  
  721. 'Slingshots
  722. Sub sw7_Hit:vpmTimer.PulseSw 7:DOFALT 103, DOFPulse:DOFALT 105, DOFPulse:End Sub
  723. Sub sw8_Hit:vpmTimer.PulseSw 8:DOFALT 104, DOFPulse:DOFALT 106, DOFPulse:End Sub
  724.  
  725. 'StandUp Targets
  726. Sub sw24_hit:vpmtimer.PulseSw 24: PlaySoundAt SoundFXDOFALT("fx_target",113,DOFPulse,DOFTargets), ActiveBall:End Sub
  727. Sub sw25_hit:vpmtimer.PulseSw 25: PlaySoundAt SoundFXDOFALT("fx_target",113,DOFPulse,DOFTargets), ActiveBall:End Sub
  728. Sub sw26_hit:vpmtimer.PulseSw 26: PlaySoundAt SoundFXDOFALT("fx_target",113,DOFPulse,DOFTargets), ActiveBall:End Sub
  729.  
  730. Sub sw37_hit:vpmtimer.PulseSw 37: PlaySoundAt SoundFXDOFALT("fx_target",114,DOFPulse,DOFTargets), ActiveBall:End Sub
  731. Sub sw38_hit:vpmtimer.PulseSw 38: PlaySoundAt SoundFXDOFALT("fx_target",114,DOFPulse,DOFTargets), ActiveBall:End Sub
  732.  
  733. Sub sw45_hit:vpmtimer.PulseSw 45: PlaySoundAt SoundFXDOFALT("fx_target",115,DOFPulse,DOFTargets), ActiveBall:End Sub
  734. Sub sw46_hit:vpmtimer.PulseSw 46: PlaySoundAt SoundFXDOFALT("fx_target",115,DOFPulse,DOFTargets), ActiveBall:End Sub
  735. Sub sw48_hit:vpmtimer.PulseSw 48: PlaySoundAt SoundFXDOFALT("fx_target",114,DOFPulse,DOFTargets), ActiveBall:End Sub
  736.  
  737. Sub sw64_hit:vpmtimer.PulseSw 64: PlaySoundAt SoundFXDOFALT("fx_target",116,DOFPulse,DOFTargets), ActiveBall:End Sub
  738.  
  739. 'captive lock rollovers
  740. Sub sw28_hit: Controller.Switch(28) = 1 : PlaySoundAt "fx_sensor",ActiveBall:End Sub
  741. Sub sw28_unhit:Controller.Switch(28) = 0: End Sub
  742.  
  743. Sub sw29_hit: Controller.Switch(29) = 1 : PlaySoundAt "fx_sensor",ActiveBall:End Sub
  744. Sub sw29_unhit:Controller.Switch(29) = 0: End Sub
  745.  
  746. Sub sw30_hit: Controller.Switch(30) = 1 : PlaySoundAt "fx_sensor",ActiveBall:End Sub
  747. Sub sw30_unhit:Controller.Switch(30) = 0: End Sub
  748.  
  749. Sub sw31_hit: Controller.Switch(31) = 1 : PlaySoundAt "fx_sensor",ActiveBall:End Sub
  750. Sub sw31_unhit:Controller.Switch(31) = 0: End Sub
  751.  
  752. Sub sw32_hit: Controller.Switch(32) = 1 : PlaySoundAt "fx_sensor",ActiveBall:End Sub
  753. Sub sw32_unhit:Controller.Switch(32) = 0: End Sub
  754.  
  755. Sub sw33_hit: Controller.Switch(33) = 1 : PlaySoundAt "fx_sensor",ActiveBall:End Sub
  756. Sub sw33_unhit:Controller.Switch(33) = 0: End Sub
  757.  
  758. 'Spinner
  759. Sub sw35_spin:vpmtimer.pulsesw 35: PlaySoundAt "fx_spinner", sw35:DOFALT 117, DOFPulse:End Sub
  760.  
  761. 'Up Post opto
  762. Sub sw36_hit:vpmtimer.pulsesw 36: End Sub
  763.  
  764. 'Ramp Switches
  765. Sub sw40_hit: Controller.Switch(40) = 1 : PlaySoundAt "fx_sensor",ActiveBall:DOFALT 118, DOFPulse End Sub
  766. Sub sw40_unhit:Controller.Switch(40) = 0: End Sub
  767.  
  768. Sub sw43_hit: Controller.Switch(43) = 1 : PlaySoundAt "fx_sensor",ActiveBall:DOFALT 118, DOFPulse:End Sub
  769. Sub sw43_unhit:Controller.Switch(43) = 0: End Sub
  770.  
  771. 'Bumpers
  772. Sub sw49_hit:DOFALT 108, DOFPulse:vpmtimer.pulsesw 49:PlaySoundAt SoundFXDOFALT("LeftJet",107,DOFPulse,DOFContactors), ActiveBall:End Sub
  773. Sub sw50_hit:DOFALT 112, DOFPulse:vpmtimer.pulsesw 50:PlaySoundAt SoundFXDOFALT("RightJet",111,DOFPulse,DOFContactors), ActiveBall:End Sub
  774. Sub sw51_hit:DOFALT 110, DOFPulse:vpmtimer.pulsesw 51:PlaySoundAt SoundFXDOFALT("BottomJet",109,DOFPulse,DOFContactors), ActiveBall:End Sub
  775.  
  776. 'ECTO Goggles opto
  777. Sub sw59_hit:vpmtimer.pulsesw 59: End Sub
  778.  
  779. 'Drop Targets
  780. Sub sw65_dropped:dtLeft.Hit 1:DOFALT 119, DOFPulse:End Sub
  781. Sub sw66_dropped:dtRight.Hit 1:DOFALT 119, DOFPulse:End Sub
  782.  
  783. '************************************************************************
  784. ' ECTO GOGGLES
  785. '************************************************************************
  786.  
  787. sub changevideo(vidnum)
  788. if (vidnum<=9) then
  789. ectomovie.imagea = "zcd_nunzioScoleri_hit_" & Right("000" & CStr(vidnum+1), 3)
  790. elseif (vidnum<=47) then
  791. ectomovie.imagea = "zcd_tonyScoleri_hit_" & Right("000" & CStr(vidnum-9), 3)
  792. elseif (vidnum<=66) then
  793. ectomovie.imagea = "zcd_nunzioScoleri_idle_" & Right("000" & CStr(vidnum-47), 3)
  794. elseif (vidnum<=90) then
  795. ectomovie.imagea = "zcd_ghost4_idle_" & Right("000" & CStr(vidnum-66), 3)
  796. ' I think this is a SPA bug - 029 is the first hit sequence, not 001
  797. elseif (vidnum<=99) Then
  798. ectomovie.imagea = "zcd_ghost4_hit_" & Right("000" & CStr(vidnum-90+28), 3)
  799. elseif (vidnum<=127) Then
  800. ectomovie.imagea = "zcd_ghost4_hit_" & Right("000" & CStr(vidnum-90-9), 3)
  801. ' end buggy sequence.
  802. elseif (vidnum<=173) then
  803. ectomovie.imagea = "zcd_SternLogo_" & Right("000" & CStr(vidnum-128), 3)
  804. elseif (vidnum=174) Then
  805. ectomovie.imagea = "zcd_GhostLogo"
  806. elseif (vidnum<=205) then
  807. ectomovie.imagea = "zcd_Jackpot_15fps_" & Right("000" & CStr(vidnum-174), 3)
  808. elseif (vidnum<=236) then
  809. ectomovie.imagea = "zcd_SuperJackpot_15fps_" & Right("000" & CStr(vidnum-205), 3)
  810. elseif (vidnum<=276) then
  811. ectomovie.imagea = "zcd_slimer_idle_" & Right("000" & CStr(vidnum-236), 3)
  812. elseif (vidnum<=294) then
  813. ectomovie.imagea = "zcd_slimer_small_hit_" & Right("000" & CStr(vidnum-276), 3)
  814. elseif (vidnum<=313) then
  815. ectomovie.imagea = "zcd_tonyScoleri_small_idle_" & Right("000" & CStr(vidnum-294), 3)
  816. elseif (vidnum<=418) then
  817. ectomovie.imagea = "zcd_Taxi" & Right("000" & CStr(vidnum-313), 3)
  818. elseif (vidnum<=464) then
  819. ectomovie.imagea = "zcd_Cat" & Right("000" & CStr(vidnum-418), 3)
  820. Else
  821. ectomovie.imagea = "zcd_GhostLogo"
  822. end if
  823. end sub
  824.  
  825. ' *********************************************************************
  826. ' LIGHTS
  827. ' *********************************************************************
  828.  
  829. Dim bulb
  830. Dim LampState(300), FadingLevel(300)
  831. Dim FlashSpeedUp(300), FlashSpeedDown(300), FlashMin(300), FlashMax(300), FlashLevel(300)
  832.  
  833. InitLamps() ' turn off the lights and flashers and reset them to the default parameters
  834. LampTimer.Interval = -1 'lamp fading speed
  835. LampTimer.Enabled = 1
  836.  
  837. Sub LampTimer_Timer()
  838. Dim chgLamp, num, chg, ii, vid
  839. vid = false
  840. chgLamp = Controller.ChangedLamps
  841. If Not IsEmpty(chgLamp) Then
  842. For ii = 0 To UBound(chgLamp)
  843. LampState(chgLamp(ii, 0) ) = chgLamp(ii, 1) 'keep the real state in an array
  844. 'Debug.print "L" & chgLamp(ii, 0) &" -> " & chgLamp(ii, 1)
  845.  
  846. Select Case chgLamp(ii, 0)
  847. Case 199,201,206,207,208,209,210,211,220,223
  848. If chgLamp(ii, 1) > 128 Then
  849. DOFALT chgLamp(ii, 0), DOFOn
  850. Else
  851. DOFALT chgLamp(ii, 0), DOFOff
  852. End If
  853. End Select
  854. if chgLamp(ii,0) = 282 or chgLamp(ii,0) = 283 Then
  855. vid = true
  856. end if
  857. Next
  858. if vid then
  859. changevideo cInt(LampState(283)) * 256 + cInt(LampState(282))
  860. end if
  861. End If
  862. UpdateLamps
  863. End Sub
  864.  
  865. Sub InitLamps()
  866. Dim x
  867. For x = 0 to 300
  868. LampState(x) = 0 ' current light state, independent of the fading level. 0 is off and 1 is on
  869. FadingLevel(x) = 4 ' used to track the fading state
  870. FlashSpeedUp(x) = 0.5 ' faster speed when turning on the flasher
  871. FlashSpeedDown(x) = 0.35 ' slower speed when turning off the flasher
  872. FlashMax(x) = 1 ' the maximum value when on, usually 1
  873. FlashMin(x) = 0 ' the minimum value when off, usually 0
  874. FlashLevel(x) = 0 ' the intensity of the flashers, usually from 0 to 1
  875. Next
  876. End Sub
  877.  
  878. Sub UpdateLamps()
  879. SingleLamp l10, 10
  880. SingleLamp l11, 11
  881. SingleLamp l13, 13
  882. SingleLamp l14, 14
  883. SingleLamp l15, 15
  884. SingleLamp l16, 16
  885. SingleLamp l17, 17
  886. SingleLamp l18, 18
  887. SingleLamp l19, 19
  888. SingleLamp l20, 20
  889. SingleLamp l21, 21
  890. SingleLamp l22, 22
  891. SingleLamp l23, 23
  892. SingleLamp l24, 24
  893. SingleLamp l25, 25
  894. SingleLamp l30, 30
  895. SingleLamp l31, 31
  896. SingleLamp l32, 32
  897. SingleLamp l33, 33
  898. SingleLamp l35, 35
  899. SingleLamp l36, 36
  900. SingleLamp l37, 37
  901. SingleLamp l38, 38
  902. SingleLamp l39, 39
  903. SingleLamp l40, 40
  904. SingleLamp l49, 49
  905. SingleLamp l54, 54
  906. SingleLamp l54a, 54
  907. SingleLamp l56, 56
  908. SingleLamp l57, 57
  909. SingleLamp l58, 58
  910. SingleLamp l59, 59
  911. SingleLamp l60, 60
  912. SingleLamp l61, 61
  913. SingleLamp l65, 65
  914. SingleLamp l66, 66
  915. SingleLamp l68, 68
  916. SingleLamp l69, 69
  917. SingleLamp l70, 70
  918. SingleLamp l71, 71
  919. SingleLamp l72, 72
  920. SingleLamp l73, 73
  921. SingleLamp l75, 75
  922. SingleLamp l76, 76
  923. SingleLamp l77, 77
  924. SingleLamp l78, 78
  925. SingleLamp l79, 79
  926. SingleLamp l84, 84
  927. SingleLamp l85, 85
  928. SingleLamp l89, 89
  929. SingleLamp Fl91, 91
  930. SingleLamp Fl91a, 91
  931. SingleLamp Fl91b, 91
  932. SinglePrimitive bulb1, 91, 1
  933. SingleLamp Fl92, 92
  934. SingleLamp Fl92a, 92
  935. SingleLamp Fl92b, 92
  936. SingleLamp Fl92c, 92
  937. SingleLamp l94, 94
  938. SingleLamp l95, 95
  939. SingleLamp l100, 100
  940. SingleLamp l100a, 100
  941. SingleLamp l100b, 100
  942. SingleLamp l101, 101
  943. SingleLamp l101a, 101
  944. SingleLamp l101b, 101
  945. SingleLamp l102, 102
  946. SingleLamp l102a, 102
  947. SingleLamp l102b, 102
  948. SingleLamp l103, 103
  949. SingleLamp l104, 104
  950. SingleLamp l105, 105
  951. SingleLamp l106, 106
  952. 'SingleLamp l110, 110 'SPA bug, DLL remaps 123 and 110 to 0 making it not quite right..
  953. SingleLamp l112, 112
  954. SingleLamp l112a, 112
  955. SingleLamp l113, 113
  956. SingleLamp l113a, 113
  957.  
  958. 'RGB lamps
  959. RGBLamp l26r, 28, 27, 26
  960. RGBLamp l41r, 43, 42, 41
  961. RGBLamp l45r, 45, 46, 47
  962. RGBLampR l45a, 45, 46, 47
  963. RGBLamp l50r, 52, 51, 50
  964. RGBLamp l62r, 64, 63, 62
  965. RGBLamp l80r, 82, 81, 80
  966. RGBLamp l86r, 88, 87, 86
  967. RGBLamp l96r, 96, 97, 98
  968. RGBLamp lPuffGlow, 107, 108, 109
  969. StayPuftColor 107, 108, 109
  970.  
  971. 'General Illumination
  972. CabinetSide 117
  973. SingleLamp Reflect1, 117
  974. GIString GILeftSling, 117
  975. GIString GIPlayfield2, 118
  976. GIString GIPlayfield3, 119
  977. GIString GIBackwall, 120
  978. SinglePrimitive bulb3, 120, 1
  979. SinglePrimitive bulb4, 120, 1
  980. SinglePrimitive bulb5, 120, 1
  981. SinglePrimitive bulb6, 120, 1
  982. SinglePrimitive bulb7, 120, 1
  983. GIString GIRightSling, 121
  984. SlimerLamp 122
  985. GIString GIEcto, 123
  986.  
  987. 'Flashers
  988. SingleLamp fl125, 125
  989. SingleLamp fl126, 126
  990.  
  991. SingleLamp fl127a, 127
  992. SingleLamp fl127b, 127
  993. SinglePrimitive fl127p, 127, 3
  994. SingleLamp fl128a, 128
  995. SingleLamp fl128b, 128
  996. SinglePrimitive fl128p, 128, 3
  997.  
  998. If LampState(127+81)>0 AND LampState(128+81)>0 Then HideLamp True
  999. If LampState(127+81)=0 OR LampState(128+81)=0 Then HideLamp False
  1000.  
  1001. SingleLamp Fl129, 129
  1002. SingleLamp Fl129a, 129
  1003. SingleLamp Fl129b, 129
  1004. SingleLamp Fl129c, 129
  1005. SinglePrimitive fl129p, 129, 3
  1006.  
  1007. SingleLamp Fl130a, 130
  1008. SingleLamp Fl130b, 130
  1009.  
  1010. SingleLamp Fl131a, 131
  1011. SingleLamp Fl131b, 131
  1012.  
  1013. SingleLamp Fl132, 132
  1014.  
  1015. SingleLamp fl133b, 133
  1016. SingleLamp fl133a, 133
  1017. SingleLamp fl134b, 134
  1018. SingleLamp fl134a, 134
  1019.  
  1020. SingleLamp Fl136, 136
  1021. SingleLamp Fl136a, 136
  1022.  
  1023. SingleLamp Fl137, 137
  1024. SingleLamp Fl137a, 137
  1025.  
  1026. SingleLamp l138, 138
  1027. SingleLamp l138a, 138
  1028.  
  1029. SingleLamp l139, 139
  1030. SingleLamp l139a, 139
  1031. SingleLamp l139b, 139
  1032. SingleLamp l139c, 139
  1033.  
  1034. SingleLamp l140a, 140
  1035. SingleLamp l140b, 140
  1036. SingleLamp l141a, 141
  1037. SingleLamp l141b, 141
  1038. SingleLamp Fl142a, 142
  1039. SingleLamp Fl142b, 142
  1040. SinglePrimitive Fl142p, 142, 1
  1041. End Sub
  1042.  
  1043. Sub HideLamp (enabled)
  1044. Fl128a.visible=NOT enabled
  1045. End Sub
  1046.  
  1047. Sub SingleLamp(lampobj, id)
  1048. lampobj.IntensityScale = LampState(id + 81) / 255
  1049. End Sub
  1050.  
  1051. Sub SinglePrimitive(primobj, id, factor)
  1052. primobj.BlendDisableLighting = factor * (LampState(id + 81) / 255)
  1053. End Sub
  1054.  
  1055. Sub RGBLamp(object, AR, AG, AB) 'used for light objects
  1056. Dim r, g, bl
  1057. r = LampState(aR+81)
  1058. g = LampState(aG+81)
  1059. bl = LampState(aB+81)
  1060.  
  1061. Object.IntensityScale = (r+g+(bl*2)) / 500
  1062. Object.ColorFull = RGB(r, g, bl)
  1063. Object.Color = RGB(r, g, bl)
  1064. end Sub
  1065.  
  1066. Sub RGBLampR(object, aR, aG, aB) 'used for flasher objects
  1067. Dim r, g, bl
  1068. r = LampState(aR+81)
  1069. g = LampState(aG+81)
  1070. bl = LampState(aB+81)
  1071. Object.IntensityScale = (r+g+(bl*2)) / 1000
  1072. Object.Color = RGB(r, g, bl)
  1073. end Sub
  1074.  
  1075. Sub SlimerLamp(id)
  1076. dim intensity:intensity = LampState(id + 81) / 255
  1077. slimer.blenddisablelighting = intensity
  1078. slimerlight.IntensityScale = intensity
  1079. slimerlighta.IntensityScale = intensity
  1080. MaterialColor "Slimer", RGB(128+127*intensity,148+107*intensity, 128+127*intensity)
  1081. end sub
  1082.  
  1083. Sub StayPuftColor(AR, AG, AB)
  1084. Dim r, g, bl, comp
  1085. r = LampState(aR+81)*1.4 / 2
  1086. g = LampState(aG+81)*1.4 / 2
  1087. bl = LampState(aB+81) *1.4 / 2
  1088. staypuft.blenddisablelighting = (r+g+(bl*2)) / 1000
  1089. comp = (r+g+bl) / 4 ' Boost contrast to make colors more intense as light gets brighter.
  1090. MaterialColor "Staypuft", RGB(r+128-comp,g+128-comp, bl+128-comp)
  1091. End Sub
  1092.  
  1093. Sub GIString(Coll, id)
  1094. dim Intensity:Intensity = LampState(id + 81)
  1095. dim Obj
  1096. for each obj in Coll
  1097. obj.IntensityScale = intensity / 255
  1098. Next
  1099. End Sub
  1100.  
  1101. Sub CabinetSide (id)
  1102. dim Intensity:Intensity = LampState(id + 81)/255
  1103. MaterialColor "CabSides", RGB (255 * Intensity, 255 * Intensity, 255 * Intensity)
  1104. End Sub
  1105.  
  1106. ' *********************************************************************
  1107. ' Supporting Ball & Sound Functions
  1108. ' *********************************************************************
  1109.  
  1110. Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed
  1111. Vol = Csng(BallVel(ball) ^2 / 2000)
  1112. End Function
  1113.  
  1114. Function Pan(ball) ' Calculates the pan for a ball based on the X position on the table. "table1" is the name of the table
  1115. Dim tmp
  1116. tmp = ball.x * 2 / table1.width-1
  1117. If tmp > 0 Then
  1118. Pan = Csng(tmp ^10)
  1119. Else
  1120. Pan = Csng(-((- tmp) ^10) )
  1121. End If
  1122. End Function
  1123.  
  1124. function AudioFade(ball)
  1125. Dim tmp
  1126. tmp = ball.y * 2 / Table1.height-1
  1127. If tmp > 0 Then
  1128. AudioFade = Csng(tmp ^10)
  1129. Else
  1130. AudioFade = Csng(-((- tmp) ^10) )
  1131. End If
  1132. End Function
  1133.  
  1134. Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed
  1135. Pitch = BallVel(ball) * 20
  1136. End Function
  1137.  
  1138. Function BallVel(ball) 'Calculates the ball speed
  1139. BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) )
  1140. End Function
  1141.  
  1142. 'Set position as table object (Use object or light but NOT wall) and Vol to 1
  1143. Sub PlaySoundAt(sound, tableobj)
  1144. PlaySound sound, 1, 1, Pan(tableobj), 0,0,0, 1, AudioFade(tableobj)
  1145. End Sub
  1146.  
  1147. 'Set position as table object and Vol manually.
  1148. Sub PlaySoundAtVol(sound, tableobj, Vol)
  1149. PlaySound sound, 1, Vol, Pan(tableobj), 0, 0, 0, 1, AudioFade(tableobj)
  1150. End Sub
  1151.  
  1152. 'Set all as per ball position & speed, but Vol Multiplier may be used eg; PlaySoundAtBallVol "sound",3
  1153. Sub PlaySoundAtBallVol(sound, VolMult)
  1154. PlaySound sound, 0, Vol(ActiveBall) * VolMult, Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 1, AudioFade(ActiveBall)
  1155. End Sub
  1156.  
  1157. Sub PlayLoopSoundAtVol(sound, tableobj, Vol)
  1158. PlaySound sound, -1, Vol, Pan(tableobj), 0, 0, 1, 0, AudioFade(tableobj)
  1159. End Sub
  1160.  
  1161. 'Additional DOF sound vs toy/effect helpers:
  1162. Function SoundFX (Sound, Effect)
  1163. If ((Effect = 0 And B2SOn) Or DOFeffects(Effect)=1) Then
  1164. SoundFX = ""
  1165. Else
  1166. SoundFX = Sound
  1167. End If
  1168. End Function
  1169.  
  1170. Function SoundFXDOF (Sound, DOFevent, State, Effect)
  1171. If DOFeffects(Effect)=1 Then
  1172. SoundFXDOF = ""
  1173. DOF DOFevent, State
  1174. ElseIf DOFeffects(Effect)=2 Then
  1175. SoundFXDOF = Sound
  1176. DOF DOFevent, State
  1177. Else
  1178. SoundFXDOF = Sound
  1179. End If
  1180. End Function
  1181.  
  1182. Function SoundFXDOFALT (Sound, DOFevent, State, Effect)
  1183. If DOFeffects(Effect)=1 Then
  1184. SoundFXDOFALT = ""
  1185. DOFALT DOFevent, State
  1186. ElseIf DOFeffects(Effect)=2 Then
  1187. SoundFXDOFALT = Sound
  1188. DOFALT DOFevent, State
  1189. Else
  1190. SoundFXDOFALT = Sound
  1191. End If
  1192. End Function
  1193.  
  1194. Sub DOF(DOFevent, State)
  1195. If B2SOn Then
  1196. If State = 2 Then
  1197. Controller.B2SSetData DOFevent, 1:Controller.B2SSetData DOFevent, 0
  1198. Else
  1199. Controller.B2SSetData DOFevent, State
  1200. End If
  1201. End If
  1202. End Sub
  1203.  
  1204. Sub DOFALT(DOFevent, State)
  1205. If B2SOnALT Then
  1206. If State = 2 Then
  1207. B2SController.B2SSetData DOFevent, 1:B2SController.B2SSetData DOFevent, 0
  1208. Else
  1209. B2SController.B2SSetData DOFevent, State
  1210. End If
  1211. End If
  1212. End Sub
  1213.  
  1214. '*****************
  1215. ' Maths
  1216. '*****************
  1217.  
  1218. Const Pi = 3.1415927
  1219.  
  1220. Function dSin(degrees)
  1221. dsin = sin(degrees * Pi/180)
  1222. End Function
  1223.  
  1224. Function dCos(degrees)
  1225. dcos = cos(degrees * Pi/180)
  1226. End Function
  1227.  
  1228. Function dAtn(degrees)
  1229. dAtn = atn(degrees * Pi/180)
  1230. End Function
  1231.  
  1232. Function RndNum(min, max)
  1233. RndNum = Int(Rnd() * (max-min + 1) ) + min ' Sets a random number between min and max
  1234. End Function
  1235.  
  1236. ' *********************************************************************
  1237. ' Other Sound FX
  1238. ' *********************************************************************
  1239.  
  1240. Sub ShooterEnd_Hit:If ActiveBall.Z > 30 Then Me.TimerInterval=100:Me.TimerEnabled=1:End If:End Sub 'ball is flying
  1241. Sub ShooterEnd_Timer(): Me.TimerEnabled=0 : PlaySoundAt "fx_BallDrop", ShooterEnd: End Sub
  1242.  
  1243. Sub LREnter_Hit():If ActiveBall.VelY < 0 Then PlaySoundAtVol "fx_lrenter", LREnter, 0.5:End If:End Sub 'ball is going up
  1244. Sub LREnter_UnHit():If ActiveBall.VelY > 0 Then StopSound "fx_lrenter":End If:End Sub 'ball is going down
  1245. Sub LREnter1_Hit(): PlaySoundAtVol "fx_lrturn",LREnter1, 0.5:End Sub
  1246. Sub LWREnter_hit: PlaysoundAt "fx_wireramp_enter", ActiveBall:End Sub
  1247. Sub LWREnter1_hit: PlaysoundAt "fx_lrbump", ActiveBall:End Sub
  1248. Sub LWRExit_hit:StopSound "Subway_enter":PlaysoundAt "Subway_exit",LWRExit:End Sub
  1249.  
  1250. Sub RREnter_Hit():If ActiveBall.VelY < 0 Then PlaySoundAt "fx_rrenter1",ActiveBall:End If:End Sub 'ball is going up
  1251. Sub RREnter_UnHit():If ActiveBall.VelY > 0 Then StopSound "fx_rrenter1":End If:End Sub 'ball is going down
  1252. Sub RREnter1_hit: PlaySoundAt "fx_rrenter2", RREnter1 : End Sub
  1253. Sub RWREnter_hit:PlaysoundAt "fx_wireramp_enter", ActiveBall:End Sub
  1254. Sub RWREnter1_hit: PlaysoundAt "fx_lrbump", ActiveBall:End Sub
  1255. Sub RWRExit_hit:StopSound"fx_wireramp_enter":PlaysoundAt "fx_wireramp_exit", ActiveBall:Me.TimerInterval=200:Me.TimerEnabled=1:End Sub
  1256. Sub RWRExit_timer:Me.TimerEnabled=0:PlaysoundAt "fx_BallDrop",RWRExit:End Sub
  1257.  
  1258. Sub OnBallBallCollision(ball1, ball2, velocity)
  1259. PlaySound "fx_collide", 0, Csng(velocity) ^2 / 500, Pan(ball1), 0, Pitch(ball1), 0, 0, AudioFade(ball1)
  1260. End Sub
  1261.  
  1262. Sub LeftFlipper_Collide(parm)
  1263. RandomSoundFlipper
  1264. End Sub
  1265.  
  1266. Sub Rightflipper_Collide(parm)
  1267. RandomSoundFlipper
  1268. End Sub
  1269.  
  1270. Sub Pins_Hit(idx)
  1271. RandomSoundRubber()
  1272. End Sub
  1273.  
  1274. Sub Posts_Hit(idx)
  1275. RandomSoundRubber()
  1276. End Sub
  1277.  
  1278. Sub Rubbers_Hit(idx)
  1279. RandomSoundRubber()
  1280. End Sub
  1281.  
  1282. Sub Gates_Hit(idx)
  1283. PlaySoundAtBallVol "gate4",1
  1284. End Sub
  1285.  
  1286. Sub RandomSoundRubber()
  1287. Select Case RndNum(1,3)
  1288. Case 1 : PlaySoundAtBallVol "fx_rubber_hit_1",10
  1289. Case 2 : PlaySoundAtBallVol "fx_rubber_hit_2",10
  1290. Case 3 : PlaySoundAtBallVol "fx_rubber_hit_3",10
  1291. End Select
  1292. End Sub
  1293.  
  1294. Sub RandomSoundFlipper()
  1295. Select Case RndNum(1,3)
  1296. Case 1 : PlaySoundAtBallVol "fx_flip_hit_1", 20
  1297. Case 2 : PlaySoundAtBallVol "fx_flip_hit_2", 20
  1298. Case 3 : PlaySoundAtBallVol "fx_flip_hit_3", 20
  1299. End Select
  1300. End Sub
  1301.  
  1302. 'Helpers
  1303. Sub LoopL_Hit : If Activeball.VelY>20 Then Activeball.VelY=18 : End If : End Sub
  1304.  
  1305. ' *********************************************************************
  1306. ' REALTIME UPDATES
  1307. ' *********************************************************************
  1308.  
  1309. Sub GameTimer_Timer
  1310. RollingSoundUpdate
  1311. BallShadowUpdate
  1312. LeftFlipperP.ObjRotZ = LeftFlipper.currentangle
  1313. RightFlipperp.ObjRotZ = RightFlipper.currentangle
  1314. FlipperLSh.RotZ = LeftFlipper.currentangle
  1315. FlipperRSh.RotZ = RightFlipper.currentangle
  1316. sw35p.RotX = -sw35.currentangle
  1317. LeftGate.RotY = Gate1.currentangle
  1318. RightGate.RotY = Gate2.currentangle
  1319. Primitive71.RotX = -Gate3.currentangle
  1320. Primitive69.RotX = -Gate4.currentangle
  1321. Primitive68.RotX = -Gate5.currentangle
  1322. End Sub
  1323.  
  1324. Const tnob = 13 ' total number of balls : 6 (trough) + 6 (Captive Ball) + 1(FakeBall)
  1325. Const fakeballs = 7 ' number of balls created on table start (rolling sound and ballshadow will be skipped)
  1326. ReDim rolling(tnob-fakeballs-1)
  1327. ReDim BallShadow(tnob-fakeballs-1)
  1328.  
  1329. InitRolling:InitBallShadow
  1330.  
  1331. Sub InitRolling
  1332. Dim i
  1333. For i=0 to tnob-fakeballs-1
  1334. rolling(i) = False
  1335. Next
  1336. End Sub
  1337.  
  1338. Sub InitBallShadow
  1339. Dim i
  1340. For i=0 to tnob-fakeballs-1
  1341. ExecuteGlobal "Set BallShadow(" & i & ")=BallShadow" & (i+1) & ":"
  1342. Next
  1343. End Sub
  1344.  
  1345. ' ************************ROLLING SOUND************************
  1346. Sub RollingSoundUpdate()
  1347. Dim BOT, b
  1348. BOT = GetBalls
  1349. ' stop the sound of deleted balls
  1350. If UBound(BOT)<(tnob - 1) Then
  1351. For b = (UBound(BOT) + 1) to (tnob-1)
  1352. rolling(b-fakeballs) = False
  1353. StopSound("fx_ballrolling" & b-fakeballs)
  1354. Next
  1355. End If
  1356. ' exit the Sub if no balls on the table
  1357. If UBound(BOT) = fakeballs-1 Then Exit Sub
  1358. ' play the rolling sound for each ball
  1359. For b = fakeballs to UBound(BOT)
  1360. If BallVel(BOT(b) ) > 1 AND BOT(b).z < 30 Then
  1361. rolling(b-fakeballs) = True
  1362. PlaySound("fx_ballrolling" & b-fakeballs), -1, Vol(BOT(b) )*0.25, Pan(BOT(b) ), 0, Pitch(BOT(b) ), 1, 0, AudioFade(BOT(b) )
  1363. Else
  1364. If rolling(b-fakeballs) = True Then
  1365. StopSound("fx_ballrolling" & b-fakeballs)
  1366. rolling(b-fakeballs) = False
  1367. End If
  1368. End If
  1369. Next
  1370. End Sub
  1371.  
  1372. ' **********************BALL SHADOW**********************
  1373. Sub BallShadowUpdate()
  1374. Dim BOT, b
  1375. BOT = GetBalls
  1376. ' hide shadow of deleted balls
  1377. If UBound(BOT)<(tnob-1) Then
  1378. For b = (UBound(BOT) + 1) to (tnob-1)
  1379. BallShadow(b-fakeballs).visible = 0
  1380. Next
  1381. End If
  1382. ' exit the Sub if no balls on the table
  1383. If UBound(BOT) = fakeballs-1 Then Exit Sub
  1384. ' render the shadow for each ball
  1385. For b = fakeballs to UBound(BOT)
  1386. If BOT(b).X < Table1.Width/2 Then
  1387. BallShadow(b-fakeballs).X = ((BOT(b).X) - (Ballsize/6) + ((BOT(b).X - (Table1.Width/2))/10)) + 10
  1388. Else
  1389. BallShadow(b-fakeballs).X = ((BOT(b).X) + (Ballsize/6) + ((BOT(b).X - (Table1.Width/2))/10)) - 10
  1390. End If
  1391. BallShadow(b-fakeballs).Y = BOT(b).Y + 20
  1392. If BOT(b).Z > 20 Then
  1393. BallShadow(b-fakeballs).visible = 1
  1394. Else
  1395. BallShadow(b-fakeballs).visible = 0
  1396. End If
  1397. Next
  1398. End Sub
  1399.  
  1400. '#############################################################
  1401. '#############################################################
  1402. '############### VPinSPA Controller loader ###################
  1403. '#############################################################
  1404. '#############################################################
  1405.  
  1406. Const directory = "HKEY_CURRENT_USER\SOFTWARE\Visual Pinball\Controller\"
  1407. Const DOFContactors = 1
  1408. Const DOFKnocker = 2
  1409. Const DOFChimes = 3
  1410. Const DOFBell = 4
  1411. Const DOFGear = 5
  1412. Const DOFShaker = 6
  1413. Const DOFFlippers = 7
  1414. Const DOFTargets = 8
  1415. Const DOFDropTargets = 9
  1416. Const DOFOff = 0
  1417. Const DOFOn = 1
  1418. Const DOFPulse = 2
  1419.  
  1420. Private Sub LoadCore
  1421. On Error Resume Next
  1422. If VPBuildVersion < 0 Or Err Then
  1423. Dim fso : Set fso = CreateObject("Scripting.FileSystemObject") : Err.Clear
  1424. ExecuteGlobal fso.OpenTextFile("core.vbs", 1).ReadAll : If Err Then MsgBox "Can't open ""core.vbs""" : Exit Sub
  1425. ExecuteGlobal fso.OpenTextFile("VPMKeys.vbs", 1).ReadAll : If Err Then MsgBox "Can't open ""vpmkeys.vbs""" : Exit Sub
  1426. Else
  1427. ExecuteGlobal GetTextFile("core.vbs") : If Err Then MsgBox "Can't open ""core.vbs""" : Exit Sub
  1428. ExecuteGlobal GetTextFile("VPMKeys.vbs") : If Err Then MsgBox "Can't open ""vpmkeys.vbs""" : Exit Sub
  1429. End If
  1430. End Sub
  1431.  
  1432. Sub LoadSPAController()
  1433. ' Adaptation of LoadController from Controller.vbs
  1434. Dim FileObj
  1435. Dim DOFConfig
  1436. Dim TextStr2
  1437. Dim tempC
  1438. Dim count
  1439. Dim ISDOF
  1440. Dim Answer
  1441.  
  1442. B2SOn = False
  1443. B2SOnALT = False
  1444. tempC = 0
  1445. on error resume next
  1446. Set objShell = CreateObject("WScript.Shell")
  1447. objShell.RegRead(directory & "ForceDisableB2S")
  1448. If Err.number <> 0 Then
  1449. PopupMessage = "This latest version of Controller.vbs stores its settings in the registry. To adjust the values, you must use VP 10.2 (or newer) and setup your configuration in the DOF section of the -Keys, Nudge and DOF- dialog of Visual Pinball."
  1450. objShell.RegWrite directory & "ForceDisableB2S",0, "REG_DWORD"
  1451. objShell.RegWrite directory & "DOFContactors",2, "REG_DWORD"
  1452. objShell.RegWrite directory & "DOFKnocker",2, "REG_DWORD"
  1453. objShell.RegWrite directory & "DOFChimes",2, "REG_DWORD"
  1454. objShell.RegWrite directory & "DOFBell",2, "REG_DWORD"
  1455. objShell.RegWrite directory & "DOFGear",2, "REG_DWORD"
  1456. objShell.RegWrite directory & "DOFShaker",2, "REG_DWORD"
  1457. objShell.RegWrite directory & "DOFFlippers",2, "REG_DWORD"
  1458. objShell.RegWrite directory & "DOFTargets",2, "REG_DWORD"
  1459. objShell.RegWrite directory & "DOFDropTargets",2, "REG_DWORD"
  1460. MsgBox PopupMessage
  1461. End If
  1462. tempC = objShell.RegRead(directory & "ForceDisableB2S")
  1463. DOFeffects(1)=objShell.RegRead(directory & "DOFContactors")
  1464. DOFeffects(2)=objShell.RegRead(directory & "DOFKnocker")
  1465. DOFeffects(3)=objShell.RegRead(directory & "DOFChimes")
  1466. DOFeffects(4)=objShell.RegRead(directory & "DOFBell")
  1467. DOFeffects(5)=objShell.RegRead(directory & "DOFGear")
  1468. DOFeffects(6)=objShell.RegRead(directory & "DOFShaker")
  1469. DOFeffects(7)=objShell.RegRead(directory & "DOFFlippers")
  1470. DOFeffects(8)=objShell.RegRead(directory & "DOFTargets")
  1471. DOFeffects(9)=objShell.RegRead(directory & "DOFDropTargets")
  1472. Set objShell = nothing
  1473.  
  1474. Set Controller = CreateObject("VPinSPA.Controller")
  1475. If Err Then MsgBox "Can't load SPA"
  1476. If tempC = 0 Then
  1477. On Error Resume Next
  1478. If Controller is Nothing Then
  1479. Err.Clear
  1480. Else
  1481. Set B2SController = CreateObject("B2S.Server")
  1482. If B2SController is Nothing Then
  1483. Err.Clear
  1484. Else
  1485. B2SController.B2SName = B2ScGameName
  1486. B2SController.Run()
  1487. On Error Goto 0
  1488. B2SOn = True
  1489. B2SOnALT = True
  1490. End If
  1491. End If
  1492. End If
  1493. End sub
Advertisement
Add Comment
Please, Sign In to add comment