Outhere

Escape From Monkey Island_1.0

Sep 29th, 2021 (edited)
482
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 251.26 KB | None | 0 0
  1. '' ****************************************************************
  2. ' VISUAL PINBALL X
  3. ' Escape from monkey island
  4. ' first version by ianski
  5. ' second version by Popotte
  6. ' vpx version by Shoopity and Remdwaas1986
  7. ' images and 3d objects provided by ianski, hauntfreaks, Shoopity and Remdwaas1986
  8. ' Version 1.0.0
  9. ' started 10-5-2021
  10. ' ****************************************************************
  11. '
  12. ' 0.001 - Sixtoe - Changed walls, plastics, sorted some layers out, tried to organised and wrap my head around table, changed some walls, images and materials so they're more visible, lots of messing around with positioning, script untouched.
  13. ' 0.002 - apophis - Converted all major flashers to Flupper flashers. Right now they do not blink like they did before.
  14. ' 0.003 - Sixtoe - more wall and layout clarification work, monkey head and skull primitives redone a little, fixed banana issue, changed textures for plastics (still can be placeholders, but work better)
  15. ' 0.004 - apophis - Added BlinkFlasher routine. The flupper flashers blink now.
  16. ' 0.005 - Sixtoe - Fixed broken ramp to poopdeck, tweaked ramps a little.
  17. ' 0.006 - remdwaas - Added the dive mode and added a different apron
  18. ' 0.007 - remdwaas - Adding tomate textured rocky objects
  19. ' 0.008 - Wylte - Added Dynamic Ball Shadows, added a -1 timer to run it, changed tnob to 10, deleted JP shadows
  20. ' 0.009 - Remdwaas - Added Multiball code/ music shoopity by compare function notepad++.finished dive modes,added grave mode,edited some walls.made the objects visible again.fixed the coins for b2s.
  21. ' 0.010 - Remdwaas - added lightsequence lechuck.Deleted textbox001.added water001.added sounds/dmd's.timer grog machine with on/off.fixed le chuck items.
  22. ' 0.011 - Remdwaas - after completing the bar modus treasure will be available. added Dainty Lady mode. added sword mastery. added multiball coin collection. added escape mode.
  23. ' 0.012 - Oqqsan - spinning wheel1
  24. ' 0.013 - Remdwaas - bugfixes, deleted the voodooball and added collecting magic eyes
  25.  
  26. '
  27.  
  28. 'DOF Some updating by Outhere
  29. '101 Left Flipper
  30. '102 Right Flipper
  31. '103 Left Slingshot
  32. '104
  33. '105 Right Slingshot
  34. '106
  35. '107 Bumper Left
  36. '108 Bumper Center
  37. '109 Bumper Right
  38. '110
  39. '111 Kicker003 TOP
  40. '112 Kicker004 RIGHT TOP
  41. '113 Kicker002 Left Righr
  42. '114 Kicker006 Left Lower
  43. '115 Shaker Spinner001
  44. '116 Shaker Center Monkey
  45. '117 Shaker Left Monkey
  46. '118 Shaker Right Monkey
  47. '119 Shaker 119,0 / 119,1
  48. '120 AutoPlunger
  49. '121
  50. '122 Knocker
  51. '123 Ball Release
  52. '124 Monkey3Hit
  53. '125 Credits
  54. '126 Monkey1Hit
  55. '127 GiOn / GiOff
  56. '128 Monkey2Hit
  57. '129 monkey Head Kick Out
  58. '130 Beacon
  59. '131 Bell chuck's Beard
  60. '132 tmurray Lower Left
  61. '133
  62. '134
  63. '135
  64. '136
  65. '137
  66. '138
  67. '139
  68. '140
  69. '141
  70. '142
  71. '143
  72. '144
  73. '145
  74. '146
  75. '147
  76. '149
  77. '150
  78. '152
  79. '153
  80. '154
  81. '155
  82.  
  83. Option Explicit
  84. Randomize
  85.  
  86. Const BallSize = 50 ' 50 is the normal size used in the core.vbs, VP kicker routines uses this value divided by 2
  87. Const BallMass = 1
  88. Const SongVolume = 0.1 ' 1 is full volume. Value is from 0 to 1
  89.  
  90. ' Load the core.vbs for supporting Subs and functions
  91. LoadCoreFiles
  92.  
  93. Sub LoadCoreFiles
  94. On Error Resume Next
  95. ExecuteGlobal GetTextFile("core.vbs")
  96. If Err Then MsgBox "Can't open core.vbs"
  97. ExecuteGlobal GetTextFile("controller.vbs")
  98. If Err Then MsgBox "Can't open controller.vbs"
  99. On Error Goto 0
  100. End Sub
  101.  
  102. '*******************************************
  103. ' User Options
  104. '*******************************************
  105.  
  106. '----- Shadow Options -----
  107. Const DynamicBallShadowsOn = 1 '0 = no dynamic ball shadow, 1 = enable dynamic ball shadow
  108.  
  109. Sub startB2S(aB2S)
  110. If B2SOn Then
  111. Controller.B2SSetData 1,0
  112. Controller.B2SSetData 2,0
  113. Controller.B2SSetData 3,0
  114. Controller.B2SSetData 4,0
  115. Controller.B2SSetData 5,0
  116. Controller.B2SSetData 6,0
  117. Controller.B2SSetData 7,0
  118. Controller.B2SSetData 8,0
  119. Controller.B2SSetData 9,0
  120. Controller.B2SSetData 10,0
  121. Controller.B2SSetData 11,0
  122. Controller.B2SSetData 20,0
  123. Controller.B2SSetData 21,0
  124. Controller.B2SSetData 22,0
  125. Controller.B2SSetData 23,0
  126. Controller.B2SSetData 24,0
  127. Controller.B2SSetData 25,0
  128. Controller.B2SSetData 26,0
  129. Controller.B2SSetData 27,0
  130. Controller.B2SSetData 28,0
  131. Controller.B2SSetData 29,0
  132. Controller.B2SSetData 30,0
  133. Controller.B2SSetData 31,0
  134. Controller.B2SSetData 32,0
  135. Controller.B2SSetData 33,0
  136. Controller.B2SSetData 34,0
  137. Controller.B2SSetData 35,0
  138. Controller.B2SSetData 36,0
  139. Controller.B2SSetData 37,0
  140. Controller.B2SSetData 38,0
  141. Controller.B2SSetData 39,0
  142. Controller.B2SSetData 40,0
  143. Controller.B2SSetData 41,0
  144. Controller.B2SSetData 42,0
  145. Controller.B2SSetData 43,0
  146. Controller.B2SSetData 44,0
  147. Controller.B2SSetData 45,0
  148. Controller.B2SSetData 46,0
  149. Controller.B2SSetData 47,0
  150. Controller.B2SSetData 48,0
  151. Controller.B2SSetData 49,0
  152. Controller.B2SSetData 50,0
  153. Controller.B2SSetData 51,0
  154. Controller.B2SSetData 52,0
  155. Controller.B2SSetData 53,0
  156. Controller.B2SSetData 54,0
  157. Controller.B2SSetData 55,0
  158. Controller.B2SSetData 56,0
  159. Controller.B2SSetData 57,0
  160. Controller.B2SSetData 58,0
  161. Controller.B2SSetData 59,0
  162. Controller.B2SSetData 60,0
  163. Controller.B2SSetData 61,0
  164. Controller.B2SSetData 62,0
  165. Controller.B2SSetData 63,0
  166. Controller.B2SSetData 64,0
  167. Controller.B2SSetData 65,0
  168. Controller.B2SSetData 66,0
  169. Controller.B2SSetData 67,0
  170. Controller.B2SSetData 68,0
  171. Controller.B2SSetData 69,0
  172. Controller.B2SSetData 70,0
  173. Controller.B2SSetData 71,0
  174. Controller.B2SSetData 72,0
  175. Controller.B2SSetData 73,0
  176. Controller.B2SSetData 74,0
  177. Controller.B2SSetData 75,0
  178. Controller.B2SSetData 76,0
  179. Controller.B2SSetData 77,0
  180. Controller.B2SSetData 78,0
  181. Controller.B2SSetData 79,0
  182. Controller.B2SSetData 80,0
  183. Controller.B2SSetData 81,0
  184. Controller.B2SSetData 82,0
  185. Controller.B2SSetData 83,0
  186. Controller.B2SSetData 84,0
  187. Controller.B2SSetData 85,0
  188. Controller.B2SSetData 86,0
  189. Controller.B2SSetData 87,0
  190. Controller.B2SSetData 88,0
  191. Controller.B2SSetData 89,0
  192. Controller.B2SSetData 90,0
  193. Controller.B2SSetData 91,0
  194. Controller.B2SSetData 92,0
  195. Controller.B2SSetData 93,0
  196. Controller.B2SSetData 94,0
  197. Controller.B2SSetData 95,0
  198. Controller.B2SSetData 96,0
  199. Controller.B2SSetData 97,0
  200. Controller.B2SSetData 98,0
  201. Controller.B2SSetData 99,0
  202. Controller.B2SSetData aB2S,1
  203. End If
  204. End Sub
  205.  
  206. ' Define any Constants
  207. Const cGameName = "monkeyisland"
  208. Const TableName = "monkeyisland"
  209. Const myVersion = "1.0.0"
  210. Const MaxPlayers = 4 ' from 1 to 4
  211. Const BallSaverTime = 20 ' in seconds
  212. Const MaxMultiplier = 3 ' limit to 3x in this game, both bonus multiplier and playfield multiplier
  213. Const BallsPerGame = 5 ' usually 3 or 5
  214. Const MaxMultiballs = 4 ' max number of balls during multiballs
  215.  
  216. Const Special1 = 1000000 ' High score to obtain an extra ball/game
  217. Const Special2 = 3000000
  218. Const Special3 = 5000000
  219.  
  220. ' Use FlexDMD if in FS mode
  221. Dim UseFlexDMD
  222. If Table1.ShowDT = True then
  223. UseFlexDMD = False
  224. Else
  225. UseFlexDMD = True
  226. End If
  227.  
  228. ' Define Global Variables
  229. Dim PlayersPlayingGame
  230. Dim CurrentPlayer
  231. Dim Credits
  232. Dim BonusPoints(4)
  233. Dim BonusMultiplier(4)
  234. Dim bBonusHeld
  235. Dim BallsRemaining(4)
  236. Dim CallApirate(4)
  237. Dim ExtraBallsAwards(4)
  238. Dim Special1Awarded(4)
  239. Dim Special2Awarded(4)
  240. Dim Special3Awarded(4)
  241. Dim Score(4)
  242. Dim HighScore(4)
  243. Dim HighScoreName(4)
  244. Dim Tilt
  245. Dim TiltSensitivity
  246. Dim Tilted
  247. Dim TotalGamesPlayed
  248. Dim bAttractMode
  249. Dim mBalls2Eject
  250. Dim bAutoPlunger
  251. Dim Insult
  252. Dim Status
  253.  
  254. ' Define Game Control Variables
  255. Dim BallsOnPlayfield
  256.  
  257. ' Define Game Flags
  258. Dim bFreePlay
  259. Dim bGameInPlay
  260. Dim bOnTheFirstBall
  261. Dim bBallInPlungerLane
  262. Dim bBallSaverActive
  263. Dim bBallSaverReady
  264. Dim bMultiBallMode
  265. 'Dim Multiball
  266. Dim bMusicOn
  267. Dim bJustStarted
  268. Dim bJackpot
  269. Dim plungerIM
  270. Dim LastSwitchHit
  271. dim countr
  272. dim countr1
  273. dim countr2
  274. dim countr3
  275. dim countr4
  276. dim countr5
  277. dim countr6
  278. dim countr41
  279. dim monkeybattle
  280. dim treasuresfound
  281. dim PFMultiplier
  282. dim baropen
  283. dim barunlocked
  284. dim voodoounlocked
  285. dim quest
  286. dim mode1TimerCount
  287. dim mode2TimerCount
  288. dim bonustime
  289. dim LowerFlippersActive
  290. dim bananasearned
  291. dim coinsearned
  292. dim treasurfindy
  293. dim imagechest
  294. Dim bumperHits
  295. Dim RovingMagnet
  296. dim greatdive
  297. dim gravediggers
  298. dim playtreasure
  299. dim escapeMI
  300. dim trytoescape
  301. dim findcrewDL
  302. dim LvLSwordM
  303. dim monkeykeepball
  304.  
  305. ' core.vbs variables
  306. Dim BSBarToBar, BSVoodooToVoodoo, BSLeChuck, BSTreasure
  307. ReDim MyTroughLR(-1), MyTroughTreasure(-1), MyTroughLeChuck(-1)
  308.  
  309. ' *********************************************************************
  310. ' Visual Pinball Defined Script Events
  311. ' *********************************************************************
  312.  
  313. Sub Table1_Init()
  314. LoadEM
  315. Dim i
  316. 'Randomize
  317.  
  318. 'reset HighScore
  319. 'Reseths
  320.  
  321. 'Impulse Plunger as autoplunger
  322. Const IMPowerSetting = 36 ' Plunger Power
  323. Const IMTime = 1.1 ' Time in seconds for Full Plunge
  324. Set plungerIM = New cvpmImpulseP
  325. With plungerIM
  326. .InitImpulseP swplunger, IMPowerSetting, IMTime
  327. .Random 1.5
  328. .InitExitSnd SoundFXDOF("fx_kicker", 141, DOFPulse, DOFContactors), SoundFXDOF("fx_solenoid", 141, DOFPulse, DOFContactors)
  329. .CreateEvents "plungerIM"
  330. End With
  331. ' Misc. VP table objects Initialisation, droptargets, animations...
  332. VPObjects_Init
  333. ' load saved values, highscore, names, jackpot
  334. Loadhs
  335. 'Init main variables
  336. For i = 1 To MaxPlayers
  337. Score(i) = 0
  338. BonusPoints(i) = 0
  339. BonusMultiplier(i) = 1
  340. BallsRemaining(i) = BallsPerGame
  341. ExtraBallsAwards(i) = 0
  342. Next
  343. ' Initalise the DMD display
  344. DMD_Init
  345. ' freeplay or coins
  346. bFreePlay = False 'we want coins
  347. 'if bFreePlay = false Then DOF 125, DOFOn
  348. ' Init main variables and any other flags
  349. bAttractMode = False
  350. bOnTheFirstBall = False
  351. bBallInPlungerLane = False
  352. bBallSaverActive = False
  353. bBallSaverReady = False
  354. bGameInPlay = False
  355. bMusicOn = True
  356. BallsOnPlayfield = 0
  357. bMultiBallMode = False
  358. 'Multiball=false
  359. bAutoPlunger = False
  360. LastSwitchHit = ""
  361. Tilt = 0
  362. TiltSensitivity = 6
  363. Tilted = False
  364. bJustStarted = True
  365. ' set any lights for the attract mode
  366. GiOff
  367. StartAttractMode
  368. 'EndOfGame()
  369. Status = "Normal"
  370. 'Initialize the magic dust
  371. ' MagicDustOff()
  372. ' FLMagic001.IntensityScale = 1
  373. ' FLMagic002.IntensityScale = 0.95
  374. ' FLMagic003.IntensityScale = 0.90
  375. ' FLMagic004.IntensityScale = 0.85
  376. ' FLMagic005.IntensityScale = 0.80
  377. ' FLMagic006.IntensityScale = 0.75
  378. ' FLMagic007.IntensityScale = 0.70
  379. ' FLMagic008.IntensityScale = 0.65
  380. ' FLMagic009.IntensityScale = 0.60
  381. ' FLMagic010.IntensityScale = 0.55
  382. ' FLMagic011.IntensityScale = 0.5
  383. ' FLMagic012.IntensityScale = 0.45
  384. ' FLMagic013.IntensityScale = 0.4
  385. ' FLMagic014.IntensityScale = 0.35
  386. ' FLMagic015.IntensityScale = 0.3
  387. ' FLMagic016.IntensityScale = 0.25
  388. ' FLMagic017.IntensityScale = 0.2
  389. ' FLMagic018.IntensityScale = 0.15
  390. ' FLMagic019.IntensityScale = 0.1
  391. ' FLMagic020.IntensityScale = 0.05
  392. ' 'Voodoo magnet stuff
  393. ' Set RovingMagnet = New cvpmMagnet
  394. ' With RovingMagnet
  395. ' .InitMagnet TrMagnet, 3
  396. ' .X = Kicker002.X
  397. ' .Y = Kicker002.Y
  398. ' .Size = 75
  399. ' .GrabCenter = 0
  400. ' End With
  401. PirateShipTimer.Interval = 20
  402. Set BSBarToBar = New cvpmSaucer
  403. Set BSVoodooToVoodoo = New cvpmSaucer
  404. Set BSLeChuck = New cvpmSaucer
  405. Set BSTreasure = New cvpmSaucer
  406. With BSBarToBar
  407. .InitKicker Kicker006, 0, 160, 7, 0
  408. .InitSounds "fx_hole_enter", "fx_kicker", "fx_kicker"
  409. End With
  410. With BSVoodooToVoodoo
  411. .InitKicker Kicker005, 0, 190, 7, 0
  412. .InitSounds "fx_hole_enter", "fx_kicker", "fx_kicker"
  413. End With
  414. With BSLeChuck
  415. .InitKicker Kicker003, 0, 160, 7, 0
  416. .InitSounds "fx_hole_enter", "fx_kicker", "fx_kicker"
  417. End With
  418. With BSTreasure
  419. .InitKicker Kicker007, 0, 8, 38, 0
  420. .InitSounds "fx_hole_enter", "fx_kicker", "fx_kicker"
  421. End With
  422. schatkist001.Visible=1
  423. FlShipShadow.X = PirateShip.X
  424. FlShipShadow.Y = PirateShip.Y
  425. PrMonkeyHead.X = 615 '615, 440
  426. PrMonkeyHead.Y = 506 '506, 1440
  427. PrMonkeyMouth.X = 615 '615, 440
  428. PrMonkeyMouth.Y = 574 '574, 1508
  429. Wall020.TimerInterval = 1
  430. Wall014.TimerInterval = 1
  431. Wall015.TimerInterval = 1
  432. End Sub
  433.  
  434. '****************************************
  435. ' Real Time updatess using the GameTimer
  436. '****************************************
  437. 'used for all the real time updates
  438. Dim Monkey1Frame, Monkey1HitRepeat, Repeat1, FrameNext1, FrameRate1b, FrameRate1c
  439. 'Starting Frame
  440. Monkey1Frame = 1
  441. 'How many times HAVE we repeated the angry animation
  442. Monkey1HitRepeat = 0
  443. 'How many times TO repeat the angry animation
  444. Repeat1 = 1
  445. 'Speed of idle animation
  446. FrameRate1c = 0.005
  447. 'Speed of Angry Animation
  448. FrameRate1b = 0.05
  449. 'Speed of init Animation
  450. FrameNext1 = FrameRate1c
  451.  
  452. Dim Monkey2Frame, Monkey2HitRepeat, Repeat2, FrameNext2, FrameRate2b, FrameRate2c
  453. Monkey2Frame = 4
  454. Monkey2HitRepeat = 0
  455. Repeat2 = 1
  456. FrameRate2c = 0.005
  457. FrameRate2b = 0.05
  458. FrameNext2 = FrameRate2c
  459.  
  460. Dim Monkey3Frame, Monkey3HitRepeat, Repeat3, FrameNext3, FrameRate3b, FrameRate3c
  461. Monkey3Frame = 7
  462. Monkey3HitRepeat = 0
  463. Repeat3 = 1
  464. FrameRate3c = 0.005
  465. FrameRate3b = 0.05
  466. FrameNext3 = FrameRate3c
  467.  
  468. '*********
  469. ' Framerate Timer for Dynamic Shadows (and more?)
  470.  
  471. Sub FrameTimer_Timer
  472. If DynamicBallShadowsOn=1 Then DynamicBSUpdate 'update ball shadows
  473. End Sub
  474. '*********
  475.  
  476. Dim PullBack:PullBack = 0
  477. Sub GameTimer_Timer
  478. Dim X, Y, tmpBall
  479. RollingUpdate
  480. If DynamicBallShadowsOn=1 Then DynamicBSUpdate 'update ball shadows
  481. ' add any other real time update subs, like gates or diverters
  482. FlipperLSh.Rotz = LeftFlipper.CurrentAngle
  483. FlipperRSh.Rotz = RightFlipper.CurrentAngle
  484. 'Rotate, raise, and dim the magic dust
  485. ' For Each X in MagicDust
  486. ' X.RotZ = X.RotZ + 1
  487. ' X.Height = X.Height + 0.75
  488. ' X.IntensityScale = X.IntensityScale - 0.01
  489. ' 'If it's gone invisible, then send it back down to the bottom of the stack and set it totally visable
  490. ' If X.IntensityScale <= 0 Then
  491. ' X.Height = 25
  492. '' X.IntensityScale = 1
  493. ' End If
  494. ' Next
  495. 'If we're in voodoo magic mode...
  496. ' If Status = "Magic" Then
  497. ' tmpBall = GetBalls
  498. ' For Each X in MagicDust
  499. 'If the dust is at the bottom of the stack, then put it at wherever the ball is
  500. ' If X.Height = 25 Then
  501. ' For Each Y in tmpBall
  502. ' If Y.ID = 666 Then
  503. ' X.X = Y.X
  504. ' X.Y = Y.Y
  505. ' X.Height = Y.Z
  506. ' End If
  507. ' Next
  508. '' End If
  509. ' Next
  510. ' End If
  511.  
  512. 'Monkey Animations
  513. 'Center Monkey
  514. 'Show the current frame of animation
  515. Monkey1.ShowFrame(Monkey1Frame)
  516. 'Go to the next frame of animation (including VPX interpolated frames)
  517. Monkey1Frame = Monkey1Frame + FrameNext1
  518. 'Idle animation or angry animation
  519. Select Case Monkey1Hit
  520. 'Idle
  521. Case 0
  522. 'If we've reached the end or beginning of the animation...
  523. If Monkey1Frame > 9 OR Monkey1Frame < 1 Then
  524. 'Change the direction of the frame step
  525. FrameNext1 = FrameNext1 * -1
  526. end if
  527. 'Angry
  528. Case 1
  529. DOF 116, DOFPulse
  530. 'If we've reached the end, then flip directions
  531. If Monkey1Frame > 19 Then FrameNext1 = FrameNext1 * -1
  532. 'If we've reached the beginning...
  533. If Monkey1Frame < 11 Then
  534. 'increment repeat count...
  535. Monkey1HitRepeat = Monkey1HitRepeat + 1
  536. 'and flip directions
  537. FrameNext1 = FrameNext1 * -1
  538. end if
  539. 'If we've repeated the desired amount...
  540. If Monkey1HitRepeat > Repeat1 Then
  541. 'Reset the speed
  542. FrameNext1 = FrameRate1c
  543. 'Reset to the first frame
  544. Monkey1Frame = 1
  545. 'Back to idle
  546. Monkey1Hit = 0
  547. 'Reset Repeat amount for the next time it gets hit
  548. Monkey1HitRepeat = 0
  549. End If
  550. End Select
  551. 'Right Monkey
  552. Monkey2.ShowFrame(Monkey2Frame)
  553. Monkey2Frame = Monkey2Frame + FrameNext2
  554. Select Case Monkey2Hit
  555. Case 0
  556. If Monkey2Frame > 9 OR Monkey2Frame < 1 Then
  557. FrameNext2 = FrameNext2 * -1
  558. end if
  559. Case 1
  560. DOF 118, DOFPulse
  561. If Monkey2Frame > 19 Then FrameNext2 = FrameNext2 * -1
  562. If Monkey2Frame < 11 Then
  563. Monkey2HitRepeat = Monkey2HitRepeat + 1
  564. FrameNext2 = FrameNext2 * -1
  565. end if
  566. If Monkey2HitRepeat > Repeat2 Then
  567. FrameNext2 = FrameRate2c
  568. Monkey2Frame = 1
  569. Monkey2Hit = 0
  570. Monkey2HitRepeat = 0
  571. End If
  572. End Select
  573. 'Left Monkey
  574. Monkey3.ShowFrame(Monkey3Frame)
  575. Monkey3Frame = Monkey3Frame + FrameNext3
  576. Select Case Monkey3Hit
  577. Case 0
  578. If Monkey3Frame > 9 OR Monkey3Frame < 1 Then
  579. FrameNext3 = FrameNext3 * -1
  580. end if
  581. Case 1
  582. DOF 117, DOFPulse
  583. If Monkey3Frame > 19 Then FrameNext3 = FrameNext3 * -1
  584. If Monkey3Frame < 11 Then
  585. Monkey3HitRepeat = Monkey3HitRepeat + 1
  586. FrameNext3 = FrameNext3 * -1
  587. end if
  588. If Monkey3HitRepeat > Repeat3 Then
  589. FrameNext3 = FrameRate3c
  590. Monkey3Frame = 1
  591. Monkey3Hit = 0
  592. Monkey3HitRepeat = 0
  593. End If
  594. End Select
  595. 'Match the Kanon position to the plunger position
  596. kanon.TransX = Plunger.Position
  597. ' If (ShipAngle > 160 AND ShipAngle < 200) OR (ShipAngle > 520 AND ShipAngle < 560) OR (ShipAngle > 880 AND ShipAngle < 920) OR (ShipAngle > 1240 AND ShipAngle < 1280) Then
  598. ' TextBox001.Text = "NOW!!"
  599. ' Else
  600. ' TextBox001.Text = "wait"
  601. ' end If
  602. ' TextBox001.Text = BallsOnPlayfield
  603. ' TextBox001.Text = PrMonkeyHead.RotZ & ", " & HeadTarget
  604. End Sub
  605.  
  606. '******
  607. ' Keys
  608. '******
  609.  
  610. Sub Table1_KeyDown(ByVal Keycode)
  611.  
  612.  
  613. If Keycode = AddCreditKey Then
  614. Credits = Credits + 1
  615. if bFreePlay = False Then
  616. DOF 125, DOFOn
  617. If(Tilted = False) Then
  618. DMDFlush
  619. DMD "_", CL(1, "CREDITS: " & Credits), "", eNone, eNone, eNone, 500, True, "fx_coin"
  620. End If
  621. End If
  622. End If
  623. If keycode = PlungerKey Then
  624. Plunger.Pullback
  625. Playsound "plungerpull2"
  626. 'PlaySoundAt "fx_plungerpull", plunger
  627. 'PlaySoundAt "fx_reload", plunger
  628. End If
  629. If hsbModeActive Then
  630. EnterHighScoreKey(keycode)
  631. Exit Sub
  632. End If
  633. ' Normal flipper action
  634. If bGameInPlay AND NOT Tilted Then
  635. If keycode = LeftTiltKey Then
  636. Nudge 90, 8
  637. PlaySound "fx_nudge", 0, 1, -0.1, 0.25
  638. CheckTilt()
  639. End If
  640. If keycode = RightTiltKey Then
  641. Nudge 270, 8
  642. PlaySound "fx_nudge", 0, 1, 0.1, 0.25
  643. CheckTilt()
  644. End If
  645. If keycode = CenterTiltKey Then Nudge 0, 9:PlaySound "fx_nudge", 0, 1, 1, 0.25:CheckTilt
  646. If keycode = StartGameKey Then
  647. If((PlayersPlayingGame <MaxPlayers) AND(bOnTheFirstBall = True) ) Then
  648. If(bFreePlay = True) Then
  649. PlayersPlayingGame = PlayersPlayingGame + 1
  650. TotalGamesPlayed = TotalGamesPlayed + 1
  651. DMD "_", CL(1, PlayersPlayingGame & " PLAYERS"), "", eNone, eBlink, eNone, 500, True, "so_fanfare1"
  652. ' playsound "start"
  653. Else
  654. If(Credits> 0) then
  655. PlayersPlayingGame = PlayersPlayingGame + 1
  656. TotalGamesPlayed = TotalGamesPlayed + 1
  657. Credits = Credits - 1
  658. DMD "_", CL(1, PlayersPlayingGame & " PLAYERS"), "", eNone, eBlink, eNone, 500, True, "so_fanfare1"
  659. ' playsound "start"
  660. If Credits <1 And bFreePlay = False Then DOF 125, DOFOff
  661. Else
  662. ' Not Enough Credits to start a game.
  663. DMD CL(0, "CREDITS " & Credits), CL(1, "INSERT COIN"), "", eNone, eBlink, eNone, 500, True, "so_nocredits"
  664. playsound "nomoney"
  665. End If
  666. End If
  667. End If
  668. End If
  669. If keycode = LeftFlipperKey Then
  670. SolLFlipper 1
  671. End If
  672. If keycode = RightFlipperKey Then
  673. SolRFlipper 1
  674. End If
  675. Else ' If (GameInPlay)
  676. If keycode = StartGameKey Then
  677. If(bFreePlay = True) Then
  678. If(BallsOnPlayfield = 0) Then
  679. ResetForNewGame()
  680. UpdateMusicNow()
  681. End If
  682. Else
  683. If(Credits> 0) Then
  684. If(BallsOnPlayfield = 0) Then
  685. Credits = Credits - 1
  686. If Credits <1 And bFreePlay = False Then DOF 125, DOFOff
  687. playsound "start"
  688. ResetForNewGame()
  689. UpdateMusicNow()
  690.  
  691. End If
  692. Else
  693. ' Not Enough Credits to start a game.
  694. DMD CL(0, "CREDITS " & Credits), CL(1, "INSERT COIN"), "", eNone, eBlink, eNone, 500, True, "so_nocredits"
  695. playsound "nomoney"
  696. End If
  697. End If
  698. End If
  699. End If ' If (GameInPlay)
  700. End Sub
  701.  
  702. Sub Table1_KeyUp(ByVal keycode)
  703. If keycode = PlungerKey Then
  704. Plunger.Fire
  705. End If
  706. If hsbModeActive Then
  707. Exit Sub
  708. End If
  709. ' Table specific
  710. If bGameInPLay AND NOT Tilted Then
  711. If keycode = LeftFlipperKey Then
  712. Select Case Status
  713. Case "Treasure"
  714. PlaySound "fx_flipperup", 0, 1, 0, 0.25
  715. LeftFlipper001.RotatetoStart
  716. Case Else
  717. SolLFlipper 0
  718. End Select
  719. End If
  720. If keycode = RightFlipperKey Then
  721. Select Case Status
  722. Case "Treasure"
  723. PlaySound "fx_flipperup", 0, 1, 0, 0.25
  724. RightFlipper001.RotatetoStart
  725. Case Else
  726. SolRFlipper 0
  727. End Select
  728. End If
  729. End If
  730. End Sub
  731.  
  732. '*************
  733. ' Pause Table
  734. '*************
  735.  
  736. Sub table1_Paused
  737. End Sub
  738.  
  739. Sub table1_unPaused
  740. End Sub
  741.  
  742. Sub Table1_Exit
  743. Savehs
  744. If B2SOn = true Then Controller.Stop
  745. End Sub
  746.  
  747. '********************
  748. ' Flippers
  749. '********************
  750.  
  751. Sub SolLFlipper(Enabled)
  752. ' MoveMouth 1, 1
  753. Select Case Status
  754. Case "Spitting"
  755. SpitProcessKey(LeftFlipperKey)
  756. Case "Treasure"
  757. PlaySound "fx_flipperup", 0, 1, 0, 0.25
  758. LeftFlipper001.RotateToEnd
  759. Case Else
  760. If Enabled Then
  761. PlaySoundAt SoundFXDOF("fx_flipperup", 101, DOFOn, DOFFlippers), LeftFlipper
  762. LeftFlipper.RotateToEnd
  763. RotateLaneLightsLeft()
  764. Else
  765. PlaySoundAt SoundFXDOF("fx_flipperdown", 101, DOFOff, DOFFlippers), LeftFlipper
  766. LeftFlipper.RotateToStart
  767. End If
  768. End Select
  769. End Sub
  770.  
  771. Sub SolRFlipper(Enabled)
  772. ' MoveMouth 0, 1
  773. Select Case Status
  774. Case "Spitting"
  775. SpitProcessKey(RightFlipperKey)
  776. Case "Treasure"
  777. PlaySound "fx_flipperup", 0, 1, 0, 0.25
  778. RightFlipper001.RotateToEnd
  779. Case Else
  780. If Enabled Then
  781. PlaySoundAt SoundFXDOF("fx_flipperup", 102, DOFOn, DOFFlippers), RightFlipper
  782. RightFlipper.RotateToEnd
  783. RotateLaneLightsRight()
  784. Else
  785. PlaySoundAt SoundFXDOF("fx_flipperdown", 102, DOFOff, DOFFlippers), RightFlipper
  786. RightFlipper.RotateToStart
  787. End If
  788. End Select
  789. End Sub
  790.  
  791. ' flippers hit Sound
  792.  
  793. Sub LeftFlipper_Collide(parm)
  794. PlaySound "fx_rubber_flipper", 0, parm / 10, pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall)
  795. End Sub
  796.  
  797. Sub RightFlipper_Collide(parm)
  798. PlaySound "fx_rubber_flipper", 0, parm / 10, pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall)
  799. End Sub
  800.  
  801. Sub RotateLaneLightsLeft
  802. Dim TempState
  803. TempState = LeftOutlane.State
  804. LeftOutlane.State = LeftInlane.State
  805. LeftInlane.State = RightInlane.State
  806. RightInlane.State = RightOutlane.State
  807. RightOutlane.State = TempState
  808. End Sub
  809.  
  810. Sub RotateLaneLightsRight
  811. Dim TempState
  812. TempState = RightOutlane.State
  813. RightOutlane.State = RightInlane.State
  814. RightInlane.State = LeftInlane.State
  815. LeftInlane.State = LeftOutlane.State
  816. LeftOutlane.State = TempState
  817. End Sub
  818.  
  819. '*********
  820. ' TILT
  821. '*********
  822.  
  823. 'NOTE: The TiltDecreaseTimer Subtracts .01 from the "Tilt" variable every round
  824.  
  825. Sub CheckTilt() 'Called when table is nudged
  826. Tilt = Tilt + TiltSensitivity 'Add to tilt count
  827. TiltDecreaseTimer.Enabled = True
  828. If(Tilt> TiltSensitivity) AND(Tilt <15) Then 'show a warning
  829. DMD "_", CL(1, "CAREFUL!"), "", eNone, eBlinkFast, eNone, 500, True, "whathappend"
  830. End if
  831. If Tilt > 15 Then 'If more that 15 then TILT the table
  832. Tilted = True
  833. 'display Tilt
  834. playSound "TILTY"
  835. DMDFlush()
  836. DMD "", "", "TILT", eNone, eNone, eBlink, 200, False, ""
  837. DisableTable True
  838. TiltRecoveryTimer.Enabled = True 'start the Tilt delay to check for all the balls to be drained
  839. End If
  840. End Sub
  841.  
  842. Sub TiltDecreaseTimer_Timer
  843. ' DecreaseTilt
  844. If Tilt> 0 Then
  845. Tilt = Tilt - 0.1
  846. Else
  847. TiltDecreaseTimer.Enabled = False
  848. End If
  849. End Sub
  850.  
  851. Sub DisableTable(Enabled)
  852. If Enabled Then
  853. 'turn off GI and turn off all the lights
  854. GiOff
  855. LightSeqTilt.Play SeqAllOff
  856. 'Disable slings, bumpers etc
  857. LeftFlipper.RotateToStart
  858. RightFlipper.RotateToStart
  859. LeftSlingshot.Disabled = 1
  860. RightSlingshot.Disabled = 1
  861. Else
  862. 'turn back on GI and the lights
  863. GiOn
  864. LightSeqTilt.StopPlay
  865. LeftSlingshot.Disabled = 0
  866. RightSlingshot.Disabled = 0
  867. 'clean up the buffer display
  868. DMDFlush
  869. End If
  870. End Sub
  871.  
  872. ' GI light sequence effects
  873.  
  874. Sub GiEffect(n)
  875. Select Case n
  876. Case 0 'all blink
  877. LightSeqGi.UpdateInterval = 8
  878. LightSeqGi.Play SeqBlinking, , 5, 50
  879. Case 1 'random
  880. LightSeqGi.UpdateInterval = 10
  881. LightSeqGi.Play SeqRandom, 5, , 1000
  882. Case 2 'upon
  883. LightSeqGi.UpdateInterval = 4
  884. LightSeqGi.Play SeqUpOn, 5, 1
  885. End Select
  886. End Sub
  887.  
  888. Sub LightEffect(n)
  889. Select Case n
  890. Case 0 'all blink
  891. LightSeqInserts.UpdateInterval = 8
  892. LightSeqInserts.Play SeqBlinking, , 5, 50
  893. Case 1 'random
  894. LightSeqInserts.UpdateInterval = 10
  895. LightSeqInserts.Play SeqRandom, 5, , 1000
  896. Case 2 'upon
  897. LightSeqInserts.UpdateInterval = 4
  898. LightSeqInserts.Play SeqUpOn, 10, 1
  899. Case 3 ' left-right-left
  900. LightSeqInserts.UpdateInterval = 5
  901. LightSeqInserts.Play SeqLeftOn, 10, 1
  902. LightSeqInserts.UpdateInterval = 5
  903. LightSeqInserts.Play SeqRightOn, 10, 1
  904. End Select
  905. End Sub
  906.  
  907. Sub TiltRecoveryTimer_Timer()
  908. ' if all the balls have been drained then..
  909. If(BallsOnPlayfield = 0) Then
  910. ' do the normal end of ball thing (this doesn't give a bonus if the table is tilted)
  911. EndOfBall()
  912. TiltRecoveryTimer.Enabled = False
  913. End If
  914. ' else retry (checks again in another second or so)
  915. End Sub
  916.  
  917. '********************
  918. ' Music as wav sounds
  919. '********************
  920.  
  921. Dim Song, UpdateMusic
  922. Song = ""
  923.  
  924. Sub PlaySong(name)
  925. If bMusicOn Then
  926. If Song <> name Then 'This if statement allows for the same song to play on top of itself; do we need it?
  927. StopSound Song
  928. Song = name
  929. PlaySound Song, -1, SongVolume
  930. End If
  931. End If
  932. End Sub
  933.  
  934. Sub StopSong()
  935. If bMusicOn Then
  936. StopSound Song
  937. Song = ""
  938. End If
  939. End Sub
  940.  
  941. Sub ChangeSong()
  942. If(BallsOnPlayfield = 0)Then
  943. PlaySong "M_end"
  944. Exit Sub
  945. End If
  946. If bAttractMode Then
  947. PlaySong "M_end"
  948. Exit Sub
  949. End If
  950. If bMultiBallMode Then
  951. PlaySong "MULTI"
  952. Else
  953. UpdateMusicNow()
  954. end if
  955. End Sub
  956.  
  957. 'if you add more balls to the game use changesong then if bMultiBallMode = true, your multiball song will be played.
  958.  
  959. Sub UpdateMusicNow()
  960. Select Case UpdateMusic
  961. Case 0:PlaySong "1"
  962. Case 1:PlaySong "2"
  963. Case 2:PlaySong "3"
  964. Case 3:PlaySong "4"
  965. Case 4:PlaySong "5"
  966. Case 5:PlaySong "M_end"
  967. End Select
  968. end sub
  969.  
  970. '********************
  971. ' Play random quotes
  972. '********************
  973.  
  974. Sub PlayLechuckQuote
  975. Dim tmp
  976. Randomize()
  977. tmp = INT(RND * 74) + 1
  978. PlaySound "Lechuck_" &tmp
  979. End Sub
  980.  
  981. Sub PlayMurrayQuote
  982. Dim tmp
  983. Randomize()
  984. tmp = INT(RND * 88) + 1
  985. PlaySound "MUR_" &tmp
  986. End Sub
  987.  
  988. Sub PlayQuoteInsult
  989. Dim tmp
  990. Randomize()
  991. tmp = INT(RND * 28) + 1
  992. PlaySound "INS_" &tmp
  993. End Sub
  994.  
  995. Sub PlayQuoteVoodoo
  996. Dim tmp
  997. Randomize()
  998. tmp = INT(RND * 49) + 1
  999. PlaySound "voodool_" &tmp
  1000. End Sub
  1001.  
  1002. '**********************
  1003. ' GI effects
  1004. ' independent routine
  1005. ' it turns on the gi
  1006. ' when there is a ball
  1007. ' in play
  1008. '**********************
  1009.  
  1010. Dim OldGiState
  1011. OldGiState = -1 'start witht the Gi off
  1012.  
  1013. Sub ChangeGi(col) 'changes the gi color
  1014. Dim bulb
  1015. For each bulb in aGILights
  1016. SetLightColor bulb, col, -1
  1017. Next
  1018. End Sub
  1019.  
  1020. Sub GIUpdateTimer_Timer
  1021. Dim tmp, obj
  1022. tmp = Getballs
  1023. If UBound(tmp) <> OldGiState Then
  1024. OldGiState = Ubound(tmp)
  1025. If UBound(tmp) = 1 Then 'we have 2 captive balls on the table (-1 means no balls, 0 is the first ball, 1 is the second..)
  1026. GiOff ' turn off the gi if no active balls on the table, we could also have used the variable ballsonplayfield.
  1027. Else
  1028. Gion
  1029. End If
  1030. End If
  1031. End Sub
  1032.  
  1033. Sub GiOn
  1034. DOF 127, DOFOn
  1035. Dim bulb
  1036. For each bulb in aGiLights
  1037. bulb.State = 1
  1038. Next
  1039. For each bulb in aBumperLights
  1040. bulb.State = 1
  1041. Next
  1042. ' table1.ColorGradeImage = "ColorGradeLUT256x16_HalfSat"
  1043. End Sub
  1044.  
  1045. Sub GiOff
  1046. DOF 127, DOFOff
  1047. Dim bulb
  1048. For each bulb in aGiLights
  1049. bulb.State = 0
  1050. Next
  1051. For each bulb in aBumperLights
  1052. bulb.State = 0
  1053. Next
  1054. ' table1.ColorGradeImage = "ColorGradeLUT256x16_HalfSat-dark"
  1055. End Sub
  1056.  
  1057. ' GI, light & flashers sequence effects
  1058.  
  1059. Sub GiEffect(n)
  1060. Dim ii
  1061. Select Case n
  1062. Case 0 'all off
  1063. LightSeqGi.Play SeqAlloff
  1064. Case 1 'all blink
  1065. LightSeqGi.UpdateInterval = 10
  1066. LightSeqGi.Play SeqBlinking, , 15, 10
  1067. Case 2 'random
  1068. LightSeqGi.UpdateInterval = 10
  1069. LightSeqGi.Play SeqRandom, 50, , 1000
  1070. Case 3 'all blink fast
  1071. LightSeqGi.UpdateInterval = 10
  1072. LightSeqGi.Play SeqBlinking, , 10, 10
  1073. Case 4 'all blink once
  1074. LightSeqGi.UpdateInterval = 10
  1075. LightSeqGi.Play SeqBlinking, , 4, 1
  1076. End Select
  1077. End Sub
  1078.  
  1079. Sub LightEffect(n)
  1080. Select Case n
  1081. Case 0 ' all off
  1082. LightSeqInserts.Play SeqAlloff
  1083. Case 1 'all blink
  1084. LightSeqInserts.UpdateInterval = 10
  1085. LightSeqInserts.Play SeqBlinking, , 15, 10
  1086. Case 2 'random
  1087. LightSeqInserts.UpdateInterval = 10
  1088. LightSeqInserts.Play SeqRandom, 50, , 1000
  1089. Case 3 'all blink fast
  1090. LightSeqInserts.UpdateInterval = 10
  1091. LightSeqInserts.Play SeqBlinking, , 10, 10
  1092. Case 4 'up 1 time
  1093. LightSeqInserts.UpdateInterval = 4
  1094. LightSeqInserts.Play SeqUpOn, 8, 1
  1095. Case 5 'up 2 times
  1096. LightSeqInserts.UpdateInterval = 4
  1097. LightSeqInserts.Play SeqUpOn, 8, 2
  1098. Case 6 'down 1 time
  1099. LightSeqInserts.UpdateInterval = 4
  1100. LightSeqInserts.Play SeqDownOn, 8, 1
  1101. Case 7 'down 2 times
  1102. LightSeqInserts.UpdateInterval = 4
  1103. LightSeqInserts.Play SeqDownOn, 8, 2
  1104. End Select
  1105. End Sub
  1106.  
  1107. ' *********************************************************************
  1108. ' Supporting Ball & Sound Functions
  1109. ' *********************************************************************
  1110.  
  1111. Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed
  1112. Vol = Csng(BallVel(ball) ^2 / 2000)
  1113. End Function
  1114.  
  1115. Function Pan(ball) ' Calculates the pan for a ball based on the X position on the table. "table1" is the name of the table
  1116. Dim tmp
  1117. tmp = ball.x * 2 / table1.width-1
  1118. If tmp > 0 Then
  1119. Pan = Csng(tmp ^10)
  1120. Else
  1121. Pan = Csng(-((- tmp) ^10))
  1122. End If
  1123. End Function
  1124.  
  1125. Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed
  1126. Pitch = BallVel(ball) * 20
  1127. End Function
  1128.  
  1129. Function BallVel(ball) 'Calculates the ball speed
  1130. BallVel = (SQR((ball.VelX ^2) + (ball.VelY ^2)))
  1131. End Function
  1132.  
  1133. Function AudioFade(ball) 'only on VPX 10.4 and newer
  1134. Dim tmp
  1135. tmp = ball.y * 2 / Table1.height-1
  1136. If tmp > 0 Then
  1137. AudioFade = Csng(tmp ^10)
  1138. Else
  1139. AudioFade = Csng(-((- tmp) ^10))
  1140. End If
  1141. End Function
  1142.  
  1143. Sub PlaySoundAt(soundname, tableobj) 'play sound at X and Y position of an object, mostly bumpers, flippers and other fast objects
  1144. PlaySound soundname, 0, 1, Pan(tableobj), 0.06, 0, 0, 0, AudioFade(tableobj)
  1145. End Sub
  1146.  
  1147. Sub PlaySoundAtBall(soundname) ' play a sound at the ball position, like rubbers, targets, metals, plastics
  1148. PlaySound soundname, 0, Vol(ActiveBall), pan(ActiveBall), 0.2, 0, 0, 0, AudioFade(ActiveBall)
  1149. End Sub
  1150.  
  1151. '********************************************
  1152. ' JP's VP10 Rolling Sounds
  1153.  
  1154. '********************************************
  1155.  
  1156. Const tnob = 10 ' total number of balls
  1157. Const lob = 0 'number of locked balls
  1158. ReDim rolling(tnob)
  1159. InitRolling
  1160.  
  1161. Sub InitRolling
  1162. Dim i
  1163. For i = 0 to tnob
  1164. rolling(i) = False
  1165. Next
  1166. End Sub
  1167.  
  1168. Sub RollingUpdate()
  1169. Dim BOT, b, ballpitch, ballvol
  1170. BOT = GetBalls
  1171.  
  1172. ' stop the sound of deleted balls
  1173. For b = UBound(BOT) + 1 to tnob
  1174. rolling(b) = False
  1175. StopSound("fx_ballrolling" & b)
  1176. Next
  1177.  
  1178. ' exit the sub if no balls on the table
  1179. If UBound(BOT) = lob - 1 Then Exit Sub 'there no extra balls on this table
  1180.  
  1181. ' play the rolling sound for each ball
  1182. For b = lob to UBound(BOT)
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188. If BallVel(BOT(b) )> 1 Then
  1189. If BOT(b).z <30 Then
  1190. ballpitch = Pitch(BOT(b) )
  1191. ballvol = Vol(BOT(b) )
  1192. Else
  1193. ballpitch = Pitch(BOT(b) ) + 25000 'increase the pitch on a ramp
  1194. ballvol = Vol(BOT(b) ) * 10
  1195. End If
  1196. rolling(b) = True
  1197. PlaySound("fx_ballrolling" & b), -1, ballvol, Pan(BOT(b) ), 0, ballpitch, 1, 0, AudioFade(BOT(b) )
  1198. Else
  1199. If rolling(b) = True Then
  1200. StopSound("fx_ballrolling" & b)
  1201. rolling(b) = False
  1202. End If
  1203. End If
  1204. ' rothbauerw's Dropping Sounds
  1205. If BOT(b).VelZ <-1 and BOT(b).z <55 and BOT(b).z> 27 Then 'height adjust for ball drop sounds
  1206. PlaySound "fx_balldrop", 0, ABS(BOT(b).velz) / 17, Pan(BOT(b) ), 0, Pitch(BOT(b) ), 1, 0, AudioFade(BOT(b) )
  1207. End If
  1208. Next
  1209. End Sub
  1210.  
  1211. '**********************
  1212. ' Ball Collision Sound
  1213. '**********************
  1214.  
  1215. Sub OnBallBallCollision(ball1, ball2, velocity)
  1216. PlaySound "fx_collide", 0, Csng(velocity) ^2 / 2000, Pan(ball1), 0, Pitch(ball1), 0, 0, AudioFade(ball1)
  1217. End Sub
  1218.  
  1219.  
  1220. '***************************************************************
  1221. '**** VPW DYNAMIC BALL SHADOWS by Iakki, Apophis, and Wylte
  1222. '***************************************************************
  1223.  
  1224. ' The "DynamicBSUpdate" sub should be called with an interval of -1 (framerate)
  1225. ' Place a toggleable variable (DynamicBallShadowsOn) in user options at the top of the script
  1226. ' Import the "bsrtx7" and "ballshadow" images
  1227. ' Import the shadow materials (3 sets included)
  1228. ' Copy in the sets of primitives named BallShadow#, RtxBallShadow#, and RtxBall2Shadow#, with at least as many objects each as there can be balls
  1229. '
  1230. ' Create a collection called DynamicSources that includes all light sources you want to cast ball shadows
  1231. '***These must be organized in order, so that lights that intersect on the table are adjacent in the collection***
  1232. ' This is because the code will only project two shadows if they are coming from lights that are consecutive in the collection
  1233. ' The easiest way to keep track of this is to start with the group on the left slingshot and move clockwise around the table
  1234. ' For example, if you use 6 lights: A & B on the left slingshot and C & D on the right, with E near A&B and F next to C&D, your collection would look like EBACDF
  1235. '
  1236. ' E
  1237. ' A C B
  1238. ' B D your collection should look like A because E&B, B&A, etc. intersect; but B&D or E&F do not
  1239. ' E F C
  1240. ' D
  1241. ' F
  1242. '
  1243. 'Update shadow options in the code to fit your table and preference
  1244.  
  1245. Const fovY = -2 'Offset y position under ball to account for layback or inclination
  1246. Const DynamicBSFactor = 0.98 '0 to 1, higher is darker, 1 will always be maxed even with 2 sources
  1247. Const AmbientBSFactor = 0.8 '0 to 1, higher is darker
  1248. Const Wideness = 15 'Sets how wide the shadows can get (20 +5 thinness should be most realistic)
  1249. Const Thinness = 5 'Sets minimum as ball moves away from source
  1250.  
  1251. Dim sourcenames, currentShadowCount
  1252.  
  1253. sourcenames = Array ("","","","","","","","","","","","")
  1254. currentShadowCount = Array (0,0,0,0,0,0,0,0,0,0,0,0)
  1255.  
  1256.  
  1257. dim objrtx1(20), objrtx2(20)
  1258. dim objBallShadow(20)
  1259. DynamicBSInit
  1260.  
  1261. sub DynamicBSInit()
  1262. Dim iii
  1263.  
  1264. for iii = 0 to tnob 'Prepares the shadow objects before play begins
  1265. Set objrtx1(iii) = Eval("RtxBallShadow" & iii)
  1266. objrtx1(iii).material = "RtxBallShadow" & iii
  1267. objrtx1(iii).z = iii/1000 + 0.01
  1268. objrtx1(iii).visible = 0
  1269. 'objrtx1(iii).uservalue=0
  1270.  
  1271. Set objrtx2(iii) = Eval("RtxBall2Shadow" & iii)
  1272. objrtx2(iii).material = "RtxBallShadow2_" & iii
  1273. objrtx2(iii).z = (iii)/1000 + 0.02
  1274. objrtx2(iii).visible = 0
  1275. 'objrtx2(iii).uservalue=0
  1276. currentShadowCount(iii) = 0
  1277. Set objBallShadow(iii) = Eval("BallShadow" & iii)
  1278. objBallShadow(iii).material = "BallShadow" & iii
  1279. objBallShadow(iii).Z = iii/1000 + 0.04
  1280. Next
  1281. end sub
  1282.  
  1283.  
  1284. Sub DynamicBSUpdate
  1285. Dim falloff: falloff = 150 'Max distance to light source, can be changed in code if you have a reason
  1286. Dim ShadowOpacity, ShadowOpacity2
  1287. Dim s, Source, LSd, b, currentMat, AnotherSource, BOT
  1288. BOT = GetBalls
  1289.  
  1290. 'Hide shadow of deleted balls
  1291. For s = UBound(BOT) + 1 to tnob
  1292. objrtx1(s).visible = 0
  1293. objrtx2(s).visible = 0
  1294. objBallShadow(s).visible = 0
  1295. Next
  1296.  
  1297. If UBound(BOT) = lob - 1 Then Exit Sub 'No balls in play, exit
  1298.  
  1299. 'The Magic happens here
  1300. For s = lob to UBound(BOT)
  1301.  
  1302. 'Normal ambient shadow
  1303. If BOT(s).X < tablewidth/2 Then
  1304. objBallShadow(s).X = ((BOT(s).X) - (Ballsize/10) + ((BOT(s).X - (tablewidth/2))/13)) + 5
  1305. Else
  1306. objBallShadow(s).X = ((BOT(s).X) + (Ballsize/10) + ((BOT(s).X - (tablewidth/2))/13)) - 5
  1307. End If
  1308. objBallShadow(s).Y = BOT(s).Y + fovY
  1309.  
  1310. If BOT(s).Z < 30 Then 'or BOT(s).Z > 105 Then 'Defining when (height-wise) you want ambient shadows
  1311. objBallShadow(s).visible = 1
  1312. Else
  1313. objBallShadow(s).visible = 0
  1314. end if
  1315.  
  1316. 'Dynamic shadows
  1317. For Each Source in DynamicSources
  1318. LSd=DistanceFast((BOT(s).x-Source.x),(BOT(s).y-Source.y)) 'Calculating the Linear distance to the Source
  1319. If BOT(s).Z < 30 Then 'Or BOT(s).Z > 105 Then 'Defining when (height-wise) you want dynamic shadows
  1320. If LSd < falloff and Source.state=1 Then 'If the ball is within the falloff range of a light and light is on
  1321. currentShadowCount(s) = currentShadowCount(s) + 1 'Within range of 1 or 2
  1322. if currentShadowCount(s) = 1 Then '1 dynamic shadow source
  1323. sourcenames(s) = source.name
  1324. currentMat = objrtx1(s).material
  1325. objrtx2(s).visible = 0 : objrtx1(s).visible = 1 : objrtx1(s).X = BOT(s).X : objrtx1(s).Y = BOT(s).Y + fovY
  1326. objrtx1(s).rotz = AnglePP(Source.x, Source.y, BOT(s).X, BOT(s).Y) + 90
  1327. ShadowOpacity = (falloff-LSd)/falloff 'Sets opacity/darkness of shadow by distance to light
  1328. objrtx1(s).size_y = Wideness*ShadowOpacity+Thinness 'Scales shape of shadow with distance/opacity
  1329. UpdateMaterial currentMat,1,0,0,0,0,0,ShadowOpacity*DynamicBSFactor^2,RGB(0,0,0),0,0,False,True,0,0,0,0
  1330. 'debug.print "update1" & source.name & " at:" & ShadowOpacity
  1331.  
  1332. currentMat = objBallShadow(s).material
  1333. UpdateMaterial currentMat,1,0,0,0,0,0,AmbientBSFactor*(1-ShadowOpacity),RGB(0,0,0),0,0,False,True,0,0,0,0
  1334.  
  1335. Elseif currentShadowCount(s) = 2 Then
  1336. 'Same logic as 1 shadow, but twice
  1337. currentMat = objrtx1(s).material
  1338. set AnotherSource = Eval(sourcenames(s))
  1339. objrtx1(s).visible = 1 : objrtx1(s).X = BOT(s).X : objrtx1(s).Y = BOT(s).Y + fovY
  1340. objrtx1(s).rotz = AnglePP(AnotherSource.x, AnotherSource.y, BOT(s).X, BOT(s).Y) + 90
  1341. ShadowOpacity = (falloff-(((BOT(s).x-AnotherSource.x)^2+(BOT(s).y-AnotherSource.y)^2)^0.5))/falloff
  1342. objrtx1(s).size_y = Wideness*ShadowOpacity+Thinness
  1343. UpdateMaterial currentMat,1,0,0,0,0,0,ShadowOpacity*DynamicBSFactor^3,RGB(0,0,0),0,0,False,True,0,0,0,0
  1344.  
  1345. currentMat = objrtx2(s).material
  1346. objrtx2(s).visible = 1 : objrtx2(s).X = BOT(s).X : objrtx2(s).Y = BOT(s).Y + fovY
  1347. objrtx2(s).rotz = AnglePP(Source.x, Source.y, BOT(s).X, BOT(s).Y) + 90
  1348. ShadowOpacity2 = (falloff-LSd)/falloff
  1349. objrtx2(s).size_y = Wideness*ShadowOpacity2+Thinness
  1350. UpdateMaterial currentMat,1,0,0,0,0,0,ShadowOpacity2*DynamicBSFactor^3,RGB(0,0,0),0,0,False,True,0,0,0,0
  1351. 'debug.print "update2: " & source.name & " at:" & ShadowOpacity & " and " & Eval(sourcenames(s)).name & " at:" & ShadowOpacity2
  1352.  
  1353. currentMat = objBallShadow(s).material
  1354. UpdateMaterial currentMat,1,0,0,0,0,0,AmbientBSFactor*(1-max(ShadowOpacity,ShadowOpacity2)),RGB(0,0,0),0,0,False,True,0,0,0,0
  1355. end if
  1356. Else
  1357. currentShadowCount(s) = 0
  1358. End If
  1359. Else 'Hide dynamic shadows everywhere else
  1360. objrtx2(s).visible = 0 : objrtx1(s).visible = 0
  1361. End If
  1362. Next
  1363. Next
  1364. End Sub
  1365.  
  1366.  
  1367. Function DistanceFast(x, y)
  1368. dim ratio, ax, ay
  1369. 'Get absolute value of each vector
  1370. ax = abs(x)
  1371. ay = abs(y)
  1372. 'Create a ratio
  1373. ratio = 1 / max(ax, ay)
  1374. ratio = ratio * (1.29289 - (ax + ay) * ratio * 0.29289)
  1375. if ratio > 0 then
  1376. DistanceFast = 1/ratio
  1377. Else
  1378. DistanceFast = 0
  1379. End if
  1380. end Function
  1381.  
  1382. Function max(a,b)
  1383. if a > b then
  1384. max = a
  1385. Else
  1386. max = b
  1387. end if
  1388. end Function
  1389.  
  1390. Function AnglePP(ax,ay,bx,by)
  1391. AnglePP = Atn2((by - ay),(bx - ax))*180/PI
  1392. End Function
  1393.  
  1394. Function Atn2(dy, dx)
  1395. If dx > 0 Then
  1396. Atn2 = Atn(dy / dx)
  1397. ElseIf dx < 0 Then
  1398. If dy = 0 Then
  1399. Atn2 = pi
  1400. Else
  1401. Atn2 = Sgn(dy) * (pi - Atn(Abs(dy / dx)))
  1402. end if
  1403. ElseIf dx = 0 Then
  1404. if dy = 0 Then
  1405. Atn2 = 0
  1406. else
  1407. Atn2 = Sgn(dy) * pi / 2
  1408. end if
  1409. End If
  1410. End Function
  1411.  
  1412. '***************************************************************
  1413. '**** END VPW DYNAMIC BALL SHADOWS by Iakki, Apophis, and Wylte
  1414. '***************************************************************
  1415. '******************************
  1416. ' Diverse Collection Hit Sounds
  1417. '******************************
  1418.  
  1419. 'Sub aMetals_Hit(idx):PlaySoundAtBall "fx_MetalHit":End Sub
  1420. 'Sub aRubber_Bands_Hit(idx):PlaySoundAtBall "fx_rubber_band":End Sub
  1421. 'Sub aRubber_Posts_Hit(idx):PlaySoundAtBall "fx_rubber_post":End Sub
  1422. 'Sub aRubber_Pins_Hit(idx):PlaySoundAtBall "fx_rubber_pin":End Sub
  1423. 'Sub aPlastics_Hit(idx):PlaySoundAtBall "fx_PlasticHit":End Sub
  1424. 'Sub aGates_Hit(idx):PlaySoundAtBall "fx_Gate":End Sub
  1425. 'Sub aWoods_Hit(idx):PlaySoundAtBall "fx_Woodhit":End Sub
  1426.  
  1427. Sub trs001_Hit()
  1428. PlaySound "fx_metalrolling"
  1429. end sub
  1430.  
  1431. Sub trs002_Hit()
  1432. PlaySound "fx_metalrolling"
  1433. end sub
  1434.  
  1435. Sub trs003_Hit()
  1436. PlaySound "fx_metalrolling"
  1437. end sub
  1438.  
  1439. Sub trs004_Hit()
  1440. PlaySound "fx_metalrolling"
  1441. end sub
  1442.  
  1443. Sub trs005_Hit()
  1444. PlaySound "fx_metalrolling"
  1445. if findcrewDL = 5 then exit sub
  1446. findcrewDL = findcrewDL + 1
  1447. checkcrewDL
  1448. end sub
  1449.  
  1450. sub checkcrewDL
  1451. if findcrewDL = 1 then
  1452. DMD "", "", "dmddl", eNone, eNone, eNone, 1000, True, ""
  1453. Score(CurrentPlayer) = Score(CurrentPlayer) + (50000*PFMultiplier)
  1454. Prpirate001.Visible = true
  1455. PlaySound "ld1"
  1456. end if
  1457. if findcrewDL = 2 then
  1458. DMD "", "", "dmddl", eNone, eNone, eNone, 1000, True, ""
  1459. Score(CurrentPlayer) = Score(CurrentPlayer) + (50000*PFMultiplier)
  1460. Prpirate002.Visible = true
  1461. PlaySound "ld2"
  1462. end if
  1463. if findcrewDL = 3 then
  1464. DMD "", "", "dmddl", eNone, eNone, eNone, 1000, True, ""
  1465. Score(CurrentPlayer) = Score(CurrentPlayer) + (50000*PFMultiplier)
  1466. Prpirate003.Visible = true
  1467. PlaySound "ld3"
  1468. end if
  1469. if findcrewDL = 4 then
  1470. DMD "", "", "dmddl", eNone, eNone, eNone, 1000, True, ""
  1471. Score(CurrentPlayer) = Score(CurrentPlayer) + (50000*PFMultiplier)
  1472. Prpirate004.Visible = true
  1473. PlaySound "ld4"
  1474. end if
  1475. if findcrewDL = 5 then
  1476. DMD "", "", "dmddlc", eNone, eNone, eNone, 1000, True, ""
  1477. Score(CurrentPlayer) = Score(CurrentPlayer) + (50000*PFMultiplier)
  1478. Prpirate005.Visible = true
  1479. PlaySound "ld5"
  1480. li044.state = 1
  1481. escapeMI = escapeMI + 1
  1482. checktoescape
  1483. end if
  1484. end sub
  1485.  
  1486. Sub trs006_Hit()
  1487. 'FlashForMs Flasher020, 1000, 50, 0
  1488. PrGrog.image = "grog_on"
  1489. grogyoff.enabled = 1
  1490. BlinkFlasher 3,450,150
  1491. PlaySound "fx_metalrolling"
  1492. if LvLSwordM = 10 then exit sub
  1493. LvLSwordM = LvLSwordM + 1
  1494. checkLvLSwordM
  1495. end sub
  1496.  
  1497. sub grogyoff_timer
  1498. PrGrog.image = "grog_off"
  1499. grogyoff.enabled = 0
  1500. end sub
  1501.  
  1502. sub checkLvLSwordM
  1503. if LvLSwordM = 1 then
  1504. DMD "", "", "dmdswm1", eNone, eNone, eNone, 1000, True, "swordend"
  1505. Score(CurrentPlayer) = Score(CurrentPlayer) + (5000*PFMultiplier)
  1506. end if
  1507. if LvLSwordM = 2 then
  1508. DMD "", "", "dmdswm2", eNone, eNone, eNone, 1000, True, "swordend"
  1509. Score(CurrentPlayer) = Score(CurrentPlayer) + (5000*PFMultiplier)
  1510. end if
  1511. if LvLSwordM = 3 then
  1512. DMD "", "", "dmdswm3", eNone, eNone, eNone, 1000, True, "swordend"
  1513. Score(CurrentPlayer) = Score(CurrentPlayer) + (5000*PFMultiplier)
  1514. end if
  1515. if LvLSwordM = 4 then
  1516. DMD "", "", "dmdswm4", eNone, eNone, eNone, 1000, True, "swordend"
  1517. Score(CurrentPlayer) = Score(CurrentPlayer) + (5000*PFMultiplier)
  1518. end if
  1519. if LvLSwordM = 5 then
  1520. DMD "", "", "dmdswm5", eNone, eNone, eNone, 1000, True, "swordend"
  1521. Score(CurrentPlayer) = Score(CurrentPlayer) + (5000*PFMultiplier)
  1522. end if
  1523. if LvLSwordM = 6 then
  1524. DMD "", "", "dmdswm6", eNone, eNone, eNone, 1000, True, "swordend"
  1525. Score(CurrentPlayer) = Score(CurrentPlayer) + (5000*PFMultiplier)
  1526. end if
  1527. if LvLSwordM = 7 then
  1528. DMD "", "", "dmdswm7", eNone, eNone, eNone, 1000, True, "swordend"
  1529. Score(CurrentPlayer) = Score(CurrentPlayer) + (5000*PFMultiplier)
  1530. end if
  1531. if LvLSwordM = 8 then
  1532. DMD "", "", "dmdswm8", eNone, eNone, eNone, 1000, True, "swordend"
  1533. Score(CurrentPlayer) = Score(CurrentPlayer) + (5000*PFMultiplier)
  1534. end if
  1535. if LvLSwordM = 9 then
  1536. DMD "", "", "dmdswm9", eNone, eNone, eNone, 1000, True, "swordend"
  1537. Score(CurrentPlayer) = Score(CurrentPlayer) + (5000*PFMultiplier)
  1538. end if
  1539. if LvLSwordM = 10 then
  1540. DMD "", "", "dmdswm10", eNone, eNone, eNone, 750, True, "swordend"
  1541. DMD "", "", "dmdswm11", eNone, eNone, eNone, 750, True, "swordend"
  1542. Score(CurrentPlayer) = Score(CurrentPlayer) + (5000*PFMultiplier)
  1543. li046.state = 1
  1544. escapeMI = escapeMI + 1
  1545. checktoescape
  1546. end if
  1547. end sub
  1548.  
  1549. Sub thelp001_Hit()
  1550. RampBonus2 = RampBonus2 + 1
  1551. FlashForMs Flasher003, 1000, 50, 0
  1552. FlashForMs Flasher004, 1000, 50, 0
  1553. StopSound "fx_metalrolling"
  1554. PlaySound "fx_ballrampdrop"
  1555. End Sub
  1556.  
  1557. Sub thelp002_Hit()
  1558. vpmtimer.addtimer 1000, "startB2S(3) '"
  1559. RampBonus2 = RampBonus2 + 1
  1560. baropen = baropen + 1
  1561. FlashForMs Flasher005, 1000, 50, 0
  1562. FlashForMs Flasher006, 1000, 50, 0
  1563. StopSound "fx_metalrolling"
  1564. PlaySound "fx_ballrampdrop"
  1565. if baropen > 4 then exit sub
  1566. checkbarr()
  1567. End Sub
  1568.  
  1569. Sub thelp003_Hit()
  1570. RampBonus2 = RampBonus2 + 1
  1571. FlashForMs Flasher007, 1000, 50, 0
  1572. FlashForMs Flasher008, 1000, 50, 0
  1573. StopSound "fx_metalrolling"
  1574. PlaySound "fx_ballrampdrop"
  1575. End Sub
  1576.  
  1577. sub checkbarr()
  1578. if(baropen = 3) then
  1579. itemrotytimer001.enabled = 1
  1580. banaan001.Visible = 1
  1581. tbanaan001.enabled = 1
  1582. barunlocked = 1
  1583. li048.state = 0
  1584. If Status = "Normal" Then li007.state = 2
  1585. PrScumm.Image = "Scumm Bar On"
  1586. end if
  1587. end sub
  1588.  
  1589. Sub CheckBar()
  1590. if voodoounlocked = 1 then
  1591. li047.state = 0
  1592. li011.state = 2
  1593. end if
  1594. if barunlocked = 1 then
  1595. li048.state = 0
  1596. li007.state = 2
  1597. end if
  1598. If BarSlot = 31 Then
  1599. BarUnlocked = 0
  1600. playtreasure = 1
  1601. li048.state = 1
  1602. li007.state = 0
  1603. End If
  1604. If LeChuckHits >= 3 AND LeChuckSlot < 255 Then li009.State = 2
  1605. End Sub
  1606.  
  1607. ' *********************************************************************
  1608. ' User Defined Script Events
  1609. ' *********************************************************************
  1610.  
  1611. ' Initialise the Table for a new Game
  1612. '
  1613. Sub ResetForNewGame()
  1614. startB2S(11)
  1615. StopSong()
  1616. PlaySound "wait"
  1617. Dim i
  1618. bGameInPLay = True
  1619. 'resets the score display, and turn off attract mode
  1620. StopAttractMode
  1621. GiOn
  1622. TotalGamesPlayed = TotalGamesPlayed + 1
  1623. CurrentPlayer = 1
  1624. PlayersPlayingGame = 1
  1625. bOnTheFirstBall = True
  1626. 'Multiball=false
  1627. For i = 1 To MaxPlayers
  1628. Score(i) = 0
  1629. BonusPoints(i) = 0
  1630. 'BonusHeldPoints(i) = 0
  1631. BonusMultiplier(i) = 1
  1632. BallsRemaining(i) = BallsPerGame
  1633. CallApirate(i)=0
  1634. ExtraBallsAwards(i) = 0
  1635. Special1Awarded(i) = False
  1636. Special2Awarded(i) = False
  1637. Special3Awarded(i) = False
  1638. Next
  1639. ' initialise any other flags
  1640. Tilt = 0
  1641. resetycoins
  1642. resetMBcoin
  1643. 'reset variables
  1644. bumperHits = 100
  1645. UpdateMusic = 0
  1646. ' BallInHoles = 0
  1647. PFMultiplier = 1
  1648. monkeybattle = 0
  1649. treasuresfound = 0
  1650. bananasearned = 0
  1651. coinsearned = 0
  1652. baropen = 0
  1653. barunlocked = 0
  1654. voodoounlocked = 0
  1655. bonustime = 0
  1656. greatdive = 0
  1657. gravediggers = 0
  1658. playtreasure = 0
  1659. escapeMI = 0
  1660. trytoescape = 0
  1661. findcrewDL = 0
  1662. LvLSwordM = 0
  1663. monkeykeepball = 0
  1664. imagechest = 0
  1665. Prpirate001.Visible = false
  1666. Prpirate002.Visible = false
  1667. Prpirate003.Visible = false
  1668. Prpirate004.Visible = false
  1669. Prpirate005.Visible = false
  1670. Tescaper001.Enabled = false
  1671. Wall030.Isdropped = False
  1672. MonkeyHeadCounter = 0
  1673. 'UpdateMusic = UpdateMusic + 6
  1674. UpdateMusicNow()
  1675. ' initialise Game variables
  1676. Game_Init()
  1677. ' you may wish to start some music, play a sound, do whatever at this point
  1678. DMD "", "", "rt", eNone, eNone, eNone, 5000, True, ""
  1679. 'reset games/timers
  1680. stopquests()
  1681. PrScumm.Image = "Scumm Bar Off"
  1682. disablebanana
  1683. countr6 = 0
  1684. countr41 = 0
  1685. Updatechest()
  1686. updateimagechest()
  1687. vpmtimer.addtimer 5000, "FirstBall '"
  1688. LeftOrbitStart = 0
  1689. RightOrbitStart = 0
  1690. GrogCounter = 0
  1691. LeChuckHits = 0
  1692. KiGrog.Enabled = 0
  1693. End Sub
  1694.  
  1695. ' This is used to delay the start of a game to allow any attract sequence to
  1696. ' complete. When it expires it creates a ball for the player to start playing with
  1697.  
  1698. Sub FirstBall()
  1699. ' reset the table for a new ball
  1700. ResetForNewPlayerBall()
  1701. ' create a new ball in the shooters lane
  1702. CreateNewBall()
  1703. End Sub
  1704.  
  1705. ' (Re-)Initialise the Table for a new ball (either a new ball after the player has
  1706. ' lost one or we have moved onto the next player (if multiple are playing))
  1707.  
  1708. Sub ResetForNewPlayerBall()
  1709. startB2S(2)
  1710. LightSeq002.Play SeqUpOn, 25, 1000
  1711. ' make sure the correct display is upto date
  1712. AddScore 0
  1713. ' set the current players bonus multiplier back down to 1X
  1714. BonusMultiplier(CurrentPlayer) = 1
  1715. 'UpdateBonusXLights
  1716. 'reset any drop targets, lights, game Mode etc..
  1717. 'This is a new ball, so activate the ballsaver
  1718. bBallSaverReady = True
  1719. 'Reset any table specific
  1720. BumperBonus = 0
  1721. HoleBonus = 0
  1722. ALLRampBonus = 0
  1723. RampBonus1 = 0
  1724. RampBonus2 = 0
  1725. RampBonus3 = 0
  1726. MulitballBonus = 0
  1727. Countr = 0
  1728. bumperHits = 0
  1729. Countr1 = 0
  1730. Countr2 = 0
  1731. Countr3 = 0
  1732. Countr4 = 0
  1733. Countr5 = 0
  1734. ChickenChecker = 0
  1735. DollChecker = 0
  1736. EarChecker = 0
  1737. MushroomChecker = 0
  1738. treasurfindy = 0
  1739. Status = "Normal"
  1740. ResetNewBallVariables
  1741. ResetNewBallLights()
  1742. 'Multiball=false
  1743. End Sub
  1744.  
  1745. ' Create a new ball on the Playfield
  1746. Sub CreateNewBall()
  1747. LightSeqAttract.StopPlay
  1748. ' create a ball in the plunger lane kicker.
  1749. BallRelease.CreateSizedBallWithMass BallSize / 2, BallMass
  1750. ' There is a (or another) ball on the playfield
  1751. BallsOnPlayfield = BallsOnPlayfield + 1
  1752. ' kick it out..
  1753. PlaySoundAt SoundFXDOF("fx_Ballrel", 123, DOFPulse, DOFContactors), BallRelease
  1754. BallRelease.Kick 90, 4
  1755. 'only this tableDrain / Plunger Functions
  1756. 'ChangeBallImage
  1757. If BallsOnPlayfield > 1 Then
  1758. bMultiBallMode = True
  1759. bAutoPlunger = True
  1760. 'ChangeSong
  1761. End If
  1762. End Sub
  1763.  
  1764. ' Add extra balls to the table with autoplunger
  1765. ' Use it as AddMultiball 4 to add 4 extra balls to the table
  1766. Sub AddMultiball(nballs)
  1767. mBalls2Eject = mBalls2Eject + nballs
  1768. CreateMultiballTimer.Enabled = True
  1769. 'and eject the first ball
  1770. CreateMultiballTimer_Timer
  1771. End Sub
  1772.  
  1773. ' Eject the ball after the delay, AddMultiballDelay
  1774. Sub CreateMultiballTimer_Timer()
  1775. ' wait if there is a ball in the plunger lane
  1776. If bBallInPlungerLane Then
  1777. Exit Sub
  1778. Else
  1779. If BallsOnPlayfield < MaxMultiballs Then
  1780. CreateNewBall()
  1781. mBalls2Eject = mBalls2Eject -1
  1782. If mBalls2Eject = 0 Then 'if there are no more balls to eject then stop the timer
  1783. CreateMultiballTimer.Enabled = False
  1784. End If
  1785. Else 'the max number of multiballs is reached, so stop the timer
  1786. mBalls2Eject = 0
  1787. CreateMultiballTimer.Enabled = False
  1788. End If
  1789. End If
  1790. End Sub
  1791.  
  1792. ' The Player has lost his ball (there are no more balls on the playfield).
  1793. ' Handle any bonus points awarded
  1794.  
  1795. Sub EndOfBall()
  1796. Dim BonusDelayTime
  1797. ' the first ball has been lost. From this point on no new players can join in
  1798. bOnTheFirstBall = False
  1799. startB2S(5)
  1800. If LockCounter = 3 and monkeykeepball = 0 then'Status = "MonkeyMB" Then
  1801. changemonkeyheadback
  1802. End If
  1803. ' only process any of this if the table is not tilted. (the tilt recovery
  1804. ' mechanism will handle any extra balls or end of game)
  1805. 'LightSeqAttract.Play SeqBlinking, , 5, 150
  1806. StopmodeEndofBall
  1807. LightSeq001.StopPlay
  1808. StopSong
  1809. playsound "splash44"
  1810. LightSeq003.Play SeqCircleOutOn, 25, 1
  1811. 'bonuscheckie
  1812. Dim AwardPoints, TotalBonus, ii
  1813. AwardPoints = 0
  1814. TotalBonus = 0
  1815. 'If NOT Tilted Then
  1816. If(Tilted = False) Then
  1817. AwardPoints = TargetBonus * 2000
  1818. TotalBonus = TotalBonus + AwardPoints
  1819. DMD CL(0, FormatScore(AwardPoints)), CL(1, "TARGET BONUS " & TargetBonus), "", eBlink, eNone, eNone, 1000, False, "monkeyend"
  1820. AwardPoints = RampBonus2 * 25000
  1821. TotalBonus = TotalBonus + AwardPoints
  1822. DMD CL(0, FormatScore(AwardPoints) ), CL(1, "RAMP BONUS: " & RampBonus2), "", eBlink, eNone, eNone, 1000, False, "monkeyend"
  1823. AwardPoints = bananasearned * 10000
  1824. TotalBonus = TotalBonus + AwardPoints
  1825. DMD CL(0, FormatScore(AwardPoints) ), CL(1, "BANANA BONUS: " & bananasearned), "", eBlink, eNone, eNone, 1000, False, "monkeyend"
  1826. AwardPoints = MulitballBonus * 150000
  1827. TotalBonus = TotalBonus + AwardPoints
  1828. AwardPoints = bumperHits * 10000
  1829. TotalBonus = TotalBonus + AwardPoints
  1830. DMD CL(0, FormatScore(AwardPoints) ), CL(1, "BARREL BONUS: " & BumperBonus), "", eBlink, eNone, eNone, 1000, False, "monkeyend"
  1831. DMD CL(0, FormatScore(TotalBonus) ), CL(1, "TOTAL BONUS" & BonusMultiplier(CurrentPlayer) ), "", eBlinkFast, eNone, eNone, 1500, True, "monkeyend"
  1832. TotalBonus = TotalBonus * BonusMultiplier(CurrentPlayer)
  1833. AddScore TotalBonus
  1834. ' add a bit of a delay to allow for the bonus points to be shown & added up
  1835. vpmtimer.addtimer 5700, "EndOfBall2 '"
  1836. Else 'Si hay falta simplemente espera un momento y va directo a la segunta parte después de perder la bola
  1837. BonusDelayTime = 100
  1838. EndOfBall2
  1839. End If
  1840. 'vpmtimer.addtimer BonusDelayTime, "EndOfBall2 '"
  1841. End Sub
  1842.  
  1843. ' The Timer which delays the machine to allow any bonus points to be added up
  1844. ' has expired. Check to see if there are any extra balls for this player.
  1845. ' if not, then check to see if this was the last ball (of the CurrentPlayer)
  1846. '
  1847. Sub EndOfBall2()
  1848. ' if were tilted, reset the internal tilted flag (this will also
  1849. ' set TiltWarnings back to zero) which is useful if we are changing player LOL
  1850. UpdateMusic = UpdateMusic + 1
  1851. UpdateMusicNow()
  1852. Tilted = False
  1853. Tilt = 0
  1854. DisableTable False 'enable again bumpers and slingshots
  1855. ' has the player won an extra-ball ? (might be multiple outstanding)
  1856. If(ExtraBallsAwards(CurrentPlayer) <> 0) Then
  1857. 'debug.print "Extra Ball"
  1858. ' yep got to give it to them
  1859. ExtraBallsAwards(CurrentPlayer) = ExtraBallsAwards(CurrentPlayer) - 1
  1860. ' if no more EB's then turn off any shoot again light
  1861. If(ExtraBallsAwards(CurrentPlayer) = 0) Then
  1862. LightShootAgain.State = 0
  1863. End If
  1864. ' You may wish to do a bit of a song AND dance at this point
  1865. 'DMD CL(0, "EXTRA BALL"), CL(1, "SHOOT AGAIN"), "", eNone, eNone, eBlink, 1000, True, "vo_extraball"
  1866. DMD "", "", "dmdextraball", eNone, eNone, eNone, 1000, True, "fantastic"
  1867. UpdateMusic = UpdateMusic - 1
  1868. UpdateMusicNow()
  1869. ' reset the playfield for the new ball
  1870. ResetForNewPlayerBall()
  1871. ' set the dropped wall for bonus
  1872. ' Create a new ball in the shooters lane
  1873. CreateNewBall()
  1874. Else ' no extra balls
  1875. BallsRemaining(CurrentPlayer) = BallsRemaining(CurrentPlayer) - 1
  1876. ' was that the last ball ?
  1877. If(BallsRemaining(CurrentPlayer) <= 0) Then
  1878. 'debug.print "No More Balls, High Score Entry"
  1879. ' Submit the CurrentPlayers score to the High Score system
  1880. CheckHighScore()
  1881. ' you may wish to play some music at this point
  1882. Else
  1883. ' not the last ball (for that player)
  1884. ' if multiple players are playing then move onto the next one
  1885. EndOfBallComplete()
  1886. End If
  1887. End If
  1888. End Sub
  1889.  
  1890. ' This function is called when the end of bonus display
  1891. ' (or high score entry finished) AND it either end the game or
  1892. ' move onto the next player (or the next ball of the same player)
  1893. '
  1894. Sub EndOfBallComplete()
  1895. Dim NextPlayer
  1896.  
  1897. 'debug.print "EndOfBall - Complete"
  1898.  
  1899. ' are there multiple players playing this game ?
  1900. If(PlayersPlayingGame> 1) Then
  1901. ' then move to the next player
  1902. NextPlayer = CurrentPlayer + 1
  1903. ' are we going from the last player back to the first
  1904. ' (ie say from player 4 back to player 1)
  1905. If(NextPlayer> PlayersPlayingGame) Then
  1906. NextPlayer = 1
  1907. End If
  1908. Else
  1909. NextPlayer = CurrentPlayer
  1910. End If
  1911.  
  1912. 'debug.print "Next Player = " & NextPlayer
  1913.  
  1914. ' is it the end of the game ? (all balls been lost for all players)
  1915. If((BallsRemaining(CurrentPlayer) <= 0) AND(BallsRemaining(NextPlayer) <= 0) ) Then
  1916. ' you may wish to do some sort of Point Match free game award here
  1917. ' generally only done when not in free play mode
  1918. StopSong
  1919. disablebanana
  1920. startB2S(10)
  1921. PlaySound "GAMEOVER"
  1922. 'DMD CL(0, "GAME OVER") "", eNone, 13000, True, ""
  1923. DMD CL(0, "MONKEYS"), CL(1, "BATTLED " &monkeybattle), "", eNone, eNone, eNone, 750, True, ""
  1924. DMD CL(0, "TREASURES"), CL(1, "FOUND " &treasuresfound), "", eNone, eNone, eNone, 750, True, ""
  1925. DMD CL(0, "BANANAS"), CL(1, "CAUGHT " &bananasearned), "", eNone, eNone, eNone, 750, True, ""
  1926. DMD CL(0, "COINS"), CL(1, "FOUND " &coinsearned), "", eNone, eNone, eNone, 750, True, ""
  1927. DMD "", "", "dmdgameover", eNone, eNone, eNone, 2000, True, ""
  1928. ' set the machine into game over mode
  1929. vpmtimer.addtimer 5000, "EndOfGame() '"
  1930. ' you may wish to put a Game Over message on the desktop/backglass
  1931. Else
  1932. ' set the next player
  1933. CurrentPlayer = NextPlayer
  1934. ' make sure the correct display is up to date
  1935. DMDScoreNow()
  1936. ' reset the playfield for the new player (or new ball)
  1937. ResetForNewPlayerBall()
  1938. ' AND create a new ball
  1939. CreateNewBall()
  1940. ' play a sound if more than 1 player
  1941. If PlayersPlayingGame> 1 Then
  1942. PlaySound "vo_player" &CurrentPlayer
  1943. DMD "_", CL(1, "PLAYER " &CurrentPlayer), "", eNone, eNone, eNone, 800, True, ""
  1944. End If
  1945. End If
  1946. End Sub
  1947.  
  1948. ' This function is called at the End of the Game, it should reset all
  1949. ' Drop targets, AND eject any 'held' balls, start any attract sequences etc..
  1950.  
  1951. Sub EndOfGame()
  1952. LightSeqAttract.StopPlay
  1953. 'debug.print "End Of Game"
  1954. bGameInPLay = False
  1955. ' just ended your game then play the end of game tune
  1956. If NOT bJustStarted Then
  1957. ChangeSong
  1958. End If
  1959. bJustStarted = False
  1960. ' ensure that the flippers are down
  1961. SolLFlipper 0
  1962. SolRFlipper 0
  1963. ' terminate all Mode - eject locked balls
  1964. ' most of the Mode/timers terminate at the end of the ball
  1965. ' set any lights for the attract mode
  1966. GiOff
  1967. StartAttractMode
  1968. ' you may wish to light any Game Over Light you may have
  1969. End Sub
  1970.  
  1971. Function Balls
  1972. Dim tmp
  1973. tmp = BallsPerGame - BallsRemaining(CurrentPlayer) + 1
  1974. If tmp> BallsPerGame Then
  1975. Balls = BallsPerGame
  1976. Else
  1977. Balls = tmp
  1978. End If
  1979. End Function
  1980.  
  1981. ' *********************************************************************
  1982. ' Drain / Plunger Functions
  1983. ' *********************************************************************
  1984.  
  1985. ' lost a ball ;-( check to see how many balls are on the playfield.
  1986. ' if only one then decrement the remaining count AND test for End of game
  1987. ' if more than 1 ball (multi-ball) then kill of the ball but don't create
  1988. ' a new one
  1989. '
  1990. Sub Drain_Hit()
  1991. 'If this is a test ball, just destroy it and pretend like nothing happened
  1992. 'If ActiveBall.ID = 21 Then Drain.DestroyBall:Exit Sub
  1993. 'If we're in voodoo Magic, do stuff to take us out
  1994. 'If Status = "Magic" Then
  1995. ' GetRidOfVoodooBall(ActiveBall)
  1996. ' Exit Sub
  1997. 'End If
  1998. BallsOnPlayfield = BallsOnPlayfield - 1
  1999. ' Destroy the ball
  2000. Drain.DestroyBall
  2001. 'If BallsOnPlayfield<2 Then
  2002. 'Multiball=false
  2003. 'end if
  2004. ' pretend to knock the ball into the ball storage mech
  2005. PlaySoundAt "fx_drain", Drain
  2006. 'if Tilted then end Ball Mode
  2007. If Tilted Then
  2008. StopEndOfBallMode()
  2009. End If
  2010. ' if there is a game in progress AND it is not Tilted
  2011. If(bGameInPLay = True) AND(Tilted = False) Then
  2012. ' is the ball saver active,
  2013. If(bBallSaverActive = True) Then
  2014. AddMultiball 1
  2015. Playsound "fire"
  2016. bAutoPlunger = True
  2017. ' yep, create a new ball in the shooters lane
  2018. ' we use the Addmultiball in case the multiballs are being ejected
  2019. 'DMD CL(0, "BALL SAVED"), CL(1, "SHOOT AGAIN"), "", eBlink, eBlink, eNone, 800, True, ""
  2020. 'vpmtimer.addtimer 1250, "CreateNewBall() '"
  2021. ' you may wish to put something on a display or play a sound at this point
  2022. Else
  2023. If(BallsOnPlayfield = 1)Then
  2024. ' AND in a multi-ball??
  2025. If(bMultiBallMode = True)then
  2026. ' not in multiball mode any more
  2027. bMultiBallMode = False
  2028. TMBcoinys.enabled = 0
  2029. resetMBcoin
  2030. ' you may wish to change any music over at this point and
  2031. ' turn off any multiball specific lights
  2032. if monkeykeepball = 0 then
  2033. ChangeSong()
  2034. end if
  2035. If LockCounter = 3 and monkeykeepball = 0 then'Status = "MonkeyMB" Then
  2036. kickoutmonkeyheady
  2037. vpmtimer.addtimer 250, "changemonkeyheadback '" '
  2038. End If
  2039. End If
  2040. End If
  2041. ' was that the last ball on the playfield
  2042. If(BallsOnPlayfield = 0) Then
  2043. DOF 130,0
  2044.  
  2045. If BallsRemaining(CurrentPlayer)=1 And CallApirate(CurrentPlayer)=0 And ExtraBallsAwards(CurrentPlayer)=0 Then
  2046. CallApirate(CurrentPlayer)=1
  2047. StartRandomWheel
  2048. Else
  2049. ' End Mode and timers
  2050. StopSong()
  2051. PlaySound ""
  2052. 'vp mtimer.addtimer 3000, "ChangeSong '"
  2053. ' S how the end of ball animation
  2054. ' and continue with the end of ball
  2055. ' DMD something?
  2056. StopEndOfBallMode()
  2057. vpmtimer.addtimer 200, "EndOfBall '" 'the delay is depending of the animation of the end of ball, since there is no animation then move to the end of ball
  2058.  
  2059. End If
  2060.  
  2061. End If
  2062. End If
  2063. End If
  2064. 'Set BallMoverHold = Nothing
  2065. End Sub
  2066.  
  2067. sub kickoutmonkeyheady
  2068. PlaySound "fx_popper"
  2069. KiHead.Kick 180, 7, 0
  2070. end sub
  2071.  
  2072. sub changemonkeyheadback
  2073. li010.state = 0
  2074. Status = "Normal"
  2075. 'PFMultiplier = 1
  2076. 'li023.state = 0
  2077. MoveHead 180, 1
  2078. Wall030.IsDropped = 0
  2079. KiHead.Enabled = 0
  2080. MonkeyHeadCounter = 0
  2081. LockCounter = 0
  2082. MoveMouth 0, 1
  2083. end sub
  2084.  
  2085.  
  2086. ' The Ball has rolled out of the Plunger Lane and it is pressing down the trigger in the shooters lane
  2087. ' Check to see if a ball saver mechanism is needed and if so fire it up.
  2088. Dim BallMoverHold:Set BallMoverHold = Nothing
  2089. Sub Trigger1_Hit()
  2090. If bAutoPlunger Then
  2091. 'Let it settle
  2092. vpmTimer.AddTimer 1000, "PlungerIM.AutoFire '"
  2093. vpmTimer.AddTimer 1000, "DOF 121, DOFPulse '"
  2094. vpmTimer.AddTimer 1000, "PlaySound ""fire"" '"
  2095. vpmTimer.AddTimer 1000, "bAutoPlunger = False '"
  2096. End If
  2097. bBallInPlungerLane = True
  2098. If (BallMoverHold Is Nothing) Then Set ballmoverhold = ActiveBall
  2099. If bMultiBallMode = false Then
  2100. PirateShipTimer.Enabled = 1
  2101. ShipAngleSpeed = 2.5
  2102. ShipReset = 1
  2103.  
  2104. End If
  2105. End Sub
  2106.  
  2107. ' The ball is released from the plunger
  2108.  
  2109. Sub Trigger1_UnHit()
  2110. bBallInPlungerLane = False
  2111. 'LightEffect 4
  2112. 'ChangeSong
  2113. If PirateShipTimer.Enabled Then
  2114. 'If the ship is low then sink it
  2115. If (ShipAngle > 160 AND ShipAngle < 200) OR (ShipAngle > 520 AND ShipAngle < 560) OR (ShipAngle > 880 AND ShipAngle < 920) OR (ShipAngle > 1240 AND ShipAngle < 1280) Then
  2116. SinkPirateShip = 1
  2117. DMD "", "", "dmdhit", enone, enone, eblink, 1000, True, ""
  2118. Else
  2119. ShipAngleSpeed = 8
  2120. ShipReset = -1
  2121. DMD "", "", "dmdmis", enone, enone, eblink, 1000, True, ""
  2122. End If
  2123. smokeytimer.enabled = 1
  2124. End If
  2125. If(bBallSaverReady = True) AND(BallSaverTime <> 0) And(bBallSaverActive = False) Then
  2126. EnableBallSaver BallSaverTime
  2127. Else
  2128. ' show the message to shoot the ball in case the player has fallen sleep
  2129. Trigger1.TimerEnabled = 1
  2130. 'End If
  2131. Playsound "Fire"
  2132. DOF 120, DOFPulse
  2133. End If
  2134. End Sub
  2135.  
  2136. Sub Trigger1_Timer
  2137. ' DMD "_", CL(1, "SHOOT THE BALL"), "", eNone, eNone, eNone, 800, True, ""
  2138. trigger1.TimerEnabled = 0
  2139. End Sub
  2140.  
  2141. Sub EnableBallSaver(seconds)
  2142. bBallSaverActive = True
  2143. bBallSaverReady = False
  2144. BallSaverTimer.Interval = 1000 * seconds
  2145. BallSaverTimer.Enabled = True
  2146. BallSaverSpeedUpTimer.Interval = 1000 * seconds -(1000 * seconds) / 3
  2147. BallSaverSpeedUpTimer.Enabled = True
  2148. ' if you have a ball saver light you might want to turn it on at this point (or make it flash)
  2149. LightShootAgain.BlinkInterval = 160
  2150. LightShootAgain.State = 2
  2151. End Sub
  2152.  
  2153. ' The ball saver timer has expired. Turn it off AND reset the game flag
  2154. '
  2155. Sub BallSaverTimer_Timer()
  2156. 'debug.print "Ballsaver ended"
  2157. BallSaverTimer.Enabled = False
  2158. ' clear the flag
  2159. bBallSaverActive = False
  2160. ' if you have a ball saver light then turn it off at this point
  2161. LightShootAgain.State = 0
  2162. End Sub
  2163.  
  2164. Sub BallSaverSpeedUpTimer_Timer()
  2165. 'debug.print "Ballsaver Speed Up Light"
  2166. BallSaverSpeedUpTimer.Enabled = False
  2167. ' Speed up the blinking
  2168. LightShootAgain.BlinkInterval = 80
  2169. LightShootAgain.State = 2
  2170. End Sub
  2171.  
  2172. ' *********************************************************************
  2173. ' Supporting Score Functions
  2174. ' *********************************************************************
  2175.  
  2176. ' Add points to the score AND update the score board
  2177. Sub AddScore(points)
  2178. If Tilted Then Exit Sub
  2179. ' add the points to the current players score variable
  2180. Score(CurrentPlayer) = Score(CurrentPlayer) + points
  2181. ' play a sound for each score
  2182. PlaySound "tone"&points
  2183. ' you may wish to check to see if the player has gotten an extra ball by a high score
  2184. If Score(CurrentPlayer) >= Special1 AND Special1Awarded(CurrentPlayer) = False Then
  2185. AwardExtraBall
  2186. Special1Awarded(CurrentPlayer) = True
  2187. End If
  2188. If Score(CurrentPlayer) >= Special2 AND Special2Awarded(CurrentPlayer) = False Then
  2189. AwardExtraBall
  2190. Special2Awarded(CurrentPlayer) = True
  2191. End If
  2192. If Score(CurrentPlayer) >= Special3 AND Special3Awarded(CurrentPlayer) = False Then
  2193. AwardExtraBall
  2194. Special3Awarded(CurrentPlayer) = True
  2195. End If
  2196. End Sub
  2197.  
  2198. ' Add bonus to the bonuspoints AND update the score board
  2199. Sub AddBonus(points) 'not used in this table, since there are many different bonus items.
  2200. If(Tilted = False) Then
  2201. ' add the bonus to the current players bonus variable
  2202. BonusPoints(CurrentPlayer) = BonusPoints(CurrentPlayer) + points
  2203. End if
  2204. End Sub
  2205.  
  2206. Sub AwardExtraBall()
  2207. DMD "", "", "dmdextraball", eNone, eNone, eNone, 1000, True, "fantastic"
  2208. 'DMD "_", CL(1, ("EXTRA BALL WON") ), "", eNone, eBlink, eNone, 1000, True, SoundFXDOF("fx_Knocker", 122, DOFPulse, DOFKnocker)
  2209. DOF 121, DOFPulse
  2210. ExtraBallsAwards(CurrentPlayer) = ExtraBallsAwards(CurrentPlayer) + 1
  2211. LightShootAgain.State = 1
  2212. LightEffect 2
  2213. End Sub
  2214.  
  2215. '*****************************
  2216. ' Load / Save / Highscore
  2217. '*****************************
  2218.  
  2219. Sub Loadhs
  2220. Dim x
  2221. x = LoadValue(TableName, "HighScore1")
  2222. If(x <> "") Then HighScore(0) = CDbl(x) Else HighScore(0) = 100000 End If
  2223. x = LoadValue(TableName, "HighScore1Name")
  2224. If(x <> "") Then HighScoreName(0) = x Else HighScoreName(0) = "AAA" End If
  2225. x = LoadValue(TableName, "HighScore2")
  2226. If(x <> "") then HighScore(1) = CDbl(x) Else HighScore(1) = 100000 End If
  2227. x = LoadValue(TableName, "HighScore2Name")
  2228. If(x <> "") then HighScoreName(1) = x Else HighScoreName(1) = "BBB" End If
  2229. x = LoadValue(TableName, "HighScore3")
  2230. If(x <> "") then HighScore(2) = CDbl(x) Else HighScore(2) = 100000 End If
  2231. x = LoadValue(TableName, "HighScore3Name")
  2232. If(x <> "") then HighScoreName(2) = x Else HighScoreName(2) = "CCC" End If
  2233. x = LoadValue(TableName, "HighScore4")
  2234. If(x <> "") then HighScore(3) = CDbl(x) Else HighScore(3) = 100000 End If
  2235. x = LoadValue(TableName, "HighScore4Name")
  2236. If(x <> "") then HighScoreName(3) = x Else HighScoreName(3) = "DDD" End If
  2237. x = LoadValue(TableName, "Credits")
  2238. If(x <> "") then Credits = CInt(x) Else Credits = 0:If bFreePlay = False Then DOF 125, DOFOff:End If
  2239. x = LoadValue(TableName, "TotalGamesPlayed")
  2240. If(x <> "") then TotalGamesPlayed = CInt(x) Else TotalGamesPlayed = 0 End If
  2241. End Sub
  2242.  
  2243. Sub Savehs
  2244. SaveValue TableName, "HighScore1", HighScore(0)
  2245. SaveValue TableName, "HighScore1Name", HighScoreName(0)
  2246. SaveValue TableName, "HighScore2", HighScore(1)
  2247. SaveValue TableName, "HighScore2Name", HighScoreName(1)
  2248. SaveValue TableName, "HighScore3", HighScore(2)
  2249. SaveValue TableName, "HighScore3Name", HighScoreName(2)
  2250. SaveValue TableName, "HighScore4", HighScore(3)
  2251. SaveValue TableName, "HighScore4Name", HighScoreName(3)
  2252. SaveValue TableName, "Credits", Credits
  2253. SaveValue TableName, "TotalGamesPlayed", TotalGamesPlayed
  2254. End Sub
  2255.  
  2256. Sub Reseths
  2257. HighScoreName(0) = "AAA"
  2258. HighScoreName(1) = "BBB"
  2259. HighScoreName(2) = "CCC"
  2260. HighScoreName(3) = "DDD"
  2261. HighScore(0) = 100000
  2262. HighScore(1) = 110000
  2263. HighScore(2) = 120000
  2264. HighScore(3) = 130000
  2265. Savehs
  2266. End Sub
  2267.  
  2268. ' ***********************************************************
  2269. ' High Score Initals Entry Functions - based on Black's code
  2270. ' ***********************************************************
  2271.  
  2272. Dim hsbModeActive
  2273. Dim hsEnteredName
  2274. Dim hsEnteredDigits(3)
  2275. Dim hsCurrentDigit
  2276. Dim hsValidLetters
  2277. Dim hsCurrentLetter
  2278. Dim hsLetterFlash
  2279.  
  2280. Sub CheckHighscore()
  2281. Dim tmp
  2282. tmp = Score(1)
  2283. If Score(2)> tmp Then tmp = Score(2)
  2284. If Score(3)> tmp Then tmp = Score(3)
  2285. If Score(4)> tmp Then tmp = Score(4)
  2286.  
  2287. 'If tmp > HighScore(1)Then 'add 1 credit for beating the highscore
  2288. ' Credits = Credits + 1
  2289. ' DOF 125, DOFOn
  2290. 'End If
  2291.  
  2292. If tmp> HighScore(3) Then
  2293. PlaySound SoundFXDOF("fx_Knocker", 122, DOFPulse, DOFKnocker)
  2294. DOF 121, DOFPulse
  2295. HighScore(3) = tmp
  2296. 'enter player's name
  2297. HighScoreEntryInit()
  2298. Else
  2299. EndOfBallComplete()
  2300. End If
  2301. End Sub
  2302.  
  2303. Sub HighScoreEntryInit()
  2304. hsbModeActive = True
  2305. PlaySound "legend"
  2306. ChangeSong()
  2307. hsLetterFlash = 0
  2308.  
  2309. hsEnteredDigits(0) = " "
  2310. hsEnteredDigits(1) = " "
  2311. hsEnteredDigits(2) = " "
  2312. hsCurrentDigit = 0
  2313.  
  2314. 'hsValidLetters = " ABCDEFGHIJKLMNOPQRSTUVWXYZ'<>*+-/=\^0123456789`" ' ` is back arrow
  2315. hsValidLetters = " ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789<" ' < is back arrow JP FLEX FIX
  2316. hsCurrentLetter = 1
  2317. DMDFlush()
  2318. HighScoreDisplayNameNow()
  2319.  
  2320. HighScoreFlashTimer.Interval = 250
  2321. HighScoreFlashTimer.Enabled = True
  2322. End Sub
  2323.  
  2324. Sub EnterHighScoreKey(keycode)
  2325. If keycode = LeftFlipperKey Then
  2326. playsound "fx_Previous"
  2327. hsCurrentLetter = hsCurrentLetter - 1
  2328. if(hsCurrentLetter = 0) then
  2329. hsCurrentLetter = len(hsValidLetters)
  2330. end if
  2331. HighScoreDisplayNameNow()
  2332. End If
  2333.  
  2334. If keycode = RightFlipperKey Then
  2335. playsound "fx_Next"
  2336. hsCurrentLetter = hsCurrentLetter + 1
  2337. if(hsCurrentLetter> len(hsValidLetters) ) then
  2338. hsCurrentLetter = 1
  2339. end if
  2340. HighScoreDisplayNameNow()
  2341. End If
  2342.  
  2343. If keycode = PlungerKey Then
  2344. 'if(mid(hsValidLetters, hsCurrentLetter, 1) <> "`") then
  2345. if(mid(hsValidLetters, hsCurrentLetter, 1) <> "<") then 'JP FLEX FIX
  2346. playsound "fx_Enter"
  2347. hsEnteredDigits(hsCurrentDigit) = mid(hsValidLetters, hsCurrentLetter, 1)
  2348. hsCurrentDigit = hsCurrentDigit + 1
  2349. if(hsCurrentDigit = 3) then
  2350. HighScoreCommitName()
  2351. else
  2352. HighScoreDisplayNameNow()
  2353. end if
  2354. else
  2355. playsound "fx_Esc"
  2356. hsEnteredDigits(hsCurrentDigit) = " "
  2357. if(hsCurrentDigit> 0) then
  2358. hsCurrentDigit = hsCurrentDigit - 1
  2359. end if
  2360. HighScoreDisplayNameNow()
  2361. end if
  2362. end if
  2363. End Sub
  2364.  
  2365. Sub HighScoreDisplayNameNow()
  2366. HighScoreFlashTimer.Enabled = False
  2367. hsLetterFlash = 0
  2368. HighScoreDisplayName()
  2369. HighScoreFlashTimer.Enabled = True
  2370. End Sub
  2371.  
  2372. Sub HighScoreDisplayName()
  2373. Dim i
  2374. Dim TempTopStr
  2375. Dim TempBotStr
  2376.  
  2377. TempTopStr = "YOUR NAME:"
  2378. dLine(0) = ExpandLine(TempTopStr, 0)
  2379. DMDUpdate 0
  2380.  
  2381. TempBotStr = " > "
  2382. if(hsCurrentDigit> 0) then TempBotStr = TempBotStr & hsEnteredDigits(0)
  2383. if(hsCurrentDigit> 1) then TempBotStr = TempBotStr & hsEnteredDigits(1)
  2384. if(hsCurrentDigit> 2) then TempBotStr = TempBotStr & hsEnteredDigits(2)
  2385.  
  2386. if(hsCurrentDigit <> 3) then
  2387. if(hsLetterFlash <> 0) then
  2388. TempBotStr = TempBotStr & "_"
  2389. else
  2390. TempBotStr = TempBotStr & mid(hsValidLetters, hsCurrentLetter, 1)
  2391. end if
  2392. end if
  2393.  
  2394. if(hsCurrentDigit <1) then TempBotStr = TempBotStr & hsEnteredDigits(1)
  2395. if(hsCurrentDigit <2) then TempBotStr = TempBotStr & hsEnteredDigits(2)
  2396.  
  2397. TempBotStr = TempBotStr & " < "
  2398. dLine(1) = ExpandLine(TempBotStr, 1)
  2399. DMDUpdate 1
  2400. End Sub
  2401.  
  2402. Sub HighScoreFlashTimer_Timer()
  2403. HighScoreFlashTimer.Enabled = False
  2404. hsLetterFlash = hsLetterFlash + 1
  2405. if(hsLetterFlash = 2) then hsLetterFlash = 0
  2406. HighScoreDisplayName()
  2407. HighScoreFlashTimer.Enabled = True
  2408. End Sub
  2409.  
  2410. Sub HighScoreCommitName()
  2411. HighScoreFlashTimer.Enabled = False
  2412. hsbModeActive = False
  2413. ChangeSong()
  2414. hsEnteredName = hsEnteredDigits(0) & hsEnteredDigits(1) & hsEnteredDigits(2)
  2415. if(hsEnteredName = " ") then
  2416. hsEnteredName = "YOU"
  2417. end if
  2418.  
  2419. HighScoreName(3) = hsEnteredName
  2420. SortHighscore
  2421. EndOfBallComplete()
  2422. End Sub
  2423.  
  2424. Sub SortHighscore
  2425. Dim tmp, tmp2, i, j
  2426. For i = 0 to 3
  2427. For j = 0 to 2
  2428. If HighScore(j) <HighScore(j + 1) Then
  2429. tmp = HighScore(j + 1)
  2430. tmp2 = HighScoreName(j + 1)
  2431. HighScore(j + 1) = HighScore(j)
  2432. HighScoreName(j + 1) = HighScoreName(j)
  2433. HighScore(j) = tmp
  2434. HighScoreName(j) = tmp2
  2435. End If
  2436. Next
  2437. Next
  2438. End Sub
  2439.  
  2440. ' *************************************************************************
  2441. ' JP's Reduced Display Driver Functions (based on script by Black)
  2442. ' only 5 effects: none, scroll left, scroll right, blink and blinkfast
  2443. ' 3 Lines, treats all 3 lines as text. 3rd line is just 1 character
  2444. ' Example format:
  2445. ' DMD "text1","text2","backpicture", eNone, eNone, eNone, 250, True, "sound"
  2446. ' Short names:
  2447. ' dq = display queue
  2448. ' de = display effect
  2449. ' *************************************************************************
  2450.  
  2451. Const eNone = 0 ' Instantly displayed
  2452. Const eScrollLeft = 1 ' scroll on from the right
  2453. Const eScrollRight = 2 ' scroll on from the left
  2454. Const eBlink = 3 ' Blink (blinks for 'TimeOn')
  2455. Const eBlinkFast = 4 ' Blink (blinks for 'TimeOn') at user specified intervals (fast speed)
  2456.  
  2457. Const dqSize = 64
  2458.  
  2459. Dim dqHead
  2460. Dim dqTail
  2461. Dim deSpeed
  2462. Dim deBlinkSlowRate
  2463. Dim deBlinkFastRate
  2464.  
  2465. Dim dCharsPerLine(2)
  2466. Dim dLine(2)
  2467. Dim deCount(2)
  2468. Dim deCountEnd(2)
  2469. Dim deBlinkCycle(2)
  2470.  
  2471. Dim dqText(2, 64)
  2472. Dim dqEffect(2, 64)
  2473. Dim dqTimeOn(64)
  2474. Dim dqbFlush(64)
  2475. Dim dqSound(64)
  2476.  
  2477. Dim FlexDMD
  2478. Dim DMDScene
  2479.  
  2480. Sub DMD_Init() 'default/startup values
  2481. deSpeed = 20
  2482. deBlinkSlowRate = 5
  2483. deBlinkFastRate = 2
  2484. dCharsPerLine(0) = 16 'characters top line
  2485. dCharsPerLine(1) = 20 'characters lower line
  2486. dCharsPerLine(2) = 1 'characters back line
  2487. If UseFlexDMD Then
  2488. Set FlexDMD = CreateObject("FlexDMD.FlexDMD")
  2489. If Not FlexDMD is Nothing Then
  2490. FlexDMD.TableFile = Table1.Filename & ".vpx"
  2491. FlexDMD.RenderMode = 2
  2492. FlexDMD.Width = 128
  2493. FlexDMD.Height = 32
  2494. FlexDMD.Clear = True
  2495. FlexDMD.GameName = cGameName
  2496. FlexDMD.Run = True
  2497. Set DMDScene = FlexDMD.NewGroup("Scene")
  2498. DMDScene.AddActor FlexDMD.NewImage("Back", "VPX.bkempty")
  2499. DMDScene.GetImage("Back").SetSize FlexDMD.Width, FlexDMD.Height
  2500. For i = 0 to UBound(Digits)
  2501. DMDScene.AddActor FlexDMD.NewImage("Dig" & i, "VPX.dempty&dmd=2")
  2502. Digits(i).Visible = False
  2503. Next
  2504. 'digitgrid.Visible = False
  2505. For i = 0 to (dCharsPerLine(1) - 1) ' Top
  2506. DMDScene.GetImage("Dig" & i).SetBounds 4 + i * 6, dCharsPerLine(0) + 5, 8, 8
  2507. Next
  2508. For i = dCharsPerLine(1) to (dCharsPerLine(0) + dCharsPerLine(1) - 1) ' Bottom
  2509. DMDScene.GetImage("Dig" & i).SetBounds (i - dCharsPerLine(1)) * 8, 3, 8, 16
  2510. Next
  2511. FlexDMD.LockRenderThread
  2512. FlexDMD.Stage.AddActor DMDScene
  2513. FlexDMD.UnlockRenderThread
  2514. End If
  2515. End If
  2516. Dim i, j
  2517. DMDFlush()
  2518. For i = 0 to 2
  2519. dLine(i) = Space(dCharsPerLine(i) )
  2520. deCount(i) = 0
  2521. deCountEnd(i) = 0
  2522. deBlinkCycle(i) = 0
  2523. dqTimeOn(i) = 0
  2524. dqbFlush(i) = True
  2525. dqSound(i) = ""
  2526. Next
  2527. For i = 0 to 2
  2528. For j = 0 to 64
  2529. dqText(i, j) = ""
  2530. dqEffect(i, j) = eNone
  2531. Next
  2532. Next
  2533. DMD dLine(0), dLine(1), dLine(2), eNone, eNone, eNone, 25, True, ""
  2534. End Sub
  2535.  
  2536. Sub DMDFlush()
  2537. Dim i
  2538. DMDTimer.Enabled = False
  2539. DMDEffectTimer.Enabled = False
  2540. dqHead = 0
  2541. dqTail = 0
  2542. For i = 0 to 2
  2543. deCount(i) = 0
  2544. deCountEnd(i) = 0
  2545. deBlinkCycle(i) = 0
  2546. Next
  2547. End Sub
  2548.  
  2549. Sub DMDScore()
  2550. Dim tmp, tmp1, tmp2
  2551. if(dqHead = dqTail) Then
  2552. tmp = RL(0, FormatScore(Score(Currentplayer)))
  2553. tmp1 = CL(1, "PLAYER " & CurrentPlayer & " BALL " & Balls)
  2554. tmp2 = "bkborder"
  2555. End If
  2556. DMD tmp, tmp1, tmp2, eNone, eNone, eNone, 25, True, ""
  2557. End Sub
  2558.  
  2559. Sub DMDScoreNow
  2560. DMDFlush
  2561. DMDScore
  2562. End Sub
  2563.  
  2564. Sub DMD(Text0, Text1, Text2, Effect0, Effect1, Effect2, TimeOn, bFlush, Sound)
  2565. if(dqTail < dqSize) Then
  2566. if(Text0 = "_") Then
  2567. dqEffect(0, dqTail) = eNone
  2568. dqText(0, dqTail) = "_"
  2569. Else
  2570. dqEffect(0, dqTail) = Effect0
  2571. dqText(0, dqTail) = ExpandLine(Text0, 0)
  2572. End If
  2573. if(Text1 = "_") Then
  2574. dqEffect(1, dqTail) = eNone
  2575. dqText(1, dqTail) = "_"
  2576. Else
  2577. dqEffect(1, dqTail) = Effect1
  2578. dqText(1, dqTail) = ExpandLine(Text1, 1)
  2579. End If
  2580. if(Text2 = "_") Then
  2581. dqEffect(2, dqTail) = eNone
  2582. dqText(2, dqTail) = "_"
  2583. Else
  2584. dqEffect(2, dqTail) = Effect2
  2585. dqText(2, dqTail) = Text2 'it is always 1 letter in this table
  2586. End If
  2587. dqTimeOn(dqTail) = TimeOn
  2588. dqbFlush(dqTail) = bFlush
  2589. dqSound(dqTail) = Sound
  2590. dqTail = dqTail + 1
  2591. if(dqTail = 1) Then
  2592. DMDHead()
  2593. End If
  2594. End If
  2595. End Sub
  2596.  
  2597. Sub DMDHead()
  2598. Dim i
  2599. deCount(0) = 0
  2600. deCount(1) = 0
  2601. deCount(2) = 0
  2602. DMDEffectTimer.Interval = deSpeed
  2603. For i = 0 to 2
  2604. Select Case dqEffect(i, dqHead)
  2605. Case eNone:deCountEnd(i) = 1
  2606. Case eScrollLeft:deCountEnd(i) = Len(dqText(i, dqHead) )
  2607. Case eScrollRight:deCountEnd(i) = Len(dqText(i, dqHead) )
  2608. Case eBlink:deCountEnd(i) = int(dqTimeOn(dqHead) / deSpeed)
  2609. deBlinkCycle(i) = 0
  2610. Case eBlinkFast:deCountEnd(i) = int(dqTimeOn(dqHead) / deSpeed)
  2611. deBlinkCycle(i) = 0
  2612. End Select
  2613. Next
  2614. if(dqSound(dqHead) <> "") Then
  2615. PlaySound(dqSound(dqHead) )
  2616. End If
  2617. DMDEffectTimer.Enabled = True
  2618. End Sub
  2619.  
  2620. Sub DMDEffectTimer_Timer()
  2621. DMDEffectTimer.Enabled = False
  2622. DMDProcessEffectOn()
  2623. End Sub
  2624.  
  2625. Sub DMDTimer_Timer()
  2626. Dim Head
  2627. DMDTimer.Enabled = False
  2628. Head = dqHead
  2629. dqHead = dqHead + 1
  2630. if(dqHead = dqTail) Then
  2631. if(dqbFlush(Head) = True) Then
  2632. DMDScoreNow()
  2633. Else
  2634. dqHead = 0
  2635. DMDHead()
  2636. End If
  2637. Else
  2638. DMDHead()
  2639. End If
  2640. End Sub
  2641.  
  2642. Sub DMDProcessEffectOn()
  2643. Dim i
  2644. Dim BlinkEffect
  2645. Dim Temp
  2646. BlinkEffect = False
  2647. For i = 0 to 2
  2648. if(deCount(i) <> deCountEnd(i) ) Then
  2649. deCount(i) = deCount(i) + 1
  2650. select case(dqEffect(i, dqHead) )
  2651. case eNone:
  2652. Temp = dqText(i, dqHead)
  2653. case eScrollLeft:
  2654. Temp = Right(dLine(i), dCharsPerLine(i) - 1)
  2655. Temp = Temp & Mid(dqText(i, dqHead), deCount(i), 1)
  2656. case eScrollRight:
  2657. Temp = Mid(dqText(i, dqHead), (dCharsPerLine(i) + 1) - deCount(i), 1)
  2658. Temp = Temp & Left(dLine(i), dCharsPerLine(i) - 1)
  2659. case eBlink:
  2660. BlinkEffect = True
  2661. if((deCount(i) MOD deBlinkSlowRate) = 0) Then
  2662. deBlinkCycle(i) = deBlinkCycle(i) xor 1
  2663. End If
  2664. if(deBlinkCycle(i) = 0) Then
  2665. Temp = dqText(i, dqHead)
  2666. Else
  2667. Temp = Space(dCharsPerLine(i) )
  2668. End If
  2669. case eBlinkFast:
  2670. BlinkEffect = True
  2671. if((deCount(i) MOD deBlinkFastRate) = 0) Then
  2672. deBlinkCycle(i) = deBlinkCycle(i) xor 1
  2673. End If
  2674. if(deBlinkCycle(i) = 0) Then
  2675. Temp = dqText(i, dqHead)
  2676. Else
  2677. Temp = Space(dCharsPerLine(i) )
  2678. End If
  2679. End Select
  2680.  
  2681. if(dqText(i, dqHead) <> "_") Then
  2682. dLine(i) = Temp
  2683. DMDUpdate i
  2684. End If
  2685. End If
  2686. Next
  2687. if(deCount(0) = deCountEnd(0) ) and(deCount(1) = deCountEnd(1) ) and(deCount(2) = deCountEnd(2) ) Then
  2688. if(dqTimeOn(dqHead) = 0) Then
  2689. DMDFlush()
  2690. Else
  2691. if(BlinkEffect = True) Then
  2692. DMDTimer.Interval = 10
  2693. Else
  2694. DMDTimer.Interval = dqTimeOn(dqHead)
  2695. End If
  2696.  
  2697. DMDTimer.Enabled = True
  2698. End If
  2699. Else
  2700. DMDEffectTimer.Enabled = True
  2701. End If
  2702. End Sub
  2703.  
  2704. Function ExpandLine(TempStr, id) 'id is the number of the dmd line
  2705. If TempStr = "" Then
  2706. TempStr = Space(dCharsPerLine(id) )
  2707. Else
  2708. if(Len(TempStr)> Space(dCharsPerLine(id) ) ) Then
  2709. TempStr = Left(TempStr, Space(dCharsPerLine(id) ) )
  2710. Else
  2711. if(Len(TempStr) <dCharsPerLine(id) ) Then
  2712. TempStr = TempStr & Space(dCharsPerLine(id) - Len(TempStr) )
  2713. End If
  2714. End If
  2715. End If
  2716. ExpandLine = TempStr
  2717. End Function
  2718.  
  2719. Function FormatScore(ByVal Num) 'it returns a string with commas (as in Black's original font)
  2720. dim i
  2721. dim NumString
  2722.  
  2723. NumString = CStr(abs(Num) )
  2724.  
  2725. For i = Len(NumString) -3 to 1 step -3
  2726. if IsNumeric(mid(NumString, i, 1) ) then
  2727. NumString = left(NumString, i-1) & chr(asc(mid(NumString, i, 1) ) + 48) & right(NumString, Len(NumString) - i)
  2728. end if
  2729. Next
  2730. FormatScore = NumString
  2731. End function
  2732.  
  2733. Function CL(id, NumString)
  2734. Dim Temp, TempStr
  2735. Temp = (dCharsPerLine(id) - Len(NumString) ) \ 2
  2736. TempStr = Space(Temp) & NumString & Space(Temp)
  2737. CL = TempStr
  2738. End Function
  2739.  
  2740. Function RL(id, NumString)
  2741. Dim Temp, TempStr
  2742. Temp = dCharsPerLine(id) - Len(NumString)
  2743. TempStr = Space(Temp) & NumString
  2744. RL = TempStr
  2745. End Function
  2746.  
  2747. '**************
  2748. ' Update DMD
  2749. '**************
  2750.  
  2751. Sub DMDUpdate(id)
  2752. Dim digit, value
  2753. If UseFlexDMD Then FlexDMD.LockRenderThread
  2754. Select Case id
  2755. Case 0 'top text line
  2756. For digit = dCharsPerLine(1) to (dCharsPerLine(0) + dCharsPerLine(1) - 1)
  2757. DMDDisplayChar mid(dLine(0), digit - (dCharsPerLine(1) - 1), 1), digit
  2758. Next
  2759. Case 1 'bottom text line
  2760. For digit = 0 to dCharsPerLine(1) - 1
  2761. DMDDisplayChar mid(dLine(1), digit + 1, 1), digit
  2762. Next
  2763. Case 2 ' back image - back animations
  2764. If dLine(2) = "" OR dLine(2) = " " Then dLine(2) = "bkempty"
  2765. DigitsBack(0).ImageA = dLine(2)
  2766. If UseFlexDMD Then DMDScene.GetImage("Back").Bitmap = FlexDMD.NewImage("", "VPX." & dLine(2) & "&dmd=2").Bitmap
  2767. End Select
  2768. If UseFlexDMD Then FlexDMD.UnlockRenderThread
  2769. End Sub
  2770.  
  2771. Sub DMDDisplayChar(achar, adigit)
  2772. If achar = "" Then achar = " "
  2773. achar = ASC(achar)
  2774. Digits(adigit).ImageA = Chars(achar)
  2775. If UseFlexDMD Then DMDScene.GetImage("Dig" & adigit).Bitmap = FlexDMD.NewImage("", "VPX." & Chars(achar) & "&dmd=2&add").Bitmap
  2776. End Sub
  2777.  
  2778. '****************************
  2779. ' JP's new DMD using flashers
  2780. '****************************
  2781.  
  2782. Dim Digits, DigitsBack, Chars(255), Images(255)
  2783.  
  2784. DMDInit
  2785.  
  2786. Sub DMDInit()
  2787. Dim i
  2788. 'If Table1.ShowDT = true then
  2789. Digits = Array(digit0, digit1, digit2, digit3, digit4, digit5, digit6, digit7, digit8, digit9, digit10, digit11, _
  2790. digit12, digit13, digit14, digit15, digit16, digit17, digit18, digit19, digit20, digit21, digit22, digit23, digit24, digit25, _
  2791. digit26, digit27, digit28, digit29, digit30, digit31, digit32, digit33, digit34, digit35)
  2792. DigitsBack = Array(digit36)
  2793. For i = 0 to 255
  2794. Chars(i) = "dempty"
  2795. Next '= "dempty":Images(i) = "dempty":Next
  2796. Chars(32) = "dempty"
  2797. ' Chars(34) = '"
  2798. ' Chars(36) = '$
  2799. ' Chars(39) = ''
  2800. ' Chars(42) = '*
  2801. ' Chars(43) = '+
  2802. ' Chars(45) = '-
  2803. ' Chars(47) = '/
  2804. Chars(48) = "d0" '0
  2805. Chars(49) = "d1" '1
  2806. Chars(50) = "d2" '2
  2807. Chars(51) = "d3" '3
  2808. Chars(52) = "d4" '4
  2809. Chars(53) = "d5" '5
  2810. Chars(54) = "d6" '6
  2811. Chars(55) = "d7" '7
  2812. Chars(56) = "d8" '8
  2813. Chars(57) = "d9" '9
  2814. Chars(60) = "dless" '<
  2815. Chars(61) = "dequal" '=
  2816. Chars(62) = "dgreater" '>
  2817. ' Chars(64) = '@
  2818. Chars(65) = "da" 'A
  2819. Chars(66) = "db" 'B
  2820. Chars(67) = "dc" 'C
  2821. Chars(68) = "dd" 'D
  2822. Chars(69) = "de" 'E
  2823. Chars(70) = "df" 'F
  2824. Chars(71) = "dg" 'G
  2825. Chars(72) = "dh" 'H
  2826. Chars(73) = "di" 'I
  2827. Chars(74) = "dj" 'J
  2828. Chars(75) = "dk" 'K
  2829. Chars(76) = "dl" 'L
  2830. Chars(77) = "dm" 'M
  2831. Chars(78) = "dn" 'N
  2832. Chars(79) = "do" 'O
  2833. Chars(80) = "dp" 'P
  2834. Chars(81) = "dq" 'Q
  2835. Chars(82) = "dr" 'R
  2836. Chars(83) = "ds" 'S
  2837. Chars(84) = "dt" 'T
  2838. Chars(85) = "du" 'U
  2839. Chars(86) = "dv" 'V
  2840. Chars(87) = "dw" 'W
  2841. Chars(88) = "dx" 'X
  2842. Chars(89) = "dy" 'Y
  2843. Chars(90) = "dz" 'Z
  2844. ' Chars(91) = '[
  2845. ' Chars(92) = '|
  2846. ' Chars(93) = ']
  2847. ' Chars(94) = '^
  2848. ' Chars(95) = '_
  2849. Chars(96) = "d0a" '0.
  2850. Chars(97) = "d1a" '1.
  2851. Chars(98) = "d2a" '2.
  2852. Chars(99) = "d3a" '3.
  2853. Chars(100) = "d4a" '4.
  2854. Chars(101) = "d5a" '5.
  2855. Chars(102) = "d6a" '6.
  2856. Chars(103) = "d7a" '7.
  2857. Chars(104) = "d8a" '8.
  2858. Chars(105) = "d9a" '9
  2859. End Sub
  2860.  
  2861. '********************************************************************************************
  2862. ' Only for VPX 10.2 and higher.
  2863. ' FlashForMs will blink light or a flasher for TotalPeriod(ms) at rate of BlinkPeriod(ms)
  2864. ' When TotalPeriod done, light or flasher will be set to FinalState value where
  2865. ' Final State values are: 0=Off, 1=On, 2=Return to previous State
  2866. '********************************************************************************************
  2867.  
  2868. Sub FlashForMs(MyLight, TotalPeriod, BlinkPeriod, FinalState) 'thanks gtxjoe for the first version
  2869.  
  2870. If TypeName(MyLight) = "Light" Then
  2871.  
  2872. If FinalState = 2 Then
  2873. FinalState = MyLight.State 'Keep the current light state
  2874. End If
  2875. MyLight.BlinkInterval = BlinkPeriod
  2876. MyLight.Duration 2, TotalPeriod, FinalState
  2877. ElseIf TypeName(MyLight) = "Flasher" Then
  2878.  
  2879. Dim steps
  2880.  
  2881. ' Store all blink information
  2882. steps = Int(TotalPeriod / BlinkPeriod + .5) 'Number of ON/OFF steps to perform
  2883. If FinalState = 2 Then 'Keep the current flasher state
  2884. FinalState = ABS(MyLight.Visible)
  2885. End If
  2886. MyLight.UserValue = steps * 10 + FinalState 'Store # of blinks, and final state
  2887.  
  2888. ' Start blink timer and create timer subroutine
  2889. MyLight.TimerInterval = BlinkPeriod
  2890. MyLight.TimerEnabled = 0
  2891. MyLight.TimerEnabled = 1
  2892. ExecuteGlobal "Sub " & MyLight.Name & "_Timer:" & "Dim tmp, steps, fstate:tmp=me.UserValue:fstate = tmp MOD 10:steps= tmp\10 -1:Me.Visible = steps MOD 2:me.UserValue = steps *10 + fstate:If Steps = 0 then Me.Visible = fstate:Me.TimerEnabled=0:End if:End Sub"
  2893. End If
  2894. End Sub
  2895.  
  2896.  
  2897. '***** Blink a Flupper Flasher *******
  2898. 'Example if you want to blink flasher number 1:
  2899. ' BlinkFlasher 1,500,100
  2900. Sub BlinkFlasher(nr, TotalPeriod, BlinkPeriod)
  2901. objlight(nr).uservalue = CInt(TotalPeriod/BlinkPeriod)
  2902. objlight(nr).timerinterval = BlinkPeriod
  2903. objlight(nr).timerenabled = 1
  2904. ExecuteGlobal "Sub " & objlight(nr).Name & "_Timer:" & "Flash" & nr & " True: me.uservalue = me.uservalue - 1: If me.uservalue = 0 Then: me.timerenabled = 0: End If: End Sub"
  2905. End Sub
  2906.  
  2907.  
  2908.  
  2909. ' #####################################
  2910. ' ###### Flashers flupper #####
  2911. ' #####################################
  2912.  
  2913. Dim TestFlashers, TableRef, FlasherLightIntensity, FlasherFlareIntensity, FlasherOffBrightness, FlasherBloomIntensity
  2914.  
  2915. ' *********************************************************************
  2916. TestFlashers = 0 ' *** set this to 1 to check position of flasher object ***
  2917. Set TableRef = Table1 ' *** change this, if your table has another name ***
  2918. FlasherLightIntensity = 0.1 ' *** lower this, if the VPX lights are too bright (i.e. 0.1) ***
  2919. FlasherFlareIntensity = 0.3 ' *** lower this, if the flares are too bright (i.e. 0.1) ***
  2920. FlasherBloomIntensity = 0.4 ' *** lower this, if the blooms are too bright (i.e. 0.1) ***
  2921. FlasherOffBrightness = 0.5 ' *** brightness of the flasher dome when switched off (range 0-2) ***
  2922. ' *********************************************************************
  2923.  
  2924. Dim ObjLevel(20), objbase(20), objlit(20), objflasher(20), objbloom(20), objlight(20)
  2925. Dim tablewidth, tableheight : tablewidth = TableRef.width : tableheight = TableRef.height
  2926. 'initialise the flasher color, you can only choose from "green", "red", "purple", "blue", "white" and "yellow"
  2927. InitFlasher 1, "orange"
  2928. InitFlasher 2, "orange"
  2929. InitFlasher 3, "orange"
  2930. InitFlasher 4, "orange"
  2931. InitFlasher 8, "yellow"
  2932. InitFlasher 9, "yellow"
  2933. ' rotate the flasher with the command below (first argument = flasher nr, second argument = angle in degrees)
  2934. 'RotateFlasher 4,17 : RotateFlasher 5,0 : RotateFlasher 6,90
  2935. 'RotateFlasher 7,0 : RotateFlasher 8,0
  2936. 'RotateFlasher 9,-45 : RotateFlasher 10,90 : RotateFlasher 11,90
  2937.  
  2938. Sub InitFlasher(nr, col)
  2939. ' store all objects in an array for use in FlashFlasher subroutine
  2940. Set objbase(nr) = Eval("Flasherbase" & nr) : Set objlit(nr) = Eval("Flasherlit" & nr)
  2941. Set objflasher(nr) = Eval("Flasherflash" & nr) : Set objlight(nr) = Eval("Flasherlight" & nr)
  2942. Set objbloom(nr) = Eval("Flasherbloom" & nr)
  2943. ' If the flasher is parallel to the playfield, rotate the VPX flasher object for POV and place it at the correct height
  2944. If objbase(nr).RotY = 0 Then
  2945. objbase(nr).ObjRotZ = atn( (tablewidth/2 - objbase(nr).x) / (objbase(nr).y - tableheight*1.1)) * 180 / 3.14159
  2946. objflasher(nr).RotZ = objbase(nr).ObjRotZ : objflasher(nr).height = objbase(nr).z + 60
  2947. End If
  2948. ' set all effects to invisible and move the lit primitive at the same position and rotation as the base primitive
  2949. objlight(nr).IntensityScale = 0 : objlit(nr).visible = 0 : objlit(nr).material = "Flashermaterial" & nr
  2950. objlit(nr).RotX = objbase(nr).RotX : objlit(nr).RotY = objbase(nr).RotY : objlit(nr).RotZ = objbase(nr).RotZ
  2951. objlit(nr).ObjRotX = objbase(nr).ObjRotX : objlit(nr).ObjRotY = objbase(nr).ObjRotY : objlit(nr).ObjRotZ = objbase(nr).ObjRotZ
  2952. objlit(nr).x = objbase(nr).x : objlit(nr).y = objbase(nr).y : objlit(nr).z = objbase(nr).z
  2953. objbase(nr).BlendDisableLighting = FlasherOffBrightness
  2954. ' set the texture and color of all objects
  2955. select case objbase(nr).image
  2956. Case "dome2basewhite" : objbase(nr).image = "dome2base" & col : objlit(nr).image = "dome2lit" & col :
  2957. Case "ronddomebasewhite" : objbase(nr).image = "ronddomebase" & col : objlit(nr).image = "ronddomelit" & col
  2958. Case "domeearbasewhite" : objbase(nr).image = "domeearbase" & col : objlit(nr).image = "domeearlit" & col
  2959. end select
  2960. If TestFlashers = 0 Then objflasher(nr).imageA = "domeflashwhite" : objflasher(nr).visible = 0 : End If
  2961. select case col
  2962. Case "blue" : objlight(nr).color = RGB(4,120,255) : objflasher(nr).color = RGB(200,255,255) : objbloom(nr).color = RGB(4,120,255) : objlight(nr).intensity = 5000
  2963. Case "green" : objlight(nr).color = RGB(12,255,4) : objflasher(nr).color = RGB(12,255,4) : objbloom(nr).color = RGB(12,255,4)
  2964. Case "red" : objlight(nr).color = RGB(255,32,4) : objflasher(nr).color = RGB(255,32,4) : objbloom(nr).color = RGB(255,32,4)
  2965. Case "purple" : objlight(nr).color = RGB(230,49,255) : objflasher(nr).color = RGB(255,64,255) : objbloom(nr).color = RGB(230,49,255)
  2966. Case "yellow" : objlight(nr).color = RGB(200,173,25) : objflasher(nr).color = RGB(255,200,50) : objbloom(nr).color = RGB(200,173,25)
  2967. Case "white" : objlight(nr).color = RGB(255,240,150) : objflasher(nr).color = RGB(100,86,59) : objbloom(nr).color = RGB(255,240,150)
  2968. Case "orange" : objlight(nr).color = RGB(255,70,0) : objflasher(nr).color = RGB(255,70,0) : objbloom(nr).color = RGB(255,70,0)
  2969. end select
  2970. objlight(nr).colorfull = objlight(nr).color
  2971. If TableRef.ShowDT and ObjFlasher(nr).RotX = -45 Then
  2972. objflasher(nr).height = objflasher(nr).height - 20 * ObjFlasher(nr).y / tableheight
  2973. ObjFlasher(nr).y = ObjFlasher(nr).y + 10
  2974. End If
  2975. End Sub
  2976.  
  2977. Sub RotateFlasher(nr, angle) : angle = ((angle + 360 - objbase(nr).ObjRotZ) mod 180)/30 : objbase(nr).showframe(angle) : objlit(nr).showframe(angle) : End Sub
  2978.  
  2979. Sub FlashFlasher(nr)
  2980. If not objflasher(nr).TimerEnabled Then objflasher(nr).TimerEnabled = True : objflasher(nr).visible = 1 : objbloom(nr).visible = 1 : objlit(nr).visible = 1 : End If
  2981. objflasher(nr).opacity = 1000 * FlasherFlareIntensity * ObjLevel(nr)^2.5
  2982. objbloom(nr).opacity = 100 * FlasherBloomIntensity * ObjLevel(nr)^2.5
  2983. objlight(nr).IntensityScale = 0.5 * FlasherLightIntensity * ObjLevel(nr)^3
  2984. objbase(nr).BlendDisableLighting = FlasherOffBrightness + 10 * ObjLevel(nr)^3
  2985. objlit(nr).BlendDisableLighting = 10 * ObjLevel(nr)^2
  2986. UpdateMaterial "Flashermaterial" & nr,0,0,0,0,0,0,ObjLevel(nr),RGB(255,255,255),0,0,False,True,0,0,0,0
  2987. ObjLevel(nr) = ObjLevel(nr) * 0.9 - 0.01
  2988. If ObjLevel(nr) < 0 Then objflasher(nr).TimerEnabled = False : objflasher(nr).visible = 0 : objbloom(nr).visible = 0 : objlit(nr).visible = 0 : End If
  2989. End Sub
  2990.  
  2991. Sub FlasherFlash1_Timer() : FlashFlasher(1) : End Sub
  2992. Sub FlasherFlash2_Timer() : FlashFlasher(2) : End Sub
  2993. Sub FlasherFlash3_Timer() : FlashFlasher(3) : End Sub
  2994. Sub FlasherFlash4_Timer() : FlashFlasher(4) : End Sub
  2995. Sub FlasherFlash5_Timer() : FlashFlasher(5) : End Sub
  2996. Sub FlasherFlash6_Timer() : FlashFlasher(6) : End Sub
  2997. Sub FlasherFlash7_Timer() : FlashFlasher(7) : End Sub
  2998. Sub FlasherFlash8_Timer() : FlashFlasher(8) : End Sub
  2999. Sub FlasherFlash9_Timer() : FlashFlasher(9) : End Sub
  3000. Sub FlasherFlash10_Timer() : FlashFlasher(10) : End Sub
  3001. Sub FlasherFlash11_Timer() : FlashFlasher(11) : End Sub
  3002.  
  3003.  
  3004. Sub Flash1(Enabled)
  3005. If Enabled Then
  3006. Objlevel(1) = 1 : FlasherFlash1_Timer
  3007. End If
  3008. End Sub
  3009.  
  3010.  
  3011. Sub Flash2(Enabled)
  3012. If Enabled Then
  3013. Objlevel(2) = 1 : FlasherFlash2_Timer
  3014. End If
  3015. End Sub
  3016.  
  3017.  
  3018. Sub Flash3(Enabled)
  3019. If Enabled Then
  3020. Objlevel(3) = 1 : FlasherFlash3_Timer
  3021. End If
  3022. End Sub
  3023.  
  3024.  
  3025. Sub Flash4(Enabled)
  3026. If Enabled Then
  3027. Objlevel(4) = 1 : FlasherFlash4_Timer
  3028. End If
  3029. End Sub
  3030.  
  3031.  
  3032. Sub Flash8(Enabled)
  3033. If Enabled Then
  3034. Objlevel(8) = 1 : FlasherFlash8_Timer
  3035. End If
  3036. End Sub
  3037.  
  3038. Sub Flash9(Enabled)
  3039. If Enabled Then
  3040. Objlevel(9) = 1 : FlasherFlash9_Timer
  3041. End If
  3042. End Sub
  3043.  
  3044. ' ###################################
  3045. ' ###### copy script until here #####
  3046. ' ###################################
  3047.  
  3048. ' *** script for demoing flashers ***
  3049. ' *** you should not need this in your table ***
  3050. ' *** in your table start a flash with : ***
  3051. ' *** ObjLevel(xx) = 1 : FlasherFlashxx_Timer ***
  3052. ' *** for modulated flashers use 0-1 for ObjLevel(xx) ***
  3053.  
  3054. 'dim countr : Randomize
  3055.  
  3056. 'Sub Timer1_Timer
  3057. ' If TestFlashers = 0 Then
  3058. ' countr = countr + 1 : If Countr > 11 then Countr = 3 : end If
  3059. ' If rnd(1) < 0.04 Then
  3060. ' PlaySound "fx_relay_on",0,1
  3061. ' select case countr
  3062. 'case 1 : Objlevel(1) = 1 : FlasherFlash1_Timer
  3063. 'case 2 : Objlevel(2) = 1 : FlasherFlash2_Timer
  3064. 'case 3 : ObjLevel(3) = 1 : FlasherFlash3_Timer
  3065. 'case 4 : ObjLevel(4) = 1 : FlasherFlash4_Timer
  3066. 'case 5 : ObjLevel(5) = 1 : FlasherFlash5_Timer
  3067. 'case 6 : ObjLevel(6) = 1 : FlasherFlash6_Timer
  3068. 'case 7 : ObjLevel(7) = 1 : FlasherFlash7_Timer
  3069. 'case 8 : ObjLevel(8) = 1 : FlasherFlash8_Timer
  3070. ' case 9 : ObjLevel(9) = 1 : FlasherFlash9_Timer
  3071. 'case 10 : ObjLevel(10) = 1 : FlasherFlash10_Timer
  3072. 'case 11 : ObjLevel(11) = 1 : FlasherFlash11_Timer
  3073. ' end Select
  3074. ' End If
  3075. ' End If
  3076. 'end Sub
  3077.  
  3078. ' ********************************
  3079. ' Table info & Attract Mode
  3080. ' ********************************
  3081.  
  3082. Sub ShowTableInfo
  3083. Dim ii
  3084. 'info goes in a loop only stopped by the credits and the startkey
  3085. If Score(1) Then
  3086. DMD CL(0, "LAST SCORE"), CL(1, "PLAYER 1" &FormatScore(Score(1) ) ), "", eNone, eNone, eNone, 3000, False, ""
  3087. End If
  3088. If Score(2) Then
  3089. DMD CL(0, "LAST SCORE"), CL(1, "PLAYER 2 " &FormatScore(Score(2) ) ), "", eNone, eNone, eNone, 3000, False, ""
  3090. End If
  3091. If Score(3) Then
  3092. DMD CL(0, "LAST SCORE"), CL(1, "PLAYER 3 " &FormatScore(Score(3) ) ), "", eNone, eNone, eNone, 3000, False, ""
  3093. End If
  3094. If Score(4) Then
  3095. DMD CL(0, "LAST SCORE"), CL(1, "PLAYER 4 " &FormatScore(Score(4) ) ), "", eNone, eNone, eNone, 3000, False, ""
  3096. End If
  3097. DMD CL(0, "GAME OVER"), CL(1, "TRY AGAIN"), "", eNone, eBlink, eNone, 2000, True, ""
  3098. If bFreePlay Then
  3099. DMD "", CL(1, "FREE PLAY"), "", eNone, eNone, eNone, 2000, False, ""
  3100. Else
  3101. If Credits> 0 Then
  3102. DMD CL(0, "CREDITS " & Credits), CL(1, "PRESS START"), "", eNone, eBlink, eNone, 2000, False, ""
  3103. Else
  3104. DMD CL(0, "CREDITS " & Credits), CL(1, "INSERT COIN"), "", eNone, eBlink, eNone, 2000, False, ""
  3105. End If
  3106. End If
  3107. DMD "", "", "dmdintro1", eNone, eNone, eNone, 2000, True, ""
  3108. DMD "", "", "dmdintro2", eNone, eNone, eNone, 1000, True, ""
  3109. DMD "", "", "dmdintrm1", eNone, eNone, eNone, 1000, True, ""
  3110. DMD "", "", "dmdintrm2", eNone, eNone, eNone, 100, True, ""
  3111. DMD "", "", "dmdintrm3", eNone, eNone, eNone, 100, True, ""
  3112. DMD "", "", "dmdintrm4", eNone, eNone, eNone, 100, True, ""
  3113. DMD "", "", "dmdintrm5", eNone, eNone, eNone, 100, True, ""
  3114. DMD "", "", "dmdintrm6", eNone, eNone, eNone, 100, True, ""
  3115. DMD "", "", "dmdintrm7", eNone, eNone, eNone, 100, True, ""
  3116. DMD "", "", "dmdintrm8", eNone, eNone, eNone, 100, True, ""
  3117. DMD "", "", "dmdintrm9", eNone, eNone, eNone, 100, True, ""
  3118. DMD "", "", "dmdintrm10", eNone, eNone, eNone, 500, True, ""
  3119. DMD "", "", "dmdintrm11", eNone, eNone, eNone, 200, True, ""
  3120. DMD "", "", "dmdintrm12", eNone, eNone, eNone, 200, True, ""
  3121. DMD "", "", "dmdintrm13", eNone, eNone, eNone, 1000, True, ""
  3122. DMD CL(0, "HIGHSCORES"), Space(dCharsPerLine(1) ), "", eScrollLeft, eScrollLeft, eNone, 20, False, ""
  3123. DMD CL(0, "HIGHSCORES"), "", "", eBlinkFast, eNone, eNone, 1000, False, ""
  3124. DMD CL(0, "HIGHSCORES"), "1> " &HighScoreName(0) & " " &FormatScore(HighScore(0) ), "", eNone, eScrollLeft, eNone, 2000, False, ""
  3125. DMD "_", "2> " &HighScoreName(1) & " " &FormatScore(HighScore(1) ), "", eNone, eScrollLeft, eNone, 2000, False, ""
  3126. DMD "_", "3> " &HighScoreName(2) & " " &FormatScore(HighScore(2) ), "", eNone, eScrollLeft, eNone, 2000, False, ""
  3127. DMD "_", "4> " &HighScoreName(3) & " " &FormatScore(HighScore(3) ), "", eNone, eScrollLeft, eNone, 2000, False, ""
  3128. DMD Space(dCharsPerLine(0) ), Space(dCharsPerLine(1) ), "", eScrollLeft, eScrollLeft, eNone, 500, False, ""
  3129. End Sub
  3130.  
  3131. Dim InAttract:InAttract = 0
  3132. Sub StartAttractMode()
  3133. startB2S(1)
  3134. InAttract = 1
  3135. wheel1.Image = "AnticheatCRU2_2"
  3136. wheel2.Image = "AnticheatCRUkopiekopie2"
  3137. spinningwheel.enabled = 1
  3138. AttractTimer.Enabled = 1
  3139. ChangeSong()
  3140. StartLightSeq()
  3141. DMDFlush()
  3142. ShowTableInfo()
  3143. End Sub
  3144.  
  3145. Sub StopAttractMode
  3146. InAttract = 0
  3147. LightSeqAttract.StopPlay
  3148. AttractTimer.Enabled = 0
  3149. wheel1.Image = "Wheel1dark"
  3150. wheel2.Image = "Wheel2dark"
  3151. DMDScoreNow()
  3152. End Sub
  3153.  
  3154. Sub AttractTimer_Timer
  3155. Dim tmp
  3156. Randomize()
  3157. tmp = INT(RND * 8)
  3158. Select Case tmp
  3159. Case 0:PlaySound "attract01"
  3160. Case 1:PlaySound "attract02"
  3161. Case 2:PlaySound "attract03"
  3162. Case 3:PlaySound "attract04"
  3163. Case 4:PlaySound "attract05"
  3164. Case 5:PlaySound "attract06"
  3165. Case 6:PlaySound "attract07"
  3166. Case 7:PlaySound "attract08"
  3167. End Select
  3168. End Sub
  3169.  
  3170. Sub StartLightSeq()
  3171. 'lights sequences
  3172. LightSeqAttract.UpdateInterval = 25
  3173. LightSeqAttract.Play SeqBlinking, , 5, 150
  3174. LightSeqAttract.Play SeqRandom, 40, , 4000
  3175. LightSeqAttract.Play SeqAllOff
  3176. LightSeqAttract.UpdateInterval = 8
  3177. LightSeqAttract.Play SeqUpOn, 50, 1
  3178. LightSeqAttract.UpdateInterval = 8
  3179. LightSeqAttract.Play SeqDownOn, 25, 1
  3180. LightSeqAttract.UpdateInterval = 8
  3181. LightSeqAttract.Play SeqCircleOutOn, 15, 2
  3182. LightSeqAttract.UpdateInterval = 8
  3183. LightSeqAttract.Play SeqUpOn, 25, 1
  3184. LightSeqAttract.UpdateInterval = 8
  3185. LightSeqAttract.Play SeqDownOn, 25, 1
  3186. LightSeqAttract.UpdateInterval = 8
  3187. LightSeqAttract.Play SeqUpOn, 25, 1
  3188. LightSeqAttract.UpdateInterval = 8
  3189. LightSeqAttract.Play SeqDownOn, 25, 1
  3190. LightSeqAttract.UpdateInterval = 10
  3191. LightSeqAttract.Play SeqCircleOutOn, 15, 3
  3192. LightSeqAttract.UpdateInterval = 5
  3193. LightSeqAttract.Play SeqRightOn, 50, 1
  3194. LightSeqAttract.UpdateInterval = 5
  3195. LightSeqAttract.Play SeqLeftOn, 50, 1
  3196. LightSeqAttract.UpdateInterval = 8
  3197. LightSeqAttract.Play SeqRightOn, 50, 1
  3198. LightSeqAttract.UpdateInterval = 8
  3199. LightSeqAttract.Play SeqLeftOn, 50, 1
  3200. LightSeqAttract.UpdateInterval = 8
  3201. LightSeqAttract.Play SeqRightOn, 40, 1
  3202. LightSeqAttract.UpdateInterval = 8
  3203. LightSeqAttract.Play SeqLeftOn, 40, 1
  3204. LightSeqAttract.UpdateInterval = 10
  3205. LightSeqAttract.Play SeqRightOn, 30, 1
  3206. LightSeqAttract.UpdateInterval = 10
  3207. LightSeqAttract.Play SeqLeftOn, 30, 1
  3208. LightSeqAttract.UpdateInterval = 8
  3209. LightSeqAttract.Play SeqRightOn, 25, 1
  3210. LightSeqAttract.UpdateInterval = 8
  3211. LightSeqAttract.Play SeqLeftOn, 25, 1
  3212. LightSeqAttract.UpdateInterval = 8
  3213. LightSeqAttract.Play SeqRightOn, 15, 1
  3214. LightSeqAttract.UpdateInterval = 8
  3215. LightSeqAttract.Play SeqLeftOn, 15, 1
  3216. LightSeqAttract.UpdateInterval = 10
  3217. LightSeqAttract.Play SeqCircleOutOn, 15, 3
  3218. LightSeqAttract.UpdateInterval = 8
  3219. LightSeqAttract.Play SeqLeftOn, 25, 1
  3220. LightSeqAttract.UpdateInterval = 8
  3221. LightSeqAttract.Play SeqRightOn, 25, 1
  3222. LightSeqAttract.UpdateInterval = 8
  3223. LightSeqAttract.Play SeqLeftOn, 25, 1
  3224. LightSeqAttract.UpdateInterval = 8
  3225. LightSeqAttract.Play SeqUpOn, 25, 1
  3226. LightSeqAttract.UpdateInterval = 8
  3227. LightSeqAttract.Play SeqDownOn, 25, 1
  3228. LightSeqAttract.UpdateInterval = 8
  3229. LightSeqAttract.Play SeqUpOn, 25, 1
  3230. LightSeqAttract.UpdateInterval = 8
  3231. LightSeqAttract.Play SeqDownOn, 25, 1
  3232. LightSeqAttract.UpdateInterval = 5
  3233. LightSeqAttract.Play SeqStripe1VertOn, 50, 2
  3234. LightSeqAttract.UpdateInterval = 8
  3235. LightSeqAttract.Play SeqCircleOutOn, 15, 2
  3236. LightSeqAttract.UpdateInterval = 8
  3237. LightSeqAttract.Play SeqStripe1VertOn, 50, 3
  3238. LightSeqAttract.UpdateInterval = 8
  3239. LightSeqAttract.Play SeqLeftOn, 25, 1
  3240. LightSeqAttract.UpdateInterval = 8
  3241. LightSeqAttract.Play SeqRightOn, 25, 1
  3242. LightSeqAttract.UpdateInterval = 8
  3243. LightSeqAttract.Play SeqLeftOn, 25, 1
  3244. LightSeqAttract.UpdateInterval = 8
  3245. LightSeqAttract.Play SeqUpOn, 25, 1
  3246. LightSeqAttract.UpdateInterval = 8
  3247. LightSeqAttract.Play SeqDownOn, 25, 1
  3248. LightSeqAttract.UpdateInterval = 8
  3249. LightSeqAttract.Play SeqCircleOutOn, 15, 2
  3250. LightSeqAttract.UpdateInterval = 8
  3251. LightSeqAttract.Play SeqStripe2VertOn, 50, 3
  3252. LightSeqAttract.UpdateInterval = 8
  3253. LightSeqAttract.Play SeqLeftOn, 25, 1
  3254. LightSeqAttract.UpdateInterval = 8
  3255. LightSeqAttract.Play SeqRightOn, 25, 1
  3256. LightSeqAttract.UpdateInterval = 8
  3257. LightSeqAttract.Play SeqLeftOn, 25, 1
  3258. LightSeqAttract.UpdateInterval = 8
  3259. LightSeqAttract.Play SeqUpOn, 25, 1
  3260. LightSeqAttract.UpdateInterval = 8
  3261. LightSeqAttract.Play SeqDownOn, 25, 1
  3262. LightSeqAttract.UpdateInterval = 8
  3263. LightSeqAttract.Play SeqUpOn, 25, 1
  3264. LightSeqAttract.UpdateInterval = 8
  3265. LightSeqAttract.Play SeqDownOn, 25, 1
  3266. LightSeqAttract.UpdateInterval = 8
  3267. LightSeqAttract.Play SeqStripe1VertOn, 25, 3
  3268. LightSeqAttract.UpdateInterval = 8
  3269. LightSeqAttract.Play SeqStripe2VertOn, 25, 3
  3270. LightSeqAttract.UpdateInterval = 8
  3271. LightSeqAttract.Play SeqUpOn, 15, 1
  3272. LightSeqAttract.UpdateInterval = 8
  3273. LightSeqAttract.Play SeqDownOn, 15, 1
  3274. LightSeqAttract.UpdateInterval = 8
  3275. LightSeqAttract.Play SeqUpOn, 15, 1
  3276. LightSeqAttract.UpdateInterval = 8
  3277. LightSeqAttract.Play SeqDownOn, 15, 1
  3278. LightSeqAttract.UpdateInterval = 8
  3279. LightSeqAttract.Play SeqUpOn, 15, 1
  3280. LightSeqAttract.UpdateInterval = 8
  3281. LightSeqAttract.Play SeqDownOn, 15, 1
  3282. LightSeqAttract.UpdateInterval = 8
  3283. LightSeqAttract.Play SeqRightOn, 15, 1
  3284. LightSeqAttract.UpdateInterval = 8
  3285. LightSeqAttract.Play SeqLeftOn, 15, 1
  3286. LightSeqAttract.UpdateInterval = 8
  3287. LightSeqAttract.Play SeqRightOn, 15, 1
  3288. LightSeqAttract.UpdateInterval = 8
  3289. LightSeqAttract.Play SeqLeftOn, 15, 1
  3290. End Sub
  3291.  
  3292. Sub LightSeqAttract_PlayDone()
  3293. StartLightSeq()
  3294. End Sub
  3295.  
  3296. Sub LightSeqTilt_PlayDone()
  3297. LightSeqTilt.Play SeqAllOff
  3298. End Sub
  3299.  
  3300. '***********************************************************************
  3301. ' *********************************************************************
  3302. ' Table Specific Script Starts Here
  3303. ' *********************************************************************
  3304. '***********************************************************************
  3305.  
  3306. ' droptargets, animations, etc
  3307. Sub VPObjects_Init
  3308. End Sub
  3309.  
  3310. ' tables variables and Mode init
  3311. Dim HoleBonus, BumperBonus, ALLRampBonus, RampBonus1, RampBonus2, RampBonus3, MulitballBonus, TargetBonus
  3312.  
  3313. Sub Game_Init() 'called at the start of a new game
  3314. Dim i, j
  3315. ChangeSong()
  3316. TargetBonus = 0
  3317. 'bumperHits = 100
  3318. BumperBonus = 0
  3319. ALLRampBonus = 0
  3320. RampBonus1 = 0
  3321. RampBonus2 = 0
  3322. RampBonus3 =0
  3323. MulitballBonus = 0
  3324. 'BallInHole = 0
  3325. TurnOffPlayfieldLights()
  3326. Status = "Normal"
  3327. in_ = "**"
  3328. su_ = "**"
  3329. lt_ = "**"
  3330. SpittingDistance(1) = 40
  3331. NextSpitKey = 1
  3332. BuildSpit = 0
  3333. Ramp010.Collidable = 1
  3334. MoveHead 180, 3
  3335. MonkeyHeadCounter = 0
  3336. LockCounter = 0
  3337. End Sub
  3338.  
  3339. Sub StopEndOfBallMode() 'this sub is called after the last ball is drained
  3340.  
  3341. End Sub
  3342.  
  3343. Sub ResetNewBallVariables() 'reset variables for a new ball or player
  3344. Dim i
  3345. TargetBonus = 0
  3346. bBallSaverReady = True
  3347. End Sub
  3348.  
  3349. Sub ResetNewBallLights() 'turn on or off the needed lights before a new ball is released
  3350. if voodoounlocked = 0 then
  3351. li047.state = 1
  3352. li011.state = 0
  3353. end if
  3354. if barunlocked = 0 then
  3355. li048.state = 1
  3356. li007.state = 0
  3357. end if
  3358. if trytoescape = 1 then
  3359. PlaySong "escapemusic"
  3360. end if
  3361. 'TurnOffPlayfieldLights
  3362. 'li025.State = 1
  3363. 'li021.State = 1
  3364. 'li022.State = 1
  3365. 'li023.State = 1
  3366. 'li024.State = 1
  3367. 'li033.state = 1
  3368. gi1.state = 1
  3369. gi2.state = 1
  3370. gi3.state = 1
  3371. gi4.state = 1
  3372. End Sub
  3373.  
  3374. Sub TurnOffPlayfieldLights()
  3375. Dim a
  3376. For each a in aLights
  3377. a.State = 0
  3378. Next
  3379. End Sub
  3380.  
  3381. ' *********************************************************************
  3382. ' Table Object Hit Events
  3383. '
  3384. ' Any target hit Sub should do something like this:
  3385. ' - play a sound
  3386. ' - do some physical movement
  3387. ' - add a score, bonus
  3388. ' - check some variables/Mode this trigger is a member of
  3389. ' - set the "LastSwitchHit" variable in case it is needed later
  3390. ' *********************************************************************
  3391.  
  3392. '************
  3393. ' Slingshots
  3394. '************
  3395.  
  3396. Dim RStep, Lstep
  3397.  
  3398. Sub RightSlingShot_Slingshot
  3399.  
  3400. PlaySound SoundFXDOF("rightslingy", 105, DOFPulse,DOFContactors), 0,1, 0.05,0.05 '0,1, AudioPan(RightSlingShot), 0.05,0,0,1,AudioFade(RightSlingShot)
  3401. RSling.Visible = 0:RSling1.Visible = 1
  3402. sling1.rotx = 20
  3403. RStep = 0
  3404. RightSlingShot.TimerEnabled = 1
  3405. Score(CurrentPlayer) = Score(CurrentPlayer) + (210*PFMultiplier)
  3406. gi1.State = 0
  3407. Gi2.State = 0
  3408. End Sub
  3409.  
  3410. Sub RightSlingShot_Timer
  3411. Select Case RStep
  3412. Case 1:RSLing1.Visible = 0:RSLing2.Visible = 1:sling1.rotx = 10:gi1.State = 0:Gi2.State = 0
  3413. Case 1:RSLing1.Visible = 0:RSLing2.Visible = 1:sling1.rotx = 5:gi1.State = 0:Gi2.State = 0
  3414. Case 2:RSLing2.Visible = 0:RSLing.Visible = 1:sling1.rotx = 0:gi1.State = 1:Gi2.State = 1:RightSlingShot.TimerEnabled = False
  3415. End Select
  3416. RStep = RStep + 1
  3417. End Sub
  3418.  
  3419. Sub LeftSlingShot_Slingshot
  3420. PlaySound SoundFXDOF("leftslingy", 103, DOFPulse,DOFContactors), 0,1, -0.05,0.05 '0,1, AudioPan(LeftSlingShot), 0.05,0,0,1,AudioFade(LeftSlingShot)
  3421. LSling.Visible = 0:LSling1.Visible = 1
  3422. sling2.rotx = 20
  3423. LStep = 0
  3424. LeftSlingShot.TimerEnabled = 1
  3425. Score(CurrentPlayer) = Score(CurrentPlayer) + (1000*PFMultiplier)
  3426. gi3.State = 0
  3427. Gi4.State = 0
  3428. End Sub
  3429.  
  3430. Sub LeftSlingShot_Timer
  3431. Select Case LStep
  3432. Case 1:LSLing1.Visible = 0:LSLing2.Visible = 1:sling2.rotx = 10:gi3.State = 0:Gi4.State = 0
  3433. Case 2:LSLing1.Visible = 0:LSLing2.Visible = 1:sling2.rotx = 5:gi3.State = 0:Gi4.State = 0
  3434. Case 3:LSLing2.Visible = 0:LSLing.Visible = 1:sling2.rotx = 0:gi3.State = 1:Gi4.State = 1:LeftSlingShot.TimerEnabled = False
  3435. End Select
  3436. LStep = LStep + 1
  3437. End Sub
  3438.  
  3439. '*****************
  3440. 'Spinners
  3441. '*****************
  3442.  
  3443. Sub Spinner001_Spin()
  3444. PlaySound "tin can"
  3445. Score(CurrentPlayer) = Score(CurrentPlayer) + (500*PFMultiplier)
  3446. DOF 115, DOFPulse
  3447. End Sub
  3448.  
  3449. '*****************
  3450. 'triggers
  3451. '*****************
  3452. Dim LeftOrbitStart:LeftOrbitStart = 0
  3453. Dim RightOrbitStart:RightOrbitStart = 0
  3454. Dim GrogCounter:GrogCounter = 0
  3455. Dim GrogEnabled:GrogEnabled = 1
  3456.  
  3457. Sub TrRightOrbit_Hit()
  3458. If Status = "Duels" Then
  3459. ProcessDuels(7)
  3460. Exit Sub
  3461. End If
  3462. If KiGrog.Enabled = 1 Then
  3463. Exit Sub
  3464. End If
  3465. If RightOrbitStart = 1 Then
  3466. 'Play Some Sound that you didn't make it
  3467. RightOrbitStart = 0
  3468. DMDFlush()
  3469. DMD "_", CL(1, "RIGHT LANE"), "_", eNone, eNone, eNone, 1, False, ""
  3470. DMD "_", CL(1, "_"), "_", eNone, eScrollRight, eNone, 1, True, ""
  3471. Exit Sub
  3472. End If
  3473. If LeftOrbitStart = 2 Then
  3474. LeftOrbitStart = 0
  3475. Exit Sub
  3476. End If
  3477. If RightOrbitStart = 0 Then
  3478. DMD "_", CL(1, "RIGHT LANE"), "_", eNone, eScrollLeft, eNone, 1, False, ""
  3479. DMD "_", CL(1, "RIGHT LANE"), "_", eNone, eNone, eNone, 1, False, ""
  3480. RightOrbitStart = 1
  3481. LSOrbit.Play SeqRadarLeftOn, 10
  3482. End If
  3483. Score(CurrentPlayer) = Score(CurrentPlayer) + (100*PFMultiplier)
  3484. vpmTimer.AddTimer 2000, "RightOrbitStart = 0 '"
  3485. vpmTimer.AddTimer 2100, "DMDScoreNow() '"
  3486. End Sub
  3487.  
  3488. Sub TrRightOrbitMake_Hit()
  3489. If RightOrbitStart = 1 Then
  3490. Score(CurrentPlayer) = Score(CurrentPlayer) + (900*PFMultiplier)
  3491. 'Play Some Sound for making a right orbit
  3492. 'Maybe some lighting effect
  3493. DMD "_", CL(1, "RIGHT LANE"), "_", eNone, eNone, eNone, 1, False, ""
  3494. DMD "_", CL(1, "_"), "_", eNone, eScrollLeft, eNone, 1, True, ""
  3495. GrogCounter = GrogCounter + 1
  3496. RightOrbitStart = 2
  3497. If GrogCounter >= 3 Then
  3498. GrogEnabled = 1
  3499. ' KiGrog.Enabled = 1
  3500. End If
  3501. End If
  3502. End Sub
  3503.  
  3504. Sub TrLeftOrbit_Hit()
  3505. If Status = "Duels" Then
  3506. ProcessDuels(0)
  3507. Exit Sub
  3508. End If
  3509. If LeftOrbitStart = 1 Then
  3510. 'Play Some Sound that you didn't make it
  3511. LeftOrbitStart = 0
  3512. DMDFlush()
  3513. DMD "_", CL(1, "LEFT LANE"), "_", eNone, eNone, eNone, 1, False, ""
  3514. DMD "_", CL(1, "_"), "_", eNone, eScrollLeft, eNone, 1, True, ""
  3515. Exit Sub
  3516. End If
  3517. If RightOrbitStart = 2 Then
  3518. RightOrbitStart = 0
  3519. Exit Sub
  3520. End If
  3521. If LeftOrbitStart = 0 Then
  3522. DMD "_", CL(1, "LEFT LANE"), "_", eNone, eScrollRight, eNone, 1, False, ""
  3523. DMD "_", CL(1, "LEFT LANE"), "_", eNone, eNone, eNone, 1, False, ""
  3524. LeftOrbitStart = 1
  3525. LSOrbit.Play SeqRadarRightOn, 10
  3526. End If
  3527. Score(CurrentPlayer) = Score(CurrentPlayer) + (100*PFMultiplier)
  3528. vpmTimer.AddTimer 2000, "LeftOrbitStart = 0 '"
  3529. vpmTimer.AddTimer 2100, "DMDScoreNow() '"
  3530. End Sub
  3531.  
  3532. Sub TrLeftOrbitMake_Hit()
  3533. If LeftOrbitStart = 1 Then
  3534. Score(CurrentPlayer) = Score(CurrentPlayer) + (900*PFMultiplier)
  3535. 'Play Some Sound for making a left orbit
  3536. 'Maybe some lighting effect
  3537. LeftOrbitStart = 2
  3538. DMD "_", CL(1, "LEFT LANE"), "_", eNone, eNone, eNone, 1, False, ""
  3539. DMD "_", CL(1, "_"), "_", eNone, eScrollRight, eNone, 1, True, ""
  3540. End If
  3541. End Sub
  3542.  
  3543. '**********************Bananas b2s bonus *********************
  3544.  
  3545. sub itemrotytimer001_timer
  3546. banaan001.RotY = banaan001.RotY + 1
  3547. if banaan001.RotY > 360 then
  3548. banaan001.RotY = 1
  3549. end if
  3550. banaan002.RotY = banaan002.RotY + 1
  3551. if banaan002.RotY > 360 then
  3552. banaan002.RotY = 1
  3553. end if
  3554. end sub
  3555.  
  3556. sub banaany1()
  3557. tbanaan001.enabled = 1
  3558. tbanaan002.enabled = 0
  3559. banaan001.Visible = 1
  3560. banaan002.Visible = 0
  3561. end sub
  3562.  
  3563. sub banaany2()
  3564. tbanaan001.enabled = 0
  3565. tbanaan002.enabled = 1
  3566. banaan001.Visible = 0
  3567. banaan002.Visible = 1
  3568. end sub
  3569.  
  3570. sub tbanaan001_hit()
  3571. playsound "haveabanana"
  3572. banaany2()
  3573. Score(CurrentPlayer) = Score(CurrentPlayer) + (5000*PFMultiplier)
  3574. bananasearned = bananasearned + 1
  3575. Updatebananascountr()
  3576. vpmtimer.addtimer 250, "startB2S(3) '"
  3577. end sub
  3578.  
  3579. sub tbanaan002_hit()
  3580. playsound "bananashurt"
  3581. banaany1()
  3582. Score(CurrentPlayer) = Score(CurrentPlayer) + (5000*PFMultiplier)
  3583. bananasearned = bananasearned + 1
  3584. Updatebananascountr()
  3585. vpmtimer.addtimer 250, "startB2S(3) '"
  3586. end sub
  3587.  
  3588. sub disablebanana()
  3589. itemrotytimer001.enabled = 0
  3590. banaan002.Visible = 0
  3591. banaan001.Visible = 0
  3592. tbanaan002.enabled = 0
  3593. tbanaan001.enabled = 0
  3594. end sub
  3595.  
  3596. '**********************murray cave*********************
  3597.  
  3598. Sub tmurray_Hit
  3599. startB2S(6)
  3600. PlayMurrayQuote()
  3601. vpmTimer.AddTimer 2000, "Ramp010.Collidable = 0 :DOF 132,2 '"
  3602. vpmTimer.AddTimer 2250, "Ramp010.Collidable = 1 '"
  3603. End Sub
  3604.  
  3605. '**********************inner/outerlane*********************
  3606.  
  3607. Sub TLeftInlane_Hit
  3608. 'FlashForMs Flasher011, 1000, 50, 0
  3609. BlinkFlasher 1,450,150
  3610. LeftInlane.State = 1
  3611. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  3612. PlaySound "doorclose"
  3613. DMD "", "", "10k", eNone, eNone, eNone, 500, True, ""
  3614. Checkbgrog
  3615. End Sub
  3616.  
  3617. Sub TLeftOutlane_Hit
  3618. Flash8 True
  3619. 'FlashForMs Flasher011, 1000, 50, 0
  3620. BlinkFlasher 1,450,150
  3621. LeftOutlane.State = 1
  3622. Score(CurrentPlayer) = Score(CurrentPlayer) + (50000*PFMultiplier)
  3623. PlaySound "wallop"
  3624. DMD "", "", "50k", eNone, eNone, eNone, 500, True, ""
  3625. Checkbgrog
  3626. End Sub
  3627.  
  3628. Sub TRightInlane_Hit
  3629. 'FlashForMs Flasher012, 1000, 50, 0
  3630. BlinkFlasher 2,450,150
  3631. RightInlane.State = 1
  3632. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  3633. PlaySound "doorclose"
  3634. DMD "", "", "10k", eNone, eNone, eNone, 500, True, ""
  3635. Checkbgrog
  3636. End Sub
  3637.  
  3638. Sub TRightOutlane_Hit
  3639. Flash9 True
  3640. 'FlashForMs Flasher012, 1000, 50, 0
  3641. BlinkFlasher 2,450,150
  3642. RightOutlane.State = 1
  3643. Score(CurrentPlayer) = Score(CurrentPlayer) + (50000*PFMultiplier)
  3644. PlaySound "wallop"
  3645. DMD "", "", "50k", eNone, eNone, eNone, 500, True, ""
  3646. Checkbgrog
  3647. End Sub
  3648.  
  3649. Sub Checkbgrog
  3650. If(LeftInlane.State = 1) And(LeftOutlane.State = 1) And(RightInlane.State = 1) And(RightOutlane.State = 1) Then
  3651. DMD "", "", "dmdgrog", eNone, eNone, eNone, 1000, True, "grog"
  3652. AddScore 100000
  3653. LeftInlane.State=0
  3654. LeftOutlane.State=0
  3655. RightInlane.State=0
  3656. RightOutlane.State=0
  3657. End If
  3658. End Sub
  3659.  
  3660. '**********************other way to add bonus*********************
  3661.  
  3662. Sub Bonuschecker_Hit
  3663. Flash9 True
  3664. Flash8 True
  3665. FlashForMs Flasher001, 1000, 50, 0
  3666. FlashForMs Flasher002, 1000, 50, 0
  3667. FlashForMs Flasher003, 1000, 50, 0
  3668. FlashForMs Flasher004, 1000, 50, 0
  3669. FlashForMs Flasher005, 1000, 50, 0
  3670. FlashForMs Flasher006, 1000, 50, 0
  3671. FlashForMs Flasher007, 1000, 50, 0
  3672. FlashForMs Flasher008, 1000, 50, 0
  3673. FlashForMs Flasher009, 1000, 50, 0
  3674. 'FlashForMs Flasher011, 1000, 50, 0
  3675. BlinkFlasher 1,450,150
  3676. 'FlashForMs Flasher012, 1000, 50, 0
  3677. BlinkFlasher 2,450,150
  3678. 'FlashForMs Flasher020, 1000, 50, 0
  3679. BlinkFlasher 3,450,150
  3680. 'FlashForMs Flasher019, 1000, 50, 0
  3681. BlinkFlasher 4,450,150
  3682. End Sub
  3683.  
  3684. '**********************grevediggers*********************
  3685. sub gravetrigger_hit
  3686. Score(CurrentPlayer) = Score(CurrentPlayer) + (50000*PFMultiplier)
  3687. DMD "", "", "dmddigg", eNone, eNone, eNone, 1000, True, ""
  3688. gravediggers = gravediggers + 1
  3689. checkgravecomplete
  3690. end sub
  3691.  
  3692. sub checkgravecomplete
  3693. if gravediggers = 3 Then
  3694. DMD "", "", "dmddiggc", eNone, eNone, eNone, 1000, True, ""
  3695. PlaySound "landliving"
  3696. li043.state = 1
  3697. escapeMI = escapeMI + 1
  3698. checktoescape
  3699. Score(CurrentPlayer) = Score(CurrentPlayer) + (100000*PFMultiplier)
  3700. exit sub
  3701. end if
  3702. if gravediggers = 6 Then
  3703. PlaySound "landliving"
  3704. Score(CurrentPlayer) = Score(CurrentPlayer) + (200000*PFMultiplier)
  3705. exit sub
  3706. end if
  3707. if gravediggers = 9 Then
  3708. PlaySound "landliving"
  3709. Score(CurrentPlayer) = Score(CurrentPlayer) + (300000*PFMultiplier)
  3710. exit sub
  3711. end if
  3712. if gravediggers = 12 Then
  3713. PlaySound "landliving"
  3714. Score(CurrentPlayer) = Score(CurrentPlayer) + (400000*PFMultiplier)
  3715. exit sub
  3716. end if
  3717. if gravediggers = 15 Then
  3718. PlaySound "landliving"
  3719. Score(CurrentPlayer) = Score(CurrentPlayer) + (500000*PFMultiplier)
  3720. exit sub
  3721. end if
  3722. if gravediggers = 18 Then
  3723. PlaySound "landliving"
  3724. Score(CurrentPlayer) = Score(CurrentPlayer) + (600000*PFMultiplier)
  3725. exit sub
  3726. end if
  3727. if gravediggers = 21 Then
  3728. PlaySound "landliving"
  3729. Score(CurrentPlayer) = Score(CurrentPlayer) + (700000*PFMultiplier)
  3730. exit sub
  3731. end if
  3732. if gravediggers = 24 Then
  3733. PlaySound "landliving"
  3734. Score(CurrentPlayer) = Score(CurrentPlayer) + (800000*PFMultiplier)
  3735. exit sub
  3736. end if
  3737. if gravediggers = 27 Then
  3738. PlaySound "landliving"
  3739. Score(CurrentPlayer) = Score(CurrentPlayer) + (900000*PFMultiplier)
  3740. exit sub
  3741. end if
  3742. if gravediggers = 30 Then
  3743. PlaySound "landliving"
  3744. Score(CurrentPlayer) = Score(CurrentPlayer) + (1000000*PFMultiplier)
  3745. exit sub
  3746. end if
  3747. PlaySound "Spooky"
  3748. end sub
  3749.  
  3750. '**************************
  3751. 'Bumpers
  3752. '**************************
  3753.  
  3754. sub scorebumpers
  3755. PlaySound "shakegrog"
  3756. Score(CurrentPlayer) = Score(CurrentPlayer) + (2500*PFMultiplier)
  3757. end sub
  3758.  
  3759. Sub Bumper001_hit()
  3760. bumperHits = bumperHits + 1
  3761. DMDFlush
  3762. DMD CL(0, FormatScore(Score(Currentplayer) ) ), CL(1, bumperHits& " BARRELS HIT"), "_", eNone, eNone, eNone, 300, True, ""
  3763. Flash9 True
  3764. Flash8 True
  3765. PlaySound "BlockHi"
  3766. DOF 108, DOFPulse
  3767. Bumper001tim.Enabled = 1
  3768. ' Me.TimerEnabled = 1
  3769. TipFull1 = 8
  3770. HasJumped1 = 0
  3771. scorebumpers
  3772. End sub
  3773. ' Bumper Bonus
  3774. ' 100000 i bonus after each 100 hits
  3775.  
  3776. Dim Tip1, TipFull1, Jump1, HasJumped1, JumpSpeed
  3777. Jumpspeed = 1
  3778. Jump1 = 1
  3779. Tip1 = 1
  3780. TipFull1 = 8
  3781. Sub Bumper001tim_Timer()
  3782. If HasJumped1 = 0 Then
  3783. barrel001.Z = dSin(Jump1)*30 + 100
  3784. Jump1 = Jump1 + 1
  3785. If Jump1 >= 180 Then
  3786. Jump1 = 1
  3787. HasJumped1 = 1
  3788. End If
  3789. End If
  3790. If HasJumped1 = 1 Then
  3791. barrel001.RotY = dSin(Tip1)*TipFull1
  3792. barrel001.ObjRotZ = barrel001.ObjRotZ + 0.1
  3793. If barrel001.ObjRotZ >= 360 Then barrel001.ObjRotZ = 0
  3794. Tip1 = Tip1 + 1
  3795. If Tip1 > 360 Then
  3796. Tip1 = 1
  3797. TipFull1 = TipFull1 - 1
  3798. End If
  3799. If TipFull1 <= 0 Then Bumper001tim.Enabled = 0
  3800. End If
  3801. End Sub
  3802.  
  3803. Sub Bumper002_hit()
  3804. bumperHits = bumperHits + 1
  3805. DMDFlush
  3806. DMD CL(0, FormatScore(Score(Currentplayer) ) ), CL(1, bumperHits& " BARRELS HIT"), "_", eNone, eNone, eNone, 300, True, ""
  3807. Flash9 True
  3808. Flash8 True
  3809. PlaySound "BlockMid"
  3810. DOF 109, DOFPulse
  3811. Bumper002tim.Enabled = 1
  3812. ' Me.TimerEnabled = 1
  3813. TipFull2 = 8
  3814. HasJumped2 = 0
  3815. scorebumpers
  3816. End sub
  3817. ' Bumper Bonus
  3818. ' 100000 i bonus after each 100 hits
  3819.  
  3820. Dim Tip2, TipFull2, Jump2, HasJumped2
  3821. Jump2 = 1
  3822. Tip2 = 1
  3823. TipFull2 = 8
  3824. Sub Bumper002tim_Timer()
  3825. If HasJumped2 = 0 Then
  3826. barrel002.Z = dSin(Jump2)*30 + 100
  3827. Jump2 = Jump2 + 1
  3828. If Jump2 >= 180 Then
  3829. Jump2 = 1
  3830. HasJumped2 = 1
  3831. End If
  3832. End If
  3833. If HasJumped2 = 1 Then
  3834. barrel002.RotY = dSin(Tip2)*TipFull2
  3835. barrel002.ObjRotZ = barrel002.ObjRotZ + 0.1
  3836. If barrel002.ObjRotZ >= 360 Then barrel002.ObjRotZ = 0
  3837. Tip2 = Tip2 + 1
  3838. If Tip2 > 360 Then
  3839. Tip2 = 1
  3840. TipFull2 = TipFull2 - 1
  3841. End If
  3842. If TipFull2 <= 0 Then Bumper002tim.Enabled = 0
  3843. End If
  3844. End Sub
  3845.  
  3846. Sub Bumper003_hit()
  3847. bumperHits = bumperHits + 1
  3848. DMDFlush
  3849. DMD CL(0, FormatScore(Score(Currentplayer) ) ), CL(1, bumperHits& " BARRELS HIT"), "_", eNone, eNone, eNone, 300, True, ""
  3850. Flash9 True
  3851. Flash8 True
  3852. PlaySound "BlockLo"
  3853. DOF 107, DOFPulse
  3854. Bumper003tim.Enabled = 1
  3855. ' Me.TimerEnabled = 1
  3856. TipFull3 = 8
  3857. HasJumped3 = 0
  3858. scorebumpers
  3859. End sub
  3860. ' Bumper Bonus
  3861. ' 100000 i bonus after each 100 hits
  3862.  
  3863. Dim Tip3, TipFull3, Jump3, HasJumped3
  3864. Jump3 = 1
  3865. Tip3 = 1
  3866. TipFull3 = 8
  3867. Sub Bumper003tim_Timer()
  3868. If HasJumped3 = 0 Then
  3869. barrel003.Z = dSin(Jump3)*30 + 100
  3870. Jump3 = Jump3 + 1
  3871. If Jump3 >= 180 Then
  3872. Jump3 = 1
  3873. HasJumped3 = 1
  3874. End If
  3875. End If
  3876. If HasJumped3 = 1 Then
  3877. barrel003.RotY = dSin(Tip3)*TipFull3
  3878. barrel003.ObjRotZ = barrel003.ObjRotZ + 0.1
  3879. If barrel003.ObjRotZ >= 360 Then barrel003.ObjRotZ = 0
  3880. Tip3 = Tip3 + 1
  3881. If Tip3 > 360 Then
  3882. Tip3 = 1
  3883. TipFull3 = TipFull3 - 1
  3884. End If
  3885. If TipFull3 <= 0 Then Bumper003tim.Enabled = 0
  3886. End If
  3887. End Sub
  3888.  
  3889. '*****************
  3890. 'Targets
  3891. '*****************
  3892.  
  3893. '*****************
  3894. 'ball saved
  3895. '*****************
  3896. Dim SafeBall:SafeBall = 0
  3897. sub Target008_hit()
  3898. PlaySound "fx_target"
  3899. Score(CurrentPlayer) = Score(CurrentPlayer) + (1000*PFMultiplier)
  3900. SafeBall = SafeBall OR 1 'Set SafeBall to the right being hit
  3901. Select Case SafeBall
  3902. Case 1 'I've already been hit...
  3903. li049.state = 2 'Set the light to blinking
  3904. Exit Sub 'and don't do anything more
  3905. Case 3 'The left target was hit already
  3906. li049.state = 1 'Set the light to be on
  3907. balltosafty.enabled = false 'reset the timer, in case it's already on
  3908. balltosafty.enabled = true
  3909. ' EnableBallSaver 30
  3910. SafeBall = 0
  3911. Case Else 'EP- Should never get here, something's wrong... probably my coding
  3912. 'PlaySound "Knocker"
  3913. End Select
  3914. end Sub
  3915.  
  3916. sub Target009_hit()
  3917. PlaySound "fx_target"
  3918. Score(CurrentPlayer) = Score(CurrentPlayer) + (1000*PFMultiplier)
  3919. SafeBall = SafeBall OR 2 'Set SafeBall to the left being hit
  3920. Select Case SafeBall
  3921. Case 2 'I've already been hit...
  3922. li049.state = 2 'Set the light to blinking
  3923. Exit Sub 'and don't do anything more
  3924. Case 3 'The right target was hit already
  3925. li049.state = 1 'Set the light to be on
  3926. balltosafty.enabled = false 'reset the timer, in case it's already on
  3927. balltosafty.enabled = true
  3928. ' EnableBallSaver 30
  3929. SafeBall = 0
  3930. Case Else 'EP- Should never get here, something's wrong... probably my coding
  3931. Exit Sub
  3932. End Select
  3933. end Sub
  3934.  
  3935. sub balltosafty_timer
  3936. li049.state = 0
  3937. balltosafty.enabled = 0
  3938. end sub
  3939.  
  3940. '*****************
  3941. 'INSULT
  3942. '*****************
  3943. Dim in_, su_, lt_
  3944. Sub Target005_hit() 'IN target
  3945. If Status = "Normal" AND VoodooSlot <> 31 Then
  3946. li037.state = 1
  3947. li038.state = 1
  3948. in_ = "IN"
  3949. PlayQuoteInsult()
  3950. DMD CL(0, "" & in_ & su_ & lt_), CL(1, "SPELL INSULT"),"",0,0,0,1000,True,""
  3951. CheckInsult()
  3952. End If
  3953. PlaySound "fx_target", 0, 0.2, Pan(ActiveBall) * 10
  3954. TargetBonus = TargetBonus + 1
  3955. Score(CurrentPlayer) = Score(CurrentPlayer) + (1000*PFMultiplier)
  3956. LSIns001.Play SeqCircleOutOn, 10
  3957. End Sub
  3958.  
  3959. Sub Target007_hit()
  3960. If Status = "Normal" AND VoodooSlot <> 31 Then
  3961. li039.state = 1
  3962. li040.state = 1
  3963. PlayQuoteInsult()
  3964. su_ = "SU"
  3965. DMD CL(0, "" & in_ & su_ & lt_), CL(1, "SPELL INSULT"),"",0,0,0,1000,True,""
  3966. CheckInsult()
  3967. End If
  3968. PlaySound "fx_target", 0, 0.2, Pan(ActiveBall) * 100
  3969. TargetBonus = TargetBonus + 1
  3970. Score(CurrentPlayer) = Score(CurrentPlayer) + (1000*PFMultiplier)
  3971. LSIns002.Play SeqCircleOutOn, 10
  3972.  
  3973. End Sub
  3974.  
  3975. Sub Target006_hit()
  3976. if Status = "Normal" AND VoodooSlot <> 31 Then
  3977. li041.state = 1
  3978. li042.state = 1
  3979. PlayQuoteInsult()
  3980. lt_ = "LT"
  3981. DMD CL(0, "" & in_ & su_ & lt_), CL(1, "SPELL INSULT"),"",0,0,0,1000,True,""
  3982. CheckInsult()
  3983. End If
  3984. PlaySound "fx_target", 0, 0.2, Pan(ActiveBall) * 100
  3985. TargetBonus = TargetBonus + 1
  3986. Score(CurrentPlayer) = Score(CurrentPlayer) + (1000*PFMultiplier)
  3987. LSIns003.Play SeqCircleOutOn, 10
  3988. End Sub
  3989.  
  3990. Sub CheckInsult()
  3991. if (in_ = "IN") And (su_ = "SU") And (lt_ = "LT") Then
  3992. if voodoounlocked = 0 Then
  3993. playsound "Unlock"
  3994. Score(CurrentPlayer) = Score(CurrentPlayer) + (75000*PFMultiplier)
  3995. end if
  3996. voodoounlocked = 1
  3997. DMDFlush()
  3998. DMD "", "", "dmdinsult", eNone, eNone, eNone, 1000, True, ""
  3999. li047.state = 0
  4000. li037.state = 2
  4001. li038.state = 2
  4002. li039.state = 2
  4003. li040.state = 2
  4004. li041.state = 2
  4005. li042.state = 2
  4006. If Status = "Normal" Then li011.state = 2
  4007. Else
  4008. DMD CL(0, "SPELL INSULT"), CL(1, "TO UNLOCK DEEP GUT"), "", eScrollLeft, eScrollRight, eNone, 1500, True, ""
  4009. End if
  4010. End Sub
  4011.  
  4012. '*****************
  4013. 'monkey battles
  4014. '*****************
  4015. Dim Monkey3Hit:Monkey3Hit = 0
  4016. sub Target003_hit() 'Left Monkey
  4017. 'Updatemonkeycountr
  4018. plank3Shaker()
  4019. TargetBonus = TargetBonus + 1
  4020. PlaySound "monkeyhit"
  4021. DOF 124, DOFPulse
  4022. 'Play the angry animation on the monkey
  4023. Monkey3Hit = 1
  4024. 'change the animation speed since being angry is faster... ?
  4025. FrameNext3 = FrameRate3b
  4026. 'make the next frame to be played the first angry frame
  4027. Monkey3Frame = 11
  4028. Score(CurrentPlayer) = Score(CurrentPlayer) + (1000*PFMultiplier)
  4029. li003.state = 1
  4030. CheckMonkeyBattle()
  4031. Monkey3JumpsMax = 1
  4032. Wall014.TimerEnabled = 1
  4033. end sub
  4034.  
  4035. Dim Monkey2Hit:Monkey2Hit = 0
  4036. sub Target002_hit() 'Right Monkey
  4037. 'Updatemonkeycountr
  4038. plank2Shaker()
  4039. TargetBonus = TargetBonus + 1
  4040. PlaySound "monkeyhit"
  4041. DOF 128, DOFPulse
  4042. Monkey2Hit = 1
  4043. FrameNext2 = FrameRate2b
  4044. Monkey2Frame = 11
  4045. Score(CurrentPlayer) = Score(CurrentPlayer) + (1000*PFMultiplier)
  4046. li005.state = 1
  4047. CheckMonkeyBattle()
  4048. Monkey2JumpsMax = 1
  4049. Wall015.TimerEnabled = 1
  4050. end sub
  4051.  
  4052. Dim Monkey1Hit:Monkey1Hit = 0
  4053. sub Target001_hit() 'Center Monkey
  4054. 'Updatemonkeycountr
  4055. plank1Shaker()
  4056. TargetBonus = TargetBonus + 1
  4057. PlaySound "monkeyhit"
  4058. DOF 126, DOFPulse
  4059. Monkey1Hit = 1
  4060. FrameNext1 = FrameRate1b
  4061. Monkey1Frame = 11
  4062. Score(CurrentPlayer) = Score(CurrentPlayer) + (1000*PFMultiplier)
  4063. li004.state = 1
  4064. CheckMonkeyBattle()
  4065. Monkey1JumpsMax = 1
  4066. Wall020.TimerEnabled = 1
  4067. end sub
  4068.  
  4069. Sub CheckMonkeyBattle()
  4070. If(li003.State = 1) And(li004.State = 1) And(li005.State = 1) Then
  4071. 'Playsound "po_fanfare5"
  4072. AddScore 25000
  4073. li004.State=0
  4074. li005.state=0
  4075. li003.state=0
  4076. monkeybattle = monkeybattle + 1
  4077. Updatemonkeycountr
  4078. vpmtimer.addtimer 250, "startB2S(3) '"
  4079. End If
  4080. End Sub
  4081.  
  4082. '***********plank shakers*************
  4083. 'Dim plank1Shake
  4084. Dim plank2Shake
  4085. Dim plank3Shake
  4086.  
  4087. Sub plank1Shaker()
  4088. ' plank1Shake = 6
  4089. plank1Timer.Enabled = True
  4090. End Sub
  4091.  
  4092. 'A number between 1 and 360 to calculate Sin on
  4093. Dim PlankShake1:PlankShake1 = 1
  4094. 'How far to move the plank; bigger numbers will increase how far away from the center it moves, smaller numbers means smaller movement
  4095. 'We could get the velocity of the ball when it hits the plank to dynamically change this. Harder hits = bigger shakes (and longer since it has to move farther)
  4096. Dim PlankShakeDist1:PlankShakeDist1 = 12
  4097. 'How fast the plank shakes; bigger numbers will make it vibrate, smaller numbers will make it move in slow motion
  4098. Dim PlankShakeSpeed1:PlankShakeSpeed1 = 4
  4099. 'How stiff the plank is; bigger numbers will make it wobble less as if it were connect to stiff rod, smaller numbers make it wobble longer like it was on a loose spring
  4100. Dim PlankStiff1:PlankStiff1 = 0.5
  4101. Sub plank1Timer_Timer()
  4102. me.Interval = 1
  4103. 'Use the same math as on the barrells to shake the planks
  4104. plank1.TransZ = dSin(PlankShake1)*PlankShakeDist1
  4105. 'Increase the number the math does work on at a rate we have control over
  4106. PlankShake1 = PlankShake1 + PlankShakeSpeed1
  4107. 'We don't want this number to increment indefinitely since 361 is the same as 1 when it comes to calculating Sin
  4108. If PlankShake1 > 360 Then
  4109. PlankShake1 = 1
  4110. 'Decrease the distance it moves from center each time it moves left and right so the next time it moves left and right, it doesn't move as far
  4111. PlankShakeDist1 = PlankShakeDist1 - PlankStiff1
  4112. End If
  4113. 'If it's shaken back and forth the specified number of times (PlankShakeDist1), then we're done
  4114. If PlankShakeDist1 <= 0 Then
  4115. 'Turn off the animation
  4116. me.Enabled = 0
  4117. 'Reset the shake amount for next time
  4118. PlankShakeDist1 = 12
  4119. End If
  4120. End Sub
  4121.  
  4122. Sub plank2Shaker()
  4123. plank2Shake = 6
  4124. plank2Timer.Enabled = True
  4125. End Sub
  4126.  
  4127. Dim PlankShake2:PlankShake2 = 1
  4128. Dim PlankShakeDist2:PlankShakeDist2 = 12
  4129. Dim PlankShakeSpeed2:PlankShakeSpeed2 = 4
  4130. Dim PlankStiff2:PlankStiff2 = 0.5
  4131. Sub plank2Timer_Timer()
  4132. me.Interval = 1
  4133. plank2.TransZ = dSin(PlankShake2)*PlankShakeDist2
  4134. PlankShake2 = PlankShake2 + PlankShakeSpeed2
  4135. If PlankShake2 > 360 Then
  4136. PlankShake2 = 1
  4137. PlankShakeDist2 = PlankShakeDist2 - PlankStiff2
  4138. End If
  4139. If PlankShakeDist2 <= 0 Then
  4140. me.Enabled = 0
  4141. PlankShakeDist2 = 12
  4142. End If
  4143. End Sub
  4144.  
  4145. Sub plank3Shaker()
  4146. plank3Shake = 6
  4147. plank3Timer.Enabled = True
  4148. End Sub
  4149.  
  4150. Dim PlankShake3:PlankShake3 = 1
  4151. Dim PlankShakeDist3:PlankShakeDist3 = 12
  4152. Dim PlankShakeSpeed3:PlankShakeSpeed3 = 4
  4153. Dim PlankStiff3:PlankStiff3 = 0.5
  4154. Sub plank3Timer_Timer()
  4155. me.Interval = 1
  4156. plank3.TransZ = dSin(PlankShake3)*PlankShakeDist3
  4157. PlankShake3 = PlankShake3 + PlankShakeSpeed3
  4158. If PlankShake3 > 360 Then
  4159. PlankShake3 = 1
  4160. PlankShakeDist3 = PlankShakeDist3 - PlankStiff3
  4161. End If
  4162. If PlankShakeDist3 <= 0 Then
  4163. me.Enabled = 0
  4164. PlankShakeDist3 = 12
  4165. End If
  4166. End Sub
  4167.  
  4168. '*****************
  4169. 'Gates
  4170. '*****************
  4171. sub Gate_Hit()
  4172. 'AddMultiball 1
  4173. ' countr41 = 1
  4174. ' TMBcoinys.enabled = 1
  4175. 'checktoescape
  4176. Playsound "gate1"
  4177. LightSeq002.StopPlay
  4178. 'FlashForMs Flasher020, 1000, 50, 0
  4179. BlinkFlasher 3,450,150
  4180. 'FlashForMs Flasher019, 1000, 50, 0
  4181. BlinkFlasher 4,450,150
  4182. startB2S(3)
  4183. If PFMultiplier > 1 then exit sub
  4184. LightSeq001.Play SeqRightOn, 25, 1000
  4185. End Sub
  4186.  
  4187. sub Gate003_Hit()
  4188. Playsound "dock"
  4189. End Sub
  4190.  
  4191. sub Gate001_Hit()
  4192. Playsound "gate004"
  4193. movegraves
  4194. End Sub
  4195.  
  4196. sub movegraves
  4197. Playsound "monkeytargup"
  4198. grave001.ObjRotx = 20
  4199. grave002.ObjRotx = 20
  4200. grave003.ObjRotx = 20
  4201. vpmTimer.AddTimer 500, "gravesnormal '"
  4202. end sub
  4203.  
  4204. sub gravesnormal
  4205. Playsound "monkeytargup"
  4206. grave001.ObjRotx = 0
  4207. grave002.ObjRotx = 0
  4208. grave003.ObjRotx = 0
  4209. end sub
  4210.  
  4211. '*****************
  4212. 'Kickers
  4213. '*****************
  4214. Dim dBall
  4215.  
  4216. '*****************Lechuck**************************
  4217. Dim LeChuckHits:LeChuckHits = 0
  4218.  
  4219. sub Kicker001_hit()
  4220. if bMultiBallMode = true Then
  4221. Score(CurrentPlayer) = Score(CurrentPlayer) + (1000*PFMultiplier)
  4222. Flash8 True
  4223. PlayLechuckQuote()
  4224. Set dBall = ActiveBall
  4225. MyTroughLeChuckAdd(dBall)
  4226. StartLeChuckSlotMachineLechuck()
  4227. exit sub
  4228. end if
  4229. If LeChuckHits = 2 AND Status = "Normal" AND LeChuckSlot <> 255 Then
  4230. LightSeq004.Play SeqDownOn, 25, 500
  4231. li009.State = 2
  4232. end if
  4233. If LeChuckHits >= 3 AND Status = "Normal" AND LeChuckSlot <> 255 Then
  4234. Set dBall = ActiveBall
  4235. MyTroughLeChuckAdd(dBall)
  4236. StartLechuckItemsSlotmachine()
  4237. Exit Sub
  4238. End If
  4239. If Status = "Normal" AND LeChuckSlot <> 255 Then
  4240. LeChuckHits = LeChuckHits + 1
  4241. If LeChuckHits >= 3 Then li009.State = 2
  4242. Score(CurrentPlayer) = Score(CurrentPlayer) + (1000*PFMultiplier)
  4243. End If
  4244. Score(CurrentPlayer) = Score(CurrentPlayer) + (1000*PFMultiplier)
  4245. Flash8 True
  4246. PlayLechuckQuote()
  4247. Set dBall = ActiveBall
  4248. MyTroughLeChuckAdd(dBall)
  4249. StartLeChuckSlotMachineLechuck()
  4250. end sub
  4251.  
  4252. '***************** Vulcano**************************
  4253. sub Kicker004_hit()
  4254. if bMultiBallMode = true Then
  4255. vulcanokick()
  4256. exit sub
  4257. end if
  4258. greatdive = greatdive + 1
  4259. ' FlashForMs Flasher019, 1000, 50, 0
  4260. Score(CurrentPlayer) = Score(CurrentPlayer) + (1000*PFMultiplier)
  4261. checkgreatdive
  4262. end sub
  4263.  
  4264. sub checkgreatdive
  4265. if greatdive = 3 Then
  4266. startdiving
  4267. exit sub
  4268. end if
  4269. vpmTimer.addTimer 1000, "vulcanokick '"
  4270. end sub
  4271.  
  4272. sub vulcanokick()
  4273. Playsound SoundFXDOF( "LavaBall", 112, DOFPulse,DOFContactors)
  4274. Kicker004.Kick 0,35,1.56
  4275. end sub
  4276.  
  4277. '*****************diving**************************
  4278. sub startdiving
  4279. Kicker004.DestroyBall
  4280. greatdive = 0
  4281. Playsound "LavaBall"
  4282. StartDivingSlotMachine
  4283. end sub
  4284.  
  4285. '**************
  4286. ' SlotMachine diving
  4287. '**************
  4288.  
  4289. Dim SlotAward4, SlotValue4
  4290. SlotAward4 = Array("dmdgd", "dmdbd")
  4291. Sub StartDivingSlotMachine()
  4292. 'startB2S(9)
  4293. Dim i
  4294. DMDFlush
  4295. For i = 0 to 1
  4296. DMD "", "", SlotAward4(i), eNone, eNone, eNone, 100, False, ""
  4297. Next
  4298. vpmtimer.AddTimer 2000, "GiveSlotAwardDiving '"
  4299. End Sub
  4300.  
  4301. Sub GiveSlotAwardDiving()
  4302. DMDFlush()
  4303. Randomize()
  4304. SlotValue4 = INT(RND * 2)
  4305. DMD "", "", SlotAward4(SlotValue4), eNone, eNone, eNone, 500, True, ""
  4306. Select Case SlotValue4
  4307. Case 0:diveG
  4308. Case 1:diveB
  4309. End Select
  4310. End Sub
  4311.  
  4312. sub diveG
  4313. li045.state = 1
  4314. playsound "nicedive2"
  4315. escapeMI = escapeMI + 1
  4316. checktoescape
  4317. Score(CurrentPlayer) = Score(CurrentPlayer) + (100000*PFMultiplier)
  4318. Kicker004.CreateSizedBall(BallSize / 2)
  4319. vpmTimer.addTimer 1300, "vulcanokick '"
  4320. end sub
  4321.  
  4322. sub diveB
  4323. playsound "diveagainstyou"
  4324. Kicker004.CreateSizedBall(BallSize / 2)
  4325. vpmTimer.addTimer 1600, "vulcanokick '"
  4326. end sub
  4327.  
  4328. '*****************Bar kicker**************************
  4329. Dim eBall
  4330.  
  4331. sub Kicker006_hit()
  4332. If (barunlocked = 0) and (playtreasure = 1) Then
  4333. 'Me.TimerEnabled = 0
  4334. Set eBall = ActiveBall
  4335. 'Kicker006.DestroyBall
  4336. Treasure
  4337. Exit Sub
  4338. end if
  4339. playsound "balldropy"
  4340. Score(CurrentPlayer) = Score(CurrentPlayer) + (1000*PFMultiplier)
  4341. Set eBall = ActiveBall
  4342. Me.TimerEnabled = 1
  4343. end sub
  4344.  
  4345. Sub Kicker006_Timer()
  4346. If eBall.Z > 0 Then
  4347. eBall.Z = eBall.Z - 5
  4348. Exit Sub
  4349. End If
  4350. If Status = "Duels" Then
  4351. Me.TimerEnabled = 0
  4352. ProcessDuels(1)
  4353. Exit Sub
  4354. End If
  4355. if (barunlocked = 0) or (Status <> "Normal") or (bMultiBallMode = true) Then
  4356. MyTroughLRAdd(eBall)
  4357. Me.DestroyBall
  4358. startB2S(4)
  4359. LowerTarget013()
  4360. LrKickout 1000, 290, 7, 0
  4361. Else
  4362. StartBarSlotmachine()
  4363. End If
  4364. Me.TimerEnabled = 0
  4365. End Sub
  4366.  
  4367. '*****************Voodoo kicker**************************
  4368. Dim cBall
  4369.  
  4370. sub Kicker005_hit()
  4371. FlashForMs Flasher001, 1000, 50, 0
  4372. Score(CurrentPlayer) = Score(CurrentPlayer) + (1000*PFMultiplier)
  4373. 'Animate the ball going down
  4374. Set cBall = ActiveBall
  4375. Me.TimerEnabled = 1
  4376. end sub
  4377.  
  4378. Sub Kicker005_Timer()
  4379. 'Lower the ball
  4380. If cBall.Z > 0 Then
  4381. cBall.Z = cBall.Z - 5
  4382. Exit Sub
  4383. End If
  4384. If Status = "Duels" Then
  4385. Me.TimerEnabled = 0
  4386. ProcessDuels(5)
  4387. Exit Sub
  4388. End If
  4389. 'If voodoo is locked, you're in a quest, or in a multiball mode, then kickout from the right
  4390. if (voodoounlocked = 0) or (Status <> "Normal") or (bMultiBallMode = true) Then
  4391. MyTroughLRAdd(cBall)
  4392. 'When it's all the way down
  4393. Me.DestroyBall
  4394. startB2S(4)
  4395. LowerTarget013()
  4396. LRKickout 1000, 290, 7, 0
  4397. 'Otherwise, Do something based on the mode we're in
  4398. Else
  4399. StartVoodooSlotmachine()
  4400. end if
  4401. Me.TimerEnabled = 0
  4402. End Sub
  4403.  
  4404. '******************* Monkey Head Kicker **********
  4405. Dim MonkeyHeadCounter:MonkeyHeadCounter = 0
  4406. Dim LockCounter:LockCounter = 0
  4407. Dim mBall
  4408.  
  4409. Sub Wall030_Hit
  4410. MonkeyHeadCounter = MonkeyHeadCounter + 1
  4411. Score(CurrentPlayer) = Score(CurrentPlayer) + (500*PFMultiplier)
  4412. Select Case MonkeyHeadCounter
  4413. Case 1
  4414. li010.state = 2
  4415. MoveHead 120, 0.5
  4416. PlaySound "aapmonkey3"
  4417. PlaySound "StoneScrape1"
  4418. DMDFlush()
  4419. DMD "", "", "mh3", eNone, eNone, eNone, 1500, True, ""
  4420. DMD "", "", "dmdopenmouth2", eNone, eNone, eNone, 1500, True, ""
  4421. ' DMD CL(0, "HIT THE HEAD"), CL(1, "2 MORE TIMES"), "", eScrollRight, eScrollRight, eNone, 1500, False, ""
  4422. ' DMD CL(0, "TO OPEN"), CL(1, "THE MOUTH"), "", eScrollLeft, eScrollLeft, eNone, 1500, True, ""
  4423. Case 2
  4424. MoveHead 60, 0.5
  4425. PlaySound "aapmonkey3"
  4426. PlaySound "StoneScrape1"
  4427. DMDFlush()
  4428. DMD "", "", "mh2", eNone, eNone, eNone, 1500, True, ""
  4429. DMD "", "", "dmdopenmouth2", eNone, eNone, eNone, 1500, True, ""
  4430. ' DMD CL(0, "HIT THE HEAD"), CL(1, "1 MORE TIME"), "", eScrollRight, eScrollRight, eNone, 1500, False, ""
  4431. ' DMD CL(0, "TO OPEN"), CL(1, "THE MOUTH"), "", eScrollLeft, eScrollLeft, eNone, 1500, True, ""
  4432. Case 3
  4433. MoveHead 10, 0.5
  4434. vpmTimer.AddTimer 2000, "Wall030.IsDropped = 1 '"
  4435. vpmTimer.AddTimer 2000, "MoveMouth 1, 0.5 '"
  4436. vpmTimer.AddTimer 2000, "KiHead.Enabled = 1 '"
  4437. PlaySound "aapmonkey3"
  4438. PlaySound "StoneScrape1"
  4439. DMDFlush()
  4440. DMD "", "", "dmdfeed", eNone, eNone, eNone, 1500, True, ""
  4441. DMD "", "", "dmdstartmulti", eNone, eNone, eNone, 1500, True, ""
  4442. ' DMD CL(0, "FEED THE HEAD"), CL(1, "3 BALLS"), "", eScrollRight, eScrollRight, eNone, 1500, False, ""
  4443. ' DMD CL(0, "TO START"), CL(1, "MONKEY MULTIBALL"), "", eScrollLeft, eScrollLeft, eNone, 1500, True, ""
  4444. End Select
  4445.  
  4446. End Sub
  4447.  
  4448. Sub KiHead_Hit()
  4449. If LockCounter = 3 then 'Status = "MonkeyMB" Then
  4450. monkeykeepball = 1
  4451. PlaySound "SecondBiggest"
  4452. vpmTimer.AddTimer 1500, "MoveMouth 1, 8 '"
  4453. vpmTimer.AddTimer 2000, "kickmonkeymbheadys '"
  4454. DMD "", "", "dmdjack", eNone, eNone, eNone, 1000, True, ""
  4455. DMD "", "", "1000K", eNone, eNone, eNone, 1000, True, ""
  4456. Score(CurrentPlayer) = Score(CurrentPlayer) + (1000000*PFMultiplier)
  4457. exit sub
  4458. End If
  4459. MoveMouth 0, 5
  4460. vpmTimer.AddTimer 200, "MoveMouth 1, 8 '"
  4461. vpmTimer.AddTimer 400, "MoveMouth 0, 8 '"
  4462. vpmTimer.AddTimer 600, "MoveMouth 1, 8 '"
  4463. vpmTimer.AddTimer 800, "MoveMouth 0, 8 '"
  4464. Set mBall = ActiveBall
  4465. LockCounter = LockCounter + 1
  4466. Select Case LockCounter
  4467. Case 1
  4468. PlaySound "aapmonkey2"
  4469. DMD "", "", "bl", eNone, eNone, eNone, 1500, True, ""
  4470. MyTroughLRAdd(mBall)
  4471. Me.DestroyBall
  4472. startB2S(4)
  4473. LowerTarget013()
  4474. LRKickout 1000, 290, 7, 0
  4475. vpmTimer.AddTimer 1000, "MoveMouth 1, 0.5 '"
  4476. case 2
  4477. PlaySound "aapmonkey2"
  4478. DMD "", "", "bl", eNone, eNone, eNone, 1500, True, ""
  4479. MyTroughLRAdd(mBall)
  4480. Me.DestroyBall
  4481. startB2S(4)
  4482. LowerTarget013()
  4483. LRKickout 1000, 290, 7, 0
  4484. vpmTimer.AddTimer 1000, "MoveMouth 1, 0.5 '"
  4485. case 3
  4486. StartMonkeyMB()
  4487. end select
  4488. End Sub
  4489.  
  4490. sub kickmonkeymbheadys
  4491. PlaySound "fx_popper"
  4492. KiHead.Kick 180, 7, 0
  4493. monkeykeepball = 0
  4494. end sub
  4495. '******************* Trough stuff ****************
  4496.  
  4497. 'We have to do it this way so that newly entering balls don't trigger ball creating immediately; ball creation should only happen 1 second after a ball is kicked out
  4498. Kicker002.UserValue = 0
  4499. Sub LRKickout(wait, tAngle, tForce, tZ)
  4500. 'If there are balls in the trough
  4501. If UBound(MyTroughLR) >= 0 Then
  4502. 'If the kicker is ready to kick...
  4503. If Kicker002.UserValue = 0 Then
  4504. 'Make the kicker not ready to kick
  4505. Kicker002.userValue = 1
  4506. FlashForMs Flasher009, 1000, 50, 0
  4507. 'And kick the ball after the desire wait
  4508. vpmTimer.AddTimer wait, "LRKickout2 " & tAngle & ", " & tForce & ", " & tz & " '"
  4509. End If
  4510. End If
  4511. End Sub
  4512.  
  4513. sub LRKickout2(tAngle, tForce, tZ)
  4514. 'Create the ball
  4515. Kicker002.CreateSizedBall(BallSize/2).ID = MyTroughLR(0)
  4516. 'Kick it
  4517. Kicker002.Kick tAngle, tForce, tZ
  4518. PlaySound SoundFXDOF("fx_popper", 113, DOFPulse,DOFContactors)
  4519. 'Remove the ball from the trough
  4520. MyTroughLRRemove()
  4521. 'Show that the kicker is ready
  4522. Kicker002.userValue = 0
  4523. 'Call LRKickout in case there are more balls in the trough
  4524. LRKickout 1000, 290, 7, 0
  4525. 'If the trough is empty, close the door, otherwise keep it open
  4526. If UBound(MyTroughLR) < 0 Then vpmTimer.Addtimer 500, "ResetTarget013 '"
  4527. End Sub
  4528.  
  4529. Sub BarKickout(wait, tAngle, tForce, tZ)
  4530. If UBound(MyTroughTreasure) >= 0 Then
  4531. BarKickout2 tAngle, tForce, tz
  4532. End If
  4533. End Sub
  4534.  
  4535. sub BarKickout2(tAngle, tForce, tZ)
  4536. Kicker006.CreateSizedBall(BallSize/2).ID = MyTroughTreasure(0)
  4537. Kicker006.Kick tAngle, tForce, tZ
  4538. Set rBall = Nothing
  4539. PlaySound SoundFXDOF("fx_popper", 114, DOFPulse,DOFContactors)
  4540. MyTroughTreasureRemove()
  4541. BarKickout 1000, 290, 7, 0
  4542. End Sub
  4543.  
  4544. Sub LeChuckKickout(wait, tAngle, tForce, tZ)
  4545. If UBound(MyTroughLeChuck) >= 0 Then
  4546. vpmTimer.AddTimer wait, "LeChuckKickout2 " & tAngle & ", " & tForce & ", " & tz & " '"
  4547. End If
  4548. End Sub
  4549.  
  4550. sub LeChuckKickout2(tAngle, tForce, tZ)
  4551. Set dBall = Nothing
  4552. Kicker001.DestroyBall
  4553. Kicker003.CreateSizedBall(BallSize/2).ID = MyTroughLeChuck(0)
  4554. Kicker003.Kick tAngle, tForce, tZ
  4555. PlaySound SoundFXDOF("fx_popper", 111, DOFPulse,DOFContactors)
  4556. MyTroughLeChuckRemove()
  4557. LeChuckKickout 1000, 290, 7, 0
  4558. End Sub
  4559.  
  4560. Sub TreasureKickout(wait, tAngle, tForce, tZ)
  4561. If UBound(MyTroughTreasure) >= 0 Then
  4562. vpmTimer.AddTimer wait, "TreasureKickout2 " & tAngle & ", " & tForce & ", " & tz & " '"
  4563. End If
  4564. End Sub
  4565.  
  4566. sub TreasureKickout2(tAngle, tForce, tZ)
  4567. Kicker007.CreateSizedBall(BallSize/2).ID = MyTroughTreasure(0)
  4568. Kicker007.Kick tAngle, tForce, tZ
  4569. PlaySound "fx_popper"
  4570. MyTroughTreasureRemove()
  4571. TreasureKickout 1000, 290, 7, 0
  4572. End Sub
  4573.  
  4574. Sub MyTroughLRAdd(tBall)
  4575. 'Increase the size of the array
  4576. ReDim Preserve MyTroughLR(UBound(MyTroughLR) + 1)
  4577. 'Set the end of the array equal to the ball id that just entered
  4578. MyTroughLR(UBound(MyTroughLR)) = tBall.ID
  4579. 'Free up the object that was the ball
  4580. Set tBall = Nothing
  4581. End Sub
  4582.  
  4583. Sub MyTroughTreasureAdd(tBall)
  4584. ReDim Preserve MyTroughTreasure(UBound(MyTroughTreasure) + 1)
  4585. MyTroughTreasure(Ubound(MyTroughTreasure)) = tBall.ID
  4586. Set tBall = Nothing
  4587. End Sub
  4588.  
  4589. Sub MyTroughLeChuckAdd(tBall)
  4590. ReDim Preserve MyTroughLeChuck(UBound(MyTroughLeChuck) + 1)
  4591. MyTroughLeChuck(Ubound(MyTroughLeChuck)) = tBall.ID
  4592. Set tBall = Nothing
  4593. End Sub
  4594.  
  4595. Sub MyTroughLRRemove()
  4596. Dim x
  4597. 'Clear the ball that just got kicked
  4598. 'MyTroughLR(0) = 0
  4599. 'For every other ball in array, "move" each ball over
  4600. For X = 1 to UBound(MyTroughLR)
  4601. MyTroughLR(X - 1) = MyTroughLR(X)
  4602. Next
  4603. 'And shrink the array
  4604. ReDim Preserve MyTroughLR(UBound(MyTroughLR)-1)
  4605. End Sub
  4606.  
  4607. Sub MyTroughTreasureRemove()
  4608. Dim X
  4609. MyTroughTreasure(0) = 0
  4610. For X = 1 to UBound(MyTroughTreasure)
  4611. MyTroughTreasure(X - 1) = MyTroughTreasure(X)
  4612. Next
  4613. ReDim Preserve MyTroughTreasure(UBound(MyTroughTreasure) - 1)
  4614. End Sub
  4615.  
  4616. Sub MyTroughLeChuckRemove()
  4617. Dim X
  4618. MyTroughLeChuck(0) = 0
  4619. For X = 1 to UBound(MyTroughLeChuck)
  4620. MyTroughLeChuck(X - 1) = MyTroughLeChuck(X)
  4621. Next
  4622. ReDim Preserve MyTroughLeChuck(UBound(MyTroughLeChuck) - 1)
  4623. End Sub
  4624.  
  4625. '*****************right lower kicker/drop target**************************
  4626. Dim fBall
  4627. sub Kicker002_hit()
  4628. FlashForMs Flasher009, 1000, 50, 0
  4629. Score(CurrentPlayer) = Score(CurrentPlayer) + (5000*PFMultiplier)
  4630. Set fBall = ActiveBall
  4631. Kicker002.TimerEnabled = 1
  4632. end sub
  4633.  
  4634. Sub Kicker002_Timer()
  4635. If fBall.Z > 0 Then
  4636. fBall.Z = fBall.Z - 5
  4637. Exit Sub
  4638. End If
  4639. MyTroughLRAdd(fBall)
  4640. Me.DestroyBall
  4641. startB2S(4)
  4642. LowerTarget013()
  4643. LRKickout 1000, 290, 7, 0
  4644. Me.TimerEnabled = 0
  4645. End Sub
  4646.  
  4647. Sub Target013_Hit()
  4648. If Tilted Then Exit Sub
  4649. LowerTarget013()
  4650. Score(CurrentPlayer) = Score(CurrentPlayer) + (1000*PFMultiplier)
  4651. TargetBonus = TargetBonus + 1
  4652. vpmtimer.addtimer 2000, "ResetTarget013 '"
  4653. End Sub
  4654.  
  4655. sub ResetTarget013()
  4656. If Target013.IsDropped = 1 Then PlaySound "dropclose"
  4657. Target013.IsDropped = 0
  4658. end sub
  4659.  
  4660. Sub LowerTarget013()
  4661. If Target013.IsDropped = 0 Then PlaySound "dropopen"
  4662. Target013.IsDropped = 1
  4663. End Sub
  4664.  
  4665. Sub KiGrog_Hit()
  4666. 'Do stuff to start Grog modes
  4667. End Sub
  4668.  
  4669. '*****************
  4670. 'lava animation
  4671. '*****************
  4672. Dim Fire1Pos,Flames
  4673. Flames = Array("lava000", "lava001", "lava002", "lava003", "lava004", "lava005", "lava006", "lava007", "lava008", "lava009", "lava010", "lava011", "lava012", "lava013", "lava014", "lava015", "lava016",_
  4674. "lava017", "lava018", "lava019", "lava020", "lava021", "lava022", "lava023", "lava024", "lava025", "lava026", "lava027", "lava028", "lava029", "lava030", "lava031", "lava032", "lava033",_
  4675. "lava034", "lava035", "lava036", "lava037", "lava038", "lava039", "lava040", "lava041", "lava042", "lava043", "lava044", "lava045", "lava046", "lava047", "lava048", "lava049", "lava050",_
  4676. "lava051", "lava052", "lava053", "lava054", "lava055", "lava056", "lava057", "lava058", "lava059", "lava060", "lava061", "lava062", "lava063", "lava064", "lava065", "lava066", "lava067",_
  4677. "lava068", "lava069", "lava070", "lava071", "lava072", "lava073", "lava074", "lava075", "lava076", "lava077", "lava078", "lava079", "lava080", "lava081", "lava082", "lava083", "lava084",_
  4678. "lava085", "lava086", "lava087", "lava088", "lava089", "lava090", "lava091", "lava092", "lava093", "lava094", "lava095", "lava096", "lava097", "lava098", "lava099", "lava100", "lava101")
  4679.  
  4680. Sub StartFire()
  4681. Fire1Pos = 0
  4682. FireTimer.Enabled = 1
  4683. End Sub
  4684.  
  4685. Sub FireTimer_Timer()
  4686. lava.ImageA = Flames(Fire1Pos)
  4687. Fire1Pos = (Fire1Pos + 1) MOD 102
  4688. End Sub
  4689.  
  4690. Dim Fire2Pos,Flames2
  4691. Flames2 = Array("magma00", "magma01", "magma02", "magma03", "magma04", "magma05", "magma06", "magma07", "magma08", "magma09", "magma10", "magma11", "magma12", "magma13", "magma14", "magma15", "magma16",_
  4692. "magma17", "magma18", "magma19", "magma20", "magma21", "magma22", "magma23", "magma24", "magma25", "magma26", "magma27", "magma28", "magma29", "magma30", "magma31")
  4693.  
  4694. Sub StartFire2()
  4695. Fire2Pos = 0
  4696. FireTimer2.Enabled = 1
  4697. End Sub
  4698.  
  4699. Sub FireTimer2_Timer()
  4700. magma.ImageA = Flames2(Fire2Pos)
  4701. Fire2Pos = (Fire2Pos + 1) MOD 32
  4702. End Sub
  4703.  
  4704. '*****************
  4705. 'Dail a pirate
  4706. '*****************
  4707. Dim WheelSpeed : WheelSpeed = 0.10
  4708. Dim SlowSpeed : SlowSpeed = 0.0005
  4709. Sub spinningwheel_Timer
  4710. Select Case InAttract
  4711. Case 1
  4712. Me.Interval = 1
  4713. Wheel1.Rotz = (Wheel1.Rotz + WheelSpeed)
  4714. WheelSpeed = WheelSpeed - SlowSpeed
  4715. If WheelSpeed <= 0.10 Then WheelSpeed = 0.10
  4716. If Wheel1.Rotz >= 360 Then Wheel1.Rotz = 1
  4717. Case 0
  4718. Me.Interval = 1
  4719. Wheel1.Rotz = (Wheel1.Rotz + WheelSpeed)
  4720. If Wheel1.Rotz >= 360 Then Wheel1.Rotz = 1
  4721. WheelSpeed = WheelSpeed - SlowSpeed
  4722. If WheelSpeed <= 0.005 Then
  4723. Me.Enabled = False
  4724. Select Case True
  4725. Case (Wheel1.Rotz <= 36 AND Wheel1.Rotz > 12)
  4726. Wheel1.Rotz = 24
  4727. Case (Wheel1.Rotz <= 60 AND Wheel1.Rotz > 36)
  4728. Wheel1.Rotz = 48
  4729. Case (Wheel1.Rotz <= 84 AND Wheel1.Rotz > 60)
  4730. Wheel1.Rotz = 72
  4731. Case (Wheel1.Rotz <= 108 AND Wheel1.Rotz > 84)
  4732. Wheel1.Rotz = 98
  4733. Case (Wheel1.Rotz <= 132 AND Wheel1.Rotz > 108)
  4734. Wheel1.Rotz = 128
  4735. Case (Wheel1.Rotz <= 156 AND Wheel1.Rotz > 132)
  4736. Wheel1.Rotz = 146
  4737. Case (Wheel1.Rotz <= 180 AND Wheel1.Rotz > 156)
  4738. Wheel1.Rotz = 168
  4739. Case (Wheel1.Rotz <= 204 AND Wheel1.Rotz > 180)
  4740. Wheel1.Rotz = 192
  4741. Case (Wheel1.Rotz <= 228 AND Wheel1.Rotz > 204)
  4742. Wheel1.Rotz = 216
  4743. Case (Wheel1.Rotz <= 252 AND Wheel1.Rotz > 228)
  4744. Wheel1.Rotz = 240
  4745. Case (Wheel1.Rotz <= 276 AND Wheel1.Rotz > 252)
  4746. Wheel1.Rotz = 264
  4747. Case (Wheel1.Rotz <= 300 AND Wheel1.Rotz > 276)
  4748. Wheel1.Rotz = 288
  4749. Case (Wheel1.Rotz <= 324 AND Wheel1.Rotz > 300)
  4750. Wheel1.Rotz = 312
  4751. Case (Wheel1.Rotz <= 348 AND Wheel1.Rotz > 324)
  4752. Wheel1.Rotz = 336
  4753. Case (Wheel1.Rotz <= 12 AND Wheel1.Rotz > 348)
  4754. Wheel1.Rotz = 0
  4755. End Select
  4756. End If
  4757. End Select
  4758. End Sub
  4759.  
  4760. Dim CounterWheel2
  4761. Dim speedup
  4762.  
  4763. Sub StartRandomWheel
  4764. StopSong()
  4765. PlaySong "stan"
  4766. wheel1.Image = "AnticheatCRU2_2"
  4767. wheel2.Image = "AnticheatCRUkopiekopie2"
  4768. WheelSpeed=0.10
  4769. Speedup=140 + int(rnd(1)*40)
  4770. Counterwheel2 = 0
  4771. spinningwheel2.enabled=True
  4772. End sub
  4773.  
  4774. Sub spinningwheel2_Timer
  4775. Select Case CounterWheel2
  4776. Case 0
  4777. Me.Interval = 1
  4778. Wheel1.Rotz = (Wheel1.Rotz + WheelSpeed)
  4779. WheelSpeed = WheelSpeed + 0.012
  4780. Speedup=Speedup-1
  4781. If Wheel1.Rotz > 360 Then Wheel1.Rotz = 1
  4782. Select Case int(Wheel1.Rotz)
  4783. Case 36
  4784. DMDflush()
  4785. DMD CL(0, "DIAL A PIRATE"), CL(1, "5.000"), "", eNone, eNone, eNone, 1, False, ""
  4786. Case 60
  4787. DMDflush()
  4788. DMD CL(0, "DIAL A PIRATE"), CL(1, "10.000"), "", eNone, eNone, eNone, 1, False, ""
  4789. Case 84
  4790. DMDflush()
  4791. DMD CL(0, "DIAL A PIRATE"), CL(1, "15.000"), "", eNone, eNone, eNone, 1, False, ""
  4792. Case 108
  4793. DMDflush()
  4794. DMD CL(0, "DIAL A PIRATE"), CL(1, "20.000"), "", eNone, eNone, eNone, 1, False, ""
  4795. Case 132
  4796. DMDflush()
  4797. DMD CL(0, "DIAL A PIRATE"), CL(1, "25.000"), "", eNone, eNone, eNone, 1, False, ""
  4798. Case 156
  4799. DMDflush()
  4800. DMD CL(0, "DIAL A PIRATE"), CL(1, "35.000"), "", eNone, eNone, eNone, 1, False, ""
  4801. Case 180
  4802. DMDflush()
  4803. DMD CL(0, "DIAL A PIRATE"), CL(1, "40.000"), "", eNone, eNone, eNone, 1, False, ""
  4804. Case 204
  4805. DMDflush()
  4806. DMD CL(0, "DIAL A PIRATE"), CL(1, "45.000"), "", eNone, eNone, eNone, 1, False, ""
  4807. Case 228
  4808. DMDflush()
  4809. DMD CL(0, "DIAL A PIRATE"), CL(1, "50.000"), "", eNone, eNone, eNone, 1, False, ""
  4810. Case 252
  4811. DMDflush()
  4812. DMD CL(0, "DIAL A PIRATE"), CL(1, "75.000"), "", eNone, eNone, eNone, 1, False, ""
  4813. Case 276
  4814. DMDflush()
  4815. DMD CL(0, "DIAL A PIRATE"), CL(1, "100.000"), "", eNone, eNone, eNone, 1, False, ""
  4816. Case 300
  4817. DMDflush()
  4818. DMD CL(0, "DIAL A PIRATE"), CL(1, "250.000"), "", eNone, eNone, eNone, 1, False, ""
  4819. Case 324
  4820. DMDflush()
  4821. DMD CL(0, "DIAL A PIRATE"), CL(1, "500.000"), "", eNone, eNone, eNone, 1, False, ""
  4822. Case 348
  4823. DMDflush()
  4824. DMD CL(0, "DIAL A PIRATE"), CL(1, "1.000.000"), "", eNone, eNone, eNone, 1, False, ""
  4825. Case 12
  4826. DMDflush()
  4827. DMD CL(0, "DIAL A PIRATE"), CL(1, "EXTRA BALL"), "", eNone, eNone, eNone, 1, False, ""
  4828. End Select
  4829. If speedup=0 Then CounterWheel2=1
  4830.  
  4831. Case 1
  4832. Me.Interval = 1
  4833. Wheel1.Rotz = (Wheel1.Rotz + WheelSpeed)
  4834. If Wheel1.Rotz >= 360 Then Wheel1.Rotz = 1
  4835. WheelSpeed = WheelSpeed - SlowSpeed
  4836. Select Case int(Wheel1.Rotz)
  4837. Case 36
  4838. DMDflush()
  4839. DMD CL(0, "DIAL A PIRATE"), CL(1, "5.000"), "", eNone, eNone, eNone, 1, False, ""
  4840. Case 60
  4841. DMDflush()
  4842. DMD CL(0, "DIAL A PIRATE"), CL(1, "10.000"), "", eNone, eNone, eNone, 1, False, ""
  4843. Case 84
  4844. DMDflush()
  4845. DMD CL(0, "DIAL A PIRATE"), CL(1, "15.000"), "", eNone, eNone, eNone, 1, False, ""
  4846. Case 108
  4847. DMDflush()
  4848. DMD CL(0, "DIAL A PIRATE"), CL(1, "20.000"), "", eNone, eNone, eNone, 1, False, ""
  4849. Case 132
  4850. DMDflush()
  4851. DMD CL(0, "DIAL A PIRATE"), CL(1, "25.000"), "", eNone, eNone, eNone, 1, False, ""
  4852. Case 156
  4853. DMDflush()
  4854. DMD CL(0, "DIAL A PIRATE"), CL(1, "35.000"), "", eNone, eNone, eNone, 1, False, ""
  4855. Case 180
  4856. DMDflush()
  4857. DMD CL(0, "DIAL A PIRATE"), CL(1, "40.000"), "", eNone, eNone, eNone, 1, False, ""
  4858. Case 204
  4859. DMDflush()
  4860. DMD CL(0, "DIAL A PIRATE"), CL(1, "45.000"), "", eNone, eNone, eNone, 1, False, ""
  4861. Case 228
  4862. DMDflush()
  4863. DMD CL(0, "DIAL A PIRATE"), CL(1, "50.000"), "", eNone, eNone, eNone, 1, False, ""
  4864. Case 252
  4865. DMDflush()
  4866. DMD CL(0, "DIAL A PIRATE"), CL(1, "75.000"), "", eNone, eNone, eNone, 1, False, ""
  4867. Case 276
  4868. DMDflush()
  4869. DMD CL(0, "DIAL A PIRATE"), CL(1, "100.000"), "", eNone, eNone, eNone, 1, False, ""
  4870. Case 300
  4871. DMDflush()
  4872. DMD CL(0, "DIAL A PIRATE"), CL(1, "250.000"), "", eNone, eNone, eNone, 1, False, ""
  4873. Case 324
  4874. DMDflush()
  4875. DMD CL(0, "DIAL A PIRATE"), CL(1, "500.000"), "", eNone, eNone, eNone, 1, False, ""
  4876. Case 348
  4877. DMDflush()
  4878. DMD CL(0, "DIAL A PIRATE"), CL(1, "1.000.000"), "", eNone, eNone, eNone, 1, False, ""
  4879. Case 12
  4880. DMDflush()
  4881. DMD CL(0, "DIAL A PIRATE"), CL(1, "EXTRA BALL"), "", eNone, eNone, eNone, 1, False, ""
  4882. End Select
  4883.  
  4884. If WheelSpeed <= 0.01 Then
  4885. Me.Enabled = False
  4886. Select Case True
  4887. Case (Wheel1.Rotz <= 36 AND Wheel1.Rotz > 12)
  4888. Wheel1.Rotz = 24 : addscore 5000
  4889. Case (Wheel1.Rotz <= 60 AND Wheel1.Rotz > 36)
  4890. Wheel1.Rotz = 48 : addscore 10000
  4891. Case (Wheel1.Rotz <= 84 AND Wheel1.Rotz > 60)
  4892. Wheel1.Rotz = 72 : addscore 15000
  4893. Case (Wheel1.Rotz <= 108 AND Wheel1.Rotz > 84)
  4894. Wheel1.Rotz = 98 : addscore 20000
  4895. Case (Wheel1.Rotz <= 132 AND Wheel1.Rotz > 108)
  4896. Wheel1.Rotz = 128 : addscore 25000
  4897. Case (Wheel1.Rotz <= 156 AND Wheel1.Rotz > 132)
  4898. Wheel1.Rotz = 146 : addscore 35000
  4899. Case (Wheel1.Rotz <= 180 AND Wheel1.Rotz > 156)
  4900. Wheel1.Rotz = 168 : addscore 40000
  4901. Case (Wheel1.Rotz <= 204 AND Wheel1.Rotz > 180)
  4902. Wheel1.Rotz = 192 : addscore 45000
  4903. Case (Wheel1.Rotz <= 228 AND Wheel1.Rotz > 204)
  4904. Wheel1.Rotz = 216 : addscore 50000
  4905. Case (Wheel1.Rotz <= 252 AND Wheel1.Rotz > 228)
  4906. Wheel1.Rotz = 240 : addscore 75000
  4907. Case (Wheel1.Rotz <= 276 AND Wheel1.Rotz > 252)
  4908. Wheel1.Rotz = 264 : addscore 100000
  4909. Case (Wheel1.Rotz <= 300 AND Wheel1.Rotz > 276)
  4910. Wheel1.Rotz = 288 : addscore 250000
  4911. Case (Wheel1.Rotz <= 324 AND Wheel1.Rotz > 300)
  4912. Wheel1.Rotz = 312 : addscore 500000
  4913. Case (Wheel1.Rotz <= 348 AND Wheel1.Rotz > 324)
  4914. Wheel1.Rotz = 336 : addscore 1000000
  4915. Case (Wheel1.Rotz <= 12 AND Wheel1.Rotz > 348)
  4916. Wheel1.Rotz = 0 : AddMultiball 1
  4917. End Select
  4918. wheel1.Image = "Wheel1dark"
  4919. wheel2.Image = "Wheel2dark"
  4920. If Not Wheel1.Rotz = 0 Then
  4921. StopSong()
  4922. PlaySound ""
  4923. 'vp mtimer.addtimer 3000, "ChangeSong '"
  4924. ' S how the end of ball animation
  4925. ' and continue with the end of ball
  4926. ' DMD something?
  4927. StopEndOfBallMode()
  4928. vpmtimer.addtimer 1000, "EndOfBall '" 'the delay is depending of the animation of the end of ball, since there is no animation then move to the end of ball
  4929. End If
  4930. End If
  4931. End Select
  4932. End Sub
  4933.  
  4934.  
  4935. '*****************
  4936. 'smoke animation
  4937. '*****************
  4938. Dim CanonSmokeAnim:CanonSmokeAnim = Array("smoke1", "smoke2", "smoke3", "smoke4", "smoke5", "smoke6", "smoke6", "smoke7", "smoke8", "smoke9", "smoke10", "smoke11", "smoke12", "smoke13", "smoke14", "smoke15""smoke16")
  4939. Dim CanonSmokeAnimKey:CanonSmokeAnimKey = 0
  4940. Dim SmokePositionYOrig:SmokePositionYOrig = canonsmoke.y
  4941. Dim FadeAmount:FadeAmount = 1/UBound(CanonSmokeAnim)
  4942. Sub smokeytimer_Timer()
  4943. canonsmoke.visible = 1
  4944. canonsmoke.ImageA = CanonSmokeAnim(CanonSmokeAnimKey)
  4945. CanonSmokeAnimKey = CanonSmokeAnimKey + 1
  4946. canonsmoke.height = canonsmoke.height + 5
  4947. canonsmoke.y = canonsmoke.y - 2
  4948. canonsmoke.IntensityScale = canonsmoke.IntensityScale - FadeAmount
  4949. If CanonSmokeAnimKey > UBound(CanonSmokeAnim) Then
  4950. ResetSmoke()
  4951. End If
  4952. End Sub
  4953.  
  4954. sub resetsmoke()
  4955. smokeytimer.enabled = False
  4956. canonsmoke.visible = 0
  4957. CanonSmokeAnimKey = 0
  4958. canonsmoke.height = 200
  4959. canonsmoke.y = SmokePositionYOrig
  4960. canonsmoke.IntensityScale = 1
  4961. end sub
  4962.  
  4963. '*****************
  4964. 'beard and palmtrees
  4965. '*****************
  4966. Dim Sway
  4967.  
  4968. sub beardtreetimer_Timer()
  4969. 'Palm Trees
  4970. tree001.RotY = dSin(Sway)*2
  4971. tree002.RotY = tree001.RotY
  4972. tree003.RotY = tree001.RotY
  4973. tree004.RotY = tree001.RotY
  4974. tree005.RotY = tree001.RotY
  4975. tree006.RotY = tree001.RotY
  4976. tree007.RotY = tree001.RotY
  4977. tree008.RotY = tree001.RotY
  4978. Leaves001.RotY = tree001.RotY
  4979. Leaves002.RotY = tree001.RotY
  4980. Leaves003.RotY = tree001.RotY
  4981. Leaves004.RotY = tree001.RotY
  4982. Leaves005.RotY = tree001.RotY
  4983. Leaves006.RotY = tree001.RotY
  4984. Leaves007.RotY = tree001.RotY
  4985. Leaves008.RotY = tree001.RotY
  4986. Sway = Sway + 0.05
  4987. If Sway > 360 Then Sway = Sway - 360
  4988. '******
  4989. 'Le chuck's Beard matches the gate
  4990. Beard.RotX = -Gate002.CurrentAngle
  4991. '******
  4992. end sub
  4993.  
  4994. '*****************
  4995. 'Monkey Head
  4996. '*****************
  4997. Dim HeadTarget, HeadSpeed, HeadDir, MouthDir
  4998.  
  4999. Sub MoveHead(whereto, whatspeed)
  5000. HeadTarget = WhereTo
  5001. HeadSpeed = WhatSpeed
  5002. Wall007.TimerInterval = 20
  5003. Wall007.TimerEnabled = 1
  5004. End Sub
  5005.  
  5006. Sub Wall007_timer()
  5007. If PrMonkeyHead.RotZ < HeadTarget Then HeadDir = 1
  5008. If PrMonkeyHead.RotZ > HeadTarget Then HeadDir = -1
  5009. PrMonkeyHead.RotZ = PrMonkeyHead.RotZ + (HeadSpeed * HeadDir)
  5010. PrMonkeyMouth.X = PrMonkeyHead.X + dCos(PrMonkeyhead.RotZ+90) * 68
  5011. PrMonkeyMouth.Y = PrMonkeyHead.Y + dSin(PrMonkeyhead.RotZ+90) * 68
  5012. PrMonkeyMouth.ObjRotZ = PrMonkeyHead.RotZ
  5013. If (PrMonkeyHead.RotZ >= HeadTarget AND HeadDir = 1) OR (PrMonkeyHead.RotZ <= HeadTarget AND HeadDir = -1) Then
  5014. me.TimerEnabled = 0
  5015. PrMonkeyHead.RotZ = HeadTarget
  5016. End If
  5017. End Sub
  5018.  
  5019. Sub MoveMouth(OpenClose, Speed)
  5020. Wall008.TimerInterval = 20
  5021. Wall008.TimerEnabled = 1
  5022. MouthSpeed = Speed
  5023. Select Case OpenClose
  5024. Case 0 'Close
  5025. MouthDir = 1
  5026. Case 1 'Open
  5027. MouthDir = -1
  5028. end Select
  5029. End Sub
  5030.  
  5031. Dim MouthSpeed:MouthSpeed = 0.5
  5032.  
  5033. Sub Wall008_timer()
  5034. PrMonkeyMouth.ObjRotX = PrMonkeyMouth.ObjRotX + (MouthSpeed * MouthDir)
  5035. If PrMonkeyMouth.ObjRotX < -45 Then
  5036. PrMonkeyMouth.ObjRotX = -45
  5037. Me.TimerEnabled = 0
  5038. ElseIf PrMonkeyMouth.ObjRotX > 0 Then
  5039. PrMonkeyMouth.ObjRotX = 0
  5040. Me.TimerEnabled = 0
  5041. End If
  5042. End Sub
  5043.  
  5044.  
  5045. '*****************
  5046. '* Maths
  5047. '*****************
  5048. Dim Pi
  5049. Pi = Round(4 * Atn(1), 6)
  5050. Function dSin(degrees)
  5051. dsin = sin(degrees * Pi/180)
  5052. if ABS(dSin) < 0.000001 Then dSin = 0
  5053. if ABS(dSin) > 0.999999 Then dSin = 1 * sgn(dSin)
  5054. End Function
  5055.  
  5056. Function dCos(degrees)
  5057. dcos = cos(degrees * Pi/180)
  5058. if ABS(dCos) < 0.000001 Then dCos = 0
  5059. if ABS(dCos) > 0.999999 Then dCos = 1 * sgn(dCos)
  5060. End Function
  5061.  
  5062. '*****************
  5063. ' pirateship animation
  5064. '*****************
  5065.  
  5066. Dim pirateshipDir, SinkPirateShip, SinkSpeed, ShipSpeed, ShipTip, ShipAngle, ShipAngleSpeed, ShipHeight, ShipReset
  5067. Dim ShipOrigX, ShipOrigY, ShipOrigZ
  5068. ShipSpeed = 6
  5069. pirateshipDir = ShipSpeed 'this is the direction, if + goes up, if - goes down
  5070. SinkPirateShip = 0
  5071. SinkSpeed = 0.5
  5072. ShipTip = 15
  5073. ShipAngle = 180
  5074. ShipAngleSpeed = 2.5
  5075. ShipHeight = 25
  5076. ShipOrigX = PirateShip.X
  5077. ShipOrigY = PirateShip.Y
  5078. ShipOrigZ = PirateShip.Z
  5079. ShipReset = 1
  5080.  
  5081. Sub PirateShipTimer_Timer
  5082. Select Case SinkPirateShip
  5083. 'Ship is moving back and forth
  5084. Case 0
  5085. PirateShip.Y = ShipOrigY + dCos(ShipAngle*0.25+135) * 300 + 300
  5086. PirateShip.Z = dCos(ShipAngle) * ShipHeight + ShipHeight + 55
  5087. ShipAngle = ShipAngle + ShipAngleSpeed * ShipReset
  5088. PirateShip.RotZ = dSin(ShipAngle) * ShipTip
  5089. If ShipAngle > 1440 Then ShipAngle = ShipAngle - 1440
  5090. If ShipAngle < 0 Then ShipAngle = ShipAngle + 1440
  5091. If ShipAngle < 180 AND ShipAngle > 170 AND ShipReset = -1 Then
  5092. ShipReset = 1
  5093. SinkPirateShip = 0
  5094. ShipAngle = 180
  5095. me.enabled = 0
  5096. ShipAngleSpeed = 2.5
  5097. End If
  5098. Case 1
  5099. 'Ship got hit, so start the sinking animation
  5100. Select Case true
  5101. Case pirateship.RotZ < 90
  5102. pirateship.RotZ = pirateship.RotZ + SinkSpeed * 1.5
  5103. Case pirateship.RotZ >= 90
  5104. Pirateship.Z = Pirateship.Z - SinkSpeed * 1.5
  5105. If pirateship.Z <= -250 Then
  5106. SinkPirateShip = 2
  5107. pirateship.Y = 1167.221
  5108. pirateship.RotZ = 0
  5109. End If
  5110. End Select
  5111. Case 2
  5112. pirateship.z = pirateship.z + SinkSpeed * 1.5
  5113. If pirateship.z >= 55 Then
  5114. SinkPirateShip = 0
  5115. ShipAngle = 180
  5116. me.enabled = 0
  5117. End If
  5118. End Select
  5119. FlShipShadow.X = PirateShip.X
  5120. FlShipShadow.Y = PirateShip.Y
  5121. End Sub
  5122.  
  5123. '**************
  5124. ' SlotMachine le chuck items
  5125. '**************
  5126. Dim SlotAward3, SlotValue3
  5127.  
  5128. SlotAward3 = Array("itm1", "itm2", "itm3", "itm4", "itm5", "itm6", "itm7", "itm8" )
  5129.  
  5130. Sub StartLechuckItemsSlotmachine()
  5131. startB2S(9)
  5132. Dim i
  5133. DMDFlush()
  5134. For i = 0 to 7
  5135. DMD "", "", SlotAward3(i), eNone, eNone, eNone, 50, False, "fx_spinner"
  5136. Next
  5137. vpmtimer.AddTimer 500, "GiveSlotAwardItemLeChuck '"
  5138. End Sub
  5139.  
  5140. Dim LeChuckSlot:LeChuckSlot = 0
  5141. Sub GiveSlotAwardItemLeChuck()
  5142. 'LightSeq001.StopPlay
  5143. DMDFlush()
  5144. Randomize()
  5145. SlotValue3 = INT(RND * 8 + 1)
  5146. DMD "", "", SlotAward3(SlotValue3 - 1), eNone, eNone, eNone, 1000, True, ""
  5147. Select Case SlotValue3
  5148. Case 3
  5149. SlotValue3 = 4
  5150. Case 4
  5151. SlotValue3 = 8
  5152. Case 5
  5153. SlotValue3 = 16
  5154. Case 6
  5155. SlotValue3 = 32
  5156. Case 7
  5157. SlotValue3 = 64
  5158. Case 8
  5159. SlotValue3 = 128
  5160. End Select
  5161. 'Check if this mode has already been played
  5162. Do While (SlotValue3 AND LeChuckSlot) > 0 'We've already done this mode So keep randomly picking one until we get a mode we haven't done yet
  5163. SlotValue3 = INT(RND * 8 + 1)
  5164. DMDFlush()
  5165. DMD "", "", SlotAward3(SlotValue3-1), eNone, eNone, eNone, 500, True, ""
  5166. Select Case SlotValue3
  5167. Case 3
  5168. SlotValue3 = 4
  5169. Case 4
  5170. SlotValue3 = 8
  5171. Case 5
  5172. SlotValue3 = 16
  5173. Case 6
  5174. SlotValue3 = 32
  5175. Case 7
  5176. SlotValue3 = 64
  5177. Case 8
  5178. SlotValue3 = 128
  5179. End Select
  5180. Loop
  5181. Select Case SlotValue3
  5182. Case 1:Lechuck_item1() 'Bone
  5183. Case 2:Lechuck_item2() 'Book
  5184. Case 4:Lechuck_item3() 'Skull
  5185. Case 8:Lechuck_item4() 'Sword
  5186. Case 16:Lechuck_item5() 'Mok
  5187. Case 32:Lechuck_item6() 'Map
  5188. Case 64:Lechuck_item7() 'Compass
  5189. Case 128:Lechuck_item8() 'Keys
  5190. End Select
  5191. li007.state = 0
  5192. li009.state = 0
  5193. li011.state = 0
  5194. li037.state = 0
  5195. li038.state = 0
  5196. li039.state = 0
  5197. li040.state = 0
  5198. li041.state = 0
  5199. li042.state = 0
  5200. End Sub
  5201.  
  5202. '********Item 1***************
  5203. sub Lechuck_item1
  5204. StopSong()
  5205. PlaySong "lechuckitems"
  5206. mode1TimerCount = 60
  5207. mode1timer.Enabled = 1
  5208. itemrotytimer.Enabled = 1
  5209. titem001.enabled = 1
  5210. bone.Visible = 1
  5211. li014.state = 2
  5212. LeChuckKickout 1000, 270, 7, 0
  5213. status = "Bone"
  5214. end Sub
  5215.  
  5216. sub titem001_hit()
  5217. DMD "", "", "200k", eNone, eNone, eNone, 1000, True, ""
  5218. Score(CurrentPlayer) = Score(CurrentPlayer) + (200000*PFMultiplier)
  5219. li014.state = 1
  5220. bone.Visible = 0
  5221. playsound "won"
  5222. StopmodeEndofBall()
  5223. titem001.enabled = 0
  5224. Status = "Normal"
  5225. ChangeSong()
  5226. LeChuckSlot = LeChuckSlot OR 1
  5227. checkitemscomplete()
  5228. LeChuckHits = 0
  5229. LightSeq004.StopPlay
  5230. li009.State = 0
  5231. CheckBar()
  5232. CheckVoodoo()
  5233. escapeMI = escapeMI + 1
  5234. checktoescape
  5235. End sub
  5236.  
  5237. '********Item 2***************
  5238. sub Lechuck_item2
  5239. StopSong()
  5240. PlaySong "lechuckitems"
  5241. mode1TimerCount = 60
  5242. mode1timer.Enabled = 1
  5243. itemrotztimer.Enabled = 1
  5244. titem002.enabled = 1
  5245. book.Visible = 1
  5246. li015.state = 2
  5247. LeChuckKickout 1000, 270, 7, 0
  5248. Status = "Book"
  5249. end Sub
  5250.  
  5251. sub titem002_hit()
  5252. DMD "", "", "200k", eNone, eNone, eNone, 1000, True, ""
  5253. Score(CurrentPlayer) = Score(CurrentPlayer) + (200000*PFMultiplier)
  5254. li015.state = 1
  5255. book.Visible = 0
  5256. playsound "won"
  5257. StopmodeEndofBall()
  5258. titem002.enabled = 0
  5259. ChangeSong()
  5260. LeChuckSlot = LeChuckSlot OR 2
  5261. checkitemscomplete()
  5262. Status = "Normal"
  5263. LeChuckHits = 0
  5264. LightSeq004.StopPlay
  5265. li009.State = 0
  5266. CheckBar()
  5267. CheckVoodoo()
  5268. escapeMI = escapeMI + 1
  5269. checktoescape
  5270. End sub
  5271.  
  5272. '********Item 3***************
  5273. sub Lechuck_item3
  5274. StopSong()
  5275. PlaySong "lechuckitems"
  5276. mode1TimerCount = 60
  5277. mode1timer.Enabled = 1
  5278. itemrotytimer.Enabled = 1
  5279. titem003.enabled = 1
  5280. skully.Visible = 1
  5281. li016.state = 2
  5282. LeChuckKickout 1000, 270, 7, 0
  5283. Status = "Skully"
  5284. end Sub
  5285.  
  5286. sub titem003_hit()
  5287. DMD "", "", "200k", eNone, eNone, eNone, 1000, True, ""
  5288. Score(CurrentPlayer) = Score(CurrentPlayer) + (200000*PFMultiplier)
  5289. li016.state = 1
  5290. skully.Visible = 0
  5291. playsound "won"
  5292. StopmodeEndofBall()
  5293. titem003.enabled = 0
  5294. Status = "Normal"
  5295. ChangeSong()
  5296. LeChuckSlot = LeChuckSlot OR 4
  5297. LeChuckHits = 0
  5298. LightSeq004.StopPlay
  5299. li009.State = 0
  5300. checkitemscomplete()
  5301. CheckBar()
  5302. CheckVoodoo()
  5303. escapeMI = escapeMI + 1
  5304. checktoescape
  5305. End sub
  5306.  
  5307. '********Item 4***************
  5308. sub Lechuck_item4
  5309. StopSong()
  5310. PlaySong "lechuckitems"
  5311. mode1TimerCount = 60
  5312. mode1timer.Enabled = 1
  5313. itemrotztimer.Enabled = 1
  5314. titem004.enabled = 1
  5315. sword001.Visible = 1
  5316. li017.state = 2
  5317. LeChuckKickout 1000, 270, 7, 0
  5318. Status = "Sword"
  5319. end Sub
  5320.  
  5321. sub titem004_hit()
  5322. DMD "", "", "200k", eNone, eNone, eNone, 1000, True, ""
  5323. Score(CurrentPlayer) = Score(CurrentPlayer) + (200000*PFMultiplier)
  5324. li017.state = 1
  5325. sword001.Visible = 0
  5326. playsound "won"
  5327. StopmodeEndofBall()
  5328. titem004.enabled = 0
  5329. Status = "Normal"
  5330. ChangeSong()
  5331. LeChuckSlot = LeChuckSlot OR 8
  5332. LeChuckHits = 0
  5333. LightSeq004.StopPlay
  5334. li009.State = 0
  5335. checkitemscomplete()
  5336. CheckBar()
  5337. CheckVoodoo()
  5338. escapeMI = escapeMI + 1
  5339. checktoescape
  5340. End sub
  5341.  
  5342. '********Item 5***************
  5343. sub Lechuck_item5
  5344. StopSong()
  5345. PlaySong "lechuckitems"
  5346. mode1TimerCount = 60
  5347. mode1timer.Enabled = 1
  5348. itemrotytimer.Enabled = 1
  5349. titem005.enabled = 1
  5350. mok.Visible = 1
  5351. li018.state = 2
  5352. LeChuckKickout 1000, 270, 7, 0
  5353. Status = "Mok"
  5354. end Sub
  5355.  
  5356. sub titem005_hit()
  5357. DMD "", "", "200k", eNone, eNone, eNone, 1000, True, ""
  5358. Score(CurrentPlayer) = Score(CurrentPlayer) + (200000*PFMultiplier)
  5359. li018.state = 1
  5360. mok.Visible = 0
  5361. playsound "won"
  5362. StopmodeEndofBall
  5363. titem005.enabled = 0
  5364. Status = "Normal"
  5365. ChangeSong()
  5366. LeChuckSlot = LeChuckSlot OR 16
  5367. LeChuckHits = 0
  5368. LightSeq004.StopPlay
  5369. li009.State = 0
  5370. checkitemscomplete()
  5371. CheckBar()
  5372. CheckVoodoo()
  5373. escapeMI = escapeMI + 1
  5374. checktoescape
  5375. End sub
  5376.  
  5377. '********Item 6***************
  5378. sub Lechuck_item6
  5379. StopSong()
  5380. PlaySong "lechuckitems"
  5381. mode1TimerCount = 60
  5382. mode1timer.Enabled = 1
  5383. itemrotytimer.Enabled = 1
  5384. titem006.enabled = 1
  5385. Map.Visible = 1
  5386. li019.state = 2
  5387. LeChuckKickout 1000, 270, 7, 0
  5388. Status = "Map"
  5389. end Sub
  5390.  
  5391. sub titem006_hit()
  5392. DMD "", "", "200k", eNone, eNone, eNone, 1000, True, ""
  5393. Score(CurrentPlayer) = Score(CurrentPlayer) + (200000*PFMultiplier)
  5394. li019.state = 1
  5395. Map.Visible = 0
  5396. playsound "won"
  5397. StopmodeEndofBall()
  5398. titem006.enabled = 0
  5399. Status = "Normal"
  5400. ChangeSong()
  5401. LeChuckSlot = LeChuckSlot OR 32
  5402. LeChuckHits = 0
  5403. LightSeq004.StopPlay
  5404. li009.State = 0
  5405. checkitemscomplete()
  5406. CheckBar()
  5407. CheckVoodoo()
  5408. escapeMI = escapeMI + 1
  5409. checktoescape
  5410. End sub
  5411.  
  5412. '********Item 7***************
  5413. sub Lechuck_item7
  5414. StopSong()
  5415. PlaySong "lechuckitems"
  5416. mode1TimerCount = 60
  5417. mode1timer.Enabled = 1
  5418. itemrotytimer.Enabled = 1
  5419. titem007.enabled = 1
  5420. compas.Visible = 1
  5421. li020.state = 2
  5422. LeChuckKickout 1000, 270, 7, 0
  5423. Status = "Compass"
  5424. end Sub
  5425.  
  5426. sub titem007_hit()
  5427. DMD "", "", "200k", eNone, eNone, eNone, 1000, True, ""
  5428. Score(CurrentPlayer) = Score(CurrentPlayer) + (200000*PFMultiplier)
  5429. li020.state = 1
  5430. compas.Visible = 0
  5431. playsound "won"
  5432. StopmodeEndofBall()
  5433. titem007.enabled = 0
  5434. Status = "Normal"
  5435. ChangeSong()
  5436. LeChuckSlot = LeChuckSlot OR 64
  5437. LeChuckHits = 0
  5438. LightSeq004.StopPlay
  5439. li009.State = 0
  5440. checkitemscomplete()
  5441. CheckBar()
  5442. CheckVoodoo()
  5443. escapeMI = escapeMI + 1
  5444. checktoescape
  5445. End sub
  5446.  
  5447. '********Item 8***************
  5448. sub Lechuck_item8
  5449. StopSong()
  5450. PlaySong "lechuckitems"
  5451. mode1TimerCount = 60
  5452. mode1timer.Enabled = 1
  5453. itemrotytimer.Enabled = 1
  5454. titem008.enabled = 1
  5455. keysitem.Visible = 1
  5456. li021.state = 2
  5457. LeChuckKickout 1000, 270, 7, 0
  5458. Status = "Keys"
  5459. end Sub
  5460.  
  5461. sub titem008_hit()
  5462. DMD "", "", "200k", eNone, eNone, eNone, 1000, True, ""
  5463. Score(CurrentPlayer) = Score(CurrentPlayer) + (200000*PFMultiplier)
  5464. li021.state = 1
  5465. keysitem.Visible = 0
  5466. playsound "won"
  5467. StopmodeEndofBall()
  5468. titem008.enabled = 0
  5469. Status = "Normal"
  5470. ChangeSong()
  5471. LeChuckSlot = LeChuckSlot OR 128
  5472. LeChuckHits = 0
  5473. LightSeq004.StopPlay
  5474. li009.State = 0
  5475. checkitemscomplete()
  5476. CheckBar()
  5477. CheckVoodoo()
  5478. escapeMI = escapeMI + 1
  5479. checktoescape
  5480. End sub
  5481.  
  5482. sub checkitemscomplete()
  5483. If LeChuckHits >= 3 Then li009.State = 2
  5484. If LeChuckSlot = 255 Then
  5485. DMD "", "", "dmditmcomplete", eNone, eNone, eNone, 1000, True, ""
  5486. Score(CurrentPlayer) = Score(CurrentPlayer) + (1000000*PFMultiplier)
  5487. li009.state = 0
  5488. end if
  5489. end sub
  5490.  
  5491. '**************
  5492. ' SlotMachine le chuck
  5493. '**************
  5494.  
  5495. Dim SlotAward, SlotValue
  5496. SlotAward = Array("lc2", "lc1")
  5497. Sub StartLeChuckSlotMachineLechuck()
  5498. startB2S(9)
  5499. Dim i
  5500. DMDFlush
  5501. For i = 0 to 1
  5502. DMD "", "", SlotAward(i), eNone, eNone, eNone, 100, False, ""
  5503. Next
  5504. vpmtimer.AddTimer 2000, "GiveSlotAwardLeChuck '"
  5505. End Sub
  5506.  
  5507. Sub GiveSlotAwardLeChuck()
  5508. DMDFlush()
  5509. Randomize()
  5510. SlotValue = INT(RND * 2)
  5511. DMD "", "", SlotAward(SlotValue), eNone, eNone, eNone, 500, True, ""
  5512. Select Case SlotValue
  5513. Case 0:LeChuckKickout 20, 270, 7, 0
  5514. Case 1:LeChuckKickout 20, 90, 7, 0
  5515. End Select
  5516. End Sub
  5517.  
  5518. '**************
  5519. ' SlotMachine Bar
  5520. '**************
  5521.  
  5522. Dim SlotAward1, SlotValue1
  5523.  
  5524. SlotAward1 = Array("b1", "b2", "b3", "b4", "b5")
  5525.  
  5526. Sub StartBarSlotmachine()
  5527. startB2S(8)
  5528. playsound "bartalk"
  5529. Dim i
  5530. DMDFlush
  5531. For i = 0 to 4
  5532. DMD "", "", SlotAward1(i), eNone, eNone, eNone, 50, False, "fx_spinner"
  5533. Next
  5534. vpmtimer.AddTimer 2000, "GiveSlotAwardBar '"
  5535. li007.state = 0
  5536. li009.state = 0
  5537. li011.state = 0
  5538. li037.state = 0
  5539. li038.state = 0
  5540. li039.state = 0
  5541. li040.state = 0
  5542. li041.state = 0
  5543. li042.state = 0
  5544. End Sub
  5545.  
  5546. Dim BarSlot:BarSlot = 0
  5547. Sub GiveSlotAwardBar()
  5548. DMDFlush()
  5549. Randomize()
  5550. SlotValue1 = INT(RND * 5) + 1
  5551. DMD "", "", SlotAward1(SlotValue1 - 1), eNone, eNone, eNone, 500, True, ""
  5552. Select Case SlotValue1
  5553. Case 1
  5554. SlotValue1 = 1 'Spitting
  5555. Case 2
  5556. SlotValue1 = 2 'Treasure
  5557. Case 3
  5558. SlotValue1 = 4 'Bar Fight
  5559. Case 4
  5560. SlotValue1 = 8 'Coin Frenzy
  5561. Case 5
  5562. SlotValue1 = 16 'Duels
  5563. End Select
  5564. Do while (SlotValue1 AND BarSlot) > 0
  5565. SlotValue1 = Int(RND * 5 + 1)
  5566. DMDFlush()
  5567. DMD "", "", SlotAward1(SlotValue1-1), eNone, eNone, eNone, 500, True, ""
  5568. Select Case SlotValue1
  5569. Case 1
  5570. SlotValue1 = 1 'Spitting
  5571. Case 2
  5572. SlotValue1 = 2 'Treasure
  5573. Case 3
  5574. SlotValue1 = 4 'Bar Fight
  5575. Case 4
  5576. SlotValue1 = 8 'Coin Frenzy
  5577. Case 5
  5578. SlotValue1 = 16 'Duels
  5579. End Select
  5580. Loop
  5581. Select Case SlotValue1
  5582. Case 1
  5583. BSBarToBar.AddBall Kicker006
  5584. vpmTimer.AddTimer 1000, "Spitting '" 'Spitting
  5585. Case 2
  5586. vpmTimer.AddTimer 1000, "Treasure '" 'Treasure
  5587. Case 4
  5588. BSBarToBar.AddBall Kicker006
  5589. FlashForMs Flasher002, 1000, 50, 0
  5590. vpmTimer.AddTimer 1000, "BarFight '" 'BarFight
  5591. Case 8
  5592. BSBarToBar.AddBall Kicker006
  5593. FlashForMs Flasher002, 1000, 50, 0
  5594. vpmTimer.AddTimer 1000, "CoinFrenzy '" 'CoinFrenzy
  5595. Case 16
  5596. BSBarToBar.AddBall Kicker006
  5597. FlashForMs Flasher002, 1000, 50, 0
  5598. vpmTimer.AddTimer 1000, "Duels '" 'Duels
  5599. End Select
  5600. End Sub
  5601.  
  5602. '********bar pitting mode***************
  5603. Dim NextSpitDistance, SpittingDistance(5), BuildSpit, SpitPower, SpitPic, SpitCount, SpitPos(13), NextSpitKey
  5604. SpitPos(1) = " MAX "
  5605. SpitPos(2) = "= MAX "
  5606. SpitPos(3) = "== MAX "
  5607. SpitPos(4) = "=== MAX "
  5608. SpitPos(5) = "==== MAX "
  5609. SpitPos(6) = "===== MAX "
  5610. SpitPos(7) = "====== MAX "
  5611. SpitPos(8) = "======= MAX "
  5612. SpitPos(9) = "======== MAX "
  5613. SpitPos(10) = "========= MAX "
  5614. SpitPos(11) = "========== MAX "
  5615. SpitPos(12) = "=========== MAX "
  5616. SpitPos(13) = "============MAX "
  5617.  
  5618. sub Spitting()
  5619. li032.state = 2
  5620. NextSpitDistance=SpittingDistance(1)
  5621. Status = "Spitting"
  5622. SpitPower = 1
  5623. SpitCount = 0
  5624. DMDFlush()
  5625. DMD CL(0, "SPITTING"), CL(1, "COMPETITION "),"",eBlink,eBlink,0,1500,False,""
  5626. DMD CL(0, "ALT FLIPPERS"), CL(1, "FOR SPIT POWER"),"",eBlink,eBlink,0,2000,False,""
  5627. DMD CL(0, " TARGET IS ="), CL(1, "AT LEAST "&NextSpitDistance&" FT"),"",0,0,0,1000,False,""
  5628. DMD CL(0, " READY"), CL(1, " READY"),"",eScrollLeft,eScrollRight,0,1000,False,""
  5629. DMD CL(0, "STEADY"), CL(1, "STEADY"),"",eScrollRight,eScrollLeft,0,1000,False,""
  5630. DMD CL(0, "GO"), CL(1, "GO"),"",eBlinkFast,eBlinkFast,0,1000,False,""
  5631. DMD "_", "_", "_", eNone, eNone, eNone, 5000, False, ""
  5632. Wall016.TimerInterval = 160
  5633. vpmTimer.AddTimer 12000, "Wall016.TimerEnabled = 1 '"
  5634. vpmTimer.AddTimer 12000, "BuildSpit = 1 '"
  5635. li007.state = 0
  5636. li011.state = 0
  5637. StopSong()
  5638. PlaySong "barquest2"
  5639. end sub
  5640.  
  5641. Sub SpitProcessKey(WhichFlipper)
  5642. If BuildSpit = 1 Then
  5643. Select Case (WhichFlipper)
  5644. Case LeftFlipperKey
  5645. If NextSpitKey = 0 Then
  5646. SpitPower = SpitPower + 1
  5647. 'Play a Sound
  5648. End If
  5649. NextSpitKey = 1
  5650. Case RightFlipperKey
  5651. If NextSpitKey = 1 Then
  5652. SpitPower = SpitPower + 1
  5653. 'Play a sound
  5654. End If
  5655. NextSpitKey = 0
  5656. End Select
  5657. End If
  5658. End Sub
  5659.  
  5660. Sub Wall016_timer()
  5661. Wall016.TimerEnabled = 0
  5662. SpitPic = ABS(Int(SpitPower/5))
  5663. If SpitPic < 1 Then SpitPic = 1
  5664. If SpitPic > 13 Then SpitPic = 13
  5665. DMDFlush()
  5666. DMD CL(0, "POWER = " & Int(SpitPower)), CL(1, SpitPos(SpitPic)),"",0,0,0,Wall016.TimerInterval,False,""
  5667. SpitPower = SpitPower - 0.5
  5668. If SpitPower < 1 Then SpitPower = 1
  5669. If SpitPower > 130 Then SpitPower = 130
  5670. Spitcount = SpitCount + 1
  5671. If SpitCount = 30 Then
  5672. DMDFlush()
  5673. DMD CL(0, "READY FOR"), CL(1, SpitPower & " FEET"),"",0,0,0,1000,False,""
  5674. If SpitPic > 12 Then SpitPic=12
  5675. vpmTimer.AddTimer 1000, "FinishSpit '"
  5676. BuildSpit = 0
  5677. Else
  5678. Me.TimerEnabled = 1
  5679. End If
  5680. End Sub
  5681.  
  5682. Sub FinishSpit()
  5683. 'Play Some Sound
  5684. Wall016.TimerEnabled = 0
  5685. DMDFlush()
  5686. DMD CL(0, " = PHTOOEY ="), "<> ","",0,0,0,20,False,""
  5687. DMD CL(0, " = PHTOOEY ="), "< > ","",0,0,0,20,False,""
  5688. DMD CL(0, " = PHTOOEY ="), "< > ","",0,0,0,20,False,""
  5689. DMD CL(0, " = PHTOOEY ="), "< > ","",0,0,0,20,False,""
  5690. DMD CL(0, " = PHTOOEY ="), "< > ","",0,0,0,20,False,""
  5691. DMD CL(0, " = PHTOOEY ="), "< > ","",0,0,0,20,False,""
  5692. DMD CL(0, " = PHTOOEY ="), "< > ","",0,0,0,20,False,""
  5693. DMD CL(0, " = PHTOOEY ="), "< > ","",0,0,0,20,False,""
  5694. DMD CL(0, " = PHTOOEY ="), "< > ","",0,0,0,20,False,""
  5695. DMD CL(0, " = PHTOOEY ="), "< >","",0,0,0,20,False,""
  5696. DMD CL(0, " = PHTOOEY ="), " < >","",0,0,0,20,False,""
  5697. DMD CL(0, " = PHTOOEY ="), " < >","",0,0,0,20,False,""
  5698. DMD CL(0, " = PHTOOEY ="), " < >","",0,0,0,20,False,""
  5699. DMD CL(0, " = PHTOOEY ="), " < >","",0,0,0,20,False,""
  5700. DMD CL(0, " = PHTOOEY ="), " < >","",0,0,0,20,False,""
  5701. DMD CL(0, " = PHTOOEY ="), " < >","",0,0,0,20,False,""
  5702. DMD CL(0, " = PHTOOEY ="), " < >","",0,0,0,20,False,""
  5703. DMD CL(0, " = PHTOOEY ="), " < >","",0,0,0,20,False,""
  5704. DMD CL(0, " = PHTOOEY ="), " <>","",0,0,0,20,False,"knocker"
  5705. DMD "_","_","_",0,0,0,1000,False,""
  5706. vpmTimer.AddTimer 1700, "TestSpit '"
  5707. End Sub
  5708.  
  5709. Sub TestSpit()
  5710. DMDFlush()
  5711. DMD CL(0, "LETS SEE"), CL(1, "HOW YA DID"),"",2,2,0,1000,False,""
  5712. Score(CurrentPlayer) = Score(CurrentPlayer) + (SpitPower*2000*PFMultiplier)
  5713. If SpitPower >= NextSpitDistance Then
  5714. vpmTimer.AddTimer 1000, "GoSpitAward '"
  5715. Else
  5716. DMD CL(0, "NICE TRY"), CL(1, "GUYBRUSH"),"",3,3,0,1000,True,"lost"
  5717. li032.state = 0
  5718. FlashForMs Flasher002, 1500, 50, 0
  5719. vpmTimer.AddTimer 1400, "eBall.Z = 25 '"
  5720. vpmTimer.AddTimer 1500, "BSBarToBar.ExitSol_On '"
  5721. Stopmode1()
  5722. End If
  5723. Status = "Normal"
  5724. CheckBar()
  5725. End Sub
  5726.  
  5727. Sub GoSpitAward()
  5728. DMDFlush()
  5729. BarSlot = BarSlot OR 1
  5730. DMD CL(0, "COMPETITION"), CL(1, "WINNER"),"",1,1,0,1000,False,"won"
  5731. li032.State = 1
  5732. DMD CL(0, "YOU ARE AWARDED"), CL(1, (SpitPower*2000*PFMultiplier) & "POINTS"), "", eNone, eNone, eNone, 1000, True, ""
  5733. vpmtimer.addtimer 250, "startB2S(3) '"
  5734. FlashForMs Flasher002, 1200, 50, 0
  5735. StopmodeEndofBall()
  5736. ChangeSong()
  5737. vpmTimer.AddTimer 1100, "eBall.Z = 25 '"
  5738. vpmTimer.AddTimer 1200, "BSBarToBar.ExitSol_On '"
  5739. escapeMI = escapeMI + 1
  5740. checktoescape
  5741. End Sub
  5742.  
  5743. '********bar treasure hunt mode***************
  5744. dim rBall
  5745. dim BallInHole4
  5746. Dim SchatkistShake
  5747.  
  5748. sub Treasure()
  5749. treasurfindy = 0
  5750. countr6 = 0
  5751. UpdateChest()
  5752. bringChestdown()
  5753. StopSong()
  5754. playsound "dig"
  5755. PlaySong "barquest2"
  5756. vpmtimer.addtimer 1050, "kickbonus '"
  5757. li033.state = 2
  5758. Status = "Treasure"
  5759. end sub
  5760.  
  5761. sub bringChestdown()
  5762. duuus()
  5763. ChestDir = 1
  5764. ChestdownTimer.enabled = 1
  5765. end sub
  5766.  
  5767. Sub kickbonus()
  5768. LowerFlippersActive = True
  5769. bonustime = 1
  5770. mode2Timercount = 7
  5771. mode2timer.Enabled = 10
  5772. end sub
  5773.  
  5774. sub Kicker007_hit()
  5775. if bonustime = 1 then
  5776. vpmtimer.AddTimer 500, "continuebonus '"
  5777. exit Sub
  5778. end if
  5779. Set rBall = ActiveBall
  5780. MyTroughTreasureAdd(rball)
  5781. Me.TimerEnabled = 1
  5782. LowerFlippersActive = False
  5783. duuus()
  5784. ChestDir = 1
  5785. ChestupTimer.enabled = 1
  5786. end sub
  5787.  
  5788. sub continuebonus()
  5789. BSTreasure.AddBall Kicker007
  5790. BSTreasure.ExitSol_On
  5791. end sub
  5792.  
  5793. Sub BackToPlayfield()
  5794. LowerFlippersActive = False
  5795. ' DMD "", "", "100k", eNone, eNone, eNone, 1000, True, ""
  5796. ' addscore 100000
  5797. BarKickout 50, 160, 7, 0
  5798. vpmtimer.addtimer 1100, "startB2S(3) '"
  5799. End Sub
  5800.  
  5801. Sub Kicker007_Timer
  5802. Do While rBall.Z > 0
  5803. rBall.Z = rBall.Z -5
  5804. Exit Sub
  5805. Loop
  5806. Me.TimerEnabled = 0
  5807. Me.Enabled = 1
  5808. Me.DestroyBall
  5809. FlashForMs Flasher002, 1000, 50, 0
  5810. vpmtimer.addtimer 1100, "BackToPlayfield '"
  5811. End Sub
  5812.  
  5813. sub Target004_hit()
  5814. playsound "hitmining"
  5815. schatkistshaker()
  5816. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  5817. treasurfindy = treasurfindy + 1
  5818. countr6 = countr6 + 1
  5819. Updatechest()
  5820. checktreasurecomplete()
  5821. end sub
  5822.  
  5823. Sub SchatkistShaker()
  5824. SchatkistShake = 3
  5825. SchatkistTimer.Enabled = True
  5826. End Sub
  5827.  
  5828. Sub SchatkistTimer_Timer()
  5829. schatkistbelow.Transz = SchatkistShake / 2
  5830. If SchatkistShake = 0 Then Me.Enabled = False:Exit Sub
  5831. If SchatkistShake <0 Then
  5832. SchatkistShake = ABS(SchatkistShake)- 0.1
  5833. Else
  5834. SchatkistShake = - SchatkistShake + 0.1
  5835. End If
  5836. End Sub
  5837.  
  5838. sub checktreasurecomplete()
  5839. If treasurfindy = 6 then
  5840. RightFlipper001.RotatetoStart
  5841. LeftFlipper001.RotatetoStart
  5842. LowerFlippersActive = False
  5843. DMD "", "", "100k", eNone, eNone, eNone, 1000, True, ""
  5844. Score(CurrentPlayer) = Score(CurrentPlayer) + (100000*PFMultiplier)
  5845. playsound "treasurecomplete"
  5846. StopmodeEndofBall()
  5847. li033.state = 1
  5848. treasurfindy = 0
  5849. Status = "Normal"
  5850. countr6 = 0
  5851. Updatechest()
  5852. ChangeSong()
  5853. treasuresfound = treasuresfound + 1
  5854. Updatetreasurecountr()
  5855. vpmtimer.addtimer 250, "startB2S(3) '"
  5856. BarSlot = BarSlot OR 2
  5857. CheckBar()
  5858. if playtreasure = 1 then exit sub
  5859. AddMultiball 1
  5860. countr41 = 1
  5861. TMBcoinys.enabled = 1
  5862. escapeMI = escapeMI + 1
  5863. checktoescape
  5864. end if
  5865. end sub
  5866.  
  5867. Sub Updatechest()
  5868. For Each Schat in CoSchatKist
  5869. Schat.Visible = 0
  5870. Next
  5871. select case countr6
  5872. case 0 : schatkist001.Visible=1
  5873. case 1 : schatkist002.Visible=1
  5874. case 2 : schatkist003.Visible=1
  5875. case 3 : schatkist004.Visible=1
  5876. case 4 : schatkist005.Visible=1
  5877. case 5 : schatkist006.Visible=1
  5878. case 6 : schatkist007.Visible=1:addimagechest()
  5879. end Select
  5880. End Sub
  5881.  
  5882. sub addimagechest()
  5883. imagechest = imagechest + 1
  5884. updateimagechest()
  5885. End Sub
  5886.  
  5887. sub updateimagechest()
  5888. select case imagechest
  5889. case 0 :chestimage1
  5890. case 1 :chestimage2
  5891. case 2 :chestimage3
  5892. case 3 :chestimage4
  5893. case 4 :chestimage5
  5894. case 5 :chestimage6
  5895. case 6 :chestimage7
  5896. end Select
  5897. End Sub
  5898.  
  5899. Dim Schat
  5900. sub chestimage1()
  5901. For Each Schat in CoSchatKist
  5902. Schat.Image = "schatkist5"
  5903. Next
  5904. end sub
  5905.  
  5906. sub chestimage2
  5907. For Each Schat in CoSchatKist
  5908. Schat.Image = "schatkist6"
  5909. Next
  5910. end sub
  5911.  
  5912. sub chestimage3
  5913. For Each Schat in CoSchatKist
  5914. Schat.Image = "schatkist7"
  5915. Next
  5916. end sub
  5917.  
  5918. sub chestimage4
  5919. For Each Schat in CoSchatKist
  5920. Schat.Image = "schatkist8"
  5921. Next
  5922. end sub
  5923.  
  5924. sub chestimage5
  5925. For Each Schat in CoSchatKist
  5926. Schat.Image = "schatkist9"
  5927. Next
  5928. end sub
  5929.  
  5930. sub chestimage6
  5931. For Each Schat in CoSchatKist
  5932. Schat.Image = "schatkist10"
  5933. Next
  5934. end sub
  5935.  
  5936. sub chestimage7
  5937. For Each Schat in CoSchatKist
  5938. Schat.Image = "schatkist5"
  5939. Next
  5940. imagechest = 0
  5941. end sub
  5942.  
  5943. '********bar fight mode***************
  5944.  
  5945. Dim mFist
  5946. sub BarFight()
  5947. mFist = 0
  5948. StopSong()
  5949. PlaySong "barquest2"
  5950. mode1TimerCount = 90
  5951. mode1timer.Enabled = 1
  5952. itemrotztimer.Enabled = 1
  5953. enablefists()
  5954. eBall.Z = 25
  5955. BSBarToBar.ExitSol_On
  5956. li034.state = 2
  5957. Status = "Fight"
  5958. end sub
  5959.  
  5960. sub enablefists()
  5961. Dim X
  5962. 'tim001.Enabled = 1
  5963. 'tim002.Enabled = 1
  5964. 'tim003.Enabled = 1
  5965. 'tim004.Enabled = 1
  5966. 'tim005.Enabled = 1
  5967. 'tim006.Enabled = 1
  5968. tfist001.Enabled = 1
  5969. tfist002.Enabled = 1
  5970. tfist003.Enabled = 1
  5971. tfist004.Enabled = 1
  5972. tfist005.Enabled = 1
  5973. For Each X in Fists
  5974. X.Visible = 1
  5975. Next
  5976. end sub
  5977.  
  5978. Sub tfist001_Hit()
  5979. tfist001.enabled = 0
  5980. movefistdown(1)
  5981. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  5982. Playsound "fisthurt"
  5983. mfist = mfist + 1
  5984. addextratime()
  5985. checkbonusfist()
  5986. end sub
  5987.  
  5988. sub movefistdown(which)
  5989. Select Case which
  5990. Case 1
  5991. fist001.Visible = 0
  5992. Case 2
  5993. fist002.Visible = 0
  5994. Case 3
  5995. fist003.Visible = 0
  5996. Case 4
  5997. fist004.Visible = 0
  5998. Case 5
  5999. fist005.Visible = 0
  6000. End Select
  6001. end sub
  6002.  
  6003. Sub tfist002_Hit()
  6004. tfist002.enabled = 0
  6005. movefistdown(2)
  6006. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  6007. Playsound "fisthurt"
  6008. mfist = mfist + 1
  6009. addextratime()
  6010. checkbonusfist()
  6011. end sub
  6012.  
  6013. Sub tfist003_Hit()
  6014. tfist003.enabled = 0
  6015. movefistdown(3)
  6016. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  6017. Playsound "fisthurt"
  6018. mfist = mfist + 1
  6019. addextratime()
  6020. checkbonusfist()
  6021. end sub
  6022.  
  6023. Sub tfist004_Hit()
  6024. tfist004.enabled = 0
  6025. movefistdown(4)
  6026. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  6027. Playsound "fisthurt"
  6028. mfist = mfist + 1
  6029. addextratime()
  6030. checkbonusfist()
  6031. end sub
  6032.  
  6033. Sub tfist005_Hit()
  6034. tfist005.enabled = 0
  6035. movefistdown(5)
  6036. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  6037. Playsound "fisthurt"
  6038. mfist = mfist + 1
  6039. addextratime()
  6040. checkbonusfist()
  6041. end sub
  6042.  
  6043. sub checkbonusfist()
  6044. If mfist = 5 then
  6045. DMD "", "", "100k", eNone, eNone, eNone, 1000, True, ""
  6046. Score(CurrentPlayer) = Score(CurrentPlayer) + (100000*PFMultiplier)
  6047. playsound "won"
  6048. StopmodeEndofBall()
  6049. li034.state = 1
  6050. mfist = 0
  6051. AddMultiball 1
  6052. countr41 = 1
  6053. TMBcoinys.enabled = 1
  6054. Status = "Normal"
  6055. ChangeSong()
  6056. BarSlot = BarSlot OR 4
  6057. CheckBar()
  6058. escapeMI = escapeMI + 1
  6059. checktoescape
  6060. end if
  6061. end sub
  6062.  
  6063. '********bar coinfrenzy mode***************
  6064.  
  6065. Dim mCoin
  6066. sub CoinFrenzy()
  6067. mCoin = 0
  6068. StopSong()
  6069. PlaySong "barquest2"
  6070. mode1TimerCount = 90
  6071. mode1timer.Enabled = 1
  6072. itemrotztimer.Enabled = 1
  6073. enablecoins()
  6074. eBall.Z = 25
  6075. BSBarToBar.ExitSol_On
  6076. li007.state = 0
  6077. li035.state = 2
  6078. Status = "Coin"
  6079. end sub
  6080.  
  6081. sub enablecoins()
  6082. Dim X
  6083. tcoin001.Enabled = 1
  6084. tcoin002.Enabled = 1
  6085. tcoin003.Enabled = 1
  6086. tcoin004.Enabled = 1
  6087. tcoin005.Enabled = 1
  6088. For Each X in Coins
  6089. X.Visible = 1
  6090. Next
  6091. end sub
  6092.  
  6093. Sub tcoin001_Hit()
  6094. tcoin001.enabled = 0
  6095. mcoin = mcoin + 1
  6096. movecoindown(1)
  6097. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  6098. Playsound "coinhurt"
  6099. addextratime()
  6100. checkbonuscoin()
  6101. coinsearned = coinsearned + 1
  6102. Updatecoinscountr()
  6103. vpmtimer.addtimer 250, "startB2S(3) '"
  6104. end sub
  6105.  
  6106. sub movecoindown(which)
  6107. Select Case which
  6108. Case 1
  6109. coin001.Visible = 0
  6110. Case 2
  6111. coin002.Visible = 0
  6112. Case 3
  6113. coin003.Visible = 0
  6114. Case 4
  6115. coin004.Visible = 0
  6116. Case 5
  6117. coin005.Visible = 0
  6118. End Select
  6119. end sub
  6120.  
  6121. Sub tcoin002_Hit()
  6122. tcoin002.enabled = 0
  6123. mcoin = mcoin + 1
  6124. movecoindown(2)
  6125. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  6126. Playsound "coinhurt"
  6127. addextratime()
  6128. checkbonuscoin()
  6129. coinsearned = coinsearned + 1
  6130. Updatecoinscountr()
  6131. vpmtimer.addtimer 250, "startB2S(3) '"
  6132. end sub
  6133.  
  6134. Sub tcoin003_Hit()
  6135. tcoin003.enabled = 0
  6136. mcoin = mcoin + 1
  6137. movecoindown(3)
  6138. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  6139. Playsound "coinhurt"
  6140. addextratime()
  6141. checkbonuscoin()
  6142. coinsearned = coinsearned + 1
  6143. Updatecoinscountr()
  6144. vpmtimer.addtimer 250, "startB2S(3) '"
  6145. end sub
  6146.  
  6147. Sub tcoin004_Hit()
  6148. tcoin004.enabled = 0
  6149. mcoin = mcoin + 1
  6150. movecoindown(4)
  6151. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  6152. Playsound "coinhurt"
  6153. addextratime()
  6154. checkbonuscoin()
  6155. coinsearned = coinsearned + 1
  6156. Updatecoinscountr()
  6157. vpmtimer.addtimer 250, "startB2S(3) '"
  6158. end sub
  6159.  
  6160. Sub tcoin005_Hit()
  6161. tcoin005.enabled = 0
  6162. movecoindown(5)
  6163. mcoin = mcoin + 1
  6164. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  6165. Playsound "coinhurt"
  6166. addextratime()
  6167. checkbonuscoin()
  6168. coinsearned = coinsearned + 1
  6169. Updatecoinscountr()
  6170. vpmtimer.addtimer 250, "startB2S(3) '"
  6171. end sub
  6172.  
  6173. sub checkbonuscoin()
  6174. If mcoin = 5 then
  6175. DMD "", "", "100k", eNone, eNone, eNone, 1000, True, ""
  6176. Score(CurrentPlayer) = Score(CurrentPlayer) + (100000*PFMultiplier)
  6177. playsound "won"
  6178. StopmodeEndofBall()
  6179. li035.state = 1
  6180. mcoin = 0
  6181. AddMultiball 1
  6182. countr41 = 1
  6183. TMBcoinys.enabled = 1
  6184. Status = "Normal"
  6185. ChangeSong()
  6186. BarSlot = BarSlot OR 8
  6187. CheckBar()
  6188. escapeMI = escapeMI + 1
  6189. checktoescape
  6190. end if
  6191. end sub
  6192.  
  6193. '********bar duels mode***************
  6194. Dim DuelsCounter, DuelsPointer, Randy
  6195. Randy = 9
  6196. DuelsCounter = 0
  6197.  
  6198. sub Duels()
  6199. DuelsCounter = 0
  6200. Wall018.TimerInterval = 5000
  6201. ' Wall018.TimerEnabled = 1
  6202. Wall018_Timer()
  6203. li036.state = 2
  6204. DMDFlush()
  6205. DMD CL(0, "DUEL!!"), CL(1, "> <"),"",eBlinkFast,eNone,0,10,False,""
  6206. DMD CL(0, "DUEL!!"), CL(1, " > < "),"",eBlinkFast,eNone,0,10,False,""
  6207. DMD CL(0, "DUEL!!"), CL(1, " > < "),"",eBlinkFast,eNone,0,10,False,""
  6208. DMD CL(0, "DUEL!!"), CL(1, " > < "),"",eBlinkFast,eNone,0,10,False,""
  6209. DMD CL(0, "DUEL!!"), CL(1, " > < "),"",eBlinkFast,eNone,0,10,False,""
  6210. DMD CL(0, "DUEL!!"), CL(1, " > < "),"",eBlinkFast,eNone,0,10,False,""
  6211. DMD CL(0, "DUEL!!"), CL(1, " > < "),"",eBlinkFast,eNone,0,10,False,""
  6212. DMD CL(0, "DUEL!!"), CL(1, " > < "),"",eBlinkFast,eNone,0,10,False,""
  6213. DMD CL(0, "DUEL!!"), CL(1, " > < "),"",eBlinkFast,eNone,0,10,False,""
  6214. DMD CL(0, "DUEL!!"), CL(1, " >< "),"",eBlinkFast,eNone,0,10,False,""
  6215. DMD CL(0, "DUEL!!"), CL(1, " > < "),"",eBlinkFast,eNone,0,10,False,""
  6216. DMD CL(0, "DUEL!!"), CL(1, " > < "),"",eBlinkFast,eNone,0,10,False,""
  6217. DMD CL(0, "DUEL!!"), CL(1, " > < "),"",eBlinkFast,eNone,0,10,False,""
  6218. DMD CL(0, "DUEL!!"), CL(1, " > < "),"",eBlinkFast,eNone,0,10,False,""
  6219. DMD CL(0, "DUEL!!"), CL(1, " > < "),"",eBlinkFast,eNone,0,10,False,""
  6220. DMD CL(0, "DUEL!!"), CL(1, " > < "),"",eBlinkFast,eNone,0,10,False,""
  6221. DMD CL(0, "DUEL!!"), CL(1, " > < "),"",eBlinkFast,eNone,0,10,False,""
  6222. DMD CL(0, "DUEL!!"), CL(1, " > < "),"",eBlinkFast,eNone,0,10,False,""
  6223. DMD CL(0, "DUEL!!"), CL(1, "> <"),"",eBlinkFast,eNone,0,10,False,""
  6224. DMD CL(0, "SHOOT"), CL(1, "MOVING SHOT"),"",eNone,eNone,0,2000,True,""
  6225. DMD CL(0, "FIGHT!!"), CL(1, "FIGHT!!"),"",eBlinkFast,eBlink,0,1000,True,""
  6226. Status = "Duels"
  6227. vpmTimer.AddTimer 3900, "eBall.Z = 25 '"
  6228. vpmTimer.AddTimer 4000, "BSBarToBar.ExitSol_On '"
  6229. vpmTimer.AddTimer 4000, "mode1TimerCount = 90 '"
  6230. vpmTimer.AddTimer 4000, "mode1timer.Enabled = 1 '"
  6231. StopSong()
  6232. PlaySong "barquest2"
  6233. end sub
  6234.  
  6235. Sub Wall018_Timer()
  6236. Dim RandyOld, X
  6237. RandyOld = Randy
  6238. Randomize()
  6239. Do While Randy = RandyOld
  6240. Randy = INT(RND * 8)
  6241. Loop
  6242. For Each X in ShotsInserts
  6243. X.State = 0
  6244. X.BlinkInterval = 50
  6245. X.BlinkPattern = 100000001010
  6246. Next
  6247. Select Case Randy
  6248. Case 0
  6249. li006.State = 2
  6250. DuelsPointer = 0
  6251. Case 1
  6252. li007.State = 2
  6253. DuelsPointer = 1
  6254. Case 2
  6255. li008.State = 2
  6256. DuelsPointer = 2
  6257. Case 3
  6258. li009.State = 2
  6259. DuelsPointer = 3
  6260. Case 4
  6261. li010.State = 2
  6262. DuelsPointer = 4
  6263. Case 5
  6264. li011.State = 2
  6265. DuelsPointer = 5
  6266. Case 6
  6267. li012.State = 2
  6268. DuelsPointer = 6
  6269. Case 7
  6270. li013.State = 2
  6271. DuelsPointer = 7
  6272. End Select
  6273. End Sub
  6274.  
  6275. Sub ProcessDuels(Shot)
  6276. Dim TempBalls, X
  6277. If Shot = DuelsPointer Then
  6278. If DuelsCounter < 3 Then PlaySound "INS_12"
  6279. DuelsCounter = DuelsCounter + 1
  6280. If Shot = 1 Then
  6281. MyTroughLRAdd(eBall)
  6282. Kicker006.DestroyBall
  6283. startB2S(4)
  6284. LowerTarget013()
  6285. LrKickout 1000, 290, 7, 0
  6286. End If
  6287. If Shot = 5 Then
  6288. MyTroughLRAdd(cBall)
  6289. Kicker005.DestroyBall
  6290. startB2S(4)
  6291. LowerTarget013()
  6292. LrKickout 1000, 290, 7, 0
  6293. End If
  6294. Else
  6295. PlaySound "Hey"
  6296. TempBalls = GetBalls
  6297. For Each X in TempBalls
  6298. X.VelX = 0
  6299. X.VelY = 0
  6300. X.VelZ = 0
  6301. Next
  6302. If Shot = 1 Then
  6303. BSBarToBar.AddBall Kicker006
  6304. eBall.Z = 25
  6305. BSBarToBar.ExitSol_On
  6306. End If
  6307. If Shot = 5 Then
  6308. BSVoodooToVoodoo.AddBall Kicker005
  6309. cBall.Z = 25
  6310. BSVoodooToVoodoo.ExitSol_On
  6311. End If
  6312. End If
  6313. ' Wall018.TimerEnabled = 0
  6314. ' Wall018.TimerEnabled = 1
  6315. Wall018_Timer()
  6316. If DuelsCounter > 2 Then EndDuels()
  6317. End Sub
  6318.  
  6319. Sub EndDuels()
  6320. PlaySound "Won"
  6321. Dim X
  6322. For Each X in ShotsInserts
  6323. X.State = 0
  6324. X.BlinkInterval = 125
  6325. X.BlinkPattern = 10
  6326. Next
  6327. Status = "Normal"
  6328. Wall018.TimerEnabled = 0
  6329. li036.state = 1
  6330. BarSlot = BarSlot OR 16
  6331. StopmodeEndofBall()
  6332. ChangeSong()
  6333. escapeMI = escapeMI + 1
  6334. checktoescape
  6335. End Sub
  6336.  
  6337. Sub TrLeftRamp_Hit()
  6338. If Status = "Duels" Then
  6339. ProcessDuels(2)
  6340. End If
  6341. End Sub
  6342.  
  6343. Sub TrMonkeyRamp_Hit()
  6344. If Status = "Duels" Then
  6345. ProcessDuels(4)
  6346. End If
  6347. End Sub
  6348.  
  6349. Sub TrBananaRamp_Hit()
  6350. If Status = "Duels" Then
  6351. ProcessDuels(6)
  6352. End If
  6353. End Sub
  6354.  
  6355. Sub TrLeChuck_Hit()
  6356. If Status = "Duels" Then
  6357. ProcessDuels(3)
  6358. End If
  6359. End Sub
  6360.  
  6361. '**************
  6362. ' SlotMachine Voodoo Lady
  6363. '**************
  6364. 'Dim TempBall
  6365. Dim SlotAward2, SlotValue2
  6366. SlotValue2 = 0
  6367.  
  6368. SlotAward2 = Array("v1", "v2", "v3", "v4", "v5")
  6369.  
  6370. Sub StartVoodooSlotmachine()
  6371. startB2S(7)
  6372. PlayQuoteVoodoo()
  6373. Dim i
  6374. DMDFlush()
  6375. For i = 0 to 4
  6376. DMD "", "", SlotAward2(i), eNone, eNone, eNone, 50, False, "fx_spinner"
  6377. Next
  6378. vpmtimer.AddTimer 2000, "GiveSlotAwardVoodoo '"
  6379. 'Stop the lights blinking and reset the INSULT variables
  6380. li047.state = 0
  6381. li037.state = 0
  6382. li038.state = 0
  6383. li039.state = 0
  6384. li040.state = 0
  6385. li041.state = 0
  6386. li042.state = 0
  6387. li011.state = 0
  6388. li007.state = 0
  6389. li009.state = 0
  6390. StopSong()
  6391. BSVoodooToVoodoo.AddBall Kicker005
  6392. End Sub
  6393.  
  6394. Dim VoodooSlot:VoodooSlot = 0
  6395. Sub GiveSlotAwardVoodoo()
  6396. DMDFlush()
  6397. Randomize()
  6398. SlotValue2 = INT(RND * 5 + 1) 'randomly pick a mode
  6399. DMD "", "", SlotAward2(SlotValue2-1), eNone, eNone, eNone, 500, True, ""
  6400. Select Case SlotValue2
  6401. Case 1
  6402. SlotValue2 = 1 'VoodooMagic
  6403. Case 2
  6404. SlotValue2 = 2 'Chicken
  6405. Case 3
  6406. SlotValue2 = 4 'Mushroom
  6407. Case 4
  6408. SlotValue2 = 8 'Dolls
  6409. Case 5
  6410. SlotValue2 = 16 'Ears
  6411. End Select
  6412. 'Check if this mode has already been played
  6413. Do While (SlotValue2 AND VoodooSlot) > 0 'We've already done this mode So keep randomly picking one until we get a mode we haven't done yet
  6414. SlotValue2 = INT(RND * 5 + 1)
  6415. DMDFlush()
  6416. DMD "", "", SlotAward2(SlotValue2-1), eNone, eNone, eNone, 500, True, ""
  6417. Select Case SlotValue2
  6418. Case 1
  6419. SlotValue2 = 1 'VoodooMagic
  6420. Case 2
  6421. SlotValue2 = 2 'Chicken
  6422. Case 3
  6423. SlotValue2 = 4 'Mushroom
  6424. Case 4
  6425. SlotValue2 = 8 'Dolls
  6426. Case 5
  6427. SlotValue2 = 16 'Ears
  6428. End Select
  6429. Loop
  6430. Select Case SlotValue2
  6431. Case 1
  6432. vpmTimer.AddTimer 1000, "VoodooMagic() '" 'VoodooMagic()
  6433. Case 2
  6434. vpmTimer.AddTimer 1000, "VoodooChicken() '" 'VoodooChicken()
  6435. Case 4
  6436. vpmTimer.AddTimer 1000, "VoodooMushroom() '" 'VoodooMushroom()
  6437. Case 8
  6438. vpmTimer.AddTimer 1000, "VoodooDolls() '" 'VoodooDolls()
  6439. Case 16
  6440. vpmTimer.AddTimer 1000, "VoodooEars() '" 'VoodooEars()
  6441. End Select
  6442. End Sub
  6443.  
  6444. Sub VoodooPicker()
  6445. Randomize()
  6446. WheelSpeed = Int(2.5*Rnd+1)
  6447. SpinningWheel.enabled = 1
  6448. End Sub
  6449.  
  6450. Sub CheckVoodoo()
  6451. if voodoounlocked = 1 then
  6452. li047.state = 0
  6453. li011.state = 2
  6454. end if
  6455. if barunlocked = 1 then
  6456. li048.state = 0
  6457. li007.state = 2
  6458. end if
  6459. If VoodooSlot = 31 Then
  6460. VoodooUnlocked = 0
  6461. li047.state = 1
  6462. li011.state = 0
  6463. End If
  6464. If LeChuckHits >= 3 AND LeChuckSlot < 255 Then li009.State = 2
  6465. End Sub
  6466.  
  6467. '********voodoo Magic mode***************
  6468.  
  6469. sub VoodooMagic()
  6470. Status = "Magic"
  6471. StopSong()
  6472. PlaySong "voodooquests"
  6473. mode1TimerCount = 90
  6474. mode1timer.Enabled = 1
  6475. enableMagics()
  6476. cBall.Z = 25
  6477. BSVoodooToVoodoo.ExitSol_On
  6478. itemrotytimer.Enabled = 1
  6479. li002.state = 2
  6480. MagicChecker = 0
  6481. end sub
  6482.  
  6483. Dim WhichMagic, MagicChecker
  6484. WhichMagic = 0
  6485. MagicChecker = 0
  6486. sub enableMagics()
  6487. If MagicChecker = 31 Then
  6488. CheckBonusMagic()
  6489. Exit Sub
  6490. End If
  6491. Randomize()
  6492. WhichMagic = INT(RND * 5) + 1
  6493. Select Case WhichMagic
  6494. Case 3
  6495. WhichMagic = 4
  6496. Case 4
  6497. WhichMagic = 8
  6498. Case 5
  6499. WhichMagic = 16
  6500. End Select
  6501. Do While (WhichMagic AND MagicChecker) > 0
  6502. WhichMagic = INT(RND * 5) + 1
  6503. Select Case WhichMagic
  6504. Case 3
  6505. WhichMagic = 4
  6506. Case 4
  6507. WhichMagic = 8
  6508. Case 5
  6509. WhichMagic = 16
  6510. End Select
  6511. Loop
  6512. Select Case WhichMagic
  6513. Case 1
  6514. tMagic001.enabled = 1
  6515. Magic001.Visible = 1
  6516. Magic001.X = tMagic001.X
  6517. Magic001.Y = tMagic001.Y
  6518. Magic001.RotY = -30
  6519. Case 2
  6520. tMagic002.enabled = 1
  6521. Magic001.Visible = 1
  6522. Magic001.X = tMagic002.X
  6523. Magic001.Y = tMagic002.Y
  6524. Magic001.RotY = 0
  6525. Case 4
  6526. tMagic003.enabled = 1
  6527. Magic001.Visible = 1
  6528. Magic001.X = tMagic003.X
  6529. Magic001.Y = tMagic003.Y
  6530. Magic001.RotY = 35
  6531. Case 8
  6532. tMagic004.enabled = 1
  6533. Magic001.Visible = 1
  6534. Magic001.X = tMagic004.X
  6535. Magic001.Y = tMagic004.Y
  6536. Magic001.RotY = 0
  6537. Case 16
  6538. tMagic005.enabled = 1
  6539. Magic001.Visible = 1
  6540. Magic001.X = tMagic005.X
  6541. Magic001.Y = tMagic005.Y
  6542. Magic001.RotY = 40
  6543. End Select
  6544. end sub
  6545.  
  6546. sub moveMagicdown()
  6547. Dim X
  6548. For Each X in Magics
  6549. X.Visible = 0
  6550. Next
  6551. end sub
  6552.  
  6553. Sub tMagic001_Hit()
  6554. tMagic001.enabled = 0
  6555. moveMagicdown()
  6556. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  6557. Playsound "Magichurt"
  6558. addextratime()
  6559. MagicChecker = (MagicChecker OR 1)
  6560. EnableMagics()
  6561. end sub
  6562.  
  6563. Sub tMagic002_Hit()
  6564. tMagic002.enabled = 0
  6565. moveMagicdown()
  6566. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  6567. Playsound "Magichurt"
  6568. addextratime()
  6569. MagicChecker = (MagicChecker OR 2)
  6570. EnableMagics()
  6571. end sub
  6572.  
  6573. Sub tMagic003_Hit()
  6574. tMagic003.enabled = 0
  6575. moveMagicdown()
  6576. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  6577. Playsound "Magichurt"
  6578. addextratime()
  6579. MagicChecker = (MagicChecker OR 4)
  6580. EnableMagics()
  6581. end sub
  6582.  
  6583. Sub tMagic004_Hit()
  6584. tMagic004.enabled = 0
  6585. moveMagicdown()
  6586. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  6587. Playsound "Magichurt"
  6588. addextratime()
  6589. MagicChecker = (MagicChecker OR 8)
  6590. EnableMagics()
  6591. end sub
  6592.  
  6593. Sub tMagic005_Hit()
  6594. tMagic005.enabled = 0
  6595. moveMagicdown()
  6596. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  6597. Playsound "Magichurt"
  6598. addextratime()
  6599. MagicChecker = (MagicChecker OR 16)
  6600. EnableMagics()
  6601. end sub
  6602.  
  6603. sub checkbonusMagic()
  6604. If MagicChecker = 31 then
  6605. DMD "", "", "100k", eNone, eNone, eNone, 1000, True, ""
  6606. Score(CurrentPlayer) = Score(CurrentPlayer) + (100000*PFMultiplier)
  6607. playsound "won"
  6608. StopmodeEndofBall()
  6609. li002.state = 1
  6610. AddMultiball 1
  6611. countr41 = 1
  6612. TMBcoinys.enabled = 1
  6613. Status = "Normal"
  6614. ChangeSong()
  6615. MagicChecker = 0
  6616. VoodooSlot = VoodooSlot OR 1
  6617. CheckVoodoo()
  6618. escapeMI = escapeMI + 1
  6619. checktoescape
  6620. end if
  6621. end sub
  6622.  
  6623. '********voodoo chicken mode***************
  6624.  
  6625. sub VoodooChicken()
  6626. Status = "Chicken"
  6627. StopSong()
  6628. PlaySong "voodooquests"
  6629. mode1TimerCount = 90
  6630. mode1timer.Enabled = 1
  6631. enablechickens()
  6632. cBall.Z = 25
  6633. BSVoodooToVoodoo.ExitSol_On
  6634. TiChickenDance.Enabled = 1
  6635. li028.state = 2
  6636. ChickenChecker = 0
  6637. end sub
  6638.  
  6639. Dim WhichChicken, ChickenChecker
  6640. WhichChicken = 0
  6641. ChickenChecker = 0
  6642. sub enablechickens()
  6643. If ChickenChecker = 31 Then
  6644. CheckBonusChicken()
  6645. Exit Sub
  6646. End If
  6647. Randomize()
  6648. WhichChicken = INT(RND * 5) + 1
  6649. Select Case WhichChicken
  6650. Case 3
  6651. WhichChicken = 4
  6652. Case 4
  6653. WhichChicken = 8
  6654. Case 5
  6655. WhichChicken = 16
  6656. End Select
  6657. Do While (WhichChicken AND ChickenChecker) > 0
  6658. WhichChicken = INT(RND * 5) + 1
  6659. Select Case WhichChicken
  6660. Case 3
  6661. WhichChicken = 4
  6662. Case 4
  6663. WhichChicken = 8
  6664. Case 5
  6665. WhichChicken = 16
  6666. End Select
  6667. Loop
  6668. Select Case WhichChicken
  6669. Case 1
  6670. tchicken001.enabled = 1
  6671. chicken001.Visible = 1
  6672. chicken001.X = tchicken001.X
  6673. chicken001.Y = tchicken001.Y
  6674. Chicken001.RotY = -30
  6675. Case 2
  6676. tchicken002.enabled = 1
  6677. chicken001.Visible = 1
  6678. chicken001.X = tchicken002.X
  6679. chicken001.Y = tchicken002.Y
  6680. Chicken001.RotY = 0
  6681. Case 4
  6682. tchicken003.enabled = 1
  6683. chicken001.Visible = 1
  6684. chicken001.X = tchicken003.X
  6685. chicken001.Y = tchicken003.Y
  6686. Chicken001.RotY = 35
  6687. Case 8
  6688. tchicken004.enabled = 1
  6689. chicken001.Visible = 1
  6690. chicken001.X = tchicken004.X
  6691. chicken001.Y = tchicken004.Y
  6692. Chicken001.RotY = 0
  6693. Case 16
  6694. tchicken005.enabled = 1
  6695. chicken001.Visible = 1
  6696. chicken001.X = tchicken005.X
  6697. chicken001.Y = tchicken005.Y
  6698. Chicken001.RotY = 40
  6699. End Select
  6700. end sub
  6701.  
  6702. sub movechickendown()
  6703. Dim X
  6704. For Each X in Chickens
  6705. X.Visible = 0
  6706. Next
  6707. end sub
  6708.  
  6709. Sub tchicken001_Hit()
  6710. tchicken001.enabled = 0
  6711. movechickendown()
  6712. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  6713. Playsound "chickenhurt"
  6714. addextratime()
  6715. ChickenChecker = (ChickenChecker OR 1)
  6716. EnableChickens()
  6717. end sub
  6718.  
  6719. Sub tchicken002_Hit()
  6720. tchicken002.enabled = 0
  6721. movechickendown()
  6722. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  6723. Playsound "chickenhurt"
  6724. addextratime()
  6725. ChickenChecker = (ChickenChecker OR 2)
  6726. EnableChickens()
  6727. end sub
  6728.  
  6729. Sub tchicken003_Hit()
  6730. tchicken003.enabled = 0
  6731. movechickendown()
  6732. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  6733. Playsound "chickenhurt"
  6734. addextratime()
  6735. ChickenChecker = (ChickenChecker OR 4)
  6736. EnableChickens()
  6737. end sub
  6738.  
  6739. Sub tchicken004_Hit()
  6740. tchicken004.enabled = 0
  6741. movechickendown()
  6742. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  6743. Playsound "chickenhurt"
  6744. addextratime()
  6745. ChickenChecker = (ChickenChecker OR 8)
  6746. EnableChickens()
  6747. end sub
  6748.  
  6749. Sub tchicken005_Hit()
  6750. tchicken005.enabled = 0
  6751. movechickendown()
  6752. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  6753. Playsound "chickenhurt"
  6754. addextratime()
  6755. ChickenChecker = (ChickenChecker OR 16)
  6756. EnableChickens()
  6757. end sub
  6758.  
  6759. sub checkbonuschicken()
  6760. If ChickenChecker = 31 then
  6761. DMD "", "", "100k", eNone, eNone, eNone, 1000, True, ""
  6762. Score(CurrentPlayer) = Score(CurrentPlayer) + (100000*PFMultiplier)
  6763. playsound "won"
  6764. StopmodeEndofBall()
  6765. li028.state = 1
  6766. AddMultiball 1
  6767. countr41 = 1
  6768. TMBcoinys.enabled = 1
  6769. Status = "Normal"
  6770. ChangeSong()
  6771. ChickenChecker = 0
  6772. VoodooSlot = VoodooSlot OR 2
  6773. TiChickenDance.Enabled = 0
  6774. CheckVoodoo()
  6775. escapeMI = escapeMI + 1
  6776. checktoescape
  6777. end if
  6778. end sub
  6779.  
  6780. Dim ChickenAngle, ChickenHeight, ChickenSpeed, ChickenLean
  6781. ChickenAngle = 0
  6782. ChickenHeight = 20
  6783. ChickenSpeed = 3
  6784. ChickenLean = 20
  6785. Sub TiChickenDance_Timer()
  6786. Chicken001.Z = ABS(dSin(ChickenAngle) * ChickenHeight) + 10
  6787. Chicken001.RotZ = dCos(ChickenAngle) * ChickenLean
  6788. ChickenAngle = ChickenAngle + ChickenSpeed
  6789. If ChickenAngle >=360 Then ChickenAngle = ChickenAngle - 360
  6790. End Sub
  6791.  
  6792. '********voodoo mushroom mode***************
  6793.  
  6794. sub VoodooMushroom()
  6795. Status = "Mushroom"
  6796. StopSong()
  6797. PlaySong "voodooquests"
  6798. mode1TimerCount = 90
  6799. mode1timer.Enabled = 1
  6800. itemrotytimer.Enabled = 1
  6801. enablemushrooms()
  6802. cBall.Z = 25
  6803. BSVoodooToVoodoo.ExitSol_On
  6804. li029.state = 2
  6805. MushroomChecker = 0
  6806. end sub
  6807.  
  6808. Dim WhichMushroom, MushroomChecker
  6809. WhichMushroom = 0
  6810. MushroomChecker = 0
  6811. sub enablemushrooms()
  6812. If MushroomChecker = 31 Then
  6813. CheckBonusMushroom()
  6814. Exit Sub
  6815. End If
  6816. Randomize()
  6817. WhichMushroom = INT(RND * 5) + 1
  6818. Select Case WhichMushroom
  6819. Case 3
  6820. WhichMushroom = 4
  6821. Case 4
  6822. WhichMushroom = 8
  6823. Case 5
  6824. WhichMushroom = 16
  6825. End Select
  6826. Do While (WhichMushroom AND MushroomChecker) > 0
  6827. WhichMushroom = INT(RND * 5) + 1
  6828. Select Case WhichMushroom
  6829. Case 3
  6830. WhichMushroom = 4
  6831. Case 4
  6832. WhichMushroom = 8
  6833. Case 5
  6834. WhichMushroom = 16
  6835. End Select
  6836. Loop
  6837. Select Case WhichMushroom
  6838. Case 1
  6839. tmushroom001.enabled = 1
  6840. Mushroom001.Visible = 1
  6841. Mushroom001.X = tmushroom001.X
  6842. Mushroom001.Y = tmushroom001.Y
  6843. Mushroom001.Z = 30
  6844. Case 2
  6845. tmushroom002.enabled = 1
  6846. Mushroom001.Visible = 1
  6847. Mushroom001.X = tmushroom002.X
  6848. Mushroom001.Y = tmushroom002.Y
  6849. Mushroom001.Z = 130
  6850. Case 4
  6851. tmushroom003.enabled = 1
  6852. Mushroom001.Visible = 1
  6853. Mushroom001.X = tmushroom003.X
  6854. Mushroom001.Y = tmushroom003.Y
  6855. Mushroom001.Z = 30
  6856. Case 8
  6857. tmushroom004.enabled = 1
  6858. Mushroom001.Visible = 1
  6859. Mushroom001.X = tmushroom004.X
  6860. Mushroom001.Y = tmushroom004.Y
  6861. Mushroom001.Z = 30
  6862. Case 16
  6863. tmushroom005.enabled = 1
  6864. Mushroom001.Visible = 1
  6865. Mushroom001.X = tmushroom005.X
  6866. Mushroom001.Y = tmushroom005.Y
  6867. Mushroom001.Z = 30
  6868. End Select
  6869. end sub
  6870.  
  6871. Sub tmushroom001_Hit()
  6872. tmushroom001.enabled = 0
  6873. movemushroomdown()
  6874. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  6875. Playsound "mushroomhurt"
  6876. addextratime()
  6877. MushroomChecker = (MushroomChecker OR 1)
  6878. EnableMushrooms()
  6879. end sub
  6880.  
  6881. sub MoveMushroomDown()
  6882. Dim X
  6883. For Each X in Mushrooms
  6884. X.Visible = 0
  6885. Next
  6886. end sub
  6887.  
  6888. Sub tmushroom002_Hit()
  6889. tmushroom002.enabled = 0
  6890. MoveMushroomDown()
  6891. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  6892. Playsound "mushroomhurt"
  6893. addextratime()
  6894. MushroomChecker = (MushroomChecker OR 2)
  6895. EnableMushrooms()
  6896. end sub
  6897.  
  6898. Sub tmushroom003_Hit()
  6899. tmushroom003.enabled = 0
  6900. MoveMushroomDown()
  6901. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  6902. Playsound "mushroomhurt"
  6903. addextratime()
  6904. MushroomChecker = (MushroomChecker OR 4)
  6905. EnableMushrooms()
  6906. end sub
  6907.  
  6908. Sub tmushroom004_Hit()
  6909. tmushroom004.enabled = 0
  6910. MoveMushroomDown()
  6911. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  6912. Playsound "mushroomhurt"
  6913. addextratime()
  6914. MushroomChecker = (MushroomChecker OR 8)
  6915. EnableMushrooms()
  6916. end sub
  6917.  
  6918. Sub tmushroom005_Hit()
  6919. tmushroom005.enabled = 0
  6920. MoveMushroomDown()
  6921. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  6922. Playsound "mushroomhurt"
  6923. addextratime()
  6924. MushroomChecker = (MushroomChecker OR 16)
  6925. EnableMushrooms()
  6926. end sub
  6927.  
  6928. sub checkbonusmushroom()
  6929. If MushroomChecker = 31 then
  6930. DMD "", "", "100k", eNone, eNone, eNone, 1000, True, ""
  6931. Score(CurrentPlayer) = Score(CurrentPlayer) + (100000*PFMultiplier)
  6932. playsound "won"
  6933. StopmodeEndofBall()
  6934. li029.state = 1
  6935. AddMultiball 1
  6936. countr41 = 1
  6937. TMBcoinys.enabled = 1
  6938. Status = "Normal"
  6939. ChangeSong()
  6940. MushroomChecker = 0
  6941. VoodooSlot = VoodooSlot OR 4
  6942. CheckVoodoo()
  6943. escapeMI = escapeMI + 1
  6944. checktoescape
  6945. end if
  6946. end sub
  6947.  
  6948. '********voodoo dolls mode***************
  6949.  
  6950. sub VoodooDolls()
  6951. Status = "Dolls"
  6952. StopSong
  6953. PlaySong "voodooquests"
  6954. mode1TimerCount = 90
  6955. mode1timer.Enabled = 1
  6956. itemrotytimer.Enabled = 1
  6957. enablevoodoodolls()
  6958. cBall.Z = 25
  6959. BSVoodooToVoodoo.ExitSol_On
  6960. li030.state = 2
  6961. DollChecker = 0
  6962. end sub
  6963.  
  6964. Dim WhichDoll, DollChecker
  6965. WhichDoll = 0
  6966. DollChecker = 0
  6967. sub EnableVoodooDolls()
  6968. If DollChecker = 31 Then
  6969. CheckBonusVoodooDoll()
  6970. Exit Sub
  6971. End If
  6972. Randomize()
  6973. WhichDoll = INT(RND * 5) + 1
  6974. Select Case WhichDoll
  6975. Case 3
  6976. WhichDoll = 4
  6977. Case 4
  6978. WhichDoll = 8
  6979. Case 5
  6980. WhichDoll = 16
  6981. End Select
  6982. Do While (WhichDoll AND DollChecker) > 0
  6983. WhichDoll = INT(RND * 5) + 1
  6984. Select Case WhichDoll
  6985. Case 3
  6986. WhichDoll = 4
  6987. Case 4
  6988. WhichDoll = 8
  6989. Case 5
  6990. WhichDoll = 16
  6991. End Select
  6992. Loop
  6993. Select Case WhichDoll
  6994. Case 1
  6995. tvoodoodoll001.enabled = 1
  6996. VoodooDoll001.Visible = 1
  6997. VoodooDoll001.X = tvoodoodoll001.X
  6998. VoodooDoll001.Y = tvoodoodoll001.Y
  6999. Case 2
  7000. tvoodoodoll002.enabled = 1
  7001. VoodooDoll001.Visible = 1
  7002. VoodooDoll001.X = tvoodoodoll002.X
  7003. VoodooDoll001.Y = tvoodoodoll002.Y
  7004. Case 4
  7005. tvoodoodoll003.enabled = 1
  7006. VoodooDoll001.Visible = 1
  7007. VoodooDoll001.X = tvoodoodoll003.X
  7008. VoodooDoll001.Y = tvoodoodoll003.Y
  7009. Case 8
  7010. tvoodoodoll004.enabled = 1
  7011. VoodooDoll001.Visible = 1
  7012. VoodooDoll001.X = tvoodoodoll004.X
  7013. VoodooDoll001.Y = tvoodoodoll004.Y
  7014. Case 16
  7015. tvoodoodoll005.enabled = 1
  7016. VoodooDoll001.Visible = 1
  7017. VoodooDoll001.X = tvoodoodoll005.X
  7018. VoodooDoll001.Y = tvoodoodoll005.Y
  7019. End Select
  7020. end sub
  7021.  
  7022. Sub tvoodoodoll001_Hit()
  7023. tvoodoodoll001.enabled = 0
  7024. MoveVoodooDollDown()
  7025. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  7026. Playsound "voodoodollhurt"
  7027. addextratime()
  7028. DollChecker = (DollChecker OR 1)
  7029. EnableVoodooDolls()
  7030. end sub
  7031.  
  7032. sub MoveVoodooDollDown()
  7033. VoodooDoll001.Visible = 0
  7034. end sub
  7035.  
  7036. Sub tvoodoodoll002_Hit()
  7037. tvoodoodoll002.enabled = 0
  7038. MoveVoodooDollDown()
  7039. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  7040. Playsound "voodoodollhurt"
  7041. addextratime()
  7042. DollChecker = (DollChecker OR 2)
  7043. EnableVoodooDolls()
  7044. end sub
  7045.  
  7046. Sub tvoodoodoll003_Hit()
  7047. tvoodoodoll003.enabled = 0
  7048. MoveVoodooDollDown()
  7049. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  7050. Playsound "voodoodollhurt"
  7051. addextratime()
  7052. DollChecker = (DollChecker OR 4)
  7053. EnableVoodooDolls()
  7054. end sub
  7055.  
  7056. Sub tvoodoodoll004_Hit()
  7057. tvoodoodoll004.enabled = 0
  7058. MoveVoodooDollDown()
  7059. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  7060. Playsound "voodoodollhurt"
  7061. addextratime()
  7062. DollChecker = (DollChecker OR 8)
  7063. EnableVoodooDolls()
  7064. end sub
  7065.  
  7066. Sub tvoodoodoll005_Hit()
  7067. tvoodoodoll005.enabled = 0
  7068. MoveVoodooDollDown()
  7069. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  7070. Playsound "voodoodollhurt"
  7071. addextratime()
  7072. DollChecker = (DollChecker OR 16)
  7073. EnableVoodooDolls()
  7074. end sub
  7075.  
  7076. sub CheckBonusVoodooDoll()
  7077. If DollChecker = 31 then
  7078. DMD "", "", "100k", eNone, eNone, eNone, 1000, True, ""
  7079. Score(CurrentPlayer) = Score(CurrentPlayer) + (100000*PFMultiplier)
  7080. playsound "won"
  7081. StopmodeEndofBall()
  7082. li030.state = 1
  7083. AddMultiball 1
  7084. countr41 = 1
  7085. TMBcoinys.enabled = 1
  7086. Status = "Normal"
  7087. ChangeSong()
  7088. DollChecker = 0
  7089. VoodooSlot = VoodooSlot OR 8
  7090. CheckVoodoo()
  7091. escapeMI = escapeMI + 1
  7092. checktoescape
  7093. end if
  7094. end sub
  7095.  
  7096. '********voodoo ears mode***************
  7097.  
  7098. sub VoodooEars()
  7099. Status = "Ears"
  7100. StopSong()
  7101. PlaySong "voodooquests"
  7102. mode1TimerCount = 90
  7103. mode1timer.Enabled = 1
  7104. itemrotytimer.Enabled = 1
  7105. EnableEars()
  7106. cBall.Z = 25
  7107. BSVoodooToVoodoo.ExitSol_On
  7108. li031.state = 2
  7109. EarChecker = 0
  7110. end sub
  7111.  
  7112. Dim WhichEar, EarChecker
  7113. WhichEar = 0
  7114. EarChecker = 0
  7115. sub EnableEars()
  7116. If EarChecker = 31 Then
  7117. CheckBonusEar()
  7118. Exit Sub
  7119. End If
  7120. Randomize()
  7121. WhichEar = INT(RND * 5) + 1
  7122. Select Case WhichEar
  7123. Case 3
  7124. WhichEar = 4
  7125. Case 4
  7126. WhichEar = 8
  7127. Case 5
  7128. WhichEar = 16
  7129. End Select
  7130. Do While (WhichEar AND EarChecker) > 0
  7131. WhichEar = INT(RND * 5) + 1
  7132. Select Case WhichEar
  7133. Case 3
  7134. WhichEar = 4
  7135. Case 4
  7136. WhichEar = 8
  7137. Case 5
  7138. WhichEar = 16
  7139. End Select
  7140. Loop
  7141. Select Case WhichEar
  7142. Case 1
  7143. TEar001.enabled = 1
  7144. Ear001.Visible = 1
  7145. Ear001.X = TEar001.X
  7146. Ear001.Y = TEar001.Y
  7147. Case 2
  7148. TEar002.enabled = 1
  7149. Ear001.Visible = 1
  7150. Ear001.X = TEar002.X
  7151. Ear001.Y = TEar002.Y
  7152. Case 4
  7153. TEar003.enabled = 1
  7154. Ear001.Visible = 1
  7155. Ear001.X = TEar003.X
  7156. Ear001.Y = TEar003.Y
  7157. Case 8
  7158. TEar004.enabled = 1
  7159. Ear001.Visible = 1
  7160. Ear001.X = TEar004.X
  7161. Ear001.Y = TEar004.Y
  7162. Case 16
  7163. TEar005.enabled = 1
  7164. Ear001.Visible = 1
  7165. Ear001.X = TEar005.X
  7166. Ear001.Y = TEar005.Y
  7167. End Select
  7168. end sub
  7169.  
  7170. Sub tear001_Hit()
  7171. tear001.enabled = 0
  7172. MoveEarDown()
  7173. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  7174. Playsound "earhurt"
  7175. addextratime()
  7176. EarChecker = (EarChecker OR 1)
  7177. EnableEars()
  7178. end sub
  7179.  
  7180. sub MoveEarDown()
  7181. Dim X
  7182. For Each X in Ears
  7183. X.Visible = 0
  7184. Next
  7185. end sub
  7186.  
  7187. Sub tear002_Hit()
  7188. tear002.enabled = 0
  7189. MoveEarDown()
  7190. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  7191. Playsound "earhurt"
  7192. addextratime()
  7193. EarChecker = (EarChecker OR 2)
  7194. EnableEars()
  7195. end sub
  7196.  
  7197. Sub tear003_Hit()
  7198. tear003.enabled = 0
  7199. MoveEarDown()
  7200. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  7201. Playsound "earhurt"
  7202. addextratime()
  7203. EarChecker = (EarChecker OR 4)
  7204. EnableEars()
  7205. end sub
  7206.  
  7207. Sub tear004_Hit()
  7208. tear004.enabled = 0
  7209. MoveEarDown()
  7210. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  7211. Playsound "earhurt"
  7212. addextratime()
  7213. EarChecker = (EarChecker OR 8)
  7214. EnableEars()
  7215. end sub
  7216.  
  7217. Sub tear005_Hit()
  7218. tear005.enabled = 0
  7219. MoveEarDown()
  7220. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  7221. Playsound "earhurt"
  7222. addextratime()
  7223. EarChecker = (EarChecker OR 16)
  7224. EnableEars()
  7225. end sub
  7226.  
  7227. sub checkbonusear()
  7228. If EarChecker = 31 then
  7229. DMD "", "", "100k", eNone, eNone, eNone, 1000, True, ""
  7230. Score(CurrentPlayer) = Score(CurrentPlayer) + (100000*PFMultiplier)
  7231. playsound "won"
  7232. StopmodeEndofBall()
  7233. li031.state = 1
  7234. AddMultiball 1
  7235. countr41 = 1
  7236. TMBcoinys.enabled = 1
  7237. Status = "Normal"
  7238. ChangeSong()
  7239. EarChecker = 0
  7240. VoodooSlot = VoodooSlot OR 16
  7241. CheckVoodoo()
  7242. escapeMI = escapeMI + 1
  7243. checktoescape
  7244. end if
  7245. end sub
  7246.  
  7247. '*******************************************
  7248. '* Monkey MultiBall
  7249. '*******************************************
  7250. Dim MHTimer:MHTimer = 0
  7251. Sub vpmFastTimer_Timer()
  7252. MHTimer = MHTimer + 1
  7253. Select Case MHTimer
  7254. 'Open Mouth at these times ticks
  7255. Case 37, 63, 84, 98, 114, 200, 218, 259, 276, 486, 563, 624, 690, 742, 807, 869, 943, 1076, 1172, 1720, 1784, 1950
  7256. MoveMouth 1, 8
  7257. 'Close Mouth at these time ticks
  7258. Case 49, 74, 94, 111, 129, 205, 230, 266, 325, 549, 610, 671, 716, 779, 844, 920, 987, 1120, 1276, 1760, 1850
  7259. MoveMouth 0, 8
  7260. 'Move Head to point down at these ticks
  7261. Case 38, 85, 115, 219, 277, 563, 583, 603, 623, 643, 663, 683, 703, 723, 743, 763, 783, 803, 823, 843, 863, 883, 903, 923, 943, 963, 983, 1003, 1023, 1043, 1063, 1083, 1103, 1143, 1203, 1263, 1323, 1383, 1443, 1503, 1563, 1623, 1683
  7262. MoveHead 1, 4
  7263. 'Move Head to the 15 degrees to the left at the ticks
  7264. Case 64, 99, 201, 260, 487, 573, 593, 613, 633, 653, 673, 693, 713, 733, 753, 773, 793, 813, 833, 853, 873, 893, 913, 933, 953, 973, 993, 1013, 1033, 1053, 1073, 1093, 1113, 1173, 1233, 1293, 1353, 1413, 1473, 1533, 1593, 1653
  7265. Movehead 15, 5
  7266. 'Reset head at end of MB intro
  7267. Case 1690
  7268. MoveHead 10, 0.5
  7269. Case 400
  7270. Monkey1Hit = 1
  7271. Repeat1 = 99
  7272. FrameNext1 = FrameRate1b
  7273. Monkey1Frame = 11
  7274. Monkey1JumpsMax = 99
  7275. Wall020.TimerEnabled = 1
  7276. Case 800
  7277. Monkey3Hit = 1
  7278. Repeat3 = 99
  7279. FrameNext3 = FrameRate3b
  7280. Monkey3Frame = 11
  7281. Monkey3JumpsMax = 99
  7282. Wall014.TimerEnabled = 1
  7283. Case 1200
  7284. Monkey2Hit = 1
  7285. Repeat2 = 99
  7286. FrameNext2 = FrameRate2b
  7287. Monkey2Frame = 11
  7288. Monkey2JumpsMax = 99
  7289. Wall015.TimerEnabled = 1
  7290. Case 2000
  7291. Me.Enabled = 0
  7292. FrameNext1 = FrameRate1c
  7293. Monkey1Frame = 1
  7294. Monkey1Hit = 0
  7295. Monkey1HitRepeat = 0
  7296. Repeat1 = 1
  7297. Monkey1JumpsMax = 1
  7298. FrameNext2 = FrameRate2c
  7299. Monkey2Frame = 1
  7300. Monkey2Hit = 0
  7301. Monkey2HitRepeat = 0
  7302. Repeat2 = 1
  7303. Monkey2JumpsMax = 1
  7304. FrameNext3 = FrameRate3c
  7305. Monkey3Frame = 1
  7306. Monkey3Hit = 0
  7307. Monkey3HitRepeat = 0
  7308. Repeat3 = 1
  7309. Monkey3JumpsMax = 1
  7310. vpmTimer.AddTimer 200, "PlaySong ""Monkey_multi1"" '"
  7311. vpmTimer.AddTimer 200, "startmonkeymultiheadbalz '"
  7312. vpmTimer.AddTimer 1000, "AddMultiBall 1 '"
  7313. vpmTimer.AddTimer 3000, "AddMultiBall 1 '"
  7314. vpmTimer.AddTimer 3000, "changemonkeyheadvalueback '"
  7315. countr41 = 1
  7316. TMBcoinys.enabled = 1
  7317. 'EnableBallSaver BallSaverTime
  7318. MHTimer = 0
  7319. End Select
  7320. End Sub
  7321.  
  7322. sub startmonkeymultiheadbalz
  7323. PlaySound "fx_popper"
  7324. KiHead.Kick 180, 7, 0
  7325. DOF 129, DOFPulse
  7326. DOF 119,0
  7327. DOF 130,1
  7328. end sub
  7329.  
  7330.  
  7331. sub changemonkeyheadvalueback
  7332. monkeykeepball = 0
  7333. end sub
  7334.  
  7335. Sub StartMonkeyMB()
  7336. Score(CurrentPlayer) = Score(CurrentPlayer) + (500*PFMultiplier)
  7337. monkeykeepball = 1
  7338. 'Status = "MonkeyMB"
  7339. StopSong()
  7340. PlaySound "themonlist"
  7341. vpmFastTimer.Enabled = 1
  7342. 'PFMultiplier = 4
  7343. 'li023.state = 1
  7344. 'End If
  7345. DOF 119,1
  7346.  
  7347. End Sub
  7348.  
  7349. Dim Monkey1Speed, Monkey1Angle, Monkey1AngleSpeed, Monkey1Height, Monkey1Jumps, Monkey1JumpsMax
  7350. Monkey1Speed = 0
  7351. Monkey1Angle = 0
  7352. Monkey1AngleSpeed = 1
  7353. Monkey1Height = Monkey1.Z
  7354. Monkey1Jumps = 0
  7355. Monkey1JumpsMax = 1
  7356. Sub Wall020_Timer() 'Monkey1
  7357. Monkey1Angle = Monkey1Angle + Monkey1AngleSpeed
  7358. Monkey1.Z = dSin(Monkey1Angle) * Monkey1Height + Monkey1Height
  7359. If Monkey1Angle > 180 Then
  7360. Monkey1Angle = Monkey1Angle - 180
  7361. Monkey1Jumps = Monkey1Jumps + 1
  7362. End If
  7363. If Monkey1Jumps >= Monkey1JumpsMax Then
  7364. Me.TimerEnabled = 0
  7365. Monkey1Jumps = 0
  7366. Monkey1.Z = Monkey1Height
  7367. End If
  7368. End Sub
  7369.  
  7370. Dim Monkey3Speed, Monkey3Angle, Monkey3AngleSpeed, Monkey3Height, Monkey3Jumps, Monkey3JumpsMax
  7371. Monkey3Speed = 0
  7372. Monkey3Angle = 0
  7373. Monkey3AngleSpeed = 1
  7374. Monkey3Height = Monkey3.Z
  7375. Monkey3Jumps = 0
  7376. Monkey3JumpsMax = 1
  7377. Sub Wall014_Timer() 'Monkey3
  7378. Monkey3Angle = Monkey3Angle + Monkey3AngleSpeed
  7379. Monkey3.Z = dSin(Monkey3Angle) * Monkey3Height + Monkey3Height
  7380. If Monkey3Angle > 180 Then
  7381. Monkey3Angle = Monkey3Angle - 180
  7382. Monkey3Jumps = Monkey3Jumps + 1
  7383. End If
  7384. If Monkey3Jumps >= Monkey3JumpsMax Then
  7385. Me.TimerEnabled = 0
  7386. Monkey3Jumps = 0
  7387. Monkey3.Z = Monkey3Height
  7388. End If
  7389. End Sub
  7390.  
  7391. Dim Monkey2Speed, Monkey2Angle, Monkey2AngleSpeed, Monkey2Height, Monkey2Jumps, Monkey2JumpsMax
  7392. Monkey2Speed = 0
  7393. Monkey2Angle = 0
  7394. Monkey2AngleSpeed = 1
  7395. Monkey2Height = Monkey1.Z
  7396. Monkey2Jumps = 0
  7397. Monkey2JumpsMax = 1
  7398. Sub Wall015_Timer() 'Monkey2
  7399. Monkey2Angle = Monkey2Angle + Monkey2AngleSpeed
  7400. Monkey2.Z = dSin(Monkey2Angle) * Monkey2Height + Monkey2Height
  7401. If Monkey2Angle > 180 Then
  7402. Monkey2Angle = Monkey2Angle - 180
  7403. Monkey2Jumps = Monkey2Jumps + 1
  7404. End If
  7405. If Monkey2Jumps >= Monkey2JumpsMax Then
  7406. Me.TimerEnabled = 0
  7407. Monkey2Jumps = 0
  7408. Monkey2.Z = Monkey2Height
  7409. End If
  7410. End Sub
  7411.  
  7412. '********end of ball stop missions + add time ***************
  7413. sub stopquests()
  7414. Dim X
  7415. itemrotytimer.Enabled = 0
  7416. itemrotztimer.Enabled = 0
  7417. Status = "Normal"
  7418. bonustime = 0
  7419. tchicken001.enabled = 0
  7420. tchicken002.enabled = 0
  7421. tchicken003.enabled = 0
  7422. tchicken004.enabled = 0
  7423. tchicken005.enabled = 0
  7424. tear001.enabled = 0
  7425. tear002.enabled = 0
  7426. tear003.enabled = 0
  7427. tear004.enabled = 0
  7428. tear005.enabled = 0
  7429. tmushroom001.enabled = 0
  7430. tmushroom002.enabled = 0
  7431. tmushroom003.enabled = 0
  7432. tmushroom004.enabled = 0
  7433. tmushroom005.enabled = 0
  7434. tvoodoodoll001.enabled = 0
  7435. tvoodoodoll002.enabled = 0
  7436. tvoodoodoll003.enabled = 0
  7437. tvoodoodoll004.enabled = 0
  7438. tvoodoodoll005.enabled = 0
  7439. tcoin001.Enabled = 0
  7440. tcoin002.Enabled = 0
  7441. tcoin003.Enabled = 0
  7442. tcoin004.Enabled = 0
  7443. tcoin005.Enabled = 0
  7444. tfist001.Enabled = 0
  7445. tfist002.Enabled = 0
  7446. tfist003.Enabled = 0
  7447. tfist004.Enabled = 0
  7448. tfist005.Enabled = 0
  7449. titem001.enabled = 0
  7450. bone.Visible = 0
  7451. titem002.enabled = 0
  7452. book.Visible = 0
  7453. titem003.enabled = 0
  7454. skully.Visible = 0
  7455. titem004.enabled = 0
  7456. sword001.Visible = 0
  7457. titem005.enabled = 0
  7458. mok.Visible = 0
  7459. titem006.enabled = 0
  7460. Map.Visible = 0
  7461. titem007.enabled = 0
  7462. compas.Visible = 0
  7463. titem008.enabled = 0
  7464. keysitem.Visible = 0
  7465. For Each X in QuestLights
  7466. If X.State = 2 Then X.State = 0
  7467. Next
  7468. For Each X in Fists
  7469. X.Visible = 0
  7470. Next
  7471. For Each X in Coins
  7472. X.Visible = 0
  7473. Next
  7474. For Each X in Chickens
  7475. X.Visible = 0
  7476. Next
  7477. For Each X in Mushrooms
  7478. X.Visible = 0
  7479. Next
  7480. For Each X in Ears
  7481. X.Visible = 0
  7482. Next
  7483. For Each X in Dolls
  7484. X.Visible = 0
  7485. Next
  7486. For Each X in Magics
  7487. X.Visible = 0
  7488. Next
  7489. end sub
  7490.  
  7491. sub addextratime()
  7492. if mode1TimerCount > 90 then exit sub
  7493. mode1TimerCount = mode1TimerCount + 5
  7494. end sub
  7495.  
  7496. Sub tim001_Hit()
  7497. if mode1TimerCount > 90 then exit sub
  7498. mode1TimerCount = mode1TimerCount + 2
  7499. end sub
  7500.  
  7501. Sub tim002_Hit()
  7502. if mode1TimerCount > 90 then exit sub
  7503. mode1TimerCount = mode1TimerCount + 2
  7504. end sub
  7505.  
  7506. Sub tim003_Hit()
  7507. if mode1TimerCount > 90 then exit sub
  7508. mode1TimerCount = mode1TimerCount + 2
  7509. end sub
  7510.  
  7511. Sub tim004_Hit()
  7512. if mode1TimerCount > 90 then exit sub
  7513. mode1TimerCount = mode1TimerCount + 2
  7514. end sub
  7515.  
  7516. Sub tim005_Hit()
  7517. if mode1TimerCount > 90 then exit sub
  7518. mode1TimerCount = mode1TimerCount + 2
  7519. end sub
  7520.  
  7521. Sub tim006_Hit()
  7522. if mode1TimerCount > 90 then exit sub
  7523. mode1TimerCount = mode1TimerCount + 2
  7524. end sub
  7525.  
  7526. '********************************
  7527. ' Digital clock
  7528. '********************************
  7529.  
  7530. Dim ClockDigits(4), ClockChars(10)
  7531.  
  7532. ClockDigits(0) = Array(a00, a02, a05, a06, a04, a01, a03) 'clock left digit
  7533. ClockDigits(1) = Array(a10, a12, a15, a16, a14, a11, a13)
  7534. ClockChars(0) = Array(1, 1, 1, 1, 1, 1, 0) '0
  7535. ClockChars(1) = Array(0, 1, 1, 0, 0, 0, 0) '1
  7536. ClockChars(2) = Array(1, 1, 0, 1, 1, 0, 1) '2
  7537. ClockChars(3) = Array(1, 1, 1, 1, 0, 0, 1) '3
  7538. ClockChars(4) = Array(0, 1, 1, 0, 0, 1, 1) '4
  7539. ClockChars(5) = Array(1, 0, 1, 1, 0, 1, 1) '5
  7540. ClockChars(6) = Array(1, 0, 1, 1, 1, 1, 1) '6
  7541. ClockChars(7) = Array(1, 1, 1, 0, 0, 0, 0) '7
  7542. ClockChars(8) = Array(1, 1, 1, 1, 1, 1, 1) '8
  7543. ClockChars(9) = Array(1, 1, 1, 1, 0, 1, 1) '9
  7544.  
  7545. Sub UpdateClock(myTime)
  7546. Dim a, b, i
  7547. a = myTime \ 10
  7548. b = myTime MOD 10
  7549. For i = 0 to 6
  7550. ClockDigits(0)(i).State = ClockChars(a)(i)
  7551. ClockDigits(1)(i).State = ClockChars(b)(i)
  7552. Next
  7553. End Sub
  7554.  
  7555. Sub TurnOffClock
  7556. Dim i
  7557. For i = 0 to 6
  7558. ClockDigits(0)(i).State = 0
  7559. ClockDigits(1)(i).State = 0
  7560. Next
  7561. End Sub
  7562.  
  7563. 'clocktimer
  7564. Sub mode1timer_Timer
  7565. mode1TimerCount = mode1TimerCount - 1
  7566. UpdateClock mode1TimerCount
  7567. If mode1TimerCount = 30 Then PlaySound "30s"
  7568. If mode1TimerCount = 10 Then PlaySound "10s"
  7569. If mode1TimerCount = 0 Then
  7570. DMD "", "", "if", eNone, eNone, eNone, 1000, True, "lost"
  7571. Stopmode1()
  7572. End If
  7573. End Sub
  7574.  
  7575. Sub mode2timer_Timer
  7576. mode2TimerCount = mode2TimerCount - 1
  7577. UpdateClock mode2TimerCount
  7578. If mode2TimerCount = 0 Then
  7579. DMD "", "", "tf", eNone, eNone, eNone, 1000, True, "treasurefailed"
  7580. Stopmode2()
  7581. End If
  7582. End Sub
  7583.  
  7584. Sub Stopmode1()
  7585. mode1timer.Enabled = 0
  7586. stopquests()
  7587. StopSong()
  7588. UpdateMusicNow()
  7589. TurnOffClock()
  7590. Wall016.TimerEnabled = 0
  7591. Wall018.TimerEnabled = 0
  7592. Dim X
  7593. For Each X in ShotsInserts
  7594. X.State = 0
  7595. X.BlinkInterval = 125
  7596. X.BlinkPattern = 10
  7597. Next
  7598. CheckBar()
  7599. CheckVoodoo()
  7600. End Sub
  7601.  
  7602. Sub Stopmode2()
  7603. RightFlipper001.RotatetoStart
  7604. LeftFlipper001.RotatetoStart
  7605. LowerFlippersActive = False
  7606. mode2timer.Enabled = 0
  7607. stopquests()
  7608. StopSong()
  7609. UpdateMusicNow()
  7610. TurnOffClock()
  7611. CheckBar()
  7612. CheckVoodoo()
  7613. End Sub
  7614.  
  7615. Sub StopmodeEndofBall()
  7616. mode1timer.Enabled = 0
  7617. mode2timer.Enabled = 0
  7618. StopSong()
  7619. itemrotytimer.Enabled = 0
  7620. itemrotztimer.Enabled = 0
  7621. 'UpdateMusicNow
  7622. TurnOffClock()
  7623. stopquests()
  7624. Status = "Normal"
  7625. CheckBar()
  7626. CheckVoodoo()
  7627. End Sub
  7628.  
  7629. '************************************************
  7630. '**************schatkist Animation*****************
  7631. '************************************************
  7632. Dim ChestDir, ChestPos
  7633.  
  7634. sub ChestdownTimer_Timer
  7635. ChestupTimer.enabled = 0
  7636. If treasurechest1.RotX < 75 Then treasurechest1.RotX = TreasureChest1.RotX + 4
  7637. If treasurechest1.RotX > 75 then
  7638. treasurechest1.RotX = 75
  7639. Me.Enabled = 0
  7640. End If
  7641. If Not (eBall Is Nothing) Then
  7642. MyTroughTreasureAdd(eBall)
  7643. Set eBall = Nothing
  7644. Kicker006.DestroyBall
  7645. TreasureKickout 1050, 8, 38, 0
  7646. End If
  7647. end sub
  7648.  
  7649. sub ChestupTimer_Timer
  7650. ChestdownTimer.enabled = 0
  7651. If treasurechest1.RotX > 0 Then treasurechest1.RotX = TreasureChest1.RotX - 4
  7652. If treasurechest1.RotX < 0 Then
  7653. Treasurechest1.RotX = 0
  7654. Me.Enabled = 0
  7655. End If
  7656. end sub
  7657.  
  7658. sub duuus()
  7659. playsound "LIFT2"
  7660. end sub
  7661.  
  7662. '************************************************
  7663. '***************turning objects******************
  7664. '************************************************
  7665. Sub itemrotztimer_Timer
  7666. coin001.Rotz = coin001.Rotz + 1
  7667. if coin001.Rotz > 360 then
  7668. coin001.Rotz = 1
  7669. end if
  7670. coin002.Rotz = coin002.Rotz + 1
  7671. if coin002.Rotz > 360 then
  7672. coin002.Rotz = 1
  7673. end if
  7674. coin003.Rotz = coin003.Rotz + 1
  7675. if coin003.Rotz > 360 then
  7676. coin003.Rotz = 1
  7677. end if
  7678. coin004.Rotz = coin004.Rotz + 1
  7679. if coin004.Rotz > 360 then
  7680. coin004.Rotz = 1
  7681. end if
  7682. coin005.Rotz = coin005.Rotz + 1
  7683. if coin005.Rotz > 360 then
  7684. coin005.Rotz = 1
  7685. end if
  7686. fist001.Rotz = fist001.Rotz + 1
  7687. if fist001.Rotz > 360 then
  7688. fist001.Rotz = 1
  7689. end if
  7690. fist002.Rotz = fist002.Rotz + 1
  7691. if fist002.Rotz > 360 then
  7692. fist002.Rotz = 1
  7693. end if
  7694. fist003.Rotz = fist003.Rotz + 1
  7695. if fist003.Rotz > 360 then
  7696. fist003.Rotz = 1
  7697. end if
  7698. fist004.Rotz = fist004.Rotz + 1
  7699. if fist004.Rotz > 360 then
  7700. fist004.Rotz = 1
  7701. end if
  7702. fist005.Rotz = fist005.Rotz + 1
  7703. if fist005.Rotz > 360 then
  7704. fist005.Rotz = 1
  7705. end if
  7706. sword001.Rotz = sword001.Rotz + 1
  7707. if sword001.Rotz > 360 then
  7708. sword001.Rotz = 1
  7709. end if
  7710. book.Rotz = book.Rotz + 1
  7711. if book.Rotz > 360 then
  7712. book.Rotz = 1
  7713. end if
  7714. end sub
  7715.  
  7716. Dim RotSpeed:RotSpeed = 1
  7717. Sub itemrotytimer_Timer()
  7718. Dim X
  7719. For Each X in Dolls
  7720. X.RotY = X.RotY + RotSpeed
  7721. If X.RotY > 360 Then X.RotY = X.RotY - 360
  7722. Next
  7723. For Each X in Ears
  7724. X.RotY = X.RotY + RotSpeed
  7725. If X.RotY > 360 Then X.RotY = X.RotY - 360
  7726. Next
  7727. For Each X in Mushrooms
  7728. X.RotY = X.RotY + RotSpeed
  7729. If X.RotY > 360 Then X.RotY = X.RotY - 360
  7730. Next
  7731. Map.RotY = Map.RotY + 1
  7732. if Map.RotY > 360 then
  7733. Map.RotY = 1
  7734. end if
  7735. compas.RotY = compas.RotY + 1
  7736. if compas.RotY > 360 then
  7737. compas.RotY = 1
  7738. end if
  7739. bone.RotY = bone.RotY + 1
  7740. if bone.RotY > 360 then
  7741. bone.RotY = 1
  7742. end if
  7743. mok.RotY = mok.RotY + 1
  7744. if mok.RotY > 360 then
  7745. mok.RotY = 1
  7746. end if
  7747. keysitem.RotY = keysitem.RotY + 1
  7748. if keysitem.RotY > 360 then
  7749. keysitem.RotY = 1
  7750. end if
  7751. skully.RotY = skully.RotY + 1
  7752. if skully.RotY > 360 then
  7753. skully.RotY = 1
  7754. end if
  7755. Magic001.RotY = Magic001.RotY + 1
  7756. if Magic001.RotY > 360 then
  7757. Magic001.RotY = 1
  7758. end if
  7759. end sub
  7760.  
  7761. '************************************************
  7762. '**************3d animations*****************
  7763. '************************************************
  7764.  
  7765. 'Moved to the gametimer since the monkey animations are always moving
  7766.  
  7767. '************************************************
  7768. '**************Escape monkey island*****************
  7769. '************************************************
  7770. sub checktoescape
  7771. if escapeMI = 22 Then
  7772. vpmTimer.AddTimer 200, "PlaySong ""escapemusic"" '"
  7773. li001.state = 2
  7774. trytoescape = 1
  7775. Tescaper001.Enabled = true
  7776. StartExitMI
  7777. end if
  7778. end sub
  7779.  
  7780. Sub StartExitMI
  7781. EnableExitMIs()
  7782. end Sub
  7783.  
  7784. Dim WhichExitMI, ExitMIChecker
  7785. WhichExitMI = 0
  7786. ExitMIChecker = 0
  7787. sub EnableExitMIs()
  7788. If ExitMIChecker = 31 Then
  7789. CheckBonusExitMI()
  7790. Exit Sub
  7791. End If
  7792. Randomize()
  7793. WhichExitMI = INT(RND * 5) + 1
  7794. Select Case WhichExitMI
  7795. Case 3
  7796. WhichExitMI = 4
  7797. Case 4
  7798. WhichExitMI = 8
  7799. Case 5
  7800. WhichExitMI = 16
  7801. End Select
  7802. Do While (WhichExitMI AND ExitMIChecker) > 0
  7803. WhichExitMI = INT(RND * 5) + 1
  7804. Select Case WhichExitMI
  7805. Case 3
  7806. WhichExitMI = 4
  7807. Case 4
  7808. WhichExitMI = 8
  7809. Case 5
  7810. WhichExitMI = 16
  7811. End Select
  7812. Loop
  7813. Select Case WhichExitMI
  7814. Case 1
  7815. ts9item001.enabled = 1
  7816. ExitMI001.Visible = 1
  7817. ExitMI001.X = ts9item001.X
  7818. ExitMI001.Y = ts9item001.Y
  7819. Case 2
  7820. ts9item002.enabled = 1
  7821. ExitMI001.Visible = 1
  7822. ExitMI001.X = ts9item002.X
  7823. ExitMI001.Y = ts9item002.Y
  7824. Case 4
  7825. ts9item003.enabled = 1
  7826. ExitMI001.Visible = 1
  7827. ExitMI001.X = ts9item003.X
  7828. ExitMI001.Y = ts9item003.Y
  7829. Case 8
  7830. ts9item004.enabled = 1
  7831. ExitMI001.Visible = 1
  7832. ExitMI001.X = ts9item004.X
  7833. ExitMI001.Y = ts9item004.Y
  7834. Case 16
  7835. ts9item005.enabled = 1
  7836. ExitMI001.Visible = 1
  7837. ExitMI001.X = ts9item005.X
  7838. ExitMI001.Y = ts9item005.Y
  7839. End Select
  7840. end sub
  7841.  
  7842.  
  7843. sub ts9item001_hit()
  7844. ts9item001.enabled = 0
  7845. MoveExitMIDown()
  7846. Score(CurrentPlayer) = Score(CurrentPlayer) + (1000000*PFMultiplier)
  7847. Playsound "ExitMIhitt"
  7848. addextratime()
  7849. ExitMIChecker = (ExitMIChecker OR 1)
  7850. EnableExitMIs()
  7851. end sub
  7852.  
  7853. sub MoveExitMIDown()
  7854. Dim X
  7855. For Each X in ExitMIs
  7856. X.Visible = 0
  7857. Next
  7858. end sub
  7859.  
  7860. sub ts9item002_hit()
  7861. ts9item002.enabled = 0
  7862. MoveExitMIDown()
  7863. Score(CurrentPlayer) = Score(CurrentPlayer) + (1000000*PFMultiplier)
  7864. Playsound "ExitMIhitt"
  7865. addextratime()
  7866. ExitMIChecker = (ExitMIChecker OR 2)
  7867. EnableExitMIs()
  7868. end sub
  7869.  
  7870. sub ts9item003_hit()
  7871. ts9item003.enabled = 0
  7872. MoveExitMIDown()
  7873. Score(CurrentPlayer) = Score(CurrentPlayer) + (1000000*PFMultiplier)
  7874. Playsound "ExitMIhitt"
  7875. addextratime()
  7876. ExitMIChecker = (ExitMIChecker OR 4)
  7877. EnableExitMIs()
  7878. end sub
  7879.  
  7880. sub ts9item004_hit()
  7881. ts9item004.enabled = 0
  7882. MoveExitMIDown()
  7883. Score(CurrentPlayer) = Score(CurrentPlayer) + (1000000*PFMultiplier)
  7884. Playsound "ExitMIhitt"
  7885. addextratime()
  7886. ExitMIChecker = (ExitMIChecker OR 8)
  7887. EnableExitMIs()
  7888. end sub
  7889.  
  7890. sub ts9item005_hit()
  7891. ts9item005.enabled = 0
  7892. MoveExitMIDown()
  7893. Score(CurrentPlayer) = Score(CurrentPlayer) + (1000000*PFMultiplier)
  7894. Playsound "ExitMIhitt"
  7895. addextratime()
  7896. ExitMIChecker = (ExitMIChecker OR 16)
  7897. EnableExitMIs()
  7898. end sub
  7899.  
  7900. sub CheckBonusExitMI()
  7901. If ExitMIChecker = 31 then
  7902. ' DMD "", "", "100k", eNone, eNone, eNone, 1000, True, ""
  7903. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000000*PFMultiplier)
  7904. playsound ""
  7905. ExitMIChecker = 0
  7906. changeback2begin
  7907. end if
  7908. end sub
  7909.  
  7910. sub changeback2begin
  7911. baropen = 0
  7912. barunlocked = 0
  7913. voodoounlocked = 0
  7914. bonustime = 0
  7915. greatdive = 0
  7916. gravediggers = 0
  7917. playtreasure = 0
  7918. findcrewDL = 0
  7919. LvLSwordM = 0
  7920. imagechest = 0
  7921. Prpirate001.Visible = false
  7922. Prpirate002.Visible = false
  7923. Prpirate003.Visible = false
  7924. Prpirate004.Visible = false
  7925. Prpirate005.Visible = false
  7926. PrScumm.Image = "Scumm Bar Off"
  7927. disablebanana
  7928. countr6 = 0
  7929. Updatechest()
  7930. updateimagechest()
  7931. LeftOrbitStart = 0
  7932. RightOrbitStart = 0
  7933. GrogCounter = 0
  7934. LeChuckHits = 0
  7935. KiGrog.Enabled = 0
  7936. UpdateMusicNow
  7937. li001.state = 1
  7938. li048.state = 1
  7939. li047.state = 1
  7940. Tescaper001.Enabled = false
  7941. escapeMI = 0
  7942. trytoescape = 0
  7943. li002.state=0
  7944. li028.state=0
  7945. li029.state=0
  7946. li030.state=0
  7947. li031.state=0
  7948. li032.state=0
  7949. li033.state=0
  7950. li034.state=0
  7951. li035.state=0
  7952. li036.state=0
  7953. li014.state=0
  7954. li015.state=0
  7955. li016.state=0
  7956. li017.state=0
  7957. li018.state=0
  7958. li019.state=0
  7959. li020.state=0
  7960. li021.state=0
  7961. li046.state=0
  7962. li045.state=0
  7963. li044.state=0
  7964. li043.state=0
  7965. BarSlot = 0
  7966. VoodooSlot = 0
  7967. LeChuckSlot = 0
  7968. end sub
  7969.  
  7970. sub Tescaper001_timer
  7971. ExitMI001.RotY= ExitMI001.RotY+ 1
  7972. if ExitMI001.RotY> 360 then
  7973. ExitMI001.RotY= 1
  7974. end if
  7975. end sub
  7976.  
  7977. '************************************************
  7978. '*************coin's multiball******************
  7979. '************************************************
  7980. Sub TMBcoinys_Timer
  7981. UpdateMultiCoiny
  7982. TMBcoinysUC.enabled = true
  7983. end sub
  7984.  
  7985. sub TMBcoinysUC_timer
  7986. coin006.Rotz = coin006.Rotz + 1
  7987. if coin006.Rotz > 360 then
  7988. coin006.Rotz = 1
  7989. end if
  7990. end sub
  7991.  
  7992. Sub UpdateMultiCoiny
  7993. select case countr41
  7994. case 1:
  7995. Tmballc001.enabled = 1
  7996. coin006.Visible = 1
  7997. coin006.X = Tmballc001.X
  7998. coin006.Y = Tmballc001.Y
  7999. case 2:
  8000. Tmballc002.enabled = 1
  8001. coin006.Visible = 1
  8002. coin006.X = Tmballc002.X
  8003. coin006.Y = Tmballc002.Y
  8004. case 3:
  8005. Tmballc003.enabled = 1
  8006. coin006.Visible = 1
  8007. coin006.X = Tmballc003.X
  8008. coin006.Y = Tmballc003.Y
  8009. case 4:
  8010. Tmballc004.enabled = 1
  8011. coin006.Visible = 1
  8012. coin006.X = Tmballc004.X
  8013. coin006.Y = Tmballc004.Y
  8014. case 5:
  8015. Tmballc005.enabled = 1
  8016. coin006.Visible = 1
  8017. coin006.X = Tmballc005.X
  8018. coin006.Y = Tmballc005.Y
  8019. case 6:
  8020. Tmballc006.enabled = 1
  8021. coin006.Visible = 1
  8022. coin006.X = Tmballc006.X
  8023. coin006.Y = Tmballc006.Y
  8024. case 7:
  8025. Tmballc007.enabled = 1
  8026. coin006.Visible = 1
  8027. coin006.X = Tmballc007.X
  8028. coin006.Y = Tmballc007.Y
  8029. case 8:
  8030. Tmballc008.enabled = 1
  8031. coin006.Visible = 1
  8032. coin006.X = Tmballc008.X
  8033. coin006.Y = Tmballc008.Y
  8034. case 9:
  8035. Tmballc009.enabled = 1
  8036. coin006.Visible = 1
  8037. coin006.X = Tmballc009.X
  8038. coin006.Y = Tmballc009.Y
  8039. case 10:
  8040. Tmballc010.enabled = 1
  8041. coin006.Visible = 1
  8042. coin006.X = Tmballc010.X
  8043. coin006.Y = Tmballc010.Y
  8044. case 11:
  8045. Tmballc011.enabled = 1
  8046. coin006.Visible = 1
  8047. coin006.X = Tmballc011.X
  8048. coin006.Y = Tmballc011.Y
  8049. case 12:
  8050. Tmballc012.enabled = 1
  8051. coin006.Visible = 1
  8052. coin006.X = Tmballc012.X
  8053. coin006.Y = Tmballc012.Y
  8054. case 13:
  8055. Tmballc013.enabled = 1
  8056. coin006.Visible = 1
  8057. coin006.X = Tmballc013.X
  8058. coin006.Y = Tmballc013.Y
  8059. case 14:
  8060. Tmballc014.enabled = 1
  8061. coin006.Visible = 1
  8062. coin006.X = Tmballc014.X
  8063. coin006.Y = Tmballc014.Y
  8064. case 15:
  8065. Tmballc015.enabled = 1
  8066. coin006.Visible = 1
  8067. coin006.X = Tmballc015.X
  8068. coin006.Y = Tmballc015.Y
  8069. case 16:
  8070. Tmballc016.enabled = 1
  8071. coin006.Visible = 1
  8072. coin006.X = Tmballc016.X
  8073. coin006.Y = Tmballc016.Y
  8074. case 17:
  8075. Tmballc017.enabled = 1
  8076. coin006.Visible = 1
  8077. coin006.X = Tmballc017.X
  8078. coin006.Y = Tmballc017.Y
  8079. case 18:
  8080. Tmballc018.enabled = 1
  8081. coin006.Visible = 1
  8082. coin006.X = Tmballc018.X
  8083. coin006.Y = Tmballc018.Y
  8084. case 19:
  8085. Tmballc019.enabled = 1
  8086. coin006.Visible = 1
  8087. coin006.X = Tmballc019.X
  8088. coin006.Y = Tmballc019.Y
  8089. case 20:
  8090. Tmballc020.enabled = 1
  8091. coin006.Visible = 1
  8092. coin006.X = Tmballc020.X
  8093. coin006.Y = Tmballc020.Y
  8094. case 21:
  8095. Tmballc021.enabled = 1
  8096. coin006.Visible = 1
  8097. coin006.X = Tmballc021.X
  8098. coin006.Y = Tmballc021.Y
  8099. case 22:
  8100. Tmballc022.enabled = 1
  8101. coin006.Visible = 1
  8102. coin006.X = Tmballc022.X
  8103. coin006.Y = Tmballc022.Y
  8104. case 23:
  8105. Tmballc023.enabled = 1
  8106. coin006.Visible = 1
  8107. coin006.X = Tmballc023.X
  8108. coin006.Y = Tmballc023.Y
  8109. case 24:
  8110. Tmballc024.enabled = 1
  8111. coin006.Visible = 1
  8112. coin006.X = Tmballc024.X
  8113. coin006.Y = Tmballc024.Y
  8114. case 25:
  8115. Tmballc025.enabled = 1
  8116. coin006.Visible = 1
  8117. coin006.X = Tmballc025.X
  8118. coin006.Y = Tmballc025.Y
  8119. case 26:
  8120. Tmballc026.enabled = 1
  8121. coin006.Visible = 1
  8122. coin006.X = Tmballc026.X
  8123. coin006.Y = Tmballc026.Y
  8124. case 27:
  8125. Tmballc027.enabled = 1
  8126. coin006.Visible = 1
  8127. coin006.X = Tmballc027.X
  8128. coin006.Y = Tmballc027.Y
  8129. case 28:
  8130. Tmballc028.enabled = 1
  8131. coin006.Visible = 1
  8132. coin006.X = Tmballc028.X
  8133. coin006.Y = Tmballc028.Y
  8134. case 29:
  8135. Tmballc029.enabled = 1
  8136. coin006.Visible = 1
  8137. coin006.X = Tmballc029.X
  8138. coin006.Y = Tmballc029.Y
  8139. case 30:
  8140. Tmballc030.enabled = 1
  8141. coin006.Visible = 1
  8142. coin006.X = Tmballc030.X
  8143. coin006.Y = Tmballc030.Y
  8144. end Select
  8145. End Sub
  8146.  
  8147. sub Tmballc001_hit()
  8148. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8149. Playsound "coinhurt"
  8150. Tmballc001.enabled = 0
  8151. MoveMBcoinDown()
  8152. countr41 = countr41 + 1
  8153. UpdateMultiCoiny
  8154. coinsearned = coinsearned + 1
  8155. Updatecoinscountr()
  8156. vpmtimer.addtimer 250, "startB2S(3) '"
  8157. end sub
  8158.  
  8159. sub MoveMBcoinDown()
  8160. Dim X
  8161. For Each X in MultiBcoins
  8162. X.Visible = 0
  8163. Next
  8164. end sub
  8165.  
  8166. sub Tmballc002_hit()
  8167. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8168. Playsound "coinhurt"
  8169. Tmballc002.enabled = 0
  8170. MoveMBcoinDown()
  8171. countr41 = countr41 + 1
  8172. UpdateMultiCoiny
  8173. coinsearned = coinsearned + 1
  8174. Updatecoinscountr()
  8175. vpmtimer.addtimer 250, "startB2S(3) '"
  8176. end sub
  8177.  
  8178. sub Tmballc003_hit()
  8179. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8180. Playsound "coinhurt"
  8181. Tmballc003.enabled = 0
  8182. MoveMBcoinDown()
  8183. countr41 = countr41 + 1
  8184. UpdateMultiCoiny
  8185. coinsearned = coinsearned + 1
  8186. Updatecoinscountr()
  8187. vpmtimer.addtimer 250, "startB2S(3) '"
  8188. end sub
  8189.  
  8190. sub Tmballc004_hit()
  8191. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8192. Playsound "coinhurt"
  8193. Tmballc004.enabled = 0
  8194. MoveMBcoinDown()
  8195. countr41 = countr41 + 1
  8196. UpdateMultiCoiny
  8197. coinsearned = coinsearned + 1
  8198. Updatecoinscountr()
  8199. vpmtimer.addtimer 250, "startB2S(3) '"
  8200. end sub
  8201.  
  8202. sub Tmballc005_hit()
  8203. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8204. Playsound "coinhurt"
  8205. Tmballc005.enabled = 0
  8206. MoveMBcoinDown()
  8207. countr41 = countr41 + 1
  8208. UpdateMultiCoiny
  8209. coinsearned = coinsearned + 1
  8210. Updatecoinscountr()
  8211. vpmtimer.addtimer 250, "startB2S(3) '"
  8212. end sub
  8213.  
  8214. sub Tmballc006_hit()
  8215. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8216. Playsound "coinhurt"
  8217. Tmballc006.enabled = 0
  8218. MoveMBcoinDown()
  8219. countr41 = countr41 + 1
  8220. UpdateMultiCoiny
  8221. coinsearned = coinsearned + 1
  8222. Updatecoinscountr()
  8223. vpmtimer.addtimer 250, "startB2S(3) '"
  8224. end sub
  8225.  
  8226. sub Tmballc007_hit()
  8227. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8228. Playsound "coinhurt"
  8229. Tmballc007.enabled = 0
  8230. MoveMBcoinDown()
  8231. countr41 = countr41 + 1
  8232. UpdateMultiCoiny
  8233. coinsearned = coinsearned + 1
  8234. Updatecoinscountr()
  8235. vpmtimer.addtimer 250, "startB2S(3) '"
  8236. end sub
  8237.  
  8238. sub Tmballc008_hit()
  8239. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8240. Playsound "coinhurt"
  8241. Tmballc008.enabled = 0
  8242. MoveMBcoinDown()
  8243. countr41 = countr41 + 1
  8244. UpdateMultiCoiny
  8245. coinsearned = coinsearned + 1
  8246. Updatecoinscountr()
  8247. vpmtimer.addtimer 250, "startB2S(3) '"
  8248. end sub
  8249.  
  8250. sub Tmballc009_hit()
  8251. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8252. Playsound "coinhurt"
  8253. Tmballc009.enabled = 0
  8254. MoveMBcoinDown()
  8255. countr41 = countr41 + 1
  8256. UpdateMultiCoiny
  8257. coinsearned = coinsearned + 1
  8258. Updatecoinscountr()
  8259. vpmtimer.addtimer 250, "startB2S(3) '"
  8260. end sub
  8261.  
  8262. sub Tmballc010_hit()
  8263. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8264. Playsound "coinhurt"
  8265. Tmballc010.enabled = 0
  8266. MoveMBcoinDown()
  8267. countr41 = countr41 + 1
  8268. UpdateMultiCoiny
  8269. coinsearned = coinsearned + 1
  8270. Updatecoinscountr()
  8271. vpmtimer.addtimer 250, "startB2S(3) '"
  8272. end sub
  8273.  
  8274. sub Tmballc011_hit()
  8275. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8276. Playsound "coinhurt"
  8277. Tmballc011.enabled = 0
  8278. MoveMBcoinDown()
  8279. countr41 = countr41 + 1
  8280. UpdateMultiCoiny
  8281. coinsearned = coinsearned + 1
  8282. Updatecoinscountr()
  8283. vpmtimer.addtimer 250, "startB2S(3) '"
  8284. end sub
  8285.  
  8286. sub Tmballc012_hit()
  8287. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8288. Playsound "coinhurt"
  8289. Tmballc012.enabled = 0
  8290. MoveMBcoinDown()
  8291. countr41 = countr41 + 1
  8292. UpdateMultiCoiny
  8293. coinsearned = coinsearned + 1
  8294. Updatecoinscountr()
  8295. vpmtimer.addtimer 250, "startB2S(3) '"
  8296. end sub
  8297.  
  8298. sub Tmballc013_hit()
  8299. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8300. Playsound "coinhurt"
  8301. Tmballc013.enabled = 0
  8302. MoveMBcoinDown()
  8303. countr41 = countr41 + 1
  8304. UpdateMultiCoiny
  8305. coinsearned = coinsearned + 1
  8306. Updatecoinscountr()
  8307. vpmtimer.addtimer 250, "startB2S(3) '"
  8308. end sub
  8309.  
  8310. sub Tmballc014_hit()
  8311. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8312. Playsound "coinhurt"
  8313. Tmballc014.enabled = 0
  8314. MoveMBcoinDown()
  8315. countr41 = countr41 + 1
  8316. UpdateMultiCoiny
  8317. coinsearned = coinsearned + 1
  8318. Updatecoinscountr()
  8319. vpmtimer.addtimer 250, "startB2S(3) '"
  8320. end sub
  8321.  
  8322. sub Tmballc015_hit()
  8323. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8324. Playsound "coinhurt"
  8325. Tmballc015.enabled = 0
  8326. MoveMBcoinDown()
  8327. countr41 = countr41 + 1
  8328. UpdateMultiCoiny
  8329. coinsearned = coinsearned + 1
  8330. Updatecoinscountr()
  8331. vpmtimer.addtimer 250, "startB2S(3) '"
  8332. end sub
  8333.  
  8334. sub Tmballc016_hit()
  8335. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8336. Playsound "coinhurt"
  8337. Tmballc016.enabled = 0
  8338. MoveMBcoinDown()
  8339. countr41 = countr41 + 1
  8340. UpdateMultiCoiny
  8341. coinsearned = coinsearned + 1
  8342. Updatecoinscountr()
  8343. vpmtimer.addtimer 250, "startB2S(3) '"
  8344. end sub
  8345.  
  8346. sub Tmballc017_hit()
  8347. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8348. Playsound "coinhurt"
  8349. Tmballc017.enabled = 0
  8350. MoveMBcoinDown()
  8351. countr41 = countr41 + 1
  8352. UpdateMultiCoiny
  8353. coinsearned = coinsearned + 1
  8354. Updatecoinscountr()
  8355. vpmtimer.addtimer 250, "startB2S(3) '"
  8356. end sub
  8357.  
  8358. sub Tmballc018_hit()
  8359. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8360. Playsound "coinhurt"
  8361. Tmballc018.enabled = 0
  8362. MoveMBcoinDown()
  8363. countr41 = countr41 + 1
  8364. UpdateMultiCoiny
  8365. coinsearned = coinsearned + 1
  8366. Updatecoinscountr()
  8367. vpmtimer.addtimer 250, "startB2S(3) '"
  8368. end sub
  8369.  
  8370. sub Tmballc019_hit()
  8371. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8372. Playsound "coinhurt"
  8373. Tmballc019.enabled = 0
  8374. MoveMBcoinDown()
  8375. countr41 = countr41 + 1
  8376. UpdateMultiCoiny
  8377. coinsearned = coinsearned + 1
  8378. Updatecoinscountr()
  8379. vpmtimer.addtimer 250, "startB2S(3) '"
  8380. end sub
  8381.  
  8382. sub Tmballc020_hit()
  8383. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8384. Playsound "coinhurt"
  8385. Tmballc020.enabled = 0
  8386. MoveMBcoinDown()
  8387. countr41 = countr41 + 1
  8388. UpdateMultiCoiny
  8389. coinsearned = coinsearned + 1
  8390. Updatecoinscountr()
  8391. vpmtimer.addtimer 250, "startB2S(3) '"
  8392. end sub
  8393.  
  8394. sub Tmballc021_hit()
  8395. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8396. Playsound "coinhurt"
  8397. Tmballc021.enabled = 0
  8398. MoveMBcoinDown()
  8399. countr41 = countr41 + 1
  8400. UpdateMultiCoiny
  8401. coinsearned = coinsearned + 1
  8402. Updatecoinscountr()
  8403. vpmtimer.addtimer 250, "startB2S(3) '"
  8404. end sub
  8405.  
  8406. sub Tmballc022_hit()
  8407. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8408. Playsound "coinhurt"
  8409. Tmballc022.enabled = 0
  8410. MoveMBcoinDown()
  8411. countr41 = countr41 + 1
  8412. UpdateMultiCoiny
  8413. coinsearned = coinsearned + 1
  8414. Updatecoinscountr()
  8415. vpmtimer.addtimer 250, "startB2S(3) '"
  8416. end sub
  8417.  
  8418. sub Tmballc023_hit()
  8419. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8420. Playsound "coinhurt"
  8421. Tmballc023.enabled = 0
  8422. MoveMBcoinDown()
  8423. countr41 = countr41 + 1
  8424. UpdateMultiCoiny
  8425. coinsearned = coinsearned + 1
  8426. Updatecoinscountr()
  8427. vpmtimer.addtimer 250, "startB2S(3) '"
  8428. end sub
  8429.  
  8430. sub Tmballc024_hit()
  8431. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8432. Playsound "coinhurt"
  8433. Tmballc024.enabled = 0
  8434. MoveMBcoinDown()
  8435. countr41 = countr41 + 1
  8436. UpdateMultiCoiny
  8437. coinsearned = coinsearned + 1
  8438. Updatecoinscountr()
  8439. vpmtimer.addtimer 250, "startB2S(3) '"
  8440. end sub
  8441.  
  8442. sub Tmballc025_hit()
  8443. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8444. Playsound "coinhurt"
  8445. Tmballc025.enabled = 0
  8446. MoveMBcoinDown()
  8447. countr41 = countr41 + 1
  8448. UpdateMultiCoiny
  8449. coinsearned = coinsearned + 1
  8450. Updatecoinscountr()
  8451. vpmtimer.addtimer 250, "startB2S(3) '"
  8452. end sub
  8453.  
  8454. sub Tmballc026_hit()
  8455. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8456. Playsound "coinhurt"
  8457. Tmballc026.enabled = 0
  8458. MoveMBcoinDown()
  8459. countr41 = countr41 + 1
  8460. UpdateMultiCoiny
  8461. coinsearned = coinsearned + 1
  8462. Updatecoinscountr()
  8463. vpmtimer.addtimer 250, "startB2S(3) '"
  8464. end sub
  8465.  
  8466. sub Tmballc027_hit()
  8467. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8468. Playsound "coinhurt"
  8469. Tmballc027.enabled = 0
  8470. MoveMBcoinDown()
  8471. countr41 = countr41 + 1
  8472. UpdateMultiCoiny
  8473. coinsearned = coinsearned + 1
  8474. Updatecoinscountr()
  8475. vpmtimer.addtimer 250, "startB2S(3) '"
  8476. end sub
  8477.  
  8478. sub Tmballc028_hit()
  8479. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8480. Playsound "coinhurt"
  8481. Tmballc028.enabled = 0
  8482. MoveMBcoinDown()
  8483. countr41 = countr41 + 1
  8484. UpdateMultiCoiny
  8485. coinsearned = coinsearned + 1
  8486. Updatecoinscountr()
  8487. vpmtimer.addtimer 250, "startB2S(3) '"
  8488. end sub
  8489.  
  8490. sub Tmballc029_hit()
  8491. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8492. Playsound "coinhurt"
  8493. Tmballc029.enabled = 0
  8494. MoveMBcoinDown()
  8495. countr41 = countr41 + 1
  8496. UpdateMultiCoiny
  8497. coinsearned = coinsearned + 1
  8498. Updatecoinscountr()
  8499. vpmtimer.addtimer 250, "startB2S(3) '"
  8500. end sub
  8501.  
  8502. sub Tmballc030_hit()
  8503. Score(CurrentPlayer) = Score(CurrentPlayer) + (10000*PFMultiplier)
  8504. Playsound "coinhurt"
  8505. Tmballc030.enabled = 0
  8506. MoveMBcoinDown()
  8507. countr41 = 1
  8508. UpdateMultiCoiny
  8509. coinsearned = coinsearned + 1
  8510. Updatecoinscountr()
  8511. vpmtimer.addtimer 250, "startB2S(3) '"
  8512. end sub
  8513.  
  8514. sub resetMBcoin
  8515. MoveMBcoinDown()
  8516. TMBcoinysUC.enabled = 0
  8517. TMBcoinys.enabled = 0
  8518. Tmballc001.enabled = 0
  8519. Tmballc002.enabled = 0
  8520. Tmballc003.enabled = 0
  8521. Tmballc004.enabled = 0
  8522. Tmballc005.enabled = 0
  8523. Tmballc006.enabled = 0
  8524. Tmballc007.enabled = 0
  8525. Tmballc008.enabled = 0
  8526. Tmballc009.enabled = 0
  8527. Tmballc010.enabled = 0
  8528. Tmballc011.enabled = 0
  8529. Tmballc012.enabled = 0
  8530. Tmballc013.enabled = 0
  8531. Tmballc014.enabled = 0
  8532. Tmballc015.enabled = 0
  8533. Tmballc016.enabled = 0
  8534. Tmballc017.enabled = 0
  8535. Tmballc018.enabled = 0
  8536. Tmballc019.enabled = 0
  8537. Tmballc020.enabled = 0
  8538. Tmballc021.enabled = 0
  8539. Tmballc022.enabled = 0
  8540. Tmballc023.enabled = 0
  8541. Tmballc024.enabled = 0
  8542. Tmballc025.enabled = 0
  8543. Tmballc026.enabled = 0
  8544. Tmballc027.enabled = 0
  8545. Tmballc028.enabled = 0
  8546. Tmballc029.enabled = 0
  8547. Tmballc030.enabled = 0
  8548. end sub
  8549.  
  8550. '************************************************
  8551. '**************b2s counters*****************
  8552. '************************************************
  8553.  
  8554. sub Updatemonkeycountr
  8555. select case monkeybattle
  8556. case 0 : monkeynbr0:monkeynbr00
  8557. case 1 : startB2S(51)
  8558. case 2 : startB2S(52)
  8559. case 3 : startB2S(53)
  8560. case 4 : startB2S(54)
  8561. case 5 : startB2S(55):punten2
  8562. case 6 : startB2S(56)
  8563. case 7 : startB2S(57)
  8564. case 8 : startB2S(58)
  8565. case 9 : startB2S(59)
  8566. case 10 : monkeynbr0:monkeynbr10
  8567. case 11 : startB2S(51)
  8568. case 12 : startB2S(52)
  8569. case 13 : startB2S(53)
  8570. case 14 : startB2S(54)
  8571. case 15 : startB2S(55):punten6
  8572. case 16 : startB2S(56)
  8573. case 17 : startB2S(57)
  8574. case 18 : startB2S(58)
  8575. case 19 : startB2S(59)
  8576. case 20 : monkeynbr0:monkeynbr20
  8577. case 21 : startB2S(51)
  8578. case 22 : startB2S(52)
  8579. case 23 : startB2S(53)
  8580. case 24 : startB2S(54)
  8581. case 25 : startB2S(55):punten10
  8582. case 26 : startB2S(56)
  8583. case 27 : startB2S(57)
  8584. case 28 : startB2S(58)
  8585. case 29 : startB2S(59)
  8586. case 30 : monkeynbr0:monkeynbr30
  8587. case 31 : startB2S(51)
  8588. case 32 : startB2S(52)
  8589. case 33 : startB2S(53)
  8590. case 34 : startB2S(54)
  8591. case 35 : startB2S(55)
  8592. case 36 : startB2S(56)
  8593. case 37 : startB2S(57)
  8594. case 38 : startB2S(58)
  8595. case 39 : startB2S(59)
  8596. case 40 : monkeynbr0:monkeynbr40
  8597. case 41 : startB2S(51)
  8598. case 42 : startB2S(52)
  8599. case 43 : startB2S(53)
  8600. case 44 : startB2S(54)
  8601. case 45 : startB2S(55)
  8602. case 46 : startB2S(56)
  8603. case 47 : startB2S(57)
  8604. case 48 : startB2S(58)
  8605. case 49 : startB2S(59)
  8606. case 50 : monkeynbr0:monkeynbr50
  8607. case 51 : startB2S(51)
  8608. case 52 : startB2S(52)
  8609. case 53 : startB2S(53)
  8610. case 54 : startB2S(54)
  8611. case 55 : startB2S(55)
  8612. case 56 : startB2S(56)
  8613. case 57 : startB2S(57)
  8614. case 58 : startB2S(58)
  8615. case 59 : startB2S(59)
  8616. case 60 : monkeynbr0:monkeynbr60
  8617. case 61 : startB2S(51)
  8618. case 62 : startB2S(52)
  8619. case 63 : startB2S(53)
  8620. case 64 : startB2S(54)
  8621. case 65 : startB2S(55)
  8622. case 66 : startB2S(56)
  8623. case 67 : startB2S(57)
  8624. case 68 : startB2S(58)
  8625. case 69 : startB2S(59)
  8626. case 70 : monkeynbr0:monkeynbr70
  8627. case 71 : startB2S(51)
  8628. case 72 : startB2S(52)
  8629. case 73 : startB2S(53)
  8630. case 74 : startB2S(54)
  8631. case 75 : startB2S(55)
  8632. case 76 : startB2S(56)
  8633. case 77 : startB2S(57)
  8634. case 78 : startB2S(58)
  8635. case 79 : startB2S(59)
  8636. case 80 : monkeynbr0:monkeynbr80
  8637. case 81 : startB2S(51)
  8638. case 82 : startB2S(52)
  8639. case 83 : startB2S(53)
  8640. case 84 : startB2S(54)
  8641. case 85 : startB2S(55)
  8642. case 86 : startB2S(56)
  8643. case 87 : startB2S(57)
  8644. case 88 : startB2S(58)
  8645. case 89 : startB2S(59)
  8646. case 90 : monkeynbr0:monkeynbr90
  8647. case 91 : startB2S(51)
  8648. case 92 : startB2S(52)
  8649. case 93 : startB2S(53)
  8650. case 94 : startB2S(54)
  8651. case 95 : startB2S(55)
  8652. case 96 : startB2S(56)
  8653. case 97 : startB2S(57)
  8654. case 98 : startB2S(58)
  8655. case 99 : startB2S(59)
  8656. end Select
  8657. End Sub
  8658.  
  8659. sub punten2
  8660. LightSeq001.StopPlay
  8661. PFMultiplier = 2
  8662. DMD "", "", "2x", eNone, eNone, eNone, 1000, True, "bonuss"
  8663. li022.state = 1
  8664. end sub
  8665.  
  8666. sub punten6
  8667. PFMultiplier = 6
  8668. DMD "", "", "6x", eNone, eNone, eNone, 1000, True, "bonuss"
  8669. li023.state = 0
  8670. li024.state = 1
  8671. end sub
  8672.  
  8673. sub punten10
  8674. PFMultiplier = 10
  8675. DMD "", "", "10x", eNone, eNone, eNone, 1000, True, "bonuss"
  8676. li025.state = 0
  8677. li026.state = 1
  8678. end sub
  8679.  
  8680. sub monkeynbr0
  8681. startB2S(50)
  8682. end sub
  8683.  
  8684. sub monkeynbr00
  8685. vpmtimer.addtimer 500, "startB2S(40) '"
  8686. vpmtimer.addtimer 750, "startB2S(11) '"
  8687. end sub
  8688.  
  8689. sub monkeynbr10
  8690. PFMultiplier = 4
  8691. DMD "", "", "4x", eNone, eNone, eNone, 1000, True, "bonuss"
  8692. li022.state = 0
  8693. li023.state = 1
  8694. vpmtimer.addtimer 500, "startB2S(41) '"
  8695. vpmtimer.addtimer 750, "startB2S(3) '"
  8696. end sub
  8697.  
  8698. sub monkeynbr20
  8699. PFMultiplier = 8
  8700. DMD "", "", "8x", eNone, eNone, eNone, 1000, True, "bonuss"
  8701. li024.state = 0
  8702. li025.state = 1
  8703. vpmtimer.addtimer 500, "startB2S(42) '"
  8704. vpmtimer.addtimer 750, "startB2S(3) '"
  8705. end sub
  8706.  
  8707. sub monkeynbr30
  8708. PFMultiplier = 12
  8709. DMD "", "", "12x", eNone, eNone, eNone, 1000, True, "bonuss"
  8710. li026.state = 0
  8711. li027.state = 1
  8712. vpmtimer.addtimer 500, "startB2S(43) '"
  8713. vpmtimer.addtimer 750, "startB2S(3) '"
  8714. end sub
  8715.  
  8716. sub monkeynbr40
  8717. vpmtimer.addtimer 500, "startB2S(44) '"
  8718. vpmtimer.addtimer 750, "startB2S(3) '"
  8719. end sub
  8720.  
  8721. sub monkeynbr50
  8722. vpmtimer.addtimer 500, "startB2S(45) '"
  8723. vpmtimer.addtimer 750, "startB2S(3) '"
  8724. end sub
  8725.  
  8726. sub monkeynbr60
  8727. vpmtimer.addtimer 500, "startB2S(46) '"
  8728. vpmtimer.addtimer 750, "startB2S(3) '"
  8729. end sub
  8730.  
  8731. sub monkeynbr70
  8732. PFMultiplier = 14
  8733. vpmtimer.addtimer 500, "startB2S(47) '"
  8734. vpmtimer.addtimer 750, "startB2S(3) '"
  8735. end sub
  8736.  
  8737. sub monkeynbr80
  8738. PFMultiplier = 16
  8739. vpmtimer.addtimer 500, "startB2S(48) '"
  8740. vpmtimer.addtimer 750, "startB2S(3) '"
  8741. end sub
  8742.  
  8743. sub monkeynb90
  8744. PFMultiplier = 18
  8745. vpmtimer.addtimer 500, "startB2S(49) '"
  8746. vpmtimer.addtimer 750, "startB2S(3) '"
  8747. end sub
  8748.  
  8749. sub Updatetreasurecountr
  8750. select case treasuresfound
  8751. case 0 : treasurenbr0:treasurenbr00
  8752. case 1 : startB2S(31)
  8753. case 2 : startB2S(32)
  8754. case 3 : startB2S(33)
  8755. case 4 : startB2S(34)
  8756. case 5 : startB2S(35)
  8757. case 6 : startB2S(36)
  8758. case 7 : startB2S(37)
  8759. case 8 : startB2S(38)
  8760. case 9 : startB2S(39)
  8761. case 10 : treasurenbr0:treasurenbr10
  8762. case 11 : startB2S(31)
  8763. case 12 : startB2S(32)
  8764. case 13 : startB2S(33)
  8765. case 14 : startB2S(34)
  8766. case 15 : startB2S(35)
  8767. case 16 : startB2S(36)
  8768. case 17 : startB2S(37)
  8769. case 18 : startB2S(38)
  8770. case 19 : startB2S(39)
  8771. case 20 : treasurenbr0:treasurenbr20
  8772. case 21 : startB2S(31)
  8773. case 22 : startB2S(32)
  8774. case 23 : startB2S(33)
  8775. case 24 : startB2S(34)
  8776. case 25 : startB2S(35)
  8777. case 26 : startB2S(36)
  8778. case 27 : startB2S(37)
  8779. case 28 : startB2S(38)
  8780. case 29 : startB2S(39)
  8781. case 30 : treasurenbr0:treasurenbr30
  8782. case 31 : startB2S(31)
  8783. case 32 : startB2S(32)
  8784. case 33 : startB2S(33)
  8785. case 34 : startB2S(34)
  8786. case 35 : startB2S(35)
  8787. case 36 : startB2S(36)
  8788. case 37 : startB2S(37)
  8789. case 38 : startB2S(38)
  8790. case 39 : startB2S(39)
  8791. case 40 : treasurenbr0:treasurenbr40
  8792. case 41 : startB2S(31)
  8793. case 42 : startB2S(32)
  8794. case 43 : startB2S(33)
  8795. case 44 : startB2S(34)
  8796. case 45 : startB2S(35)
  8797. case 46 : startB2S(36)
  8798. case 47 : startB2S(37)
  8799. case 48 : startB2S(38)
  8800. case 49 : startB2S(39)
  8801. case 50 : treasurenbr0:treasurenbr50
  8802. case 51 : startB2S(31)
  8803. case 52 : startB2S(32)
  8804. case 53 : startB2S(33)
  8805. case 54 : startB2S(34)
  8806. case 55 : startB2S(35)
  8807. case 56 : startB2S(36)
  8808. case 57 : startB2S(37)
  8809. case 58 : startB2S(38)
  8810. case 59 : startB2S(39)
  8811. case 60 : treasurenbr0:treasurenbr60
  8812. case 61 : startB2S(31)
  8813. case 62 : startB2S(32)
  8814. case 63 : startB2S(33)
  8815. case 64 : startB2S(34)
  8816. case 65 : startB2S(35)
  8817. case 66 : startB2S(36)
  8818. case 67 : startB2S(37)
  8819. case 68 : startB2S(38)
  8820. case 69 : startB2S(39)
  8821. case 70 : treasurenbr0:treasurenbr70
  8822. case 71 : startB2S(31)
  8823. case 72 : startB2S(32)
  8824. case 73 : startB2S(33)
  8825. case 74 : startB2S(34)
  8826. case 75 : startB2S(35)
  8827. case 76 : startB2S(36)
  8828. case 77 : startB2S(37)
  8829. case 78 : startB2S(38)
  8830. case 79 : startB2S(39)
  8831. case 80 : treasurenbr0:treasurenbr80
  8832. case 81 : startB2S(31)
  8833. case 82 : startB2S(32)
  8834. case 83 : startB2S(33)
  8835. case 84 : startB2S(34)
  8836. case 85 : startB2S(35)
  8837. case 86 : startB2S(36)
  8838. case 87 : startB2S(37)
  8839. case 88 : startB2S(38)
  8840. case 89 : startB2S(39)
  8841. case 90 : treasurenbr0:treasurenbr90
  8842. case 91 : startB2S(31)
  8843. case 92 : startB2S(32)
  8844. case 93 : startB2S(33)
  8845. case 94 : startB2S(34)
  8846. case 95 : startB2S(35)
  8847. case 96 : startB2S(36)
  8848. case 97 : startB2S(37)
  8849. case 98 : startB2S(38)
  8850. case 99 : startB2S(39)
  8851. end Select
  8852. End Sub
  8853.  
  8854. sub treasurenbr0
  8855. startB2S(30)
  8856. End Sub
  8857.  
  8858. sub treasurenbr00
  8859. vpmtimer.addtimer 500, "startB2S(20) '"
  8860. vpmtimer.addtimer 750, "startB2S(11) '"
  8861. End Sub
  8862.  
  8863. sub treasurenbr10
  8864. vpmtimer.addtimer 500, "startB2S(21) '"
  8865. vpmtimer.addtimer 750, "startB2S(3) '"
  8866. End Sub
  8867.  
  8868. sub treasurenbr20
  8869. vpmtimer.addtimer 500, "startB2S(22) '"
  8870. vpmtimer.addtimer 750, "startB2S(3) '"
  8871. End Sub
  8872.  
  8873. sub treasurenbr30
  8874. vpmtimer.addtimer 500, "startB2S(23) '"
  8875. vpmtimer.addtimer 750, "startB2S(3) '"
  8876. End Sub
  8877.  
  8878. sub treasurenbr40
  8879. vpmtimer.addtimer 500, "startB2S(24) '"
  8880. vpmtimer.addtimer 750, "startB2S(3) '"
  8881. End Sub
  8882.  
  8883. sub treasurenbr50
  8884. vpmtimer.addtimer 500, "startB2S(25) '"
  8885. vpmtimer.addtimer 750, "startB2S(3) '"
  8886. End Sub
  8887.  
  8888. sub treasurenbr60
  8889. vpmtimer.addtimer 500, "startB2S(26) '"
  8890. vpmtimer.addtimer 750, "startB2S(3) '"
  8891. End Sub
  8892.  
  8893. sub treasurenbr70
  8894. vpmtimer.addtimer 500, "startB2S(27) '"
  8895. vpmtimer.addtimer 750, "startB2S(3) '"
  8896. End Sub
  8897.  
  8898. sub treasurenbr80
  8899. vpmtimer.addtimer 500, "startB2S(28) '"
  8900. vpmtimer.addtimer 750, "startB2S(3) '"
  8901. End Sub
  8902.  
  8903. sub treasurenbr90
  8904. vpmtimer.addtimer 500, "startB2S(29) '"
  8905. vpmtimer.addtimer 750, "startB2S(3) '"
  8906. End Sub
  8907.  
  8908. sub Updatecoinscountr
  8909. if coinsearned => 99 then exit sub
  8910. select case coinsearned
  8911. case 0 : coinsnbr0:coinsnbr00
  8912. case 1 : startB2S(71)
  8913. case 2 : startB2S(72)
  8914. case 3 : startB2S(73)
  8915. case 4 : startB2S(74)
  8916. case 5 : startB2S(75)
  8917. case 6 : startB2S(76)
  8918. case 7 : startB2S(77)
  8919. case 8 : startB2S(78)
  8920. case 9 : startB2S(79)
  8921. case 10 : coinsnbr0:coinsnbr10
  8922. case 11 : startB2S(71)
  8923. case 12 : startB2S(72)
  8924. case 13 : startB2S(73)
  8925. case 14 : startB2S(74)
  8926. case 15 : startB2S(75)
  8927. case 16 : startB2S(76)
  8928. case 17 : startB2S(77)
  8929. case 18 : startB2S(78)
  8930. case 19 : startB2S(79)
  8931. case 20 : coinsnbr0:coinsnbr20
  8932. case 21 : startB2S(71)
  8933. case 22 : startB2S(72)
  8934. case 23 : startB2S(73)
  8935. case 24 : startB2S(74)
  8936. case 25 : startB2S(75)
  8937. case 26 : startB2S(76)
  8938. case 27 : startB2S(77)
  8939. case 28 : startB2S(78)
  8940. case 29 : startB2S(79)
  8941. case 30 : coinsnbr0:coinsnbr30
  8942. case 31 : startB2S(71)
  8943. case 32 : startB2S(72)
  8944. case 33 : startB2S(73)
  8945. case 34 : startB2S(74)
  8946. case 35 : startB2S(75)
  8947. case 36 : startB2S(76)
  8948. case 37 : startB2S(77)
  8949. case 38 : startB2S(78)
  8950. case 39 : startB2S(79)
  8951. case 40 : coinsnbr0:coinsnbr40
  8952. case 41 : startB2S(71)
  8953. case 42 : startB2S(72)
  8954. case 43 : startB2S(73)
  8955. case 44 : startB2S(74)
  8956. case 45 : startB2S(75)
  8957. case 46 : startB2S(76)
  8958. case 47 : startB2S(77)
  8959. case 48 : startB2S(78)
  8960. case 49 : startB2S(79)
  8961. case 70 : coinsnbr0:coinsnbr50
  8962. case 51 : startB2S(71)
  8963. case 52 : startB2S(72)
  8964. case 53 : startB2S(73)
  8965. case 54 : startB2S(74)
  8966. case 55 : startB2S(75)
  8967. case 56 : startB2S(76)
  8968. case 57 : startB2S(77)
  8969. case 58 : startB2S(78)
  8970. case 59 : startB2S(79)
  8971. case 60 : coinsnbr0:coinsnbr60
  8972. case 61 : startB2S(71)
  8973. case 62 : startB2S(72)
  8974. case 63 : startB2S(73)
  8975. case 64 : startB2S(74)
  8976. case 65 : startB2S(75)
  8977. case 66 : startB2S(76)
  8978. case 67 : startB2S(77)
  8979. case 68 : startB2S(78)
  8980. case 69 : startB2S(79)
  8981. case 70 : coinsnbr0:coinsnbr70
  8982. case 71 : startB2S(71)
  8983. case 72 : startB2S(72)
  8984. case 73 : startB2S(73)
  8985. case 74 : startB2S(74)
  8986. case 75 : startB2S(75)
  8987. case 76 : startB2S(76)
  8988. case 77 : startB2S(77)
  8989. case 78 : startB2S(78)
  8990. case 79 : startB2S(79)
  8991. case 80 : coinsnbr0:coinsnbr80
  8992. case 81 : startB2S(71)
  8993. case 82 : startB2S(72)
  8994. case 83 : startB2S(73)
  8995. case 84 : startB2S(74)
  8996. case 85 : startB2S(75)
  8997. case 86 : startB2S(76)
  8998. case 87 : startB2S(77)
  8999. case 88 : startB2S(78)
  9000. case 89 : startB2S(79)
  9001. case 90 : coinsnbr0:coinsnbr90
  9002. case 91 : startB2S(71)
  9003. case 92 : startB2S(72)
  9004. case 93 : startB2S(73)
  9005. case 94 : startB2S(74)
  9006. case 95 : startB2S(75)
  9007. case 96 : startB2S(76)
  9008. case 97 : startB2S(77)
  9009. case 98 : startB2S(78)
  9010. case 99 : startB2S(79)
  9011. end Select
  9012. End Sub
  9013.  
  9014. sub coinsnbr0
  9015. startB2S(70)
  9016. End Sub
  9017.  
  9018. sub coinsnbr00
  9019. vpmtimer.addtimer 500, "startB2S(60) '"
  9020. vpmtimer.addtimer 750, "startB2S(11) '"
  9021. End Sub
  9022.  
  9023. sub coinsnbr10
  9024. vpmtimer.addtimer 500, "startB2S(61) '"
  9025. vpmtimer.addtimer 750, "startB2S(3) '"
  9026. End Sub
  9027.  
  9028. sub coinsnbr20
  9029. vpmtimer.addtimer 500, "startB2S(62) '"
  9030. vpmtimer.addtimer 750, "startB2S(3) '"
  9031. End Sub
  9032.  
  9033. sub coinsnbr30
  9034. vpmtimer.addtimer 500, "startB2S(63) '"
  9035. vpmtimer.addtimer 750, "startB2S(3) '"
  9036. End Sub
  9037.  
  9038. sub coinsnbr40
  9039. vpmtimer.addtimer 500, "startB2S(64) '"
  9040. vpmtimer.addtimer 750, "startB2S(3) '"
  9041. End Sub
  9042.  
  9043. sub coinsnbr50
  9044. vpmtimer.addtimer 500, "startB2S(65) '"
  9045. vpmtimer.addtimer 750, "startB2S(3) '"
  9046. End Sub
  9047.  
  9048. sub coinsnbr60
  9049. vpmtimer.addtimer 500, "startB2S(66) '"
  9050. vpmtimer.addtimer 750, "startB2S(3) '"
  9051. End Sub
  9052.  
  9053. sub coinsnbr70
  9054. vpmtimer.addtimer 500, "startB2S(67) '"
  9055. vpmtimer.addtimer 750, "startB2S(3) '"
  9056. End Sub
  9057.  
  9058. sub coinsnbr80
  9059. vpmtimer.addtimer 500, "startB2S(68) '"
  9060. vpmtimer.addtimer 750, "startB2S(3) '"
  9061. End Sub
  9062.  
  9063. sub coinsnbr90
  9064. vpmtimer.addtimer 500, "startB2S(69) '"
  9065. vpmtimer.addtimer 750, "startB2S(3) '"
  9066. End Sub
  9067.  
  9068. sub Updatebananascountr()
  9069. select case bananasearned
  9070. case 0 : bananasnbr0:bananasbr00
  9071. case 1 : startB2S(91)
  9072. case 2 : startB2S(92)
  9073. case 3 : startB2S(93)
  9074. case 4 : startB2S(94)
  9075. case 5 : startB2S(95)
  9076. case 6 : startB2S(96)
  9077. case 7 : startB2S(97)
  9078. case 8 : startB2S(98)
  9079. case 9 : startB2S(99)
  9080. case 10 : bananasnbr0:bananasbr10
  9081. case 11 : startB2S(91)
  9082. case 12 : startB2S(92)
  9083. case 13 : startB2S(93)
  9084. case 14 : startB2S(94)
  9085. case 15 : startB2S(95)
  9086. case 16 : startB2S(96)
  9087. case 17 : startB2S(97)
  9088. case 18 : startB2S(98)
  9089. case 19 : startB2S(99)
  9090. case 20 : bananasnbr0:bananasbr20
  9091. case 21 : startB2S(91)
  9092. case 22 : startB2S(92)
  9093. case 23 : startB2S(93)
  9094. case 24 : startB2S(94)
  9095. case 25 : startB2S(95)
  9096. case 26 : startB2S(96)
  9097. case 27 : startB2S(97)
  9098. case 28 : startB2S(98)
  9099. case 29 : startB2S(99)
  9100. case 30 : bananasnbr0:bananasbr30
  9101. case 31 : startB2S(91)
  9102. case 32 : startB2S(92)
  9103. case 33 : startB2S(93)
  9104. case 34 : startB2S(94)
  9105. case 35 : startB2S(95)
  9106. case 36 : startB2S(96)
  9107. case 37 : startB2S(97)
  9108. case 38 : startB2S(98)
  9109. case 39 : startB2S(99)
  9110. case 40 : bananasnbr0:bananasbr40
  9111. case 41 : startB2S(91)
  9112. case 42 : startB2S(92)
  9113. case 43 : startB2S(93)
  9114. case 44 : startB2S(94)
  9115. case 45 : startB2S(95)
  9116. case 46 : startB2S(96)
  9117. case 47 : startB2S(97)
  9118. case 48 : startB2S(98)
  9119. case 49 : startB2S(99)
  9120. case 50 : bananasnbr0:bananasbr50
  9121. case 51 : startB2S(91)
  9122. case 52 : startB2S(92)
  9123. case 53 : startB2S(93)
  9124. case 54 : startB2S(94)
  9125. case 55 : startB2S(95)
  9126. case 56 : startB2S(96)
  9127. case 57 : startB2S(97)
  9128. case 58 : startB2S(98)
  9129. case 59 : startB2S(99)
  9130. case 60 : bananasnbr0:bananasbr60
  9131. case 61 : startB2S(91)
  9132. case 62 : startB2S(92)
  9133. case 63 : startB2S(93)
  9134. case 64 : startB2S(94)
  9135. case 65 : startB2S(95)
  9136. case 66 : startB2S(96)
  9137. case 67 : startB2S(97)
  9138. case 68 : startB2S(98)
  9139. case 69 : startB2S(99)
  9140. case 70 : bananasnbr0:bananasbr70
  9141. case 71 : startB2S(91)
  9142. case 72 : startB2S(92)
  9143. case 73 : startB2S(93)
  9144. case 74 : startB2S(94)
  9145. case 75 : startB2S(95)
  9146. case 76 : startB2S(96)
  9147. case 77 : startB2S(97)
  9148. case 78 : startB2S(98)
  9149. case 79 : startB2S(99)
  9150. case 80 : bananasnbr0:bananasbr80
  9151. case 81 : startB2S(91)
  9152. case 82 : startB2S(92)
  9153. case 83 : startB2S(93)
  9154. case 84 : startB2S(94)
  9155. case 85 : startB2S(95)
  9156. case 86 : startB2S(96)
  9157. case 87 : startB2S(97)
  9158. case 88 : startB2S(98)
  9159. case 89 : startB2S(99)
  9160. case 90 : bananasnbr0:bananasbr90
  9161. case 91 : startB2S(91)
  9162. case 92 : startB2S(92)
  9163. case 93 : startB2S(93)
  9164. case 94 : startB2S(94)
  9165. case 95 : startB2S(95)
  9166. case 96 : startB2S(96)
  9167. case 97 : startB2S(97)
  9168. case 98 : startB2S(98)
  9169. case 99 : startB2S(99)
  9170. end Select
  9171. End Sub
  9172.  
  9173. sub bananasnbr0()
  9174. startB2S(90)
  9175. End Sub
  9176.  
  9177. sub bananasbr00()
  9178. vpmtimer.addtimer 500, "startB2S(80) '"
  9179. vpmtimer.addtimer 750, "startB2S(11) '"
  9180. End Sub
  9181.  
  9182. sub bananasbr10()
  9183. vpmtimer.addtimer 500, "startB2S(81) '"
  9184. vpmtimer.addtimer 750, "startB2S(3) '"
  9185. End Sub
  9186.  
  9187. sub bananasbr20()
  9188. vpmtimer.addtimer 500, "startB2S(82) '"
  9189. vpmtimer.addtimer 750, "startB2S(3) '"
  9190. End Sub
  9191.  
  9192. sub bananasbr30()
  9193. vpmtimer.addtimer 500, "startB2S(83) '"
  9194. vpmtimer.addtimer 750, "startB2S(3) '"
  9195. End Sub
  9196.  
  9197. sub bananasbr40()
  9198. vpmtimer.addtimer 500, "startB2S(84) '"
  9199. vpmtimer.addtimer 750, "startB2S(3) '"
  9200. End Sub
  9201.  
  9202. sub bananasbr50()
  9203. vpmtimer.addtimer 500, "startB2S(85) '"
  9204. vpmtimer.addtimer 750, "startB2S(3) '"
  9205. End Sub
  9206.  
  9207. sub bananasbr60()
  9208. vpmtimer.addtimer 500, "startB2S(86) '"
  9209. vpmtimer.addtimer 750, "startB2S(3) '"
  9210. End Sub
  9211.  
  9212. sub bananasbr70()
  9213. vpmtimer.addtimer 500, "startB2S(87) '"
  9214. vpmtimer.addtimer 750, "startB2S(3) '"
  9215. End Sub
  9216.  
  9217. sub bananasbr80()
  9218. vpmtimer.addtimer 500, "startB2S(88) '"
  9219. vpmtimer.addtimer 750, "startB2S(3) '"
  9220. End Sub
  9221.  
  9222. sub bananasbr90()
  9223. vpmtimer.addtimer 500, "startB2S(89) '"
  9224. vpmtimer.addtimer 750, "startB2S(3) '"
  9225. End Sub
  9226.  
  9227. sub resetycoins()
  9228. coinsearned = 0
  9229. Updatecoinscountr
  9230. vpmtimer.addtimer 1000, "resettreasures '"
  9231. end sub
  9232.  
  9233. sub resettreasures()
  9234. treasuresfound = 0
  9235. Updatetreasurecountr
  9236. vpmtimer.addtimer 1000, "resetbananasy '"
  9237. end sub
  9238.  
  9239. Sub resetbananasy()
  9240. bananasearned = 0
  9241. Updatebananascountr
  9242. vpmtimer.addtimer 1000, "resetmonkeybattlys '"
  9243. end sub
  9244.  
  9245. Sub resetmonkeybattlys()
  9246. monkeybattle = 0
  9247. Updatemonkeycountr
  9248. end sub
Add Comment
Please, Sign In to add comment