Arngrim

Untitled

Dec 12th, 2017
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 47.81 KB | None | 0 0
  1. Const cGameName = "contest_1958"
  2. Const ReflectionMod=True 'enable JPJ reflection mod
  3.  
  4. Dim Score(4)
  5. dim truesc(4)
  6. dim ballrelenabled
  7. dim activeballs
  8. dim state
  9. dim playno
  10. dim credit
  11. dim eg
  12. dim currpl
  13. dim play(4)
  14. dim rst
  15. dim ballinplay
  16. dim tilt
  17. dim tiltsens
  18. dim rep(4)
  19. dim plm(4)
  20. dim matchnumb
  21. dim cred
  22. dim scn
  23. dim scn1
  24. dim scn2
  25. dim scn3
  26. dim points
  27. dim tempscore
  28. dim replay1
  29. dim replay2
  30. dim replay3
  31. dim replay4
  32. dim hisc
  33. dim pltilt(4)
  34. dim motion
  35. dim rv
  36. dim rt
  37. dim rt1
  38. dim tt
  39. dim rsv 'Rotor initial score value without multiply
  40. dim ylv
  41. dim rstep, rstepb, rstepc, rstepd, rstepe, lstep, lstepb, lstepc, lstepd, lstepe
  42. dim BallRadius, BallMass, cball1
  43. dim LaunchBall
  44. dim automatic
  45. dim rotorR, rotation
  46. dim wheelprice
  47. dim c, a
  48. dim EMR(4)
  49. dim GL, bumpT, bumpB 'state of gi left and right and high bumper states
  50. DIM HZ 'Hit Zone for the gates to provide double hits
  51. dim b2svarlightA, b2svarlightB, b2sSunL, b2sSunR
  52. Dim GlobalSoundLevel 'Diner's Method for amplify mechanical sounds, thanks to them :
  53.  
  54. GlobalSoundLevel = 2
  55.  
  56. GL="L"
  57. bumpT=0
  58. bumpB=0
  59.  
  60. credit = 0
  61.  
  62. On Error Resume Next
  63. ExecuteGlobal GetTextFile("controller.vbs")
  64. If Err Then MsgBox "You need the controller.vbs in order to run this table, available in the vp10 package"
  65. On Error Goto 0
  66.  
  67.  
  68. sub table1_init
  69. LoadEM
  70. If ShowDT=false Then
  71. for each obj in DTItems
  72. obj.visible=False
  73. Next
  74. Primitive78.visible = 0
  75. Primitive77.visible = 0
  76. Primitive81.visible = 0
  77. Primitive82.visible = 0
  78. Primitive83.visible = 0
  79. Primitive84.visible = 0
  80. RampLBlack.visible = 1
  81. RampRBlack.visible = 1
  82. RampLBlack1.visible = 1
  83. RampRBlack1.visible = 1
  84. Else
  85.  
  86. RampLBlack.visible = 0
  87. RampRBlack.visible = 0
  88. RampLBlack1.visible = 0
  89. RampRBlack1.visible = 0
  90.  
  91. end If
  92.  
  93. '***********************************************************************
  94. '*** Automatic launch ball or not, if not use the RightMagnaSave Key ***
  95. '*** 0 = RightMagnaSave Key - 1 = automatic ***
  96. '***********************************************************************
  97. automatic = 1 '***
  98. '***********************************************************************
  99. '***********************************************************************
  100. Scoreb2s.enabled = 1 '*** Activation of the Score sync on the b2s **
  101. '***********************************************************************
  102.  
  103. set EMR(1)=score1
  104. set EMR(2)=score2
  105. set EMR(3)=score3
  106. set EMR(4)=score4
  107. if credit="" then
  108. credit=0
  109. end If
  110. credittxt.text=credit
  111. If credit > 0 Then DOF 119, DOFOn
  112. GL="L"
  113. GILeft.enabled = 1
  114.  
  115.  
  116. BallRadius = 25
  117. BallMass = 2.5
  118. bouton01.z=2.5
  119. bouton01f.z=2.5
  120. bouton02.z=2.5
  121. bouton02f.z=2.5
  122. bouton03.z=2.5
  123. bouton03f.z=2.5
  124. rotorR=Wheel.objroty
  125. Wheelprice = 10
  126. c=0
  127.  
  128. randomize
  129. replay1=995
  130. replay2=1300
  131. replay3=1700
  132. replay4=1850
  133. r1.text=replay1
  134. r2.text=replay2
  135. r3.text=replay3
  136. r4.text=replay4
  137.  
  138. for each obj in droppers
  139. obj.isdropped=true
  140. next
  141.  
  142. loadhs
  143.  
  144. if hisc="" then hisc=1000
  145. hstxt.text=hisc
  146. if credit="" then credit=0
  147. credittxt.text=credit
  148. if B2SOn then
  149. Scoreb2s.enabled =1
  150. end If
  151. if matchnumb="" then matchnumb=int(rnd(1)*9)
  152. match(matchnumb).text=matchnumb
  153. for i=0 to 3
  154. currpl=i
  155. reel(i).setvalue(score(i))
  156. if score(i)>9999 then threel(i).setvalue(1)
  157. next
  158. currpl=0
  159. cred=0
  160.  
  161. credtimer.enabled=true
  162.  
  163. if rv="" then rv=0
  164. if ylv="" then ylv=0
  165. ylupdate
  166.  
  167. AutomaticBallLaunch.enabled=True
  168.  
  169.  
  170. '************************************************************
  171. '*** B2S ***
  172. '************************************************************
  173. If B2SOn Then
  174. for i=0 to 3
  175. Controller.B2SSetScore i, Score(i)
  176. next
  177. End If
  178.  
  179. HZ = 0
  180. Ballinplay = 0
  181. b2svarlightA=1
  182. b2svarlightB=2
  183.  
  184. b2svar1.enabled = 1
  185. b2svar2.enabled = 1
  186. SunL.enabled = 1
  187. b2sSunL=1
  188. b2sSunR=1
  189.  
  190. if motion=0 and tilt=false and c=0 then
  191. rt=(int(rnd(1)*8)+4)
  192. motion=1
  193. c=1
  194. a=int((rnd*6)+1)
  195. rotort.enabled=true
  196. end if
  197. end sub
  198. '******** end of table ini *********
  199.  
  200.  
  201. Sub Table1_KeyDown(ByVal keycode)
  202. If keycode = PlungerKey Then
  203. Plunger.PullBack
  204. End If
  205.  
  206.  
  207. if keycode = AddCreditKey then
  208. playsound "coin3"
  209. coindelay.enabled=true
  210. end if
  211.  
  212. if keycode = StartGameKey and credit>0 and state=false and playno=0 then
  213. credit=credit-1
  214. If credit < 1 Then DOF 119, DOFOff
  215. credittxt.text=credit
  216.  
  217. eg=0
  218. playno=1
  219. currpl=0
  220. activeballs=0
  221. tilt=false
  222. tilttxt.text=" "
  223. bumper1.force=5
  224. bumper2.force=5
  225. tiltseq.stopplay
  226.  
  227.  
  228. for each obj in indtilt
  229. obj.text=" "
  230. next
  231.  
  232.  
  233. gamov.text="GAME OVER"
  234. playup(currpl).setvalue(1)
  235. player.setvalue(1)
  236. playsound "click"
  237. rst=0
  238. playsound "initialize"
  239. resettimer.enabled=true
  240. if B2SOn then Scoreb2s.enabled =1
  241. end if
  242.  
  243. if keycode = StartGameKey and credit>0 and state=true and playno>0 and playno<4 and ballinplay<2 then
  244. credit=credit-1
  245. If credit < 1 Then DOF 119, DOFOff
  246. credittxt.text=credit
  247. player.addvalue(1)
  248. playno=playno+1
  249. playsound "click"
  250. if B2SOn then Scoreb2s.enabled =1
  251. End If
  252.  
  253.  
  254. if automatic = 0 and keycode = RightMagnaSave and activeballs=0 and state=true and ballinplay<6 then
  255. activeballs=activeballs+1
  256. nb.CreateSizedballWithMass BallRadius,BallMass 'old nb.createball
  257. nb.kick 270,10
  258. playsound SoundFXDOF("ballout",115,DOFPulse,DOFContactors)
  259. end if
  260.  
  261. if tilt=false and state=true then
  262.  
  263. If keycode = LeftFlipperKey Then
  264. LeftFlipper.RotateToEnd
  265. Flipper1.RotateToEnd
  266. PlaySound SoundFXDOF("FlipperUp",101,DOFOn,DOFFlippers)
  267. playsound "buzz"
  268. End If
  269.  
  270. If keycode = RightFlipperKey Then
  271. RightFlipper.RotateToEnd
  272. Flipper2.RotateToEnd
  273. PlaySound SoundFXDOF("FlipperUp",102,DOFOn,DOFFlippers)
  274. playsound "buzz1"
  275. End If
  276. End If
  277.  
  278. If keycode = LeftTiltKey Then
  279. Nudge 90, 2
  280. checktilt
  281. End If
  282.  
  283. If keycode = RightTiltKey Then
  284. Nudge 270, 2
  285. checktilt
  286. End If
  287.  
  288. If keycode = CenterTiltKey Then
  289. Nudge 0, 2
  290. checktilt
  291. End If
  292. End Sub
  293.  
  294.  
  295.  
  296. Sub Table1_KeyUp(ByVal keycode)
  297.  
  298. If keycode = PlungerKey Then
  299. Plunger.Fire
  300. playsound "plunger"
  301. End If
  302.  
  303. If keycode = LeftFlipperKey Then
  304. LeftFlipper.RotateToStart
  305. Flipper1.RotateToStart
  306. if state=true and tilt=false then PlaySound SoundFXDOF("FlipperDown",101,DOFOff,DOFFlippers)
  307. stopsound "buzz"
  308. End If
  309.  
  310. If keycode = RightFlipperKey Then
  311. RightFlipper.RotateToStart
  312. Flipper2.RotateToStart
  313. if state=true and tilt=false then PlaySound SoundFXDOF("FlipperDown",102,DOFOff,DOFFlippers)
  314. stopsound "buzz1"
  315. End If
  316.  
  317. End Sub
  318.  
  319. sub AutomaticBallLaunch_Timer
  320. if automatic = 1 and activeballs=0 and state=true and ballinplay<6 then
  321. activeballs=activeballs+1
  322. nb.CreateSizedballWithMass BallRadius,BallMass
  323. nb.kick 270,10
  324. DOF 115, DOFPulse
  325. end if
  326. End Sub
  327.  
  328. sub coindelay_timer
  329. playsound "click"
  330. credit=credit+1
  331. DOF 119, DOFOn
  332. credittxt.text=credit
  333. coindelay.enabled=false
  334. if B2SOn then Scoreb2s.enabled =1
  335. end sub
  336.  
  337. sub resettimer_timer
  338. rst=rst+1
  339. if rst=6 or rst=12 or rst=1 then
  340. tiltseq.play seqalloff
  341. playsound "clerker"
  342. for each obj in plast
  343. obj.isdropped=true
  344. next
  345. end if
  346. if rst=7 or rst=13 or rst=2 then
  347. tiltseq.stopplay
  348. playsound "relay"
  349. ylv=ylv+1
  350. if ylv>4 then ylv=0
  351. ylupdate
  352. for each obj in plast
  353. obj.isdropped=false
  354. next
  355. end if
  356. for i=0 to 3
  357. reel(i).resettozero
  358. next
  359. if rst=14 then
  360. playsound "kickerkick"
  361. end if
  362. ylv=ylv+1
  363. if ylv>4 then ylv=0
  364. ylupdate
  365. if rst=18 then
  366. newgame
  367. resettimer.enabled=false
  368. end if
  369. end sub
  370.  
  371. sub addscore(points)
  372. if tilt=false then
  373. bell=0
  374. if points=10 or points=1 then
  375. matchnumb=matchnumb+1
  376. if matchnumb=10 then matchnumb=0
  377. end if
  378. if points = 100 then
  379. reel(currpl).addvalue(100)
  380. playsound SoundFXDOF("gigibump4loud",142,DOFPulse,DOFChimes)
  381. end if
  382. if points = 10 then
  383. reel(currpl).addvalue(10)
  384. playsound SoundFXDOF("gigibump3loud",141,DOFPulse,DOFChimes)
  385. end if
  386. if points = 1 then
  387. reel(currpl).addvalue(1)
  388. ylv=ylv+1
  389. if ylv>4 then ylv=0
  390. ylupdate
  391. end if
  392. if points = 5 then
  393. playsound "motorshort1s"
  394. reel(currpl).addvalue(5)
  395. end if
  396. if points = 20 then
  397. reel(currpl).addvalue(20)
  398. scn=2
  399. scn1=0
  400. playsound "motorshort1s"
  401. scntimer.enabled=true
  402. end if
  403. if points = 30 then
  404. reel(currpl).addvalue(30)
  405. scn=3
  406. scn1=0
  407. playsound "motorshort1s"
  408. scntimer.enabled=true
  409. end if
  410. if points = 40 then
  411. reel(currpl).addvalue(40)
  412. scn=4
  413. scn1=0
  414. playsound "motorshort1s"
  415. scntimer.enabled=true
  416. end if
  417. if points = 50 then
  418. reel(currpl).addvalue(50)
  419. scn=5
  420. scn1=0
  421. playsound "motorshort1s"
  422. scntimer.enabled=true
  423. end if
  424. if points = 200 then
  425. reel(currpl).addvalue(200)
  426. scn2=2
  427. scn3=0
  428. playsound "motorshort1s"
  429. scntimer1.enabled=true
  430. end if
  431. if points = 300 then
  432. reel(currpl).addvalue(300)
  433. scn2=3
  434. scn3=0
  435. playsound "motorshort1s"
  436. scntimer1.enabled=true
  437. end if
  438. if points = 400 then
  439. reel(currpl).addvalue(400)
  440. scn2=4
  441. scn3=0
  442. playsound "motorshort1s"
  443. scntimer1.enabled=true
  444. end if
  445. if points = 500 then
  446. reel(currpl).addvalue(500)
  447. scn2=5
  448. scn3=0
  449. playsound "motorshort1s"
  450. scntimer1.enabled=true
  451. end if
  452. score(currpl)=score(currpl)+points
  453. truesc(currpl)=truesc(currpl)+points
  454. 'if truesc(currpl)>1999 then exsc(currpl).text=truesc(currpl)
  455. if score(currpl)>9999 then threel(currpl).setvalue(1)
  456. ' if score(currpl)>1999 then
  457. ' score(currpl)=score(currpl)-1000
  458. ' rep(currpl)=0
  459. ' end if
  460. if score(currpl)=>replay1 and rep(currpl)=0 then
  461. credit=credit+1
  462. DOF 119, DOFOn
  463. playsound SoundFXDOF("knocke",117,DOFPulse,DOFKnocker)
  464. DOF 118, DOFPulse
  465. credittxt.text=credit
  466. rep(currpl)=1
  467. playsound "click"
  468. if B2SOn then Scoreb2s.enabled =1
  469. end if
  470. if score(currpl)=>replay2 and rep(currpl)=1 then
  471. credit=credit+1
  472. DOF 119, DOFOn
  473. playsound SoundFXDOF("knocke",117,DOFPulse,DOFKnocker)
  474. DOF 118, DOFPulse
  475. credittxt.text=credit
  476. rep(currpl)=2
  477. playsound "click"
  478. if B2SOn then Scoreb2s.enabled =1
  479. End if
  480. if score(currpl)=>replay3 and rep(currpl)=2 then
  481. credit=credit+1
  482. DOF 119, DOFOn
  483. playsound SoundFXDOF("knocke",117,DOFPulse,DOFKnocker)
  484. DOF 118, DOFPulse
  485. credittxt.text=credit
  486. rep(currpl)=3
  487. playsound "click"
  488. if B2SOn then Scoreb2s.enabled =1
  489. end if
  490. if score(currpl)=>replay4 and rep(currpl)=3 then
  491. credit=credit+1
  492. DOF 119, DOFOn
  493. playsound SoundFXDOF("knocke",117,DOFPulse,DOFKnocker)
  494. DOF 118, DOFPulse
  495. credittxt.text=credit
  496. rep(currpl)=4
  497. playsound "click"
  498. if B2SOn then Scoreb2s.enabled =1
  499. end if
  500. end if
  501. end sub
  502.  
  503. sub scntimer_timer
  504. scn1=scn1 + 1
  505. playsound SoundFXDOF("gigibump3loud",141,DOFPulse,DOFChimes)
  506. if scn1=scn then scntimer.enabled=false
  507. end sub
  508.  
  509. sub scntimer1_timer
  510. scn3=scn3 + 1
  511. playsound SoundFXDOF("gigibump4loud",142,DOFPulse,DOFChimes)
  512. if scn2=scn3 then scntimer1.enabled=false
  513. end sub
  514.  
  515. sub matchnum
  516. match(matchnumb).text=matchnumb
  517. for i=1 to playno
  518. if matchnumb=(score(i-1) mod 10) then
  519. credit=credit+1
  520. DOF 119, DOFOn
  521. playsound SoundFXDOF("knocke",117,DOFPulse,DOFKnocker)
  522. DOF 118, DOFPulse
  523. credittxt.text= credit
  524. playsound "click"
  525. end if
  526. next
  527. playno=0
  528. end sub
  529.  
  530. Sub CheckTilt
  531. If Tilttimer.Enabled = True Then
  532. TiltSens = TiltSens + 1
  533. if TiltSens = 2 Then
  534. Tilt = True
  535. tilttxt.text="TILT"
  536. tiltsens = 0
  537. pltilt(currpl)=1
  538. indtilt(currpl).text="TILT"
  539. playsound "tilt"
  540. turnoff
  541. End If
  542. Else
  543. TiltSens = 0
  544. Tilttimer.Enabled = True
  545. End If
  546. End Sub
  547.  
  548. Sub Tilttimer_Timer()
  549. Tilttimer.Enabled = False
  550. End Sub
  551.  
  552. sub turnoff
  553. bumper1.force=0
  554. bumper2.force=0
  555. tiltseq.play seqalloff
  556. for each obj in match
  557. obj.text=" "
  558. next
  559. playup(currpl).setvalue(0)
  560. player.setvalue(0)
  561. for each obj in ballplay
  562. obj.text=" "
  563. next
  564. for each obj in GIGEN
  565. obj.state=0
  566. Next
  567. for each obj in GIR
  568. obj.state=0
  569. Next
  570. for each obj in GIL
  571. obj.state=0
  572. Next
  573. currpl=0
  574. ballinplay=0
  575. end sub
  576.  
  577. sub newgame
  578. credtimer.enabled=false
  579. credtxt.text="Ported To VP By Leon Spalding, Ported To VPX by Team PP, JPJ, Chucky"
  580. state=true
  581. eg=0
  582. for i=0 to 3
  583. score(i)=0
  584. truesc(i)=0
  585. rep(i)=0
  586. pltilt(i)=0
  587. threel(i).setvalue(0)
  588. next
  589. bumper1.force=5
  590. bumper2.force=5
  591. for each obj in GIGEN
  592. obj.state=1
  593. Next
  594.  
  595. ' for each obj in lights
  596. ' obj.state=0
  597. ' next
  598.  
  599. on1.state=1
  600. off2.state=1
  601. light3.state=1:light3z.state=1
  602. light4.state=1:light4z.state=1
  603. light5.state=1:light5z.state=1
  604.  
  605. if motion=0 then
  606. rt=(int(rnd(1)*8)+4)
  607. motion=1
  608. rotort.enabled=true
  609. end if
  610. bip5.text=" "
  611. bip1.text="1"
  612. for i=0 to 9
  613. match(i).text=" "
  614. next
  615. tilttxt.text=" "
  616. gamov.text=" "
  617. tilt=false
  618. tiltsens=0
  619. ballinplay=1
  620. playsound "reset1"
  621. if B2SOn then Scoreb2s.enabled =1
  622. end sub
  623.  
  624. Sub Drain_Hit()
  625. playsound "drainshort"
  626. DOF 116, DOFPulse
  627. Drain.DestroyBall
  628. if ballinplay<5 then playsound "motorshort"
  629. activeballs=activeballs-1
  630. if activeballs=0 then tt=0:nextball
  631. if B2SOn then Scoreb2s.enabled =1
  632. End Sub
  633.  
  634. sub nextball
  635. if ballinplay<5 and tilt=false then playsound "motorshorter1s"
  636.  
  637. for i=0 to 4
  638. if pltilt(i)=1 then tt=tt+1
  639. next
  640.  
  641. for each obj in GIGEN
  642. obj.state=1
  643. Next
  644.  
  645. if tt=playno then
  646. for i=0 to 4
  647. ballplay(i).text=" "
  648. next
  649. currpl=currpl+1
  650. state=false
  651. savehs
  652. playno=0
  653. 'ballreltimer.enabled=true
  654. exit sub
  655. end if
  656. if tilt=true then
  657. tilt=false
  658. tilttxt.text=" "
  659. bumper1.force=6
  660. bumper2.force=6
  661. tiltseq.stopplay
  662. ballplay(ballinplay).text=ballinplay
  663. player.setvalue(playno)
  664. end if
  665. currpl=currpl+1
  666. if currpl>playno-1 then
  667. ballinplay=ballinplay+1
  668. playsound "relay"
  669. if ballinplay>5 then
  670. playsound "motorleer"
  671. ballreltimer.enabled=true
  672. else
  673. if state=true and tilt=false then
  674. playup(currpl-1).setvalue(0)
  675. currpl=0
  676. playup(currpl).setvalue(1)
  677. playsound "relay"
  678. tilttxt.text=" "
  679. end if
  680. select case ballinplay
  681. case 0:
  682. bip1.text=" "
  683. bip2.text=" "
  684. bip3.text=" "
  685. bip4.text=" "
  686. bip5.text=" "
  687. case 1:
  688. bip1.text="1"
  689. bip2.text=" "
  690. bip3.text=" "
  691. bip4.text=" "
  692. bip5.text=" "
  693. case 2:
  694. bip1.text=" "
  695. bip2.text="2"
  696. bip3.text=" "
  697. bip4.text=" "
  698. bip5.text=" "
  699. case 3:
  700. bip1.text=" "
  701. bip2.text=" "
  702. bip3.text="3"
  703. bip4.text=" "
  704. bip5.text=" "
  705. case 4:
  706. bip1.text=" "
  707. bip2.text=" "
  708. bip3.text=" "
  709. bip4.text="4"
  710. bip5.text=" "
  711. case 5:
  712. bip1.text=" "
  713. bip2.text=" "
  714. bip3.text=" "
  715. bip4.text=" "
  716. bip5.text="5"
  717. end select
  718. playsound "relay"
  719. end if
  720. end if
  721. if currpl>0 and currpl<(playno) then
  722. if state=true and tilt=false then
  723. playup(currpl-1).setvalue(0)
  724. playup(currpl).setvalue(1)
  725. playsound "relay"
  726. tilttxt.text=" "
  727. end if
  728. end if
  729. if pltilt(currpl)=1 then tilttxt.text="TILT":tt=0:nextball
  730. end Sub
  731.  
  732. sub ballreltimer_timer
  733. if tilt=false then matchnum
  734. bip5.text=" "
  735. state=false
  736. for i=0 to 3
  737. if truesc(i)>hisc then
  738. hisc=truesc(i)
  739. hstxt.text=hisc
  740. end if
  741. next
  742. playup(currpl-1).setvalue(0)
  743. player.setvalue(0)
  744. gamov.text="GAME OVER"
  745. savehs
  746. cred=0
  747. credtimer.enabled=true
  748. if ballinplay > 5 then ballinplay = 0
  749. ballreltimer.enabled=false
  750. end sub
  751.  
  752. '**********************************************
  753. '** New wheel part jpj **
  754. '**********************************************
  755.  
  756. sub rotort_timer()
  757.  
  758. rotorR = Wheel.objroty
  759. playsound SoundFXDOF("lightmotor",120,DOFOn,DOFGear)
  760. rotationW.enabled=True
  761.  
  762. rt1=rt1+1
  763. ' rotoradv mis à la fin
  764. if rt1=rt*2 then
  765. rt1=0
  766. motion=0
  767. ylupdate
  768. end If
  769. if rsv<40 then
  770. l400.state=0:l400z.state=0
  771. l500.state=0:l500z.state=0
  772. end if
  773.  
  774. end sub
  775.  
  776.  
  777.  
  778.  
  779. sub rotationW_timer
  780. select case c
  781. case 1 :
  782. Wheel.objroty = Wheel.objroty + 9
  783. if wheel.objroty = 360 then wheel.objroty = 0:end If
  784. c=2
  785. case 2 :
  786. Wheel.objroty = Wheel.objroty + 9
  787. if wheel.objroty = 360 then wheel.objroty = 0:end If
  788. c=3
  789. case 3 :
  790. Wheel.objroty = Wheel.objroty + 9
  791. if wheel.objroty = 360 then wheel.objroty = 0:end If
  792. c=4
  793. case 4 :
  794. Wheel.objroty = Wheel.objroty + 9
  795. if wheel.objroty = 360 then wheel.objroty = 0:end If
  796. a=a-1
  797. if a >0 then
  798. c=1
  799. Else
  800. if a=0 then c=5
  801. rotoradv
  802. end If
  803.  
  804. case 5 :
  805. Wheel.objroty = Wheel.objroty + 25
  806. c=6
  807. case 6 :
  808. Wheel.objroty = Wheel.objroty + 10
  809. c=7
  810. case 7 :
  811. Wheel.objroty = Wheel.objroty + 5
  812. c=8
  813. case 8 :
  814. Wheel.objroty = Wheel.objroty +2
  815. c=9
  816. case 9 :
  817. Wheel.objroty = Wheel.objroty - 7
  818. c=10
  819. case 10 :
  820. Wheel.objroty = Wheel.objroty -46
  821. c=11
  822. case 11 :
  823. Wheel.objroty = Wheel.objroty +11
  824. c=0:rotationW.enabled=false:DOF 120, DOFOff
  825. end Select
  826.  
  827.  
  828. motion=0 and tilt=false
  829.  
  830.  
  831. rotort.enabled=false
  832. if c=0 then rotationW.enabled=false:DOF 120, DOFOff:end if
  833. end Sub
  834. '*************************************************
  835.  
  836. '************** Slingshots ***********************
  837.  
  838. Sub RightSlingShot_Slingshot
  839. playsound SoundFXDOF("rightslingshot",104,DOFPulse,DOFContactors)
  840. DOF 106, DOFPulse
  841. if GI1.state=1 then
  842. addscore 10
  843. else
  844. addscore 1
  845. end if
  846. if GL = "L" then
  847. GL = "R"
  848. Else
  849. GL = "L"
  850. end if
  851. RSling.Visible = 0
  852. RSling1.Visible = 1
  853. slingR.objroty = -15
  854. RStep = 2
  855. RightSlingShot.TimerEnabled = 1
  856. End Sub
  857.  
  858. Sub RightSlingShot_Timer
  859. Select Case RStep
  860. Case 3:RSLing1.Visible = 0:RSLing2.Visible = 1:slingR.objroty = -7
  861. Case 4: slingR.objroty = 0:RSLing2.Visible = 0:RSLing.Visible = 1:RightSlingShot.TimerEnabled = 0:b2sSunR=b2sSunR+1
  862. End Select
  863. RStep = RStep + 1
  864. End Sub
  865.  
  866. Sub LeftSlingShot_Slingshot
  867. playsound SoundFXDOF("leftslingshot",103,DOFPulse,DOFContactors)
  868. DOF 105, DOFPulse
  869. if GI01.state=1 then
  870. addscore 10
  871. else
  872. addscore 1
  873. end if
  874. if GL = "L" then
  875. GL = "R"
  876. Else
  877. GL = "L"
  878. end if
  879. LSling.Visible = 0
  880. LSling1.Visible = 1
  881. slingL.objroty = 15
  882. LStep = 2
  883. LeftSlingShot.TimerEnabled = 1
  884. End Sub
  885.  
  886. Sub LeftSlingShot_Timer()
  887. Select Case LStep
  888. Case 3:LSLing1.Visible = 0:LSLing2.Visible = 1:slingL.objroty = 7
  889. Case 4:slingL.objroty = 0:LSLing2.Visible = 0:LSLing.Visible = 1:LeftSlingShot.TimerEnabled = 0:b2sSunL=b2sSunL+1
  890. End Select
  891. LStep = LStep + 1
  892. End Sub
  893.  
  894. Sub LeftSlingShotb_Slingshot
  895. playsound SoundFX("leftslingshot",DOFcontactors)
  896. DOF 124, DOFPulse
  897. addscore 1
  898. if GL = "L" then
  899. GL = "R"
  900. Else
  901. GL = "L"
  902. end if
  903. LSlingb.Visible = 0
  904. LSlingb1.Visible = 1
  905. slingLb.objroty = 15
  906. LStepb = 2
  907. LeftSlingShotb.TimerEnabled = 1
  908. End Sub
  909.  
  910. Sub LeftSlingShotb_Timer()
  911. Select Case LStepb
  912. Case 3:LSLingb1.Visible = 0:LSLingb2.Visible = 1:slingLb.objroty = 7
  913. Case 4:slingLb.objroty = 0:LSLingb2.Visible = 0:LSLingb.Visible = 1:LeftSlingShotb.TimerEnabled = 0:b2sSunL=b2sSunL+1
  914. End Select
  915. LStepb = LStepb + 1
  916. End Sub
  917.  
  918. Sub LeftSlingShotc_Slingshot
  919. playsound SoundFX("leftslingshot",DOFcontactors)
  920. DOF 122, DOFPulse
  921. addscore 5
  922. if motion=0 and tilt=false and c=0 then
  923. rt=(int(rnd(1)*8)+4)
  924. motion=1
  925. c=1
  926. a=int((rnd*6)+1)
  927. rotort.enabled=true
  928. end if
  929. if GL = "L" then
  930. GL = "R"
  931. Else
  932. GL = "L"
  933. end if
  934. LSlingc.Visible = 0
  935. LSlingc1.Visible = 1
  936. slingLc.objroty = 15
  937. LStepc = 2
  938. LeftSlingShotc.TimerEnabled = 1
  939. End Sub
  940.  
  941. Sub LeftSlingShotc_Timer()
  942. Select Case LStepc
  943. Case 3:LSLingc1.Visible = 0:LSLingc2.Visible = 1:slingLc.objroty = 7
  944. Case 4:slingLc.objroty = 0:LSLingc2.Visible = 0:LSLingc.Visible = 1:LeftSlingShotc.TimerEnabled = 0:b2sSunL=b2sSunL+1
  945. End Select
  946. LStepc = LStepc + 1
  947. End Sub
  948.  
  949. Sub LeftSlingShotd_Slingshot
  950. playsound SoundFX("leftslingshot",DOFContactors)
  951. DOF 120, DOFPulse
  952. addscore 1
  953. if GL = "L" then
  954. GL = "R"
  955. Else
  956. GL = "L"
  957. end if
  958. LSlingc.Visible = 0
  959. LSlingd1.Visible = 1
  960. slingLd.objroty = 15
  961. LStepd = 2
  962. LeftSlingShotd.TimerEnabled = 1
  963. End Sub
  964.  
  965. Sub LeftSlingShotd_Timer()
  966. Select Case LStepd
  967. Case 3:LSLingd1.Visible = 0:LSLingd2.Visible = 1:slingLd.objroty = 7
  968. Case 4:slingLd.objroty = 0:LSLingd2.Visible = 0:LSLingc.Visible = 1:LeftSlingShotd.TimerEnabled = 0:b2sSunL=b2sSunL+1
  969. End Select
  970. LStepd = LStepd + 1
  971. End Sub
  972.  
  973. Sub LeftSlingShote_Slingshot
  974. playsound SoundFX("leftslingshot",DOFcontactors)
  975. DOF 126, DOFPulse
  976. addscore 1
  977. if GL = "L" then
  978. GL = "R"
  979. Else
  980. GL = "L"
  981. end if
  982. CentralSling.Visible = 0
  983. CentralSlingLe1.Visible = 1
  984. slingLe.objroty = 15
  985. LStepe = 2
  986. LeftSlingShote.TimerEnabled = 1
  987. End Sub
  988.  
  989. Sub LeftSlingShote_Timer()
  990. Select Case LStepe
  991. Case 3:CentralSlingLe1.Visible = 0:CentralSlingLe2.Visible = 1:slingLe.objroty = 7
  992. Case 4:slingLe.objroty = 0:CentralSlingLe2.Visible = 0:CentralSling.Visible = 1:LeftSlingShote.TimerEnabled = 0:b2sSunL=b2sSunL+1
  993. End Select
  994. LStepe = LStepe + 1
  995. End Sub
  996.  
  997. Sub RightSlingShotb_Slingshot
  998. playsound SoundFX("leftslingshot",DOFContactors)
  999. DOF 125, DOFPulse
  1000. addscore 1
  1001. if GL = "L" then
  1002. GL = "R"
  1003. Else
  1004. GL = "L"
  1005. end if
  1006. RSlingb.Visible = 0
  1007. RSlingb1.Visible = 1
  1008. slingRb.objroty = -15
  1009. RStepb = 2
  1010. RightSlingShotb.TimerEnabled = 1
  1011. End Sub
  1012.  
  1013. Sub RightSlingShotb_Timer()
  1014. Select Case RStepb
  1015. Case 3:RSLingb1.Visible = 0:RSLingb2.Visible = 1:slingRb.objroty = 7
  1016. Case 4:slingRb.objroty = 0:RSLingb2.Visible = 0:RSLingb.Visible = 1:RightSlingShotb.TimerEnabled = 0:b2sSunR=b2sSunR+1
  1017. End Select
  1018. RStepb = RStepb + 1
  1019. End Sub
  1020.  
  1021. Sub RightSlingShotc_Slingshot
  1022. playsound SoundFX("leftslingshot",DOFcontactors)
  1023. DOF 123, DOFPulse
  1024. addscore 5
  1025. if motion=0 and tilt=false and c=0 then
  1026. rt=(int(rnd(1)*8)+4)
  1027. motion=1
  1028. c=1
  1029. a=int((rnd*6)+1)
  1030. rotort.enabled=true
  1031. end if
  1032. if GL = "L" then
  1033. GL = "R"
  1034. Else
  1035. GL = "L"
  1036. end if
  1037. RSlingc.Visible = 0
  1038. RSlingc1.Visible = 1
  1039. slingRc.objroty = -15
  1040. RStepc = 2
  1041. RightSlingShotc.TimerEnabled = 1
  1042. End Sub
  1043.  
  1044. Sub RightSlingShotc_Timer()
  1045. Select Case RStepc
  1046. Case 3:RSLingc1.Visible = 0:RSLingc2.Visible = 1:slingRc.objroty = 7
  1047. Case 4:slingRc.objroty = 0:RSLingc2.Visible = 0:RSLingc.Visible = 1:RightSlingShotc.TimerEnabled = 0:b2sSunR=b2sSunR+1
  1048. End Select
  1049. RStepc = RStepc + 1
  1050. End Sub
  1051.  
  1052. Sub RightSlingShotd_Slingshot
  1053. playsound SoundFX("leftslingshot",DOFcontactors)
  1054. DOF 121, DOFPulse
  1055. addscore 1
  1056. if GL = "L" then
  1057. GL = "R"
  1058. Else
  1059. GL = "L"
  1060. end if
  1061. RSlingc.Visible = 0
  1062. RSlingd1.Visible = 1
  1063. slingRd.objroty = -15
  1064. RStepd = 2
  1065. RightSlingShotd.TimerEnabled = 1
  1066. End Sub
  1067.  
  1068. Sub RightSlingShotd_Timer()
  1069. Select Case RStepd
  1070. Case 3:RSLingd1.Visible = 0:RSLingd2.Visible = 1:slingRd.objroty = 7
  1071. Case 4:slingRd.objroty = 0:RSLingd2.Visible = 0:RSLingc.Visible = 1:RightSlingShotd.TimerEnabled = 0:b2sSunR=b2sSunR+1
  1072. End Select
  1073. RStepd = RStepd + 1
  1074. End Sub
  1075.  
  1076. Sub RightSlingShote_Slingshot
  1077. playsound SoundFX("leftslingshot",DOFcontactors)
  1078. DOF 126, DOFPulse
  1079. addscore 1
  1080. if GL = "L" then
  1081. GL = "R"
  1082. Else
  1083. GL = "L"
  1084. end if
  1085. CentralSling.Visible = 0
  1086. CentralSlingRe1.Visible = 1
  1087. slingRe.objroty = 15
  1088. RStepe = 2
  1089. RightSlingShote.TimerEnabled = 1
  1090. End Sub
  1091.  
  1092. Sub RightSlingShote_Timer()
  1093. Select Case RStepe
  1094. Case 3:CentralSlingRe1.Visible = 0:CentralSlingRe2.Visible = 1:slingRe.objroty = 7
  1095. Case 4:slingRe.objroty = 0:CentralSlingRe2.Visible = 0:CentralSling.Visible = 1:RightSlingShote.TimerEnabled = 0:b2sSunR=b2sSunR+1
  1096. End Select
  1097. RStepe = RStepe + 1
  1098. End Sub
  1099.  
  1100. '*********** End Slingshots *************
  1101.  
  1102. '*********** Bumpers + points **********
  1103. sub bumper1_hit
  1104. if GI10.state=1 then
  1105. addscore 10
  1106. else
  1107. addscore 1
  1108. end if
  1109. if tilt=false then
  1110. playsound SoundFXDOF("jet1",107,DOFPulse,DOFContactors)
  1111. DOF 109, DOFPulse
  1112. ring1.isdropped=false
  1113. end if
  1114. b2sSunL=b2sSunL+1
  1115. end sub
  1116.  
  1117. sub bumper2_hit
  1118. if GI11.state=1 then
  1119. addscore 10
  1120. else
  1121. addscore 1
  1122. end if
  1123. if tilt=false then
  1124. playsound SoundFXDOF("jet1",108,DOFPulse,DOFContactors)
  1125. DOF 110, DOFPulse
  1126. ring2.isdropped=false
  1127. end if
  1128. b2sSunR=b2sSunR+1
  1129. end sub
  1130.  
  1131. sub bumper3_hit
  1132. addscore 5
  1133. if motion=0 and tilt=false and c=0 then
  1134. rt=(int(rnd(1)*8)+4)
  1135. motion=1
  1136. c=1
  1137. a=int((rnd*6)+1)
  1138. rotort.enabled=true
  1139. end if
  1140. b2sSunL=b2sSunL+1
  1141. end sub
  1142.  
  1143. sub bumper4_hit
  1144. addscore 5
  1145. if motion=0 and tilt=false and c=0 then
  1146. rt=(int(rnd(1)*8)+4)
  1147. motion=1
  1148. c=1
  1149. a=int((rnd*6)+1)
  1150. rotort.enabled=true
  1151. end if
  1152. b2sSunR=b2sSunR+1
  1153. end sub
  1154. '**********************************
  1155.  
  1156. '****** Buttons points *****
  1157. sub ulbt_hit
  1158. addscore 1
  1159. bouton03.z=-1
  1160. bouton03f.z=-1
  1161. b2sSunL=b2sSunL+1
  1162. end sub
  1163. sub ulbt_unhit
  1164. bouton03.z=2.5
  1165. bouton03f.z=2.5
  1166. end sub
  1167.  
  1168. sub urbt_hit
  1169. addscore 1
  1170. bouton02.z=-1
  1171. bouton02f.z=-1
  1172. b2sSunR=b2sSunR+1
  1173. end sub
  1174. sub urbt_unhit
  1175. bouton02.z=2.5
  1176. bouton02f.z=2.5
  1177. end sub
  1178.  
  1179. sub lbt_hit
  1180. addscore 1
  1181. bouton01.z=-1
  1182. bouton01f.z=-1
  1183. b2sSunL=b2sSunL+1
  1184. b2sSunR=b2sSunR+1
  1185. end sub
  1186. sub lbt_unhit
  1187. bouton01.z=2.5
  1188. bouton01f.z=2.5
  1189. end sub
  1190. '****************************
  1191.  
  1192. '****** Outlanes points *****
  1193. sub lout_hit
  1194. DOF 121, DOFPulse
  1195. if loutl.state=1 then
  1196. addscore 100
  1197. else
  1198. addscore 10
  1199. end if
  1200. end sub
  1201.  
  1202. sub rout_hit
  1203. DOF 122, DOFPulse
  1204. if routl.state=1 then
  1205. addscore 100
  1206. else
  1207. addscore 10
  1208. end if
  1209. end sub
  1210. '****************************
  1211.  
  1212.  
  1213. '********* Triggers between targets *************
  1214. sub lru_hit
  1215.  
  1216. if on1.state=1 and tilt=false and HZ=0 then
  1217. BumpT = 1
  1218. BumpB = 0
  1219. end if
  1220.  
  1221. if on1.state=0 and tilt=false and HZ=0 then
  1222. BumpT = 0
  1223. BumpB = 0
  1224. end if
  1225.  
  1226. if HZ=0 Then
  1227. if GL = "L" then
  1228. GL = "R"
  1229. Else
  1230. GL = "L"
  1231. end if
  1232. end If
  1233.  
  1234. HZ=1
  1235. End Sub
  1236.  
  1237. sub HitZoneL_unhit
  1238. HZ = 0
  1239. end Sub
  1240.  
  1241. sub rru_hit
  1242. if on2.state=1 and tilt=false and HZ=0 then
  1243. BumpT = 0
  1244. BumpB = 1
  1245. End If
  1246.  
  1247. if on2.state=0 and tilt=false and HZ=0 then
  1248. BumpT = 0
  1249. BumpB = 0
  1250. end if
  1251.  
  1252. if HZ=0 Then
  1253. if GL = "L" then
  1254. GL = "R"
  1255. Else
  1256. GL = "L"
  1257. end if
  1258. end If
  1259.  
  1260. HZ=1
  1261. end Sub
  1262.  
  1263. sub HitZoneR_unhit
  1264. HZ = 0
  1265. end Sub
  1266.  
  1267. sub gate_hit
  1268. playsound "gate"
  1269. end Sub
  1270.  
  1271. sub gate1_hit
  1272. playsound "gate"
  1273. end Sub
  1274.  
  1275. sub gate2_hit
  1276. playsound "gate"
  1277. end Sub
  1278.  
  1279. '******************************************************
  1280.  
  1281.  
  1282. '******************************************************
  1283. '****** Targets *******
  1284. '******************************************************
  1285.  
  1286. sub ctarga
  1287. addscore 100
  1288. end sub
  1289.  
  1290. Sub SW24_hit():sw24p.transx = -10:Me.TimerEnabled = 1:playsound "metal4":ltarga:DOF 111, DOFPulse:End Sub
  1291. Sub SW24_Timer():sw24p.transx = 0:Me.TimerEnabled = 0:End Sub
  1292.  
  1293. Sub SW25_hit():sw25p.transx = -10:Me.TimerEnabled = 1:playsound "metal4":ctarga:DOF 112, DOFPulse:End Sub
  1294. Sub SW25_Timer():sw25p.transx = 0:Me.TimerEnabled = 0:End Sub
  1295.  
  1296. Sub SW26_hit():sw26p.transx = -10:Me.TimerEnabled = 1:playsound "metal4":rtarga:DOF 113, DOFPulse:End Sub
  1297. Sub SW26_Timer():sw26p.transx = 0:Me.TimerEnabled = 0:End Sub
  1298.  
  1299. sub rtarga
  1300. if urtlb.state=0 and urtlf.state=0 then addscore 1
  1301. if urtlb.state=1 and urtlf.state=0 then addscore 10
  1302. if urtlf.state=1 then addscore (rsv*10)
  1303. end sub
  1304.  
  1305. sub ltarga
  1306. if ultlb.state=0 and ultlf.state=0 then addscore 1
  1307. if ultlb.state=1 and ultlf.state=0 then addscore 10
  1308. if ultlf.state=1 then addscore (rsv*10)
  1309. end sub
  1310.  
  1311. '*******************************************************
  1312.  
  1313. '******************************************************
  1314. '****** Wheel price et score *******
  1315. '******************************************************
  1316.  
  1317. Sub SWheelPrice_hit():Wheel.transx = 10:Me.TimerEnabled = 1:playsound "metal4":swheelscore:DOF 114, DOFPulse:End Sub
  1318. Sub SWheelPrice_Timer():Wheel.transx = 0:Me.TimerEnabled = 0:End Sub
  1319.  
  1320. sub swheelscore
  1321. If l400.state = 1 then
  1322. addscore 400
  1323. end if
  1324.  
  1325. If l500.state = 1 then
  1326. addscore 500
  1327. end if
  1328.  
  1329. if rl.state=1 and l400.state=0 and l500.state = 0 then
  1330. addscore (rsv*10)
  1331. end if
  1332.  
  1333. if rl.state=0 and l400.state=0 and l500.state = 0 then
  1334. addscore (rsv)
  1335. end if
  1336. end Sub
  1337.  
  1338. '************************************************
  1339. '**** Holes ****
  1340. '************************************************
  1341. sub lgob_hit
  1342. playsound "drain"
  1343. if lgl.state=1 then addscore (rsv*10) else addscore (rsv) end if
  1344. end sub
  1345.  
  1346. sub rgob_hit
  1347. playsound "drain"
  1348. if rgl.state=1 then addscore (rsv*10) else addscore (rsv) end if
  1349. end sub
  1350.  
  1351. Sub TriggerLgob_hit:Me.DestroyBall:gobtimer.enabled=1:End Sub
  1352. Sub TriggerRgob_hit:Me.DestroyBall:gobtimer.enabled=1:End Sub
  1353.  
  1354. sub gobtimer_timer
  1355. Me.enabled=0
  1356. playsound "motorshort"
  1357. activeballs=activeballs-1
  1358. if activeballs=0 then tt=0:nextball
  1359. if B2SOn then Scoreb2s.enabled =1:end If
  1360. end sub
  1361.  
  1362. '************************************************
  1363. '**** wheel Price ****
  1364. '************************************************
  1365. sub rotoradv
  1366. If wheel.objroty = 0 then rsv =10
  1367. If wheel.objroty = 36 then rsv =20
  1368. If wheel.objroty = 72 then rsv =30
  1369. If wheel.objroty = 108 then rsv =40
  1370. If wheel.objroty = 144 then rsv =50
  1371. If wheel.objroty = 180 then rsv =10
  1372. If wheel.objroty = 216 then rsv =20
  1373. If wheel.objroty = 252 then rsv =30
  1374. If wheel.objroty = 288 then rsv =40
  1375. If wheel.objroty = 324 then rsv =50
  1376. rv=rv+1
  1377. if rv>9 then rv=0:end If
  1378. playsound "lightmotor"
  1379. end sub
  1380.  
  1381. '*************************************************
  1382. '********* Scoring lights ********
  1383. sub ylupdate
  1384. for each obj in rtvalue
  1385. obj.state=0
  1386. next
  1387. rtvalue(ylv).state=1
  1388. ' if ylv=0 or ylv=3 and rv>5 then
  1389. ' if rsv=40 then l400.state=1:l500.state=0:l400z.state=1:l500z.state=0:end if
  1390. ' if rsv=50 then l500.state=1:l400.state=0:l500z.state=1:l400z.state=0:end if
  1391. ' end if
  1392. ' if rsv<40 then
  1393. ' l400.state=0:l400z.state=0
  1394. ' l500.state=0:l500z.state=0
  1395. ' end if
  1396. end sub
  1397. '*************************************************
  1398.  
  1399. sub credtimer_timer
  1400. cred=cred+1
  1401. if cred=1 then credtxt.text="Ported To VPX By JPJ, from a Leon Spalding's Table"
  1402. if cred=2 then credtxt.text="'5'Coin:'S'Start:'Right magnet or automatic 'Load Ball"
  1403. if cred=3 then credtxt.text="Thanx Go To:"
  1404. if cred=4 then credtxt.text="Randy Davis & Black (VP GODS)"
  1405. if cred=5 then credtxt.text="Most At VPF, VPFF & MFF"
  1406. if cred=6 then credtxt.text="'5'Coin:'S'Start:'Right magnet or automatic 'Load Ball"
  1407. if cred=6 then cred=0
  1408. end sub
  1409.  
  1410. '****************** Save and load values, score, credit *********************
  1411. sub savehs
  1412. savevalue "Contest", "credit", credit
  1413. savevalue "Contest", "plsc1", score(0)
  1414. savevalue "Contest", "plsc2", score(1)
  1415. savevalue "Contest", "plsc3", score(2)
  1416. savevalue "Contest", "plsc4", score(3)
  1417. savevalue "Contest", "hiscore", hisc
  1418. savevalue "Contest", "match", matchnumb
  1419. savevalue "Contest", "rotpos", rv
  1420. savevalue "Contest", "yellowlpos", ylv
  1421. end sub
  1422.  
  1423. sub loadhs
  1424. dim temp
  1425. temp = LoadValue("Contest", "credit")
  1426. If (temp <> "") then credit = CDbl(temp)
  1427. temp = LoadValue("Contest", "plsc1")
  1428. If (temp <> "") then score(0) = CDbl(temp)
  1429. temp = LoadValue("Contest", "plsc2")
  1430. If (temp <> "") then score(1) = CDbl(temp)
  1431. temp = LoadValue("Contest", "plsc3")
  1432. If (temp <> "") then score(2) = CDbl(temp)
  1433. temp = LoadValue("Contest", "plsc4")
  1434. If (temp <> "") then score(3) = CDbl(temp)
  1435. temp = LoadValue("Contest", "hiscore")
  1436. If (temp <> "") then hisc = CDbl(temp)
  1437. temp = LoadValue("Contest", "match")
  1438. If (temp <> "") then matchnumb = CDbl(temp)
  1439. temp = LoadValue("Contest", "rotpos")
  1440. If (temp <> "") then rv = CDbl(temp)
  1441. temp = LoadValue("Contest", "yellowlpos")
  1442. If (temp <> "") then ylv = CDbl(temp)
  1443. If ylv>4 then ylv=0
  1444. end sub
  1445.  
  1446. '********* launching ball triger **********
  1447. sub ballhome_hit
  1448. ballrelenabled=1
  1449. end sub
  1450.  
  1451. sub ballrel_hit
  1452. if ballrelenabled=1 then
  1453. playsound "launchball"
  1454. ballrelenabled=0
  1455. end if
  1456. end sub
  1457.  
  1458. 'plus utile
  1459. 'sub ballout_hit
  1460. ' bb.isdropped=false
  1461. 'end sub
  1462.  
  1463. '******* Light to the B2S *******
  1464. Sub BGLight(id, value)
  1465. If B2SOn Then
  1466. Controller.B2SSetData id, value
  1467. End If
  1468. End Sub
  1469.  
  1470. '******* Score, credit lights to B2s *******
  1471.  
  1472. sub Scoreb2s_timer()
  1473.  
  1474. '********** Scores ************
  1475. if B2SOn Then
  1476. Controller.B2SSetScore 1, Score(0)
  1477. Controller.B2SSetScore 2, Score(1)
  1478. Controller.B2SSetScore 3, Score(2)
  1479. Controller.B2SSetScore 4, Score(3)
  1480. Controller.B2SSetCredits credit
  1481. Controller.B2SSetPlayerUp playno
  1482.  
  1483. '********** active PLayer's light in game ************
  1484. if currpl=0 Then
  1485. if ballinplay>0 and ballinplay<6 then
  1486. Controller.B2SSetData 25, 1
  1487. end if
  1488. else
  1489. Controller.B2SSetData 25, 0
  1490. end If
  1491. if currpl=1 Then
  1492. if ballinplay>0 and ballinplay<6 then
  1493. Controller.B2SSetData 26, 1
  1494. end if
  1495. else
  1496. Controller.B2SSetData 26, 0
  1497. end If
  1498. if currpl=2 Then
  1499. if ballinplay>0 and ballinplay<6 then
  1500. Controller.B2SSetData 27, 1
  1501. end if
  1502. else
  1503. Controller.B2SSetData 27, 0
  1504. end If
  1505. if currpl=3 Then
  1506. if ballinplay>0 and ballinplay<6 then
  1507. Controller.B2SSetData 28, 1
  1508. end if
  1509. else
  1510. Controller.B2SSetData 28, 0
  1511. end If
  1512.  
  1513. '********** Tilt ************
  1514. Controller.B2SSetBallInPlay ballinplay
  1515. Controller.B2SSetTilt 33, pltilt(0)
  1516. Controller.B2SSetTilt 33, pltilt(1)
  1517. Controller.B2SSetTilt 33, pltilt(2)
  1518. Controller.B2SSetTilt 33, pltilt(3)
  1519. End If
  1520. '********** Game Over ************
  1521. If ballinplay<1 or ballinplay>5 and b2svarlightA=0 then
  1522. If B2SOn Then Controller.B2SSetData 35, 1: Controller.B2SSetPlayerUp 0
  1523. b2svar1.enabled=1
  1524. b2svar2.enabled=0
  1525. sunzero
  1526. sunL.enabled=0
  1527. sunR.enabled=0
  1528. Else
  1529. If B2SOn Then
  1530. Controller.B2SSetData 35, 0
  1531. Controller.B2SSetData 10, 0
  1532. Controller.B2SSetData 11, 0
  1533. End If
  1534. b2svarlightA=0
  1535. b2svar1.enabled=0
  1536. b2svar2.enabled=1
  1537. sunL.enabled=1
  1538. sunR.enabled=1
  1539. end If
  1540. If ballinplay<1 or ballinplay>5 and b2svarlightA<>0 then
  1541. If B2SOn Then Controller.B2SSetData 35, 1
  1542. b2svar1.enabled=1
  1543. b2svar2.enabled=0
  1544. sunzero
  1545. sunL.enabled=0
  1546. sunR.enabled=0
  1547. Else
  1548. If B2SOn Then
  1549. Controller.B2SSetData 35, 0
  1550. Controller.B2SSetData 10, 0
  1551. Controller.B2SSetData 11, 0
  1552. End If
  1553. b2svarlightA=0
  1554. b2svar1.enabled=0
  1555. b2svar2.enabled=1
  1556. sunL.enabled=1
  1557. sunR.enabled=1
  1558. end If
  1559. end Sub
  1560.  
  1561.  
  1562. sub B2svar1_timer
  1563. if b2svarlightA=0 then b2svar1.enabled = 0:end If
  1564. If B2SOn Then
  1565. select case b2svarlightA
  1566. case 1:Controller.B2SSetData 10, 0
  1567. Controller.B2SSetData 11, 0
  1568. case 2:Controller.B2SSetData 10, 1
  1569. Controller.B2SSetData 11, 1
  1570. case 3:
  1571. Controller.B2SSetData 10, 1
  1572. Controller.B2SSetData 11, 0
  1573. case 4:
  1574. Controller.B2SSetData 10, 0
  1575. Controller.B2SSetData 11, 1
  1576. case 5:
  1577. Controller.B2SSetData 10, 0
  1578. Controller.B2SSetData 11, 0
  1579. case 6:
  1580. Controller.B2SSetData 10, 1
  1581. Controller.B2SSetData 11, 1
  1582. end Select
  1583. End If
  1584.  
  1585. b2svarlightA=b2svarlightA+1
  1586. if b2svarlightA=7 then b2svarlightA=1
  1587. end sub
  1588.  
  1589. sub b2svar2_timer
  1590. if b2svarlightB=0 then b2svar2.enabled = 0:end If
  1591. If B2SOn Then
  1592. select case b2svarlightB
  1593. case 1:
  1594. Controller.B2SSetData 8, 1
  1595. Controller.B2SSetData 9, 0
  1596. case 2:
  1597. Controller.B2SSetData 8, 1
  1598. Controller.B2SSetData 9, 0
  1599. case 3:
  1600. Controller.B2SSetData 8, 0
  1601. Controller.B2SSetData 9, 1
  1602. case 4:
  1603. Controller.B2SSetData 8, 0
  1604. Controller.B2SSetData 9, 1
  1605. case 5:
  1606. Controller.B2SSetData 8, 0
  1607. Controller.B2SSetData 9, 0
  1608. case 6:
  1609. Controller.B2SSetData 8, 1
  1610. Controller.B2SSetData 9, 1
  1611. case 7:
  1612. Controller.B2SSetData 8, 0
  1613. Controller.B2SSetData 9, 0
  1614. case 8:
  1615. Controller.B2SSetData 8, 1
  1616. Controller.B2SSetData 9, 1
  1617. case 9:
  1618. Controller.B2SSetData 8, 0
  1619. Controller.B2SSetData 9, 0
  1620. case 10:
  1621. Controller.B2SSetData 8, 0
  1622. Controller.B2SSetData 9, 1
  1623. case 11:
  1624. Controller.B2SSetData 8, 1
  1625. Controller.B2SSetData 9, 0
  1626. case 12:
  1627. Controller.B2SSetData 8, 0
  1628. Controller.B2SSetData 9, 0
  1629. end Select
  1630. End If
  1631. b2svarlightB=b2svarlightB+1
  1632. if b2svarlightB=10 then b2svarlightB=1
  1633. End Sub
  1634.  
  1635. sub sunL_Timer
  1636. If B2SOn Then
  1637. select case b2sSunL
  1638. case 1:
  1639. Controller.B2SSetData 40, 1
  1640. Controller.B2SSetData 41, 0
  1641. Controller.B2SSetData 42, 0
  1642. Controller.B2SSetData 43, 0
  1643. case 2:
  1644. Controller.B2SSetData 40, 0
  1645. Controller.B2SSetData 41, 1
  1646. Controller.B2SSetData 42, 0
  1647. Controller.B2SSetData 43, 0
  1648. case 3:
  1649. Controller.B2SSetData 40, 0
  1650. Controller.B2SSetData 41, 0
  1651. Controller.B2SSetData 42, 1
  1652. Controller.B2SSetData 43, 0
  1653. case 4:
  1654. Controller.B2SSetData 40, 0
  1655. Controller.B2SSetData 41, 0
  1656. Controller.B2SSetData 42, 0
  1657. Controller.B2SSetData 43, 1
  1658. case 5:
  1659. Controller.B2SSetData 40, 0
  1660. Controller.B2SSetData 41, 0
  1661. Controller.B2SSetData 42, 1
  1662. Controller.B2SSetData 43, 0
  1663. case 6:
  1664. Controller.B2SSetData 40, 0
  1665. Controller.B2SSetData 41, 1
  1666. Controller.B2SSetData 42, 0
  1667. Controller.B2SSetData 43, 0
  1668. end Select
  1669. End If
  1670. ' b2sSunL=b2sSunL+1
  1671. if b2sSunL=7 then b2sSunL=1:end If
  1672.  
  1673. end Sub
  1674.  
  1675. Sub sunR_Timer
  1676. If B2SOn Then
  1677. select case b2sSunR
  1678. case 1:
  1679. Controller.B2SSetData 44, 0
  1680. Controller.B2SSetData 45, 0
  1681. Controller.B2SSetData 46, 0
  1682. Controller.B2SSetData 47, 1
  1683. case 2:
  1684. Controller.B2SSetData 44, 0
  1685. Controller.B2SSetData 45, 0
  1686. Controller.B2SSetData 46, 1
  1687. Controller.B2SSetData 47, 0
  1688. case 3:
  1689. Controller.B2SSetData 44, 0
  1690. Controller.B2SSetData 45, 1
  1691. Controller.B2SSetData 46, 0
  1692. Controller.B2SSetData 47, 0
  1693. case 4:
  1694. Controller.B2SSetData 44, 1
  1695. Controller.B2SSetData 45, 0
  1696. Controller.B2SSetData 46, 0
  1697. Controller.B2SSetData 47, 0
  1698. case 5:
  1699. Controller.B2SSetData 44, 0
  1700. Controller.B2SSetData 45, 1
  1701. Controller.B2SSetData 46, 0
  1702. Controller.B2SSetData 47, 0
  1703. case 6:
  1704. Controller.B2SSetData 44, 0
  1705. Controller.B2SSetData 45, 0
  1706. Controller.B2SSetData 46, 1
  1707. Controller.B2SSetData 47, 0
  1708. end Select
  1709. End If
  1710. ' b2sSunR=b2sSunR+1
  1711. if b2sSunR=7 then b2sSunR=1:end If
  1712. end Sub
  1713.  
  1714. Sub sunzero
  1715. If B2SOn Then
  1716. Controller.B2SSetData 40, 0
  1717. Controller.B2SSetData 41, 0
  1718. Controller.B2SSetData 42, 0
  1719. Controller.B2SSetData 43, 0
  1720. Controller.B2SSetData 44, 0
  1721. Controller.B2SSetData 45, 0
  1722. Controller.B2SSetData 46, 0
  1723. Controller.B2SSetData 47, 0
  1724. End If
  1725. end Sub
  1726.  
  1727.  
  1728. '******* Lights Timers, Lights mechanic *******
  1729.  
  1730. sub GILeft_Timer
  1731. if GL="R" then GIRight:end If
  1732. if GL="L" then GILeftt:end If
  1733.  
  1734. if ylv=0 or ylv=3 and rv>5 then
  1735. if rsv=40 then l400.state=1:l500.state=0:l400z.state=1:l500z.state=0:end if
  1736. if rsv=50 then l500.state=1:l400.state=0:l500z.state=1:l400z.state=0:end if
  1737. end if
  1738. if rsv<40 then
  1739. l400.state=0:l400z.state=0
  1740. l500.state=0:l500z.state=0
  1741. end if
  1742.  
  1743. End Sub
  1744.  
  1745. sub GIGen_Timer
  1746. for each obj in GIR
  1747. obj.state=0
  1748. Next
  1749. for each obj in GIL
  1750. obj.state=0
  1751. Next
  1752. 'condition hasard
  1753. GL="L"
  1754. end Sub
  1755.  
  1756. sub GILeftt
  1757. for each obj in GIR
  1758. obj.state=0
  1759. Next
  1760. for each obj in GIL
  1761. obj.state=1
  1762. Next
  1763. '********** bottom clouds in B2S ************
  1764. If B2SOn Then
  1765. if ballinplay>0 and ballinplay<6 then
  1766. Controller.B2SSetData 12, 1
  1767. Controller.B2SSetData 14, 0
  1768. Else
  1769. Controller.B2SSetData 12, 0
  1770. Controller.B2SSetData 14, 0
  1771. End If
  1772. End If
  1773. '********************************************
  1774.  
  1775. 'Targets Top
  1776. GI01.state = 1
  1777. GI02.state = 1
  1778. GI1.state = 0
  1779. GI2.state = 0
  1780.  
  1781. 'on/off
  1782. on1.state=1
  1783. off2.state=1
  1784. on2.state=0
  1785. off1.state=0
  1786.  
  1787. 'Right Outlane
  1788. routl.state = 1
  1789. loutl.state = 0
  1790.  
  1791. 'Bumpers
  1792. if bumpB = 1 or bumpT = 1 Then
  1793. GI11.state = 1
  1794. Light7.state = 1
  1795. GI10.state = 0
  1796. Light6.state = 0
  1797. end If
  1798. if bumpB = 0 and bumpT = 0 Then
  1799. GI11.state = 0
  1800. Light7.state = 0
  1801. GI10.state =0
  1802. Light6.state = 0
  1803. end if
  1804. end Sub
  1805.  
  1806. sub GIRight
  1807. for each obj in GIR
  1808. obj.state=1
  1809. Next
  1810. for each obj in GIL
  1811. obj.state=0
  1812. Next
  1813. '********** bottom clouds in B2S ************
  1814. If B2SOn Then
  1815. if ballinplay>0 and ballinplay<6 then
  1816. Controller.B2SSetData 12, 0
  1817. Controller.B2SSetData 14, 1
  1818. Else
  1819. Controller.B2SSetData 12, 0
  1820. Controller.B2SSetData 14, 0
  1821. End If
  1822. End If
  1823. '********************************************
  1824.  
  1825. 'condition
  1826. 'Targets Top
  1827. GI01.state = 0
  1828. GI02.state = 0
  1829. GI1.state = 1
  1830. GI2.state = 1
  1831.  
  1832. 'on/off
  1833. on1.state=0
  1834. off2.state=0
  1835. on2.state=1
  1836. off1.state=1
  1837.  
  1838. 'Left Outlane
  1839. loutl.state = 1
  1840. routl.state = 0
  1841.  
  1842. 'Bumpers
  1843. if bumpB = 1 or bumpT = 1 Then
  1844. GI11.state = 0
  1845. Light7.state = 0
  1846. GI10.state =1
  1847. Light6.state = 1
  1848. end If
  1849. if bumpB = 0 and bumpT = 0 Then
  1850. GI11.state = 0
  1851. Light7.state = 0
  1852. GI10.state =0
  1853. Light6.state = 0
  1854. end If
  1855. end Sub
  1856.  
  1857. ' *********************************************************************
  1858. ' Supporting Ball & Sound Functions
  1859. ' *********************************************************************
  1860.  
  1861. Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed
  1862. Vol = Csng(BallVel(ball) ^2 / 1000)
  1863. End Function
  1864.  
  1865. Function Pan(ball) ' Calculates the pan for a ball based on the X position on the table. "table1" is the name of the table
  1866. Dim tmp
  1867. tmp = ball.x * 2 / table1.width-1
  1868. If tmp> 0 Then
  1869. Pan = Csng(tmp ^10)
  1870. Else
  1871. Pan = Csng(-((- tmp) ^10) )
  1872. End If
  1873. End Function
  1874.  
  1875. Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed
  1876. Pitch = BallVel(ball) * 20
  1877. End Function
  1878.  
  1879. Function BallVel(ball) 'Calculates the ball speed
  1880. BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ))
  1881. End Function
  1882.  
  1883. ' *********************************************************************
  1884. ' Other Sound FX
  1885. ' *********************************************************************
  1886. 'Balls Collision
  1887. Sub OnBallBallCollision(ball1, ball2, velocity)
  1888. PlaySound "fx_collide", 0, Csng(velocity) ^2 / 500, Pan(ball1), 0, Pitch(ball1), 0, 0
  1889. End Sub
  1890.  
  1891. 'Rubbers Collision
  1892. Sub Rubbers_Hit(idx)
  1893. dim finalspeed
  1894. finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
  1895. If finalspeed > 20 then
  1896. PlaySound "rubber_hit_1", 0, Vol(ActiveBall)*10*GlobalSoundLevel , pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
  1897. End if
  1898. If finalspeed >= 1 AND finalspeed <= 20 then
  1899. RandomSoundRubber()
  1900. End If
  1901. End Sub
  1902.  
  1903. Sub RandomSoundRubber()
  1904. Select Case Int(Rnd*3)+1
  1905. Case 1 : PlaySound "rubber_hit_1", 0, Vol(ActiveBall)*10*GlobalSoundLevel , pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
  1906. Case 2 : PlaySound "rubber_hit_2", 0, Vol(ActiveBall)*10*GlobalSoundLevel , pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
  1907. Case 3 : PlaySound "rubber_hit_3", 0, Vol(ActiveBall)*10*GlobalSoundLevel , pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
  1908. End Select
  1909. End Sub
  1910.  
  1911. 'Metals Collision
  1912. Sub MetalsThin_Hit (idx)
  1913. PlaySound "metalhit_thin", 0, Vol(ActiveBall)*GlobalSoundLevel, Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1914. End Sub
  1915.  
  1916. 'Post Collision
  1917. Sub wood_hit(idx)
  1918. PlaySound "Post1", 0, Vol(ActiveBall)*10*GlobalSoundLevel , pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
  1919. End Sub
  1920.  
  1921. 'Flippers Collision
  1922. Sub LeftFlipper_Collide(parm) : RandomSoundFlipper() : End Sub
  1923. Sub RightFlipper_Collide(parm) : RandomSoundFlipper() : End Sub
  1924.  
  1925. Sub RandomSoundFlipper()
  1926. Select Case Int(Rnd*3)+1
  1927. Case 1 :PlaySound "flip_hit_1", 0, GlobalSoundLevel * ballvel(ActiveBall) / 50, -0.1, 0.25
  1928. Case 2 :PlaySound "flip_hit_2", 0, GlobalSoundLevel * ballvel(ActiveBall) / 50, -0.1, 0.25
  1929. Case 3 :PlaySound "flip_hit_3", 0, GlobalSoundLevel * ballvel(ActiveBall) / 50, -0.1, 0.25
  1930. End Select
  1931. End Sub
  1932.  
  1933. '******************************************************
  1934. ' RealTime Updates
  1935. '******************************************************
  1936. Const tnob = 1 ' total number of balls for this table (at the same time)
  1937.  
  1938. Sub GameTimer_timer()
  1939. RollingSoundUpdate
  1940. BallShadowUpdate
  1941. FlippersUpdate
  1942. If ReflectionMod Then RMUpdate
  1943. End Sub
  1944.  
  1945. '*********** ROLLING SOUND *********************************
  1946. ReDim rolling(tnob)
  1947. InitRolling
  1948. Sub InitRolling:Dim i:For i=0 to (tnob-1):rolling(i) = False:Next:End Sub
  1949.  
  1950. Sub RollingSoundUpdate
  1951. Dim BOT, b
  1952. BOT = GetBalls
  1953. ' stop the sound of deleted balls
  1954. If UBound(BOT)<(tnob-1) Then
  1955. For b = (UBound(BOT) + 1) to (tnob-1)
  1956. rolling(b) = False
  1957. StopSound("fx_ballrolling" & (b+1))
  1958. Next
  1959. End If
  1960. ' exit the Sub if no balls on the table
  1961. If UBound(BOT) = -1 Then Exit Sub
  1962. ' play the rolling sound for each ball
  1963. For b = 0 to UBound(BOT)
  1964. If BallVel(BOT(b) ) > 1 AND BOT(b).z < 30 Then
  1965. rolling(b) = True
  1966. PlaySound "fx_ballrolling" & (b+1), -1, Vol(BOT(b)), Pan(BOT(b)), 0, Pitch(BOT(b)), 1, 0
  1967. Else
  1968. If rolling(b) = True Then
  1969. StopSound("fx_ballrolling" & (b+1))
  1970. rolling(b) = False
  1971. End If
  1972. End If
  1973. Next
  1974. End Sub
  1975.  
  1976. '*********** BALL SHADOW *********************************
  1977. ReDim BallShadow(tnob-1)
  1978. InitBallShadow
  1979.  
  1980. Sub InitBallShadow
  1981. Dim i:For i = 0 to tnob-1
  1982. ExecuteGlobal "Set BallShadow(" & i & ") = BallShadow" & (i+1) & " :"
  1983. Next
  1984. End Sub
  1985.  
  1986. Sub BallShadowUpdate
  1987. Dim BOT, b
  1988. BOT = GetBalls
  1989. ' hide shadow of deleted balls
  1990. If UBound(BOT)<(tnob-1) Then
  1991. For b = (UBound(BOT) + 1) to (tnob-1)
  1992. BallShadow(b).visible = 0
  1993. Next
  1994. End If
  1995. ' exit the Sub if no balls on the table
  1996. If UBound(BOT) = -1 Then Exit Sub
  1997. ' render the shadow for each ball
  1998. For b = 0 to UBound(BOT)
  1999. If BOT(b).X < Table1.Width/2 Then
  2000. BallShadow(b).X = ((BOT(b).X) - (50/6) + ((BOT(b).X - (Table1.Width/2))/7)) + 10
  2001. Else
  2002. BallShadow(b).X = ((BOT(b).X) + (50/6) + ((BOT(b).X - (Table1.Width/2))/7)) - 10
  2003. End If
  2004. ballShadow(b).Y = BOT(b).Y + 20
  2005. If BOT(b).Z > 20 Then
  2006. BallShadow(b).visible = 1
  2007. Else
  2008. BallShadow(b).visible = 0
  2009. End If
  2010. Next
  2011. End Sub
  2012.  
  2013. '*********** FLIPPERS MODEL AND SHADOW SYNC *********************************
  2014. Sub FlippersUpdate
  2015. '** Include Flippers Primitives **
  2016. LeftFlipperP.ObjRotZ = LeftFlipper.CurrentAngle-130
  2017. Primitive85.Roty = LeftFlipper.CurrentAngle-130
  2018. Primitive87.Roty = LeftFlipper.CurrentAngle-130
  2019. LeftFlipperP1.ObjRotZ = Flipper1.CurrentAngle-125
  2020. RightFlipperP.ObjRotZ = RightFlipper.CurrentAngle-230
  2021. Primitive86.Roty = RightFlipper.CurrentAngle-230
  2022. Primitive88.Roty = RightFlipper.CurrentAngle-230
  2023. RightFlipperP1.ObjRotZ = Flipper2.CurrentAngle-235
  2024.  
  2025. '** Include Flipper's shadows from Ninuzzu **
  2026. LeftFlipperSh.RotZ = LeftFlipper.currentangle
  2027. RightFlipperSh.RotZ = RightFlipper.currentangle
  2028. LeftFlipperSh1.RotZ = Flipper1.currentangle
  2029. RightFlipperSh1.RotZ = Flipper2.currentangle
  2030. End Sub
  2031.  
  2032. '******* JPJ reflection mod *******
  2033. Sub RMUpdate
  2034. if loutl.state = 1 then loutlz.state = 1 else loutlz.state = 0:end If
  2035. if routl.state = 1 then routlz.state = 1 else routlz.state = 0:end If
  2036. if lgl.state = 1 then
  2037. lgl2.state = 1
  2038. lglz.state = 1
  2039. else
  2040. lglz.state = 0
  2041. lgl2.state = 0
  2042. end If
  2043. if rl.state = 1 then rlz.state = 1 else rlz.state = 0:end If
  2044. if rgl.state = 1 then
  2045. rgl2.state = 1
  2046. rglz.state = 1
  2047. else
  2048. rglz.state = 0
  2049. rgl2.state = 0
  2050. end If
  2051. if ultlf.state = 1 then ultlfz.state = 1 else ultlfz.state = 0:end If
  2052. if ultlb.state = 1 then ultlbz.state = 1 else ultlbz.state = 0:end If
  2053. if on1.state = 1 then on1z.state = 1 else on1z.state = 0:end If
  2054. if off1.state = 1 then off1z.state = 1 else off1z.state = 0:end If
  2055. if on2.state = 1 then on2z.state = 1 else on2z.state = 0:end If
  2056. if off2.state = 1 then off2z.state = 1 else off2z.state = 0:end If
  2057. if urtlb.state = 1 then urtlbz.state = 1 else urtlbz.state = 0:end If
  2058. if urtlf.state = 1 then urtlfz.state = 1 else urtlfz.state = 0:end If
  2059. End Sub
Advertisement
Add Comment
Please, Sign In to add comment