'******************************************************************************************** '* * '* _____ __ __ __ __ _ _ _ * '* | __ )| | __ _ ___ | | __ | |/ / _ __ ( _ ) __ _ | | __ | | _ * '* | _ \| | / _ ` | / __ | | / / | ' / | ' _ \| |/ _ `| _ \| __ | * '* | | _ ) | | ( _ | | ( __ | < | . \ | | | | | ( _| | | | | | _ * '* | ____ / |__ |\ __ , _ | \ ___ | _ | \ _\ | _ | \ _\ _ | | _ | _ |\ __, | _ | | _ |\ __ | * '* | ___ / * '* ____ __ ___ __ ____ * '* / ___ | _ _ ____ _ __ __ | | / _ \ / _ | | _ \ __ _ __ _ ___ * '* \ ___ \ \ /\ / / _ \ | '__ / _` | | | | | | _ | | _ ) / _` |/ _ ` |/ _ \ * '* ___) \ V V / ( _ ) | | | ( _ | | | |_ | | _ | | _ < ( _ | | ( _ | | __ / * '* | ____ / \ _ /\ _/ \ ___ / | _ | \ __ , _ | \ ___ /| _ | | _ | \ _\ __ , _ | \ __ , |\ ____ | * '* | ___ / * '* * '* * '******************************************************************************************** ' Vpx table originally developed by Vinch52 ' New version reworked/coded by Meakin68 ' Rework/Fixes: callout loading, PuP startup safety, ball tracking cleanup, start button gating - by FilthTribe Option Explicit Randomize 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' Player Options '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '************************************************************************************************************************ '************************************** YOU CAN MODIFY HERE ************************************************************* ' Original adjustables Will look at adding all adjustables to F12 menu in future updates. Const bpgcurrent = 5 ' Ball Per Game - see also variable "Ballremaining" 'HERE YOU CAN CHANGE THEN NUMBER OF BALL (3 or 5) Const ReplayAt = 60000000 ' Replay At 60,000,000 Const BallSaverTime = 15 ' ball saver time for each new ball Const DifficultyRageCountMystery=1 ' Rage counter used to mystery at the moment this could be an extension set to 1 to always light each time as per original Const MaxMultiballs = 10 ' Max number of balls onn playfield Const MissionTime = 65 ' Time for a mission in Seconds (The default time is 65) Const MissionTimeLastChance=30 ' last chance Not implemented yet, may be developed later Const Bk2000Time = 60 ' retro mode Kings ransom time Const WarHurryTime = 30 ' war hurry up timer in seconds for each phase ' New Additional adjustables. Const ReflipAngle = 20 ' used in Fleep Sound const tnob = 10 ' used by Fleep sounds set to 10 max (actual should be 5 but need to check) ' ************************ Meakin Adjustables ********************* ' mission amount to complete on each new game nb automatically increases during the game Dim MudBogHeadsDefault: MudBogHeadsDefault = 4 Dim MoltenFireShotsDefault: MoltenFireShotsDefault = 8 Dim WickedCavernShotsDefault: WickedCavernShotsDefault = 8 Dim BurningSandsSetsDefault: BurningSandsSetsDefault = 2 Dim DeepFreezeLordsDefault: DeepFreezeLordsDefault = 4 Dim BlackCastleRoundsDefault: BlackCastleRoundsDefault = 4 Dim KnightLampDefault: KnightLampDefault = 2 'number of knightlights lit at the start of a game 0-5 Dim MissionAttackTimeBoost: MissionAttackTimeBoost = 15 ' seconds added to timer when successful attack. Dim KeepBonusMultiplier: KeepBonusMultiplier = True ' setting for bonus multiplier from ball to ball if True multiplier is not reset each ball Dim PowerSwordStartLevel: PowerSwordStartLevel = 50 Dim WarAnimationBallLimit: WarAnimationBallLimit = 9 ' based on BallsOnPlayfield before skelton animation switches to single image may need to be reduced depending on system 0 = no animation 1 single ball play etc. Dim MysteryMode: MysteryMode = 1 ' Mystery award has two modes 0 is Stern Orginal (as of ver 1.18) 1 is Modified which uses number of missions completed to affect scores and adds 2 extra items: "Fill PowerSword" and "Light BallSaver" Dim ExtraBallAfterMissionNum: ExtraBallAfterMissionNum = 1 ' Number how often to award an extra ball +ve 1 is every mission, 2 every second mission, -ve is that mission eg -1 is first mission only, -2 2nd mission Only, 0 is NO Extra Ball Dim UturnExtraBall: UturnExtraBall = 8 ' number of uturns to award an extra ball Dim backpeddle: backpeddle = 3 ' Black knight will callout when bashed if -ve callout always insulting, 0 completely random, +ve insulting until number of missions complete reach this backpeddle number then start backpeddling Dim specialAward: specialAward = "ball" ' what to award as a special/Replay "Credit", "Ball", "Score" dim specialScore: specialScore = 2000000 ' What score to add if special award is set to score ' Black Castle Settings ' Original was Very Diffficult and commented on in reviews and forums ' So I have added options to allow different settings. I use the Modified Mode, Shown Below, But you can set any combination. ' If you want the Original Stern Version change settings to match Stern Mode shown below. ' Stern mode: Mode = 0, MissionTime = 200, TimeBoost = 0, BallSave = True, AllowPowerSword = False ' Modified Mode: Mode = 1, MissionTime = 65, TimeBoost = 10, BallSave = False, AllowPowerSword = True Dim BlackCastleMode: BlackCastleMode = 1 ' Can be set to 0 or 1 Where 0 = if Ball drains Mode ends, 1 = Mission continues on next ball (similar to other missions) Dim BlackCastleMissionTime: BlackCastleMissionTime = 65 ' Amount of time for misssion Dim BlackCastleTimeBoost: BlackCastleTimeBoost = 10 ' same as MissionAttackTimeBoost but for only Black Castle Mode Dim BlackCastleBallSave : BlackCastleBallSave = False ' Enable ball save on outer loops hit in Black Castle Mode Dim BlackCastleAllowPowerSword: BlackCastleAllowPowerSword = True ' Powersword can be used in the black castle battle If True uses Powersword advantage: Hit lights do not go out, x2 score Dim RageMultiballTimed: RageMultiballTimed = True ' Rage Multiball if set to true is a timed multiball (90 seconds) else its not Dim ResetHighScores: ResetHighScores = True ' will run reseths on tanle init (may need restart) ' Testing adjustables not needed unless debugging Dim PMdebug: PMdebug = False ' if true turn on debug mode on LeftMagnaSave, most switches will displsy in curplayer slot Dim PMtest: PMtest = 0 ' test value used for debuging '*********************************** HERE YOU CAN ADJUST THE VOLUME ***************************************************** dim vovol: vovol = 100 ' set the volume of the voice over callouts dim vsvol: vsvol = 100 ' set the volume of the cinematic videos dim sndknightvol: sndknightvol = 100 dim sndtrkvol: sndtrkvol = vsvol Dim SongVolume: SongVolume = 1 '///////////////////////-----General Sound Options-----/////////////////////// '// VolumeDial: '// VolumeDial is the actual global volume multiplier for the mechanical sounds. '// Values smaller than 1 will decrease mechanical sounds volume. '// Recommended values should be no greater than 1. Dim VolumeDial : VolumeDial = 0.8 ' Overall Mechanical sound effect volume. Recommended values should be no greater than 1. Dim BallRollVolume : BallRollVolume = 0.5 ' Level of ball rolling volume. Value between 0 and 1 Dim RampRollVolume : RampRollVolume = 0.5 ' Level of ramp rolling volume. Value between 0 and 1 Dim StagedFlippers : StagedFlippers = 0 ' Staged Flippers. 0 = Disabled, 1 = Enabled '****** PuP Variables ****** Dim usePUP: Dim cPuPPack: Dim PUPStatus: PUPStatus=False ' dont edit this line!!! 'Dim PuPlayer : '*************************** PuP Settings for this table ******************************** usePUP = true ' enable Pinup Player functions for this table NB only set to false if you like playing using "the force" ;-) cPuPPack = "bksor" ' name of the PuP-Pack / PuPVideos folder for this table ' constants for puppack Const pTopper=0 ' mode is off Const pDMD=1 ' mode is off Const pBackglass = 2 ' mode is ForceOn Const pPlayfield = 3 ' mode is off Const pFullDMD = 5 ' mode is ForceOn Const pMusic = 4 ' mode is MusicOnly Const pCallouts = 6 ' mode is MusicOnly Const pAudio = 6 ' this is used a bit changed to callouts Const pPupUnderHUD = 11 ' mode is ForcePopBack Const pPupOverHUD = 12 ' mode is ForcePop '************************************Constants used in game ************************************************************* Const BallMass = 1 ' standard ball mass for nfozzy physics implemented Const Ballsize = 50 Const cGameName = "bksor" Const directory = "HKEY_CURRENT_USER\SOFTWARE\Visual Pinball\Controller\" ' callout settings change the path if settings are different 'Const calloutpath = "..\PinUPSystem\PUPVideos\bksor\Callouts\" 'Dim calloutData ' this is an array that holds all the callouts read from zzzCalloutList.csv see below calloutData(x)(1) = mp3 file calloutData(x)(2) = duration used for eyes NB -1 not BK 'calloutData = ReadCSVToArray(calloutpath+"zzzCalloutList.csv") ' FxTxP - VPXS: the upstream fix resolves the PuP install via two WScript.Shell RegRead calls ' against HKEY_CLASSES_ROOT. There is no registry on the cabinet, so both throw at ' global scope with no handler and abort the whole script before anything else runs. ' On this hardware the pack lives under the table folder, confirmed in the log: ' /media/usb0/external/vpx-bksor/pupvideos/bksor/ ' so derive it from the current directory instead of looking it up. Dim calloutpath, cpFSO, cpBase, cpSep Set cpFSO = CreateObject("Scripting.FileSystemObject") cpBase = cpFSO.GetAbsolutePathName(".") If InStr(cpBase, "\") > 0 Then cpSep = "\" Else cpSep = "/" If Right(cpBase, 1) = cpSep Then cpBase = Left(cpBase, Len(cpBase) - 1) calloutpath = cpBase & cpSep & "pupvideos" & cpSep & cPuPPack & cpSep & "Callouts" & cpSep Set cpFSO = Nothing Dim calloutData calloutData = ReadCSVToArray(calloutpath & "zzzCalloutList.csv") ' DOF constants will look at later Const DOFBell = 4 Const DOFChimes = 3 Const DOFContactors = 1 Const DOFDropTargets = 9 Const DOFFlippers = 7 Const DOFGear = 5 Const DOFKnocker = 2 Const DOFOff = 0 Const DOFOn = 1 Const DOFPulse = 2 Const DOFShaker = 6 Const DOFTargets = 8 ' At moment table only runs single player but multiple playyer settings kept for future development Const MaxPlayers = 1 Const numberfont = "CCDuskTillDawnRisenUpW00" Const numberfont2 = "DSEG14 Classic" '*********************** Const pBigLine=2 Const pDMDBlank=0 Const pDMDTypeFULL=2 Const pDMDTypeLCD=0 Const pDMDTypeReal=1 Const pGame=15 Const pOvervid=14 Const pScores=1 Const pTargerLetters=5 Const pThreeLines=3 Const pTwoLines=4 'Const SongVolume = 0.15 ' 1 is full volume, but I set it quite low to listen better the other sounds :) See below... Const TableName = "Sword of Rage" Const typefont = "CCDuskTillDawnRisenUpW00" Const typefont2 = "DSEG14 Classic" Const typefontbold = "CCDuskTillDawnRisenUpWBold" Const zoombgfont = "Magic School One" ' needs to be an outline of the zoomfont Const zoomfont = "Magic School One" 'dmdType gibase = 60 'brightness of your gis '*************************************************************** '******************* Define Variable ************************** '*************************************************************** ' Original variables "tidied up a bit" NB there are still parts that are unused/not needed but kept for possible future modifications. eg last chance, and light runs Dim BallsOnPlayfield : BallsOnPlayfield = 0 ' how many active balls are on playfield NB locked balls are seperate Dim NewBall : NewBall = False ' newball set to true every new ball to trigger ball saver Dim bBallSaverActive ' ballsaver if true will save ball Dim a,b,c,d ' general calculation variables Dim f,g,h Dim AddChestJackpot, AddScoreChestJackpot Dim AddscoreCatapult, AddscoreCatapultBonus, AddscoreCatapultBonusAfterMulti, AddscoreCatapultTotal(4), AddscoreCatapultTotalEndGame(4) Dim AddScoreLoopBonus Dim AddScoreSuperLanes, AddScoreSuperOrbits, AddScoreSuperPops, AddScoreSuperSlings, AddScoreSuperSpinner, AddScoreSuperTargets Dim AddScoreTripleKnightChallenge, AddScoreTripleKnightChallengeGoldRoom, AddScoreTripleKnightChallengeKnightHited, AddScoreTripleKnightChallengeTotal(4), AddScoreTripleKnightChallengeTotalEndGame(4) Dim AddScoreWarHurryUp, AddScoreWarHurryUpTotal(4), AddScoreWarHurryUpTotalEndGame(4) Dim AddTimeForMission(4) ' used as the timer for missions Dim animation_start_and_finish_flag ' Light animations set t0 1 or 0 ' light runs? Dim arcbld:arcbld=1 ' light options Dim arcblu:arcblu=2 Dim arcbrd:arcbrd=3 Dim arcbru:arcbru=4 Dim arctld:arctld=5 Dim arctlu:arctlu=6 Dim arctrd:arctrd=7 Dim arctru:arctru=8 Dim audioknight Dim audionoise Dim AutoFireTime:AutoFireTime=0 ' Used for the autofire routine Dim B2SController, B2SOn, B2SOnALT Dim Ball:Ball=0 Dim BallInCatapult(4) Dim BallInLocker Dim BallInPlay Dim BallKeptInLocker Dim BallSaveAvailable(4) Dim BallsInLock Dim BallsRemaining(4) Dim BaseBonus Dim bAttractMode Dim bBallSaverActiveL13 Dim bBallSaverReady Dim BeginCurrentMissionFlag Dim bGameInPlay Dim BlackKnightRetro(4) Dim bMultiBallMode ' only if is in light runs. Dim bOnTheFirstBall ' will be used for adding players ie must be true to add player dim Bonus Dim BonusHeld(4) Dim BonusMultiplier(4) Dim BonusPoints(4) Dim BouleAngle Dim BouleHited' Used when the shield is opened for start a mission - normal state the "boule" is lock. If the ball is hit the "boule" turn for reject the ball if the boule is hit a second time ???? Dim BurningSands(4) Dim BurningSandsCount, BurningSandsHit, BurningSandsLightMovementNumber Dim BypassVideo Dim canstart:canstart=0 Dim Catapult_jackpot_collected, Catapult_Mode_Total_score(4), Catapult_Super_Jackpot_Multi, CatapultModeFlag dim catapult_lock_is_lit(4) Dim cineon:cineon = 0 Dim circlein:circlein=9 Dim circleout:circleout=10 Dim clockleft:clockleft=11 Dim clockright:clockright=12 Dim ColorRoundLight Dim Combos Dim CommentDisplayed Dim compteuri Dim Controller Dim CounOrbitsFlag dim Count Dim CountSW45used(4) 'after the ball go to SW45 4x --> The SW41 wakeup Dim Credits Dim curLine1Color: curLine1Color=pLine1Color 'can change later Dim curLine2Color: curLine2Color=pLine2Color 'can change later Dim curLine3Color: curLine3Color=pLine3Color 'can change later Dim currentcombo(4) Dim CurrentMissionFlag(4) 'If the ball is drained the CurrentMissionFlag=0 for the next player see : Sub EndOfBallComplete() Dim CurrentPlayer Dim currentqueue Dim curScore Dim DeepFreeze(4) Dim DeepFreezeMissionHitStart(4), DeepFreezeTargetRedHit Dim DelayVideoAttract Dim diagdl:diagdl=13 Dim diagdr:diagdr=14 Dim diagul:diagul=15 Dim diagur:diagur=16 Dim dmdnote:dmdnote="2-shortnote.mp4" Dim dmdver : dmdver = PuPDMDDriverType if dmdver = 2 Then Else dmdver = 1 end if Dim DOFeffects(9) Dim EnableBallControl: EnableBallControl = false 'Change to true to enable manual ball control (or press C in-game) via the arrow keys and B (boost movement) keys Dim ExtraBallsAwards(4) Dim ExtraBallsIsLit ' light runs? Dim fanld:fanld=18 Dim fanlu:fanlu=19 Dim fanrd:fanrd=20 Dim fanru:fanru=21 Dim FEffect:FEffect = 0 Dim FEStep:FEStep = 0 Dim FlashState(100), FadingLevel(100), FlashSpeedUp(100), FlashSpeedDown(100), FlashMin(100), FlashMax(100), FlashLevel(100), FlashRepeat(100) Dim Gamerover_flag:Gamerover_flag = True 'Stop music after end the endmusic Dim bStartPending : bStartPending = False ' FxTxP - VPXS: start pressed before the table settled Dim StartPendingTicks: StartPendingTicks = 0 ' RollingTimer ticks since that press Dim gibase Dim gistatus:gistatus = 0 Dim HasPup:HasPuP = True ' light runs? Dim hatch1h:hatch1h=22 Dim hatch1v:hatch1v=23 Dim hatch2h:hatch2h=24 Dim hatch2v:hatch2v=25 Dim HideOverlay Dim HighScore(5) Dim HighScoreBlackCastleChampionName, HighScoreBlackCastleChampion Dim HighScoreBonusChampionName, HighScoreBonusChampion Dim HighScoreBurningSandsChampionName, HighScoreBurningSandsChampion Dim HighScoreCatapultMBChampionName, HighScoreCatapultMBChampion Dim HighScoreComboChampionName, HighScoreComboChampion Dim HighScoreDeepFreezeChampionName, HighScoreDeepFreezeChampion Dim HighScoreKnightChampionName, HighScoreKnightChampion Dim HighScoreLoopChampionName, HighScoreLoopChampion Dim HighScoreMoltenFireChampionName, HighScoreMoltenFireChampion Dim HighScoreMudBogChampionName, HighScoreMudBogChampion Dim HighScoreName(5) Dim HighScoreSuperChampionName, HighScoreSuperChampion Dim HighScoreTripleKnightsMBChampionName, HighScoreTripleKnightsMBChampion Dim HighScoreWarChampionName, HighScoreWarChampion Dim HighScoreWickedCavernChampionName, HighScoreWickedCavernChampion Dim hs4,hs3,hs2,hs1,hs0,hsn4,hsn3,hsn2,hsn1,hsn0 Dim hsbModeActive:hsbModeActive = False Dim hschecker:hschecker = 0 Dim hsCurrentDigit Dim hsCurrentLetter Dim hsdigit:hsdigit = 1 Dim hsEnteredDigits(3) Dim hsEnteredName Dim hsletter:hsletter = 1 Dim hsLetterFlash Dim hsValidLetters Dim introposition Dim introtime:introtime = 0 Dim ishield 'used to count the number of move of the shield (normaly 4 at the start ) Dim Knight_challenge(4) Dim Knight_challenge_flag 'Knight challenge Active or Not Dim knight_challenge_jackpot, Knight_challenge_phase, KnightRemaining Dim knightchallenge Dim KnightLamp(4) ' knight letters on playfield Dim L106color(4), L106State(4) Dim L29State, L35State, L41State, L47State, L53State, L59State, L66color(4), L66State(4), L75color(4), L75State(4), L79color(4), L79State(4), L85color(4), L85State(4), L91color(4), L91State(4), L98color(4), L98State(4) Dim LastChanceBallToLock, LastChanceButtonPush(4), LastChanceCatapultMode, LastChanceCatapultMulti, LastChanceChronoStart(4), LastChanceClearTable, LastChanceDrainUncompleted, LastChanceFlag, LastChanceStart, LastChanceSuccess Dim lastvocall:lastvocall="" Dim ldown:ldown = 0 Dim LeftGateTWcount ' check this its only when it hits 3 does it light a knight letter and it doesn't reset Dim Lightcounter Dim Lightcounter2 dim lightstateflag Dim LightType(12), LightObjectColor(12) Dim Loops Dim MagnaSaveFlag(4) Dim MatchRandom Dim MessageCredits ' light runs? Dim middleih:middleih=27 Dim middleiv:middleiv=28 Dim middleoh:middleoh=29 Dim middleov:middleov=30 Dim Mission Dim MissionRandom Dim mMagnetSave Dim MoltenFire(4) Dim MudBog(4) Dim MysteryFlag Dim NewRecord Dim noskipper:noskipper=0 ' not sure on this needs checking Dim notenow:notenow = dmdnote dim notinus : notinus = 1 ' was 0 set this if you're not from the USA and it'll make sure your backglass numbers have commas Dim NumberOfHitForStartMission(4) Dim NumberOfMissioncomplete(4) Dim objShell Dim OldGiState: OldGiState = -1 'start witht the Gi off Dim OrbitFlag DIM pAttractBetween: pAttractBetween=2000 '1 second between calls to next attract page DIM pAttractReset:pAttractReset=-1 DIM pCurAttractPos: pCurAttractPos=0 Dim pDMDCurPage: pDMDCurPage= 0 'default page is empty. Dim pDMDCurPriority: pDMDCurPriority =-1 Dim pDMDDefVolume: pDMDDefVolume = 0 'default no audio on pDMD Dim pDMDlastchk: pDMDLastchk= -1 'performance of updates DIM pDMDVideoPlaying: pDMDVideoPlaying=false Dim pGameName : pGameName=cGameName 'pupvideos foldername, set to cGameName Dim pInAttract : pInAttract=false 'pAttract mode Dim PlayerCheckCurrent Dim PlayersPlayingGame Dim PleaseWait:PleaseWait=True 'launch puppack completely before to play Dim pLine1 Dim pLine1Ani Dim pLine1Color : pLine1Color=8454143 Dim pLine2 Dim pLine2Ani Dim pLine2Color : pLine2Color=8454143 Dim pLine3 Dim pLine3Ani Dim pLine3Color : pLine3Color=8454143 Dim pNumLines Dim PopupMessage Dim PriorityReset:PriorityReset=-1 dim PuPDMDDriverType: PuPDMDDriverType=2 ' 0=LCD DMD, 1=RealDMD 2=FULLDMD (large/High LCD) Dim PUPDMDObject 'for realtime mirroring. Dim PuPlayer ' light run? Dim radarl:radarl=31 Dim radarr:radarr=32 Dim RageCount ' used to count how many times we have lit Rage possible extension in future to increase how many times rage is hit before mystery Dim RampActivForValidateMission(4) Dim RampChangeStatus(4), RampLightsBlinkInterval, RampLightsMove(4), RampLightsState Dim RandomL01(4), RandomL02(4), RandomL03(4), randomLeft ' used by Wicked cavern moving the lights Dim RandomMysterySelect,RandomMysterySelect1, RandomMysterySelect2, RandomMysterySelect3, RandomMysterySelect4 Dim RandomR01(4), RandomR02(4), RandomR03(4), randomRight ' used by Wicked cavern moving the lights Dim rdown:rdown = 0 Dim RedColorOnly Dim RemainingHit(4) ' used as counter for how many hits to start mission Dim ReplayPlayer(4) Dim RequestANewBall ' flag in catapult multiball Dim reverseLightcounter Dim reverseLightcounter2 Dim RGBStep, RGBFactor, rRed, rGreen, rBlue, RainbowLights Dim RGBStep2, RGBFactor2, rRed2, rGreen2, rBlue2, RainbowLights2 Dim RStep, Lstep ' slingshot animation Dim Score(4) Dim ScoreBlackCastleChampion(4) Dim ScoreBonusChampion(4) Dim ScoreBurningSandsChampion(4) Dim ScoreCatapultMBChampion(4) Dim ScoreCent(4), ScorePercent(4), ScoreSternupdated Dim ScoreComboChampion(4) Dim ScoreDeepFreezeChampion(4) Dim ScoreKnightChampion(4) Dim ScoreLoopChampion(4) Dim ScoreMoltenFireChampion(4) Dim ScoreMudBogChampion(4) Dim ScoreSuperChampion(4) Dim ScoreToAdd Dim ScoreTripleKnightsMBChampion(4) Dim ScoreWarChampion(4) Dim ScoreWickedCavernChampion(4) ' lighth runs? Dim screwl:screwl=35 Dim screwr:screwr=36 Dim seq_animation_array Dim SeqAnimation, SequenceAnimation Dim Shield_lock Dim Shield_New_Status 'used to command the shield (lock or unlock) Dim ShieldIsReadyToActivateMission(4) Dim ShieldNumberOfMove 'used for the begining Dim ShieldRemainsLock dim shotskillflag Dim skillshotlive:skillshotlive = 0 Dim SkillshotValue Dim skipped:skipped = 0 Dim SpeakTime Dim StartMission Dim StopBouleAngle Dim StopBouleFlag ' light runs? Dim stripe1h:stripe1h=37 Dim stripe1v:stripe1v=38 Dim stripe2h:stripe2h=39 Dim stripe2v:stripe2v=40 Dim subtitle Dim SuperFeatures, SuperIsLit Dim SW41_Flag 'L66 (SW41 + SW45) -> Left spinner lane Dim SW41Dropped Dim SW48_Flag 'L75 -> Left orbit Dim SW51_Flag 'L79 -> Left ramp Dim SW56_Flag 'L85 -> The Black Knight Dim SW58_Flag 'L91 (SW58 + SW60) -> Shield and rear of shield(saucer) Dim SW59_Flag 'L98 -> Light Lock target Dim SW60Timer Dim SW60videoDelay Dim SW64_Flag 'L106 -> Right orbit Dim SW79_Flag Dim SWNoHit Dim TableWidth, TableHeight Dim Tilt Dim Tilted Dim TiltSensitivity Dim tilttime:tilttime = 0 Dim TimerBeforeBonusScore Dim title Dim titlepos Dim tmpCatapultMBChampion, tmpMoltenFireChampion, tmpDeepFreezeChampion, tmpMudBogChampion, tmpWickedCavernChampion, tmpBurningSandsChampion, tmpSuperChampion Dim tmpComboChampion, tmpKnightChampion, tmpBlackCastleChampion, tmpLoopChampion, tmpWarChampion, tmpBonusChampion, tmpTripleKnightsMBChampion Dim tmpScore Dim TopBallLoop, TotalBonus Dim TotalGamesPlayed ' light runs Dim udown:udown=17 Dim uleft:uleft=26 Dim uright:uright=34 Dim uup:uup=41 Dim wiperl:wiperl=42 Dim wiperr:wiperr=43 dim useDMDVideos : useDMDVideos=true ' true or false to use DMD splash videos. dim usePuPDMD : usePuPDMD=true ' set to false to not use PuPDMD for a DMD (different that BG scoring) dim useRealDMDScale : useRealDMDScale=0 ' 0 or 1 for RealDMD scaling. Choose which one you prefer. Dim Uturn Dim WarHurryFlag, WarHurryPhase Dim WarHurryUp51Touch:Dim WarHurryUp56Touch:Dim WarHurryUp58Touch Dim WickedCavern(4) titlepos = 0 titletimer.enabled = 0 title = "" subtitle = "" ' *************************** Meakin Setting new variables Dim PMVideoQueueID(9) ' queue upto 9 videos to play well Over parallel array with times Dim PMVideoQueueTimes(9) ' time to wait for interval Dim vcount ' sets counter for video Dim vModeBG ' when mission/mode is started needs triggre for BG loop Dim vModeIntro ' trigger number ofr the intro to be played Dim vModeIntroTime ' time for intro to play also used to reset bgmusic when a mode is started Dim triggerVal ' which trigger to Call Dim musicVal ' which music to play in background Dim NewBallDelayTime ' when ball drains this is a time based on tilt/bomus/extra ball before new ball is launched Dim ballNumDisplay ' used to display ball number Dim RetroMode ' inicates the retro mode 0 none, 1 first, 3 second, -1 end the retromode Dim MultiballAmount ' How many balls are in the multiball used by multiball kicker to keep that number on the playfield Dim DisplayingEOBBonus ' flag used to stop other totals showing when End Of Ball bonus is playing ' Missions Variables Dim BlackCastle(4) Dim HitsToActivateMission(4) ' how many hits of three way to start mission arrayed for each player Dim MudBogHeadsNeeded(4) ' How many Hydra heads need sealing for battle to be won Dim MoltenFireShotsNeeded(4) ' How many Magna Beast shots needed for battle to be won Dim WickedCavernShotsNeeded(4) ' How many Hell Hand shots needed for battle to be won Dim BurningSandsSetsNeeded(4) ' How many Sandworm Sets completed needed for battle to be won Dim DeepFreezeLordsNeeded(4) ' How many Lych lords completed needed for battle to be won Dim BlackCastleRoundsNeeded(4) ' How many times to defeat the BK in black castle For battle to be wo Dim AddScoreMudBog ' calculation for adding scores in Hydra missions Dim AddScoreMudBogTotal(4) ' Total used for champion high score comparison Dim AddScoreMoltenFire ' calculation for adding scores in Magna Beast missions Dim AddScoreMoltenFireTotal(4) ' Total used for champion high score comparison Dim AddScoreSandWorm ' calculation for adding scores in SandWorm/burning sands missions Dim AddScoreSandWormTotal(4) ' Total used for champion high score comparison Dim AddScoreWickedCavern ' calculation for adding scores in Hand Holder missions Dim AddScoreWickedCavernTotal(4) ' Total used for champion high score comparison Dim AddScoreDeepFreeze ' calculation for adding scores in Lych missions Dim AddScoreDeepFreezeTotal(4) ' Total used for champion high score comparison Dim AddScoreBlackCastle ' calculation for adding scores in Black Castle missions Dim AddScoreBlackCastleTotal(4) ' Total used for champion high score comparison Dim MudBogHeadsCounter(4) Dim MoltenFireShots(4) Dim BurningSandsSetsCounter(4) Dim WickedCavernShots(4) Dim DeepFreezeLordsCounter(4) Dim WickedCavernCheckCountRandomLeft(4) Dim WickedCavernCheckCountRandomRight(4) Dim WickedCavernLeftOrRight Dim WickedCavernLeftOrRightOld ' Black Castle is special as its an either win or lose so isn't an array Dim BlackCastleRoundCounter ' main counter of rounds defeating the Black Castle Dim BlackCastleMissionHitStart ' flag to show Mode has started used in lights Dim BlackCastleHitCounter ' used in Black castle battle to count the three centre targets hit (Powersword keeps the three targets lit so can be reused) so count the hits Dim BC41Hit ' used for outer loops as in normal mode they have to each be hit so lights go out (powersord keeps lit so allows 4 of the same) Dim BC48Hit Dim BC59Hit Dim BC64Hit Dim RageMultiball ' used to inicate if Rage Multiball is Active Dim RageMultiballJackPot ' used as a jackpot accumulator for Bash Target ' powersword Variables Dim PowerSwordLevel(4) ' Amount powersword is charged 0 to 100 Dim PowerSwordActivated ' if used in battle True/False Dim PowerSwordMultipler ' if activated is set to 2 for score else set to 1 Dim PowerSwordFrame ' used for animating powersword ' War and Pops variables Dim AnimationFrame ' used to animate the skeltons Dim WarStartTime ' used to count time left Dim Pop1Hits(4) ' counts the number of hits the pops have by player Dim Pop2Hits(4) Dim Pop3Hits(4) Dim Pop1Val ' Used in WAr Hurryup determines the value based on Pop1DropRate Dim Pop2val Dim Pop3Val Dim PopTotal ' Used as phase 2 of War hurry up it is the total of Pop1+2+3Val and drops til end of mode Dim Pop1DropRate ' speed numbers go down for War hurry up Dim Pop2DropRate Dim Pop3DropRate Dim WarCounter ' used to workout how much time left for Phase 2 Dim PopTotalDropRate ' phase 2 drop rate Dim Skel1Ded ' flag for skelton animations to trigger from idle Dim Skel2Ded Dim Skel3Ded ' super mode variables Dim SuperTargetsLevel ' super modes the level they are at for scoring and display 0 none, 1 to 4 levels Dim SuperSlingsLevel Dim SuperLanesLevel Dim SuperPopsLevel Dim SuperOrbitsLevel Dim SuperSpinnerLevel Dim SuperCollect ' flag set to true when MagnaSave is pressed for 5 seconds to collect the Chest value ' Misc variables Dim tempFlag ' temporary flag used in routines Dim tempNum ' temporary number used in routines mostly random number routines Dim ShootAgain ' flag used to show shoot again pupevent on endofballcomplete Dim lastPlayer ' Notes which was the last player so if different from current, reset music Dim FlailResetFlipFlop ' Used by FlailReset_Timer when flail is spinning Black Castle, Rage Multiball etc this resets evry 15 seconds to free trapped balls Dim BIPL ' used at the plunger for sound only Dim DelayedCalloutID ' callout needed after delay used by sub DelayedCallout Dim OldScore ' used by ball checker timer evry 30 seconds if score hasnt changed then spin flail, open shield, check number of balls and launch if necessary ' *************************** Meakin initialise variables PMVideoTimer.Enabled = False ' turn off video timer used for stacking video AnimationFrame = 0 LastPlayer = 0 FlailResetFlipFlop = 0 PowerSwordFrame = 1 SuperCollect = False SuperTargetsLevel = 0 SuperSlingsLevel = 0 SuperLanesLevel = 0 SuperPopsLevel = 0 SuperOrbitsLevel = 0 SuperSpinnerLevel = 0 BIPL = 0 tablewidth = Table1.width tableheight = Table1.height LastChanceCatapultMulti = 1 Dim red, orange, amber, yellow, darkgreen, green, blue, darkblue, purple, white, base red = 10 orange = 9 amber = 8 yellow = 7 darkgreen = 6 green = 5 blue = 4 darkblue = 3 purple = 2 white = 1 base = 11 '******************************************************************************************************************************************* '******************************************************************************************************************************************* '******************************************************************************************************************************************* LoadCoreFiles Sub LoadCoreFiles On Error Resume Next ExecuteGlobal GetTextFile("core.vbs") If Err Then MsgBox "Can't open core.vbs" On Error Goto 0 End Sub Sub table1_Exit Controller.stop Savehs ' If UseFlexDMD Then FlexDMD.Run = False If B2SOn = true Then Controller.Stop End Sub '******************** ' Light Def '******************** Dim OldState_L101(4) Dim OldState_L106(4) Dim OldState_L103(4) Dim OldState_L11(4) Dim OldState_L110(4) Dim OldState_L111(4) Dim OldState_L112(4) Dim OldState_L115(4) Dim OldState_L116(4) Dim OldState_L117(4) Dim OldState_L12(4) Dim OldState_L13(4) Dim OldState_L131(4) Dim OldState_L132(4) Dim OldState_L133(4) Dim OldState_L14(4) Dim OldState_L15(4) Dim OldState_L16(4) Dim OldState_L163(4) Dim OldState_L165(4) Dim OldState_L166(4) Dim OldState_L170(4) Dim OldState_L171(4) Dim OldState_L172(4) Dim OldState_L18(4) Dim OldState_L19(4) Dim OldState_L20(4) Dim OldState_L21(4) Dim OldState_L22(4) Dim OldState_L23(4) Dim OldState_L24(4) Dim OldState_L26(4) Dim OldState_L29(4) Dim OldState_L32(4) Dim OldState_L35(4) Dim OldState_L38(4) Dim OldState_L41(4) Dim OldState_L44(4) Dim OldState_L47(4) Dim OldState_L48(4) Dim OldState_L49(4) Dim OldState_L50(4) Dim OldState_L53(4) Dim OldState_L56(4) Dim OldState_L59(4) Dim OldState_L63(4) Dim OldState_L64(4) Dim OldState_L66(4) Dim OldState_L69(4) Dim OldState_L70(4) Dim OldState_L75(4) Dim OldState_L72(4) Dim OldState_L79(4) Dim OldState_L82(4) Dim OldState_L83(4) Dim OldState_L85(4) Dim OldState_L88(4) Dim OldState_L89(4) Dim OldState_L91(4) Dim OldState_L94(4) Dim OldState_L95(4) Dim OldState_L96(4) Dim OldState_L98(4) Dim OldState_Light026(4) Dim OldState_Light054(4) Dim OldState_Light055(4) Dim OldState_Light056(4) Dim OldState_Light057(4) Dim OldState_Light058(4) Dim OldState_Light059(4) Dim OldState_Light060(4) Dim OldState_Light061(4) Dim OldState_Light062(4) Dim OldState_Light063(4) '************************************************************************************* '****************************** Special Routines PM ********************************** '************************************************************************************* ' Function to read CSV file into a 2D array Function ReadCSVToArray(filePath) Dim fso, file, line, rows(), rowCount, cols, i Set fso = CreateObject("Scripting.FileSystemObject") ' Check if file exists If Not fso.FileExists(filePath) Then ' FxTxP - VPXS: return an empty array rather than Empty. Callers index calloutData(), ' and indexing Empty raises a runtime error that would abort the caller. ReadCSVToArray = Array() Exit Function End If Set file = fso.OpenTextFile(filePath, 1) ' 1 = ForReading rowCount = 0 Do Until file.AtEndOfStream line = Trim(file.ReadLine) ' Skip empty lines If line <> "" Then cols = Split(line, ",") ' Split by comma ReDim Preserve rows(rowCount) rows(rowCount) = cols rowCount = rowCount + 1 End If Loop file.Close Set file = Nothing Set fso = Nothing ReadCSVToArray = rows End Function ' routine to call and for testing sub PMCheck () PMDebugTimer.interval = 100 PMDebugTimer.Enabled end sub sub PMDebugTimer_timer() ' timer used for testing ' if PMTest<39 then PMTest = 39 ' PuPlayer.LabelSet pFullDMD,"curplayer","BIP: " & BallsOnPlayfield,1,"{'mt':2}" ' PMtest = PMtest+1 ' ' PuPlayer.LabelSet pFullDMD,"Skel1","skelet01idle\\0"&PMtest&".png",1,"{'mt':2,'color':255, 'width': 30, 'height': 75, 'xpos': 10, 'xalign': 0, 'ypos': 30, 'yalign': 0}" ' if PMtest = 56 then PMtest = 39 end sub ' new routine to reset after a mode showing a total to go back to norml sub ResetBackToNormal_Timer() ResetBackToNormal.Enabled = False VideoSetBackgroundPM 'MusicResetPM End Sub ' new routine for reseting background music NB not called every set background so stops the repeated track starting over again Sub MusicResetPM If CurrentMissionFlag(CurrentPlayer) = 1 Then If MudBog(CurrentPlayer) = 2 Then musicVal = 401 ' hydra idle end If If MoltenFire(CurrentPlayer) = 2 Then musicVal = 402 ' fire elemental idle end If If BurningSands(CurrentPlayer) = 2 Then musicVal = 403 ' sandworm idle end If If WickedCavern(CurrentPlayer) = 2 Then musicVal = 404 ' hand holder idle end If If DeepFreeze(CurrentPlayer) = 2 Then musicVal = 405 ' ice lich idle end If If BlackCastle(CurrentPlayer) = 2 Then musicVal = 406 ' blck knight Castle idle end If Else If Knight_challenge_flag = True Then musicVal = 400 ' basic theme for now Else musicVal = 400 ' Standard playfield "the black night" End if End If ' call the bgMusic pupevent musicVal End Sub 'Meakin new routine for setting background ignoring DOF sub VideoSetBackgroundPM ' set default background triggerVal = 100 ' Playfield 'musicVal = 400 WarHideHurryUp ' determine which background to Set If CurrentMissionFlag(CurrentPlayer) = 1 Then If MudBog(CurrentPlayer) = 2 Then triggerVal = 147 ' hydra idle end If If MoltenFire(CurrentPlayer) = 2 Then triggerVal = 133 ' fire elemental idle end If If BurningSands(CurrentPlayer) = 2 Then triggerVal = 194 ' sandworm idle end If If WickedCavern(CurrentPlayer) = 2 Then triggerVal = 140 ' hand holder idle end If If DeepFreeze(CurrentPlayer) = 2 Then triggerVal = 180 ' ice lich idle end If If BlackCastle(CurrentPlayer) = 2 Then triggerVal = 109 ' black knight Castle idle end If If BlackCastle(CurrentPlayer) = 4 Then triggerVal = 215 ' black knight Castle pre multiball end If Else If Knight_challenge_flag = True Then triggerVal = 159 ' TKC 3 knights remaining Elseif CatapultModeFlag = True Then triggerVal = 118 Elseif RetroMode = 1 Then triggerVal = 107 Elseif RetroMode = 3 Then triggerVal = 105 Elseif RageMultiball = True Then triggerVal = 214 Elseif WarHurryFlag = True Then triggerVal = 205 WarShowHurryup Else triggerVal = 100 ' Normal Playfield End if End If ' call the bgloop pupevent triggerVal end Sub ' ********************************************************************************************************** ' ************ Callout Routines run using these instaed of pupevent see notes **************************** ' ********************************************************************************************************** sub Callout(IDreq) playmedia calloutData(IDreq)(1),"Callouts",pCallouts,"",0,"",1,3 ' if array calloutData(IDreq)(2) (duration) shows >0 then its a Black knight speaking callout and toy needs lights if calloutData(IDreq)(2) >= 0 Then if calloutData(IDreq)(2) = 0 Then SpeakTime = 500 Else SpeakTime = calloutData(IDreq)(2)*1000 End If LightEyesBK end If End sub 'special added to delayed callout that if id is -99 then it play video extraball is lit sub DelayedCallout_timer() DelayedCallout.Enabled = False if DelayedCalloutID = -99 Then VideoExtraBallIsLit Else Callout DelayedCalloutID End If end sub sub DelayCallout(TimeReq,IDreq) DelayedCalloutID = IDreq DelayedCallout.interval = TimeReq * 1000 DelayedCallout.Enabled = True end sub sub ImWaiting_timer() 'waiting for mission to start if other mode hit don't shout anything If WarHurryFlag = False And Knight_challenge_flag = False And CatapultModeFlag = False And Gamerover_flag = False Then if ExtraBallsIsLit = True Then Select Case RndInt(1,3) Case 1 : Callout 414 Case 2 : Callout 417 Case 3 : Callout RndInt(331,343) End Select Else Callout RndInt(331,343) End If End If ImWaiting.Enabled = True End sub ' ' ********************************************************************************************************** ' ************ Free ball if trapped routine **************************** ' ********************************************************************************************************** ' this subroutine called every 30 seconds if no score change then go through routines to free ball(s) Sub BallChecker_timer() if oldScore = Score(CurrentPlayer) Then FlailReset.interval = 1000 FlailReset.Enabled = True ShieldRemainsLock = False Shield_New_Status = "Unlock" ShieldTimer.interval = 1000 ShieldTimer.enabled = True ' double check there is a ball possible if multiball ended quickly ball was missed if ((UBound(GetBalls()) + 1) - BallInLocker) = 0 Then AutoFireTimer.Enabled=true 'Send new ball because no balls found BallsOnPlayfield = 1 ' force balls on playfield back to 1 ' spin the flail to 90 to open up ramp StopBouleAngle = 90 StopRotating.Enabled=True FlailReset.enabled = False End if End If oldscore = score(CurrentPlayer) End Sub '********************************************************************************************************************************** '************************************************************************************* '************************************DOF section************************************** '************************************************************************************* Sub video_init() BypassVideo = False PleaseWait = False 'DOF 1, DOFPulse ' HideOverlay = True ' DOF 499, DOFPulse ''' SetBackGroundGeneral ' puPlayer.LabelSet pFullDMD,"CommentDisplayed","Mudbog Total",1,"" '' puPlayer.LabelSet pFullDMD,"CommentDisplayed2","Mudbog Total",1,"" ' puPlayer.LabelSet pFullDMD,"AddScoreDisplayed","1,000,000",1,"" ' puPlayer.LabelSet pFullDMD,"AddScoreDisplayed2","1,000,000",1,"" '' pSplashScore "Mudbog Total",4.1,255 ' pSplashScore "Mudbog Total",4,40 ' pSplashCommentDisplayed "7777777777777",10,255 ' pSplashCommentDisplayed2 "7777777777777",10,40 ' pSplashAddScoreDisplayed "88888888888888",10,255 ' pSplashAddScoreDisplayed2 "88888888888888",10,40 ' puPlayer.LabelSet pFullDMD,"LastChanceTime","30 ",1,"" End Sub Sub video_init2() BypassVideo = False PleaseWait = False 'DOF 1, DOFPulse HideOverlay = True End Sub Sub AttractMode_Timer() BypassVideo = False AttractMode.Enabled = False pAttractNextBackglass End Sub Sub pAttractNextBackglass BypassVideo = False pCurAttractPos=pCurAttractPos+1 'If bAttractMode = True Then ' Select Case pCurAttractPos ' Case 1 PuPlayer.playlistplayex pFullDMD,"Attract loop","ATTRACT_LOOP1.mp4",0,1: AttractMode.Enabled = True : AttractMode.interval=17000 ' Case 2 PuPlayer.playlistplayex pFullDMD,"Attract loop","ATTRACT_LOOP2.mp4",0,1: AttractMode.Enabled = True : AttractMode.interval=17000 ' Case 3 PuPlayer.playlistplayex pFullDMD,"Attract loop","ATTRACT_LOOP3.mp4",0,1: AttractMode.Enabled = True : AttractMode.interval=17000 ' Case 4 PuPlayer.playlistplayex pFullDMD,"Tutorial Premium","Black Knight Premium - Catapult Multiball.mp4",0,1: AttractMode.Enabled = True : AttractMode.interval=36000 ' Case 5 PuPlayer.playlistplayex pFullDMD,"Tutorial Premium","Black Knight Premium - Lightning Wheel Modes.mp4",0,1: AttractMode.Enabled = True : AttractMode.interval=47000 ' Case 6 PuPlayer.playlistplayex pFullDMD,"Tutorial Premium","Black Knight Premium - Triple Knights Challenge Multiball.mp4",0,1: AttractMode.Enabled = True : AttractMode.interval=44000 ' Case 7 PuPlayer.playlistplayex pFullDMD,"Tutorial Premium","Black Knight Premium - Triple Knights Challenge Multiball.mp4",0,1: AttractMode.Enabled = True : AttractMode.interval=56000 ' Case Else ' pCurAttractPos=0 ' pAttractNextBackglass 'reset to beginning ' end Select 'Else ' AttractMode.Enabled = False 'End If End Sub ' ********************************************************************************************************** ' ************ Video Routines these play the videos in backglass **************************** ' ********************************************************************************************************** Sub video_fire_animation() BypassVideo = False 'EndOfVideo.Interval=6000 'EndOfVideo.Enabled=True If WarHurryFlag = False Then WarHideHurryUp pupevent 130 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If Else WarHideHurryUp pupevent 131 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End If End Sub Sub Videos_Ball_Saved() 'PuP - Ball Saved BypassVideo = False WarHideHurryUp pupevent 103 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End Sub Sub Video_FireAnimation2 If OrbitFlag = True Then 'EndOfVideo.Interval=5000 WarHideHurryUp pupevent 131 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If 'playmedia "BK Fire integrated 01.mp4","Fire Animation2",pFullDMD,"cineon",5000,"",1,5 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) Else 'EndOfVideo.Interval=9500 WarHideHurryUp pupevent 132 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If 'playmedia "BK Fire integrated 02.mp4","Fire Animation2",pFullDMD,"cineon",9500,"",1,5 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) End If 'play sound "watch it all burn here Callout 503 'playmedia "Sound-0x0802.mp3","Audio Monster 1",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) End Sub Sub video_catapult_lock_is_lit() BypassVideo = True 'HideOverlay = True 'VideoHideOverlay 'EndOfVideo.Interval=3000 'EndOfVideo.Enabled=True ' playmedia "BlackKnight_CatapultMultiball_LockIsLit.mp4","catapult ball is lit",pFullDMD,"cineon",3000,"",1,5 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 111 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End Sub Sub VideocatapultBall1lock BypassVideo = True 'HideOverlay = True 'VideoHideOverlay 'EndOfVideo.Interval=3000 'EndOfVideo.Enabled=True 'playmedia "BlackKnight_CatapultMultiball_Ball_1_Lock.mp4","Catapult lock",pFullDMD,"cineon",2500,"",1,6 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 112 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End Sub Sub VideocatapultBall2lock BypassVideo = True 'HideOverlay = True 'VideoHideOverlay 'EndOfVideo.Interval=3000 'EndOfVideo.Enabled=True 'playmedia "BlackKnight_CatapultMultiball_Ball_2_Lock.mp4","Catapult lock",pFullDMD,"cineon",2500,"",1,6 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 113 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End Sub Sub VideocatapultBall3lock BypassVideo = True 'HideOverlay = True 'VideoHideOverlay ' EndOfVideo.Interval=5100 ' EndOfVideo.Enabled=True 'playmedia "BlackKnight_CatapultMultiball_Ball_3_Lock_ModeStart.mp4","Catapult lock",pFullDMD,"cineon",6500,"",1,6 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 114 DelayCallout 2,358 If WarHurryFlag = True Then WarDelayShow.Interval = 5000 ' 5 second delay WarDelayShow.enabled = True End If VideoCatapultLoopSetBackground.Interval=6500 VideoCatapultLoopSetBackground.Enabled = True L131.state=0 L132.state=0 L133.state=0 'meakin special ballsonplayfield reduced by one as kicker adds a Ball BallsOnPlayfield = BallsOnPlayfield - 1 End Sub Sub VideoSupercatapultBall1lock BypassVideo = False 'HideOverlay = True 'VideoHideOverlay EndOfVideo.Interval=3000 'EndOfVideo.Enabled=True 'playmedia "BlackKnight_SuperCatapultMultiball_Ball_1_Lock.mp4","Catapult lock",pFullDMD,"cineon",2500,"",1,6 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 115 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End Sub Sub VideoSupercatapultBall2lock BypassVideo = False 'HideOverlay = True 'VideoHideOverlay 'EndOfVideo.Interval=3000 'EndOfVideo.Enabled=True 'playmedia "BlackKnight_SuperCatapultMultiball_Ball_2_Lock.mp4","Catapult lock",pFullDMD,"cineon",2500,"",1,6 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 116 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End Sub Sub VideoSupercatapultBall3lock BypassVideo = False 'HideOverlay = True 'VideoHideOverlay ' EndOfVideo.Interval=5100 ' EndOfVideo.Enabled=True 'playmedia "BlackKnight_SuperCatapultMultiball_Ball_3_Lock_ModeStart.mp4","Catapult lock",pFullDMD,"cineon",6900,"",1,6 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 117 DelayCallout 2,358 If WarHurryFlag = True Then WarDelayShow.Interval = 5000 ' 5 second delay WarDelayShow.enabled = True End If ' VideoCatapultLoopSetBackground.Interval=6900 ' VideoCatapultLoopSetBackground.Enabled = True L131.state=0 L132.state=0 L133.state=0 'meakin special ballsonplayfield reduced by one as kicker adds a Ball BallsOnPlayfield = BallsOnPlayfield - 1 End Sub Sub videoshotput BypassVideo = False 'HideOverlay = True 'VideoHideOverlay ' EndOfVideo.Interval=1000 'EndOfVideo.Enabled=True WarHideHurryUp Select Case Int(Rnd*4)+1 Case 1 : pupevent 200 Case 2 : pupevent 201 Case 3 : pupevent 202 Case 4 : pupevent 203 End Select If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End Sub Sub videoshotskill BypassVideo = True WarHideHurryUp Select Case Int(Rnd*2)+1 Case 1 : pupevent 207 Case 2 : pupevent 208 End Select If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If callout RndInt(387,388) End Sub Sub VideoReplay BypassVideo = False ' HideOverlay = True 'EndOfVideo.Interval=6400 ' EndOfVideo.Enabled=True ' VideoHideOverlay ' playmedia "Replay.mp4","Match",pFullDMD,"cineon",6000,"",1,35 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 191 DelayCallout 4,438 KnockerSolenoid If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End Sub Sub VideoNewRecord BypassVideo = False HideOverlay = True 'EndOfVideo.Interval=4000 'EndOfVideo.Enabled=True VideoHideOverlay pSplashCommentDisplayed "Player "&PlayerCheckCurrent,2,0 pSplashCommentDisplayed2 "Player "&PlayerCheckCurrent,2,30719 pSplashAddScoreDisplayed "enter initials",2,0 pSplashAddScoreDisplayed2 "enter initials",2,30719 'playmedia "HightScore.mp4","Match",pFullDMD,"cineon",4000,"",1,35 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 189 Callout RndInt(393,397) If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End Sub Sub VideoLastChanceIntro_Timer() BypassVideo = False VideoLastChanceIntro.Enabled = False 'HideOverlay = True 'EndOfVideoLastChance.Interval=5000 'EndOfVideoLastChance.Enabled=True ' VideoHideOverlay ' playmedia "LastChance.mp4","Last Chance",pFullDMD,"cineon",5000,"",1,35 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 178 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End Sub ' Videos of Totals for battles missions calls EndOfMode To reset Sub ModeTotalHydra_Timer() BypassVideo = False CurrentMissionFlag(CurrentPlayer) = 0 ModeTotalHydra.Enabled = False ' HideOverlay = True ' VideoHideOverlay EndOfMode.Interval=4000 EndOfMode.Enabled=True ' playmedia "BlackKnight_HydraBattle_ModeTotal.mp4","Hydra Mode",pFullDMD,"cineon",3000,"",1,20 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' puPlayer.LabelSet pFullDMD,"CommentDisplayed","Mudbog Total",1,"" ' puPlayer.LabelSet pFullDMD,"CommentDisplayed2","Mudbog Total",1,"" ' puPlayer.LabelSet pFullDMD,"AddScoreDisplayed","" & FormatNumber(AddScoreMudBogTotal(CurrentPlayer),0),1,"" ' puPlayer.LabelSet pFullDMD,"AddScoreDisplayed2","" & FormatNumber(AddScoreMudBogTotal(CurrentPlayer),0),1,"" if DisplayingEOBBonus = False Then CommentDisplayed = "Mudbog Total" ' play comment pSplashCommentDisplayed ""& CommentDisplayed,3,255 pSplashCommentDisplayed2 ""& CommentDisplayed,3,40 pSplashAddScoreDisplayed "" & FormatNumber(AddScoreMudBogTotal(CurrentPlayer),0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(AddScoreMudBogTotal(CurrentPlayer),0),3,40 WarHideHurryUp pupevent 148 DelayCallout 2,RndInt(387,397) If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End If ScoreMudBogChampion(CurrentPlayer) = ScoreMudBogChampion(CurrentPlayer) + AddScoreMudBogTotal(CurrentPlayer) AddScoreMudBogTotal(CurrentPlayer) = 0 ' increase number of hits for next Mission HitsToActivateMission(CurrentPlayer) = HitsToActivateMission(CurrentPlayer) + 1 NumberOfHitForStartMission(CurrentPlayer) = 0 'RampChangeStatus(CurrentPlayer) = "Blinking" ' force lights back to 3 centre Targets L66State(CurrentPlayer) = 0 L75State(CurrentPlayer) = 0 L79State(CurrentPlayer) = 2 L85State(CurrentPlayer) = 2 L91State(CurrentPlayer) = 2 L98State(CurrentPlayer) = 0 L106State(CurrentPlayer) = 0 RampLightsMove(CurrentPlayer) = "Blinking" CheckLamp.Enabled = True End Sub Sub ModeTotalFireElement_Timer() BypassVideo = False CurrentMissionFlag(CurrentPlayer) = 0 MoltenFire(CurrentPlayer) = 4 ModeTotalFireElement.Enabled = False ' HideOverlay = True ' VideoHideOverlay EndOfMode.Interval=8000 EndOfMode.Enabled=True ' playmedia "BlackKnight_FireElementalBattle_ModeTotal.mp4","Fire Elemental Mode",pFullDMD,"cineon",3000,"",1,20 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) If DisplayingEOBBonus = False Then CommentDisplayed = "Molten Fire Total" ' play comment pSplashCommentDisplayed ""& CommentDisplayed,3,255 pSplashCommentDisplayed2 ""& CommentDisplayed,3,40 pSplashAddScoreDisplayed "" & FormatNumber(AddScoreMoltenFireTotal(CurrentPlayer),0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(AddScoreMoltenFireTotal(CurrentPlayer),0),3,40 WarHideHurryUp pupevent 134 DelayCallout 2,RndInt(387,397) If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End If ScoreMoltenFireChampion(CurrentPlayer) = ScoreMoltenFireChampion(CurrentPlayer) + AddScoreMoltenFireTotal(CurrentPlayer) AddScoreMoltenFireTotal(CurrentPlayer) = 0 ' increase number of hits for next Mission HitsToActivateMission(CurrentPlayer) = HitsToActivateMission(CurrentPlayer) + 1 NumberOfHitForStartMission(CurrentPlayer) = 0 'RampChangeStatus(CurrentPlayer) = "Blinking" ' force lights back to 3 centre Targets L66State(CurrentPlayer) = 0 L75State(CurrentPlayer) = 0 L79State(CurrentPlayer) = 2 L85State(CurrentPlayer) = 2 L91State(CurrentPlayer) = 2 L98State(CurrentPlayer) = 0 L106State(CurrentPlayer) = 0 RampLightsMove(CurrentPlayer) = "Blinking" CheckLamp.Enabled = True End Sub Sub ModeTotalSandWorm_Timer() BypassVideo = False CurrentMissionFlag(CurrentPlayer) = 0 ModeTotalSandWorm.Enabled = False ' HideOverlay = True ' VideoHideOverlay EndOfMode.Interval=1900 EndOfMode.Enabled=True ' playmedia "BK_WheelMode_Sandworm_ModeTotal.mp4","Sandworm Mode",pFullDMD,"cineon",3000,"",1,20 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) If DisplayingEOBBonus = False Then CommentDisplayed = "Burning Sands Total" ' play comment pSplashCommentDisplayed ""& CommentDisplayed,3,255 pSplashCommentDisplayed2 ""& CommentDisplayed,3,40 pSplashAddScoreDisplayed "" & FormatNumber(AddScoreSandWormTotal(CurrentPlayer),0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(AddScoreSandWormTotal(CurrentPlayer),0),3,40 WarHideHurryUp pupevent 195 DelayCallout 2,RndInt(387,397) If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End If ScoreBurningSandsChampion(CurrentPlayer) = ScoreBurningSandsChampion(CurrentPlayer) + AddScoreSandWormTotal(CurrentPlayer) AddScoreSandWormTotal(CurrentPlayer) = 0 ' increase number of hits for next Mission HitsToActivateMission(CurrentPlayer) = HitsToActivateMission(CurrentPlayer) + 1 NumberOfHitForStartMission(CurrentPlayer) = 0 'RampChangeStatus(CurrentPlayer) = "Blinking" ' force lights back to 3 centre Targets L66State(CurrentPlayer) = 0 L75State(CurrentPlayer) = 0 L79State(CurrentPlayer) = 2 L85State(CurrentPlayer) = 2 L91State(CurrentPlayer) = 2 L98State(CurrentPlayer) = 0 L106State(CurrentPlayer) = 0 RampLightsMove(CurrentPlayer) = "Blinking" CheckLamp.Enabled = True End Sub Sub ModeTotalHandHolder_Timer() BypassVideo = False CurrentMissionFlag(CurrentPlayer) = 0 ModeTotalHandHolder.Enabled = False ' HideOverlay = True ' VideoHideOverlay EndOfMode.Interval=2650 EndOfMode.Enabled=True ' playmedia "BK_WheelMode_Handholder_ModeTotal.mp4","Hand holder Mode",pFullDMD,"cineon",2850,"",1,20 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) If DisplayingEOBBonus = False Then CommentDisplayed = "Wicked Cavern Total" ' play comment pSplashCommentDisplayed ""& CommentDisplayed,3,255 pSplashCommentDisplayed2 ""& CommentDisplayed,3,40 pSplashAddScoreDisplayed "" & FormatNumber(AddScoreWickedCavernTotal(CurrentPlayer),0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(AddScoreWickedCavernTotal(CurrentPlayer),0),3,40 WarHideHurryUp pupevent 141 DelayCallout 2,RndInt(387,397) If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End If ScoreWickedCavernChampion(CurrentPlayer) = ScoreWickedCavernChampion(CurrentPlayer) + AddScoreWickedCavernTotal(CurrentPlayer) AddScoreWickedCavernTotal(CurrentPlayer) = 0 ' increase number of hits for next Mission HitsToActivateMission(CurrentPlayer) = HitsToActivateMission(CurrentPlayer) + 1 NumberOfHitForStartMission(CurrentPlayer) = 0 'RampChangeStatus(CurrentPlayer) = "Blinking" ' force lights back to 3 centre Targets L66State(CurrentPlayer) = 0 L75State(CurrentPlayer) = 0 L79State(CurrentPlayer) = 2 L85State(CurrentPlayer) = 2 L91State(CurrentPlayer) = 2 L98State(CurrentPlayer) = 0 L106State(CurrentPlayer) = 0 RampLightsMove(CurrentPlayer) = "Blinking" CheckLamp.Enabled = True End Sub Sub ModeTotalLich_Timer() BypassVideo = False CurrentMissionFlag(CurrentPlayer) = 0 ModeTotalLich.Enabled = False ' HideOverlay = True ' VideoHideOverlay EndOfMode.Interval=4050 EndOfMode.Enabled=True ' playmedia "BlackKnight_LichBattle_ModeComplete.mp4","Lich Mode",pFullDMD,"cineon",3000,"",1,20 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) If DisplayingEOBBonus = False Then CommentDisplayed = "Deep Freeze Total" ' play comment pSplashCommentDisplayed ""& CommentDisplayed,3,255 pSplashCommentDisplayed2 ""& CommentDisplayed,3,40 pSplashAddScoreDisplayed "" & FormatNumber(AddScoreDeepFreezeTotal(CurrentPlayer),0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(AddScoreDeepFreezeTotal(CurrentPlayer),0),3,40 WarHideHurryUp pupevent 181 DelayCallout 2,RndInt(387,397) If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End If ScoreDeepFreezeChampion(CurrentPlayer) = ScoreDeepFreezeChampion(CurrentPlayer) + AddScoreDeepFreezeTotal(CurrentPlayer) AddScoreDeepFreezeTotal(CurrentPlayer) = 0 ' increase number of hits for next Mission HitsToActivateMission(CurrentPlayer) = HitsToActivateMission(CurrentPlayer) + 1 NumberOfHitForStartMission(CurrentPlayer) = 0 ' RampChangeStatus(CurrentPlayer) = "Blinking" ' force lights back to 3 centre Targets L66State(CurrentPlayer) = 0 L75State(CurrentPlayer) = 0 L79State(CurrentPlayer) = 2 L85State(CurrentPlayer) = 2 L91State(CurrentPlayer) = 2 L98State(CurrentPlayer) = 0 L106State(CurrentPlayer) = 0 RampLightsMove(CurrentPlayer) = "Blinking" CheckLamp.Enabled = True End Sub Sub ModeTotalBlackCastle_Timer() ' BypassVideo = False ' CurrentMissionFlag(CurrentPlayer) = 0 ModeTotalBlackCastle.Enabled = False ' HideOverlay = True ' VideoHideOverlay ' EndOfMode.Interval=4000 ' EndOfMode.Enabled=True ' playmedia "BlackKnight_BKBattle_ModeTotal.mp4","Black Castle Mode",pFullDMD,"cineon",3000,"",1,20 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) If DisplayingEOBBonus = False Then ' WarHideHurryUp pupevent 110 pSplashCommentDisplayed "Black Castle Total",3,255 pSplashCommentDisplayed2 "Black Castle Total",3,40 pSplashAddScoreDisplayed "" & FormatNumber(AddScoreBlackCastleTotal(CurrentPlayer),0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(AddScoreBlackCastleTotal(CurrentPlayer),0),3,40 DelayCallout 2,RndInt(387,397) ' If WarHurryFlag = True Then ' WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts ' WarDelayShow.enabled = True ' End If End If ScoreBlackCastleChampion(CurrentPlayer) = ScoreBlackCastleChampion(CurrentPlayer) + AddScoreBlackCastleTotal(CurrentPlayer) AddScoreBlackCastleTotal(CurrentPlayer) = 0 ' increase number of hits for next Mission HitsToActivateMission(CurrentPlayer) = HitsToActivateMission(CurrentPlayer) + 1 NumberOfHitForStartMission(CurrentPlayer) = 0 ' RampChangeStatus(CurrentPlayer) = "Blinking" ' RampLightsMove(CurrentPlayer) = "Blinking" CheckLamp.Enabled =True End Sub Sub ModeTotalCatapult_Timer() BypassVideo = False ModeTotalCatapult.Enabled = False ' HideOverlay = True ' VideoHideOverlay ' EndOfMode.Interval=4750 ' EndOfMode.Enabled=True ' playmedia "BlackKnight_CatapultMultiball_ModeTotal.mp4","Catapult Multiball",pFullDMD,"cineon",4750,"",1,20 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' puPlayer.LabelSet pFullDMD,"CommentDisplayed","Catapult Multiball Total",1,"" ' puPlayer.LabelSet pFullDMD,"CommentDisplayed2","Catapult Multiball Total",1,"" ' puPlayer.LabelSet pFullDMD,"AddScoreDisplayed","" & FormatNumber(Catapult_Mode_Total_score,0),1,"" ' puPlayer.LabelSet pFullDMD,"AddScoreDisplayed2","" & FormatNumber(Catapult_Mode_Total_score,0),1,"" If DisplayingEOBBonus = False Then pSplashCommentDisplayed "Catapult Multiball Total",3,255 pSplashCommentDisplayed2 "Catapult Multiball Total",3,40 pSplashAddScoreDisplayed "" & FormatNumber(Catapult_Mode_Total_score(CurrentPlayer),0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(Catapult_Mode_Total_score(CurrentPlayer),0),3,40 AddscoreCatapultBonus = 400000 LastChanceCatapultMode = False WarHideHurryUp pupevent 123 Callout RndInt(368,369) If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End If ScoreCatapultMBChampion(CurrentPlayer) = ScoreCatapultMBChampion(CurrentPlayer) + Catapult_Mode_Total_score(CurrentPlayer) Catapult_Mode_Total_score(CurrentPlayer) = 0 End Sub Sub ModeTotalKnightChallenge_Timer() BypassVideo = False ModeTotalKnightChallenge.Enabled = False ' HideOverlay = True ' VideoHideOverlay ' EndOfMode.Interval=4000 ' EndOfMode.Enabled=True ' playmedia "TKC_ModeTotal.mp4","Catapult Multiball",pFullDMD,"cineon",4000,"",1,20 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) If DisplayingEOBBonus = False Then pSplashCommentDisplayed "Multiball Total",3,255 pSplashCommentDisplayed2 "Multiball Total",3,40 pSplashAddScoreDisplayed "" & FormatNumber(AddScoreTripleKnightChallengeTotal(CurrentPlayer),0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(AddScoreTripleKnightChallengeTotal(CurrentPlayer),0),3,40 WarHideHurryUp pupevent 171 ' TKC total background callout RndInt(368,369) If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End If AddScoreTripleKnightChallengeKnightHited = 1000000 AddScoreTripleKnightChallengeGoldRoom = 1000000 ScoreTripleKnightsMBChampion(CurrentPlayer) = ScoreTripleKnightsMBChampion(CurrentPlayer) + AddScoreTripleKnightChallengeTotal(CurrentPlayer) AddScoreTripleKnightChallengeTotal(CurrentPlayer) = 0 End Sub Sub ModeTotalRetro_Timer() End Sub Sub VideoCatapultLoopSetBackground_Timer() BypassVideo = False VideoCatapultLoopSetBackground.Enabled = False video_catapult_mode_loop If LastChanceFlag = True Then LastChanceCatapultMode = True DisableTable False bGameInPlay = True End If End Sub Sub video_catapult_mode_loop BypassVideo = False CatapultManagement.interval = 500 CatapultManagement.Enabled = True HideOverlay = False 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True ' If vsvol = 100 Then ' DOF 522, DOFPulse ' ElseIf vsvol < 100 And vsvol > 89 Then DOF 919, DOFPulse ' ElseIf vsvol < 90 And vsvol > 79 Then DOF 918, DOFPulse ' ElseIf vsvol < 80 And vsvol > 69 Then DOF 917, DOFPulse ' ElseIf vsvol < 70 And vsvol > 59 Then DOF 916, DOFPulse ' ElseIf vsvol < 60 And vsvol > 49 Then DOF 915, DOFPulse ' ElseIf vsvol < 50 And vsvol > 39 Then DOF 914, DOFPulse ' ElseIf vsvol < 40 And vsvol > 29 Then DOF 913, DOFPulse ' ElseIf vsvol < 30 And vsvol > 19 Then DOF 912, DOFPulse ' Else DOF 911, DOFPulse ' End If 'EnableBallSaver 40 ' playmedia "BlackKnight_CatapultMultiball_LoopingMainplayBG.mp4","Catapult Multiball",pFullDMD,"cineon",18000,"",1,5 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' PuPlayer.setbackground pFullDMD, 1 ' EndLightsequenceAnimation.Enabled=True Callout 358 CatapultModeFlag = True BouleAfterHit.Enabled = True CheckLamp.Enabled = True Catapult_Super_Jackpot_Multi = 1 ' SetBackGroundImportant.Enabled = True 'VideoSetBackgroundPM End Sub Sub StopMainScreen PuPlayer.playstop pTopper PuPlayer.playstop pDMD PuPlayer.playstop pBackglass PuPlayer.playstop pPlayfield PuPlayer.playstop pMusic PuPlayer.playstop pAudio PuPlayer.playstop pCallouts PuPlayer.playstop pPupUnderHUD PuPlayer.playstop pPupOverHUD End Sub Sub Video_lock1IsLit BypassVideo = False ' HideOverlay = True ' VideoHideOverlay ' EndOfVideo.Interval=4000 ' EndOfVideo.Enabled=True ' playmedia "TKC_Ball1LockLIT.mp4","Knight challenge",pFullDMD,"cineon",3000,"",1,17 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 153 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End Sub Sub Video_lock2IsLit BypassVideo = False ' HideOverlay = True ' VideoHideOverlay ' EndOfVideo.Interval=3000 ' EndOfVideo.Enabled=True ' playmedia "TKC_Ball2LockLIT.mp4","Knight challenge",pFullDMD,"cineon",3000,"",1,17 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 155 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End Sub Sub Video_lock3IsLit BypassVideo = False ' HideOverlay = True ' VideoHideOverlay ' EndOfVideo.Interval=3000 ' EndOfVideo.Enabled=True ' playmedia "TKC_Ball3LockLIT.mp4","Knight challenge",pFullDMD,"cineon",3000,"",1,17 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 157 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End Sub Sub Video_knightball1lock BypassVideo = True ' HideOverlay = True ' VideoHideOverlay ' EndOfVideo.Interval=6000 ' EndOfVideo.Enabled=True ' playmedia "TKC_Ball1Lock.mp4","Knight challenge",pFullDMD,"cineon",6000,"",1,18 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 154 If WarHurryFlag = True Then WarDelayShow.Interval = 6000 ' 6 second delay s WarDelayShow.enabled = True End If End Sub Sub Video_knightball2lock BypassVideo = True ' HideOverlay = True ' VideoHideOverlay ' EndOfVideo.Interval=6000 ' EndOfVideo.Enabled=True ' playmedia "TKC_Ball2Lock.mp4","Knight challenge",pFullDMD,"cineon",6000,"",1,18 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 156 If WarHurryFlag = True Then WarDelayShow.Interval = 6000 ' 6 second delay WarDelayShow.enabled = True End If End Sub Sub Video_knightball3lock BypassVideo = True ' HideOverlay = True ' VideoHideOverlay ' EndOfVideo.Interval=6000 ' EndOfVideo.Enabled=True ' 'PlaySound "Sound-0x03A3" 'SpeakTime = 1780 'LightEyesBK 'playmedia "Sound-0x03A3.mp3","Audioknight",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' playmedia "TKC_Ball3Lock.mp4","Knight challenge",pFullDMD,"cineon",6000,"",1,18 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) callout RndInt(361,362) WarHideHurryUp pupevent 158 If WarHurryFlag = True Then WarDelayShow.Interval = 6000 ' 6 second delay WarDelayShow.enabled = True End If End Sub Sub video_knight_challenge_background(Knight) BypassVideo = False HideOverlay = False 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True If Knight_challenge_phase = 1 or Knight_challenge_phase = 2 Then If Knight = 0 Then 'playmedia "TKC_jackpotREADYbkexposed.mp4","Knight challenge",pFullDMD,"cineon",6000,"",1,5 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 164 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End If If Knight = 1 Then 'playmedia "TKC_1knightIdle.mp4","Knight challenge",pFullDMD,"cineon",6000,"",1,5 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 161 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End If If Knight = 2 Then 'playmedia "TKC_2knightIdle.mp4","Knight challenge",pFullDMD,"cineon",6000,"",1,5 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 160 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End If If Knight = 3 Then 'playmedia "TKC_3knightIdle.mp4","Knight challenge",pFullDMD,"cineon",6000,"",1,5 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 159 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End If End If If Knight_challenge_phase = 3 Then WarHideHurryUp pupevent 166 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If ' If x=1 Then ' 'playmedia "TKC_GoldRoomIdle02.mp4","Knight challenge",pFullDMD,"cineon",6000,"",1,5 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' DOF 609, DOFPulse 'Strobe ' End If End If End Sub Sub Video_knight_challenge_phase1_hited BypassVideo = False HideOverlay = True VideoHideOverlay 'EndOfVideo.Interval=3000 'EndOfVideo.Enabled=True If KnightRemaining => 1 Then 'playmedia "TKC_wrongKnight_skeleton.mp4","Knight challenge",pFullDMD,"cineon",3000,"",1,10 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 163 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If Else ' playmedia "TKC_wrongKnight_BlackKnight.mp4","Knight challenge",pFullDMD,"cineon",3000,"",1,11 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 162 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End If 'video_knight_challenge_background KnightRemaining KnightRemainingSetBackground.Interval=4000 KnightRemainingSetBackground.Enabled = True pSplashAddScoreDisplayed "" & FormatNumber(AddScoreTripleKnightChallenge,0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(AddScoreTripleKnightChallenge,0),3,40 AddScoreTripleKnightChallengeKnightHited = AddScoreTripleKnightChallengeKnightHited + 300000 End Sub Sub KnightRemainingSetBackground_timer() KnightRemainingSetBackground.Enabled = False video_knight_challenge_background KnightRemaining End Sub sub video_knight_challenge_advance_to_gold_room BypassVideo = False HideOverlay = True VideoHideOverlay 'EndOfVideo.Interval=4000 'EndOfVideo.Enabled=True ' playmedia "TKC_AdvanceToGoldRoom.mp4","Knight challenge",pFullDMD,"cineon",6000,"",1,5 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 165 If WarHurryFlag = True Then WarDelayShow.Interval = 3500 ' 5 second delay WarDelayShow.enabled = True End If KnightRemainingSetBackground.Interval=6000 KnightRemainingSetBackground.Enabled = True pSplashAddScoreDisplayed "" & FormatNumber(AddScoreTripleKnightChallenge,0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(AddScoreTripleKnightChallenge,0),3,40 AddScoreTripleKnightChallengeKnightHited = AddScoreTripleKnightChallengeKnightHited + 300000 End Sub sub video_knight_challenge_jackpot BypassVideo = False HideOverlay = True 'VideoHideOverlay 'EndOfVideo.Interval=4000 'EndOfVideo.Enabled=True If knight_challenge_jackpot = 1 Then ' playmedia "TKC_GoldRoomAward01.mp4","Knight challenge",pFullDMD,"cineon",6000,"",1,10 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 168 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End If If knight_challenge_jackpot = 2 Then ' playmedia "TKC_GoldRoomAward02.mp4","Knight challenge",pFullDMD,"cineon",6000,"",1,10 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 169 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End If If knight_challenge_jackpot = 3 Then ' playmedia "TKC_Bigsuper.mp4","Knight challenge",pFullDMD,"cineon",6000,"",1,10 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 170 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End If pSplashAddScoreDisplayed "" & FormatNumber(AddScoreTripleKnightChallenge,0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(AddScoreTripleKnightChallenge,0),3,40 AddScoreTripleKnightChallengeGoldRoom = AddScoreTripleKnightChallengeGoldRoom + 50000 End Sub ' ********************************* Mystery Modified to take into account missions and extras ****** ' I have modified bonus scores to take into account number of missions completed ' Added 2 extra randoms "Fill PowerSword" and "Light BallSaver" to remove and change MysteryMode to 0 See adjustablea ' case 7 is war hurry up which will award 5,000,000 if ready for mission Sub MysteryRandom() If MysteryMode = 1 Then tempNum = Int(Rnd*15)+1 Else tempNum = Int(Rnd*13)+1 End If Select Case tempNum Case 1 : If MysteryMode = 1 Then RandomMysterySelect = CStr(250000 * (NumberOfMissioncomplete(CurrentPlayer)+1)) Else RandomMysterySelect = "2000000" Case 2 : If MysteryMode = 1 Then RandomMysterySelect = CStr(750000 * (NumberOfMissioncomplete(CurrentPlayer)+1)) Else RandomMysterySelect = "3000000" Case 3 : If MysteryMode = 1 Then RandomMysterySelect = CStr(1000000 * (NumberOfMissioncomplete(CurrentPlayer)+1)) Else RandomMysterySelect = "4000000" Case 4 : If MysteryMode = 1 Then RandomMysterySelect = CStr(2000000 * (NumberOfMissioncomplete(CurrentPlayer)+1)) Else RandomMysterySelect = "5000000" Case 5 : RandomMysterySelect = "Hold Bonus" Case 6 : RandomMysterySelect = "Light Lock" Case 7 : If ShieldIsReadyToActivateMission(CurrentPlayer) = True And CurrentMissionFlag(CurrentPlayer) = 0 Then RandomMysterySelect ="5000000" Else RandomMysterySelect = "War Hurry Up" Case 8 : RandomMysterySelect = "Add Bonus X" Case 9 : RandomMysterySelect = "Knight Letter" Case 10 : RandomMysterySelect = "Light Super" Case 11 : RandomMysterySelect = "Advance Save" Case 12 : RandomMysterySelect = "Light Magna Save" Case 13 : RandomMysterySelect = "Light Extra Ball" Case 14 : RandomMysterySelect = "Fill PowerSword" Case 15 : RandomMysterySelect = "Light Ballsaver" End Select CheckMysteryRandom End Sub Sub checkMysteryRandom If RandomMysterySelect1 = "" Then RandomMysterySelect1 = RandomMysterySelect Elseif RandomMysterySelect1 = RandomMysterySelect Then MysteryRandom ElseIf RandomMysterySelect2 = "" Then RandomMysterySelect2 = RandomMysterySelect Elseif RandomMysterySelect2 = RandomMysterySelect Then MysteryRandom ElseIf RandomMysterySelect3 = "" Then RandomMysterySelect3 = RandomMysterySelect Elseif RandomMysterySelect3 = RandomMysterySelect Then MysteryRandom ElseIf RandomMysterySelect4 = "" Then RandomMysterySelect4 = RandomMysterySelect ' Elseif RandomMysterySelect1 = RandomMysterySelect Then ' MysteryRandom End If End Sub Sub Video_Mistery BypassVideo = False RandomMysterySelect1 = "" MysteryRandom RandomMysterySelect2 = "" MysteryRandom RandomMysterySelect3 = "" MysteryRandom RandomMysterySelect4 = "" MysteryRandom HideOverlay = True VideoHideOverlay 'EndOfVideo.Interval=5000 'EndOfVideo.Enabled=True 'PlaySound "Sound-0x03A3" 'playmedia "Sound-0x03A3.mp3","Audioknight",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) pSplashMystery "Mystery",1,30719 ' playmedia "Mistery.mp4","Mistery",pFullDMD,"cineon",4000,"",1,5 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 191 If WarHurryFlag = True Then WarDelayShow.Interval = 5000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If RandomMystery1.Enabled = True RandomMystery2.Enabled = True RandomMystery3.Enabled = True RandomMystery4.Enabled = True MysteryFlag = False L96.State = 0 End Sub Sub RandomMystery1_timer() RandomMystery1.Enabled = False pSplashMystery "", 1, 307717 pSplashRandomMystery RandomMysterySelect1, 1,30719 End Sub Sub RandomMystery2_timer() RandomMystery2.Enabled = False pSplashRandomMystery RandomMysterySelect2, 1,30719 End Sub Sub RandomMystery3_timer() RandomMystery3.Enabled = False pSplashRandomMystery RandomMysterySelect3, 1,30719 End Sub Sub RandomMystery4_timer() RandomMystery4.Enabled = False pSplashRandomMystery RandomMysterySelect4, 1,30719 If RandomMysterySelect4 = "2000000" Then Addscore 2000000 Elseif RandomMysterySelect4 = "3000000" Then AddScore 3000000 ElseIf RandomMysterySelect4 = "4000000" Then AddScore 4000000 ElseIf RandomMysterySelect4 = "5000000" Then AddScore 5000000 ElseIf RandomMysterySelect4 = CStr(250000 * (NumberOfMissioncomplete(CurrentPlayer)+1)) Then AddScore 250000 * (NumberOfMissioncomplete(CurrentPlayer)+1) ElseIf RandomMysterySelect4 = CStr(750000 * (NumberOfMissioncomplete(CurrentPlayer)+1)) Then AddScore 750000 * (NumberOfMissioncomplete(CurrentPlayer)+1) ElseIf RandomMysterySelect4 = CStr(1000000 * (NumberOfMissioncomplete(CurrentPlayer)+1)) Then AddScore 1000000 * (NumberOfMissioncomplete(CurrentPlayer)+1) ElseIf RandomMysterySelect4 = CStr(2000000 * (NumberOfMissioncomplete(CurrentPlayer)+1)) Then AddScore 2000000 * (NumberOfMissioncomplete(CurrentPlayer)+1) ElseIf RandomMysterySelect4 = "Hold Bonus" Then BonusHeld(CurrentPlayer) = True ElseIf RandomMysterySelect4 = "Light Lock" Then L101.state=1 If Knight_challenge_flag = False Then If Knight_challenge(CurrentPlayer) = 0 Then Video_lock1IsLit Knight_challenge(CurrentPlayer) = 1 ElseIf Knight_challenge(CurrentPlayer) = 2 Then Video_lock2IsLit Knight_challenge(CurrentPlayer) = 3 ElseIf Knight_challenge(CurrentPlayer) = 4 Then Video_lock3IsLit Knight_challenge(CurrentPlayer) = 5 Else End If End If ElseIf RandomMysterySelect4 = "War Hurry Up" Then WarHurryUpStart ElseIf RandomMysterySelect4 = "Add Bonus X" Then BonusMultiplier(CurrentPlayer) = BonusMultiplier(CurrentPlayer) + 1 ElseIf RandomMysterySelect4 = "Knight Letter" Then KnightLamp(CurrentPlayer) = KnightLamp(CurrentPlayer) + 2 ElseIf RandomMysterySelect4 = "Light Super" Then SuperIsLit = True L88.State = 1 ElseIf RandomMysterySelect4 = "Advance Save" Then BallSaveAvailable(CurrentPlayer) = True ElseIf RandomMysterySelect4 = "Light Magna Save" Then MagnaSaveFlag(CurrentPlayer) = 1 L24.State = 1 ElseIf RandomMysterySelect4 = "Light Extra Ball" Then ExtraBallsIsLit = True L95.State = 1 ElseIf RandomMysterySelect4 = "Fill PowerSword" Then PowerSwordLevel(CurrentPlayer) = 100 updatePowersword() ElseIf RandomMysterySelect4 = "Light Ballsaver" Then ' double ballsaver time as mission intro may take up all the time ;-) EnableBallSaver BallSaverTime * 2 End If Callout RndInt(162,169) End Sub '*************************************************************************************** ' War routines '*************************************************************************************** sub WarHurryUpStart() Pop1Val = 3000000 + 230000 * Pop1Hits(CurrentPlayer) Pop2Val = 3000000 + 180000 * Pop2Hits(CurrentPlayer) Pop3Val = 3000000 + 200000 * Pop3Hits(CurrentPlayer) if Pop1Val>25000000 then Pop1Val = 25000000 ' Maximum is 25Mil if Pop2Val>25000000 then Pop2val = 25000000 if Pop3Val>25000000 then Pop3Val = 25000000 Pop1DropRate = int(Pop1Val / (WarHurryTime * 100))*10 Pop2DropRate = int(Pop2Val / (WarHurryTime * 100))*10 Pop3DropRate = int(Pop3Val / (WarHurryTime * 100))*10 Skel1Ded = False Skel2Ded = False Skel3Ded = False WarHurryFlag = True CheckLamp.Enabled = True WarHurryPhase = 1 pupevent 205 '(with bk in bg) ' start skelton animation initialise the counters and flags to start WarCounter = 0 WarHurryUp51Touch=0 WarHurryUp56Touch=0 WarHurryUp58Touch=0 AnimationFrame = 1 WarStartTime = Int(Timer) WarShowHurryup ' set up the display WarCalcTimer.Interval = 100 WarCalcTimer.Enabled = True pupevent 409 WarHurryTimer.Interval = WarHurryTime * 1000 WarHurryTimer.Enabled = True End Sub Sub WarHideHurryUp() PuPlayer.LabelSet pFullDMD,"Skel1","",0,"" PuPlayer.LabelSet pFullDMD,"Skel2","",0,"" PuPlayer.LabelSet pFullDMD,"Skel3","",0,"" PuPlayer.LabelSet pFullDMD,"Pop1","",0,"" PuPlayer.LabelSet pFullDMD,"Pop2","",0,"" PuPlayer.LabelSet pFullDMD,"Pop3","",0,"" PuPlayer.LabelSet pFullDMD,"PopTotal","",0,"" WarSkeltonAnimation.Enabled = False End Sub sub WarShowHurryup() ' display based on whether to start animation or not pupevent 205 '(with bk in bg) If WarAnimationBallLimit >= BallsOnPlayfield Then ' using animation WarSkeltonAnimation.Interval = 100 WarSkeltonAnimation.Enabled = True Else ' show stills instead of animation If WarHurryPhase = 1 Then If Skel1Ded = True Then PuPlayer.LabelSet pFullDMD,"Skel1","skelet01Death\\S1Death17.png",1,"{'mt':2,'color':255, 'width': 20, 'height': 60, 'xpos': 10, 'xalign': 0, 'ypos': 40, 'yalign': 0}" Else PuPlayer.LabelSet pFullDMD,"Skel1","skelet01idle\\S1idle1.png",1,"{'mt':2,'color':255, 'width': 20, 'height': 60, 'xpos': 10, 'xalign': 0, 'ypos': 40, 'yalign': 0}" End If If Skel2Ded = True Then PuPlayer.LabelSet pFullDMD,"Skel2","skelet02Death\\S2Death17.png",1,"{'mt':2,'color':255, 'width': 30, 'height': 90, 'xpos': 35, 'xalign': 0, 'ypos': 10, 'yalign': 0}" Else PuPlayer.LabelSet pFullDMD,"Skel2","skelet02idle\\S2idle1.png",1,"{'mt':2,'color':255, 'width': 30, 'height': 90, 'xpos': 35, 'xalign': 0, 'ypos': 10, 'yalign': 0}" End If If Skel3Ded = True Then PuPlayer.LabelSet pFullDMD,"Skel3","skelet03Death\\S3Death17.png",1,"{'mt':2,'color':255, 'width': 25, 'height': 100, 'xpos': 67, 'xalign': 0, 'ypos': 5, 'yalign': 0}" Else PuPlayer.LabelSet pFullDMD,"Skel3","skelet03idle\\S3idle1.png",1,"{'mt':2,'color':255, 'width': 25, 'height': 100, 'xpos': 67, 'xalign': 0, 'ypos': 5, 'yalign': 0}" End If ' show labels with scores PuPlayer.LabelSet pFullDMD,"Pop1",FormatNumber(Pop1Val,0),1,"" PuPlayer.LabelSet pFullDMD,"Pop2",FormatNumber(Pop2Val,0),1,"" PuPlayer.LabelSet pFullDMD,"Pop3",FormatNumber(Pop3Val,0),1,"" Else ' phase 2 hit the BK for the super jackpot PuPlayer.LabelSet pFullDMD,"Skel1","",0,"" PuPlayer.LabelSet pFullDMD,"Skel2","",0,"" PuPlayer.LabelSet pFullDMD,"Skel3","",0,"" PuPlayer.LabelSet pFullDMD,"Pop1","",0,"" PuPlayer.LabelSet pFullDMD,"Pop2","",0,"" PuPlayer.LabelSet pFullDMD,"Pop3","",0,"" PuPlayer.LabelSet pFullDMD,"PopTotal",FormatNumber(PopTotal,0),1,"" End If End If end sub ' Delay used to show the display after a timer used after other pupevents ' use this code after pupevent 'If WarHurryFlag = True Then ' WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts ' WarDelayShow.enabled = True 'End If Sub WarDelayShow_Timer() WarDelayShow.Enabled = False WarShowHurryup End Sub ' end of war hurry up (run out of Time) Sub WarHurryTimer_Timer() L85State(CurrentPlayer) = 0 WarHurryTimer.Enabled = False WarCalcTimer.Enabled = False WarHurryPhase = 0 WarHurryFlag = False WarHideHurryUp pupevent 410 pupevent 413 VideoSetBackgroundPM MusicResetPM ModeTotalWarHurry.Interval = 100 ModeTotalWarHurry.Enabled = True 'VideoSetBackgroundPM End Sub ' force end of Hurry up (used on ball drains and similar Sub WarStop() L85State(CurrentPlayer) = 0 WarHurryTimer.Enabled = False WarCalcTimer.Enabled = False WarHurryPhase = 0 WarHurryFlag = False WarHideHurryUp pupevent 410 pupevent 413 VideoSetBackgroundPM MusicResetPM 'ModeTotalWarHurry.Interval = 100 'ModeTotalWarHurry.Enabled = True 'VideoSetBackgroundPM End Sub sub WarCalcTimer_Timer() AnimationFrame = AnimationFrame + 1 If AnimationFrame = 18 Then AnimationFrame = 1 IF WarHurryUp51Touch=1 Then Skel1Ded = True IF WarHurryUp56Touch=1 Then Skel2Ded = True IF WarHurryUp58Touch=1 Then Skel3Ded = True End If If WarHurryPhase = 1 Then ' stop drop rates if dead if Skel1Ded = False Then Pop1Val = pop1Val - Pop1DropRate if Skel2Ded = False Then Pop2Val = pop2Val - Pop2DropRate if Skel3Ded = False Then Pop3Val = pop3Val - Pop3DropRate Else ' phase 2 hit the BK for the super jackpot WarCounter = WarCounter + 1 ' used to workout how much time left this is flag to calculate the following once if (WarCounter = 1) Then ' calculate the Total for BK and its drop rate NB Minimum =10000 (survival) PopTotal = Pop1Val + Pop2Val + Pop3Val pupevent 410 pupevent 412 WarHurryTimer.Interval = WarHurryTime * 1000 WarHurryTimer.enabled = True PopTotalDropRate = int(Pop3Val/ (WarHurryTime * 100))*10 ' if (WarHurryTime - (Int(Timer) - WarStartTime)) >0 Then PopTotalDropRate = int((PopTotal/10) / ((WarHurryTime - (Int(Timer) - WarStartTime))*100))*100 End if PopTotal = PopTotal - PopTotalDropRate if PopTotal < 10000 Then PopTotal = 10000 ' minimum is 10000 awarded if run out of time and don't lose ball End If end Sub Sub WarSkeltonAnimation_Timer() ' new routine to show war skeletons like a flipbook If WarHurryPhase = 1 Then ' show animation IF WarHurryUp51Touch<>1 Then PuPlayer.LabelSet pFullDMD,"Skel1","skelet01idle\\S1idle"& AnimationFrame &".png",1,"{'mt':2,'color':255, 'width': 20, 'height': 60, 'xpos': 10, 'xalign': 0, 'ypos': 40, 'yalign': 0}" Elseif Skel1Ded = True Then PuPlayer.LabelSet pFullDMD,"Skel1","skelet01death\\S1Death17.png",1,"{'mt':2,'color':255, 'width': 20, 'height': 60, 'xpos': 10, 'xalign': 0, 'ypos': 40, 'yalign': 0}" Else PuPlayer.LabelSet pFullDMD,"Skel1","skelet01death\\S1Death"& AnimationFrame &".png",1,"{'mt':2,'color':255, 'width': 20, 'height': 60, 'xpos': 10, 'xalign': 0, 'ypos': 40, 'yalign': 0}" End If If WarHurryUp56Touch<>1 Then PuPlayer.LabelSet pFullDMD,"Skel2","skelet02idle\\S2idle"& AnimationFrame &".png",1,"{'mt':2,'color':255, 'width': 30, 'height': 90, 'xpos': 35, 'xalign': 0, 'ypos': 10, 'yalign': 0}" Elseif Skel2Ded = True Then PuPlayer.LabelSet pFullDMD,"Skel2","skelet02Death\\S2Death17.png",1,"{'mt':2,'color':255, 'width': 30, 'height': 90, 'xpos': 35, 'xalign': 0, 'ypos': 10, 'yalign': 0}" Else PuPlayer.LabelSet pFullDMD,"Skel2","skelet02Death\\S2Death"& AnimationFrame &".png",1,"{'mt':2,'color':255, 'width': 30, 'height': 90, 'xpos': 35, 'xalign': 0, 'ypos': 10, 'yalign': 0}" End If IF WarHurryUp58Touch<>1 Then PuPlayer.LabelSet pFullDMD,"Skel3","skelet03idle\\S3idle"& AnimationFrame &".png",1,"{'mt':2,'color':255, 'width': 25, 'height': 100, 'xpos': 67, 'xalign': 0, 'ypos': 5, 'yalign': 0}" Elseif Skel3Ded = True Then PuPlayer.LabelSet pFullDMD,"Skel3","skelet03Death\\S3Death17.png",1,"{'mt':2,'color':255, 'width': 25, 'height': 100, 'xpos': 67, 'xalign': 0, 'ypos': 5, 'yalign': 0}" Else PuPlayer.LabelSet pFullDMD,"Skel3","skelet03Death\\S3Death"& AnimationFrame &".png",1,"{'mt':2,'color':255, 'width': 25, 'height': 100, 'xpos': 67, 'xalign': 0, 'ypos': 5, 'yalign': 0}" End if ' show labels with scores PuPlayer.LabelSet pFullDMD,"Pop1",FormatNumber(Pop1Val,0),1,"" PuPlayer.LabelSet pFullDMD,"Pop2",FormatNumber(Pop2Val,0),1,"" PuPlayer.LabelSet pFullDMD,"Pop3",FormatNumber(Pop3Val,0),1,"" Else ' phase 2 hit the BK for the super jackpot PuPlayer.LabelSet pFullDMD,"Skel1","",0,"" PuPlayer.LabelSet pFullDMD,"Skel2","",0,"" PuPlayer.LabelSet pFullDMD,"Skel3","",0,"" PuPlayer.LabelSet pFullDMD,"Pop1","",0,"" PuPlayer.LabelSet pFullDMD,"Pop2","",0,"" PuPlayer.LabelSet pFullDMD,"Pop3","",0,"" PuPlayer.LabelSet pFullDMD,"PopTotal",FormatNumber(PopTotal,0),1,"" End If End Sub ' end of Hurry up Sub ModeTotalWarHurry_Timer() pupevent 206 WarHurryTimer.Enabled = False ' ensure timers are false if completd the WarHurryUP WarCalcTimer.Enabled = False ModeTotalWarHurry.Enabled = False WarHideHurryUp If DisplayingEOBBonus = False Then pupevent 410 pupevent 413 pSplashCommentDisplayed "War Hurry Up Total",3,255 pSplashCommentDisplayed2 "War Hurry Up Total",3,40 pSplashAddScoreDisplayed "" & FormatNumber(AddScoreWarHurryUpTotal(CurrentPlayer),0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(AddScoreWarHurryUpTotal(CurrentPlayer),0),3,40 ScoreWarChampion(CurrentPlayer) = ScoreWarChampion(CurrentPlayer) + AddScoreWarHurryUpTotal(CurrentPlayer) AddScoreWarHurryUpTotal(CurrentPlayer) = 0 ResetBackToNormal.interval = 3000 ResetBackToNormal.Enabled = True End If End Sub '************************************************************************************************* ' End of War Routines '************************************************************************************************* Sub Video_Display_Match_Timer() ' BypassVideo = True BypassVideo = False Video_Display_Match.Enabled=False playclear pMusic HideOverlay = False ' VideoHideOverlay pupevent 399 ' playmedia "BK_Match.mp4","Match",pFullDMD,"cineon",6000,"",1,5 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 190 ScorePercent(CurrentPlayer) = int(Score(CurrentPlayer) /100) ScoreCent(CurrentPlayer) = Score(CurrentPlayer) - (ScorePercent(CurrentPlayer) * 100) MatchRandom = RndInt(0,9) * 10 DisplayMatchRandom.Interval=5200 DisplayMatchRandom.Enabled = True End Sub Sub DisplayMatchRandom_timer() BypassVideo = False ' BypassVideo = True EndOfVideoGameOver.Interval=4000 EndOfVideoGameOver.Enabled=True DisplayMatchRandom.Enabled = False If PlayersPlayingGame = 1 Then ScorePercent(1) = int(Score(1) /100) ScoreCent(1) = (ScorePercent(1) * 100) + MatchRandom If Score(1) = ScoreCent(1) Then Credits=Credits + 1 SaveCredits ' Savehs KnockerSolenoid End If End If If PlayersPlayingGame = 2 Then ScorePercent(1) = int(Score(1) /100) ScorePercent(2) = int(Score(2) /100) ScoreCent(1) = (ScorePercent(1) * 100) + MatchRandom ScoreCent(2) = (ScorePercent(2) * 100) + MatchRandom If Score(1) = ScoreCent(1) Or Score(2) = ScoreCent(2) Then Credits=Credits + 1 SaveCredits ' Savehs KnockerSolenoid End If End If If PlayersPlayingGame = 3 Then ScorePercent(1) = int(Score(1) /100) ScorePercent(2) = int(Score(2) /100) ScorePercent(3) = int(Score(3) /100) ScoreCent(1) = (ScorePercent(1) * 100) + MatchRandom ScoreCent(2) = (ScorePercent(2) * 100) + MatchRandom ScoreCent(3) = (ScorePercent(3) * 100) + MatchRandom If Score(1) = ScoreCent(1) Or Score(2) = ScoreCent(2) Or Score(3) = ScoreCent(3) Then Credits=Credits + 1 SaveCredits ' Savehs KnockerSolenoid End If End If If PlayersPlayingGame = 4 Then ScorePercent(1) = int(Score(1) /100) ScorePercent(2) = int(Score(2) /100) ScorePercent(3) = int(Score(3) /100) ScorePercent(4) = int(Score(4) /100) ScoreCent(1) = (ScorePercent(1) * 100) + MatchRandom ScoreCent(2) = (ScorePercent(2) * 100) + MatchRandom ScoreCent(3) = (ScorePercent(3) * 100) + MatchRandom ScoreCent(4) = (ScorePercent(4) * 100) + MatchRandom If Score(1) = ScoreCent(1) Or Score(2) = ScoreCent(2) Or Score(3) = ScoreCent(3) Or Score(4) = ScoreCent(4) Then Credits=Credits + 1 SaveCredits ' Savehs KnockerSolenoid End If End If MatchingScore End Sub ' New end of all routine that shows Bonus Sub DisplayEndOfBallBonus() DisplayingEOBBonus = True Puplayer.setVolumeCurrent pMusic, 50 'turn down music 'puplayer.stopplayer pMusic puPlayer.LabelSet pFullDMD,"CommentDisplayed","",1,"" puPlayer.LabelSet pFullDMD,"CommentDisplayed2","",1,"" puPlayer.LabelSet pFullDMD,"AddScoreDisplayed","",1,"" puPlayer.LabelSet pFullDMD,"AddScoreDisplayed2","",1,"" ' BypassVideo = True ' BypassVideo = False 'HideOverlay = True 'videoHideOverlay 'EndOfVideo.Interval=7500 ' turns background back On 'EndOfVideo.Enabled=True displaySuperFeatures.interval=1200 displaySuperFeatures.Enabled=True displayCombos.interval=1800 displayCombos.Enabled=True displayLoops.interval=2400 displayLoops.Enabled=True displayBonusMultiplier.interval=3400 displayBonusMultiplier.Enabled=True HideBonusScore.Interval=4500 HideBonusScore.Enabled=True DisplayTotalScoreBonus.Interval=4700 DisplayTotalScoreBonus.Enabled=True HideTotalBonusScore.Interval=5000 HideTotalBonusScore.Enabled=True ' PlaySound "Sound-0x0008", 0, SongVolume ' thuds playmedia "Sound-0x00BF.mp3","Audionoise",pAudio,"",0,"",1,1 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' playmedia "score02.mp4","Score",pFullDMD,"cineon",7000,"",1,5 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) 'WarHideHurryUp pupevent 188 puPlayer.LabelSet pFullDMD,"TitleBonus","bonus",1,"" puPlayer.LabelSet pFullDMD,"TextBaseBonus","base bonus",1,"" puPlayer.LabelSet pFullDMD,"basebonus","" & "" & FormatNumber(BaseBonus,0),1,"" End Sub Sub Video_DisplayScore02 ' Base Bonus, Loops, etc... puPlayer.LabelSet pFullDMD,"CommentDisplayed","",1,"" puPlayer.LabelSet pFullDMD,"CommentDisplayed2","",1,"" puPlayer.LabelSet pFullDMD,"AddScoreDisplayed","",1,"" puPlayer.LabelSet pFullDMD,"AddScoreDisplayed2","",1,"" ' BypassVideo = True BypassVideo = False 'HideOverlay = True 'videoHideOverlay 'EndOfVideo.Interval=7500 'EndOfVideo.Enabled=True displaySuperFeatures.interval=1200 displaySuperFeatures.Enabled=True displayCombos.interval=1800 displayCombos.Enabled=True displayLoops.interval=2400 displayLoops.Enabled=True displayBonusMultiplier.interval=3400 displayBonusMultiplier.Enabled=True HideBonusScore.Interval=4500 HideBonusScore.Enabled=True DisplayTotalScoreBonus.Interval=4700 DisplayTotalScoreBonus.Enabled=True HideTotalBonusScore.Interval=5000 HideTotalBonusScore.Enabled=True ' PlaySound "Sound-0x0008", 0, SongVolume ' Thuds playmedia "Sound-0x00BF.mp3","Audionoise",pAudio,"",0,"",1,1 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' playmedia "score02.mp4","Score",pFullDMD,"cineon",7000,"",1,5 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) 'pupevent 582 puPlayer.LabelSet pFullDMD,"TitleBonus","bonus",1,"" puPlayer.LabelSet pFullDMD,"TextBaseBonus","base bonus",1,"" puPlayer.LabelSet pFullDMD,"basebonus","" & "" & FormatNumber(BaseBonus,0),1,"" End Sub Sub displaySuperFeatures_timer() ' BypassVideo = True ' BypassVideo = False displaySuperFeatures.Enabled=False puPlayer.LabelSet pFullDMD,"TextSuperFeatures","super features",1,"" puPlayer.LabelSet pFullDMD,"SuperFeatures","" & FormatNumber(SuperFeatures,0),1,"" ' PlaySound "Sound-0x0008" ' PlaySound "Sound-0x0008", 0, SongVolume playmedia "Sound-0x00BF.mp3","Audionoise",pAudio,"",0,"",1,1 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) End Sub Sub displayCombos_timer() Combos = 25000 * Uturn ScoreComboChampion(CurrentPlayer) = ScoreComboChampion(CurrentPlayer) + Uturn ' Combos = Uturn(CurrentPlayer) ' BypassVideo = True ' BypassVideo = False displayCombos.Enabled=False puPlayer.LabelSet pFullDMD,"TextCombos","combos",1,"" puPlayer.LabelSet pFullDMD,"Combos","" & FormatNumber(Combos,0),1,"" ' PlaySound "Sound-0x0008" ' PlaySound "Sound-0x0008", 0, SongVolume playmedia "Sound-0x00BF.mp3","Audionoise",pAudio,"",0,"",1,1 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) End Sub Sub displayLoops_timer() ' BypassVideo = True ' BypassVideo = False displayLoops.Enabled=False puPlayer.LabelSet pFullDMD,"TextLoops","loops",1,"" puPlayer.LabelSet pFullDMD,"Loops","" & FormatNumber(Loops,0),1,"" ' PlaySound "Sound-0x0008" ' PlaySound "Sound-0x0008", 0, SongVolume playmedia "Sound-0x00BF.mp3","Audionoise",pAudio,"",0,"",1,1 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) End Sub Sub displayBonusMultiplier_timer() ' BypassVideo = True ' BypassVideo = False displayBonusMultiplier.Enabled=False puPlayer.LabelSet pFullDMD,"TitleBonus","",1,"" puPlayer.LabelSet pFullDMD,"TextBaseBonus","",1,"" puPlayer.LabelSet pFullDMD,"TextSuperFeatures","",1,"" puPlayer.LabelSet pFullDMD,"TextCombos","",1,"" puPlayer.LabelSet pFullDMD,"TextLoops","",1,"" puPlayer.LabelSet pFullDMD,"BaseBonus","",1,"" puPlayer.LabelSet pFullDMD,"SuperFeatures","",1,"" puPlayer.LabelSet pFullDMD,"Combos","",1,"" puPlayer.LabelSet pFullDMD,"Loops","",1,"" puPlayer.LabelSet pFullDMD,"BonusMultiplier",FormatNumber(BonusMultiplier(CurrentPlayer),0)&"X",1,"" ' PlaySound "Sound-0x0008" ' PlaySound "Sound-0x0008", 0, SongVolume playmedia "Sound-0x00BF.mp3","Audionoise",pAudio,"",0,"",1,1 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) End Sub Sub HideBonusScore_timer() ' BypassVideo = True ' BypassVideo = False HideBonusScore.Enabled=False TotalBonus = (BaseBonus + SuperFeatures + Combos + Loops) * BonusMultiplier(CurrentPlayer) ScoreBonusChampion(CurrentPlayer) = ScoreBonusChampion(CurrentPlayer) + TotalBonus puPlayer.LabelSet pFullDMD,"TitleBonus","",1,"" puPlayer.LabelSet pFullDMD,"TextBaseBonus","",1,"" puPlayer.LabelSet pFullDMD,"TextSuperFeatures","",1,"" puPlayer.LabelSet pFullDMD,"TextCombos","",1,"" puPlayer.LabelSet pFullDMD,"TextLoops","",1,"" puPlayer.LabelSet pFullDMD,"BaseBonus","",1,"" puPlayer.LabelSet pFullDMD,"SuperFeatures","",1,"" puPlayer.LabelSet pFullDMD,"Combos","",1,"" puPlayer.LabelSet pFullDMD,"Loops","",1,"" puPlayer.LabelSet pFullDMD,"BonusMultiplier","",1,"" puPlayer.LabelSet pFullDMD,"TextTotalBonus","total",1,"" puPlayer.LabelSet pFullDMD,"TotalBonus","" & FormatNumber(TotalBonus,0),1,"" ' PlaySound "Sound-0x0008" ' PlaySound "Sound-0x0008", 0, SongVolume playmedia "Sound-0x00BF.mp3","Audionoise",pAudio,"",0,"",1,1 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) BaseBonus = 0 SuperFeatures = 0 Combos = 0 Uturn = 0 Loops = 0 RageCount = 0 'BonusMultiplier(CurrentPlayer) = 1 End Sub Sub DisplayTotalScoreBonus_timer() ' BypassVideo = True ' BypassVideo = False DisplayTotalScoreBonus.Enabled=False Score(CurrentPlayer) = Score(CurrentPlayer) + TotalBonus 'puPlayer.LabelSet pFullDMD,"TotalScoreBonus","" & FormatNumber(Score(CurrentPlayer),0),1,"" playmedia "Sound-0x013D.mp3","Audionoise",pAudio,"",0,"",1,1 ' Fanfare at end of bonus End Sub Sub HideTotalBonusScore_timer() ' BypassVideo = False HideTotalBonusScore.Enabled=False 'Score(CurrentPlayer) = Score(CurrentPlayer) + BaseBonus puPlayer.LabelSet pFullDMD,"BonusMultiplier","",1,"" puPlayer.LabelSet pFullDMD,"TextTotalBonus","",1,"" puPlayer.LabelSet pFullDMD,"TotalBonus","",1,"" 'puPlayer.LabelSet pFullDMD,"TotalScoreBonus","",1,"" ' PlaySound "knocker" Puplayer.setVolumeCurrent pMusic, 100 ' music back up End Sub Sub VideoBlackCastleIntro BypassVideo = False HideOverlay = True ' EndOfVideo.Interval=15000 ' EndOfVideo.Enabled=True ' VideoHideOverlay ' playmedia "BlackKnight_BKBattle_ModeIntro.mp4","Black Castle Mode",pFullDMD,"cineon",15000,"",1,5 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) if WarHurryFlag = True Then WarStop pupevent 108 End Sub Sub VideoBlackCastleLoop BypassVideo = False HideOverlay = False 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True ' DOF 513, DOFPulse ' If vsvol = 100 Then ' DOF 513, DOFPulse ' ElseIf vsvol < 100 And vsvol > 89 Then DOF 909, DOFPulse ' ElseIf vsvol < 90 And vsvol > 79 Then DOF 908, DOFPulse ' ElseIf vsvol < 80 And vsvol > 69 Then DOF 907, DOFPulse ' ElseIf vsvol < 70 And vsvol > 59 Then DOF 906, DOFPulse ' ElseIf vsvol < 60 And vsvol > 49 Then DOF 905, DOFPulse ' ElseIf vsvol < 50 And vsvol > 39 Then DOF 904, DOFPulse ' ElseIf vsvol < 40 And vsvol > 29 Then DOF 903, DOFPulse ' ElseIf vsvol < 30 And vsvol > 19 Then DOF 902, DOFPulse ' Else DOF 901, DOFPulse ' End If ' SetBackGroundImportant.Enabled = True ' pupevent 513 ' playmedia "BlackKnight_BKBattle_LoopingMainplayBackground.mp4","Black Castle Mode",pFullDMD,"cineon",20000,"",1,5 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' PuPlayer.setbackground pFullDMD, 1 End Sub Sub VideoHideOverlay playmedia "overlay_blank.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PuPlayer.LabelSet pFullDMD,"AddScoreChest","",1,"{'mt':2,'color':28671, 'size': 5, 'xpos': 14, 'xalign': 1, 'ypos': 69, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"TimerSuperMode","",1,"{'mt':2,'color':16777215, 'size': 6, 'xpos': 5, 'xalign': 1, 'ypos': 9, 'yalign': 1}" puPlayer.LabelSet pFullDMD,"LastChanceBallToLock","",1,"" puPlayer.LabelSet pFullDMD,"LastChanceTime","",1,"" puPlayer.LabelSet pFullDMD,"LastChanceJackpot","",1,"" pSplashCommentDisplayed "",3,255 pSplashCommentDisplayed2 "",3,40 pSplashAddScoreDisplayed "",3,255 pSplashAddScoreDisplayed2 "",3,40 End Sub Sub VideoExtraBallIsLit ' BypassVideo = False ' HideOverlay = True ' VideoHideOverlay 'EndOfVideo.Interval=6000 'EndOfVideo.Enabled=True WarHideHurryUp pupevent 127 If WarHurryFlag = True Then WarDelayShow.Interval = 6000 ' 6 second delay used WarDelayShow.enabled = True End If 'playmedia "ExtraballIsLit.mp4","Extra ball",pFullDMD,"cineon",6000,"",1,30 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) 'playmedia "Sound-0x08CD.mp3","Audiocomment",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ExtraBallsIsLit = True End Sub Sub VideoExtraBall BypassVideo = False 'HideOverlay = True 'VideoHideOverlay 'EndOfVideo.Interval=8500 'EndOfVideo.Enabled=True 'playmedia "ExtraBall.mp4","Extra ball",pFullDMD,"cineon",8500,"",1,30 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 128 If WarHurryFlag = True Then WarDelayShow.Interval = 9000 ' 9 second delay WarDelayShow.enabled = True End If 'playmedia "Sound-0x08AB.mp3","Audiocomment",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) DelayCallout 8, RndInt(415,416) End Sub Sub VideoExtraBallShootAgain BypassVideo = False 'HideOverlay = True 'VideoHideOverlay 'EndOfVideo.Interval=5000 'EndOfVideo.Enabled=True 'playmedia "ShootAgain.mp4","Extra ball",pFullDMD,"cineon",5000,"",1,18 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 129 'playmedia "shoot again Sound-0x091A.mp3","Audiocomment",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) DelayCallout 4, RndInt(439,440) End Sub ' **** Battle videos attacks and checks ' mudgbog video Sub VideoHydraattack_timer() VideoHydraattack.Enabled = False ' hide warhurryup WarHideHurryUp If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If ' play attack check if defeated if MudBogHeadsCounter(CurrentPlayer) => MudBogHeadsNeeded(CurrentPlayer) Then pupevent 152 'all 4 heads gone video Hydra defeated CommentDisplayed = "Hydra Defeated!" ' play comment pSplashCommentDisplayed ""& CommentDisplayed,3,255 pSplashCommentDisplayed2 ""& CommentDisplayed,3,40 pSplashAddScoreDisplayed "" & FormatNumber(AddScoreMudBog,0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(AddScoreMudBog,0),3,40 MudBog(CurrentPlayer) = 4 ' mudbog has been completed MudBogHeadsCounter(CurrentPlayer)= 0 AddTimeForMission(CurrentPlayer) = 1 NumberOfMissioncomplete(CurrentPlayer) = NumberOfMissioncomplete(CurrentPlayer) + 1 NumberOfHitForStartMission(CurrentPlayer) = 0 ShieldIsReadyToActivateMission(CurrentPlayer) = False MudBogHeadsNeeded(CurrentPlayer) = MudBogHeadsNeeded(CurrentPlayer) + 1 ' increase number of heads neded for next battle If PowerSwordActivated = True then PowerSwordActivated = False PowerSwordMultipler = 1 PowerSwordAnimated.enabled = False PowerSwordLevel(CurrentPlayer) = 0 updatePowersword() End If horloge.enabled = False ModeTotalHydra.Interval = 5000 ModeTotalHydra.Enabled = True Else ' play normal attack Select Case Int(Rnd*3)+1 Case 1 : pupevent 149 Case 2 : pupevent 150 Case 3 : pupevent 151 End Select ' play comment pSplashCommentDisplayed ""& CommentDisplayed,3,255 pSplashCommentDisplayed2 ""& CommentDisplayed,3,40 pSplashAddScoreDisplayed "" & FormatNumber(AddScoreMudBog,0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(AddScoreMudBog,0),3,40 AddTimeForMission(CurrentPlayer) = AddTimeForMission(CurrentPlayer) + MissionAttackTimeBoost ' adds seconds to mission timer ' check if knight letter added (half of number neded) If MudBogHeadsCounter(CurrentPlayer) = Int(MudBogHeadsNeeded(CurrentPlayer)/2) Then KnightLamp(CurrentPlayer) = KnightLamp(CurrentPlayer) + 1 If KnightLamp(CurrentPlayer) > 12 Then KnightLamp(CurrentPlayer) =12 Else Video_Knight End if End if DelayCallout 5,RndInt(269,270) End If End Sub ' magma beast Sub VideoFireElementattack_timer() VideoFireElementattack.Enabled = False WarHideHurryUp If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If If MoltenFireShots(CurrentPlayer) >= MoltenFireShotsNeeded(CurrentPlayer) Then pupevent 138 CommentDisplayed = "Magma Beast Defeated!" ' play comment pSplashCommentDisplayed ""& CommentDisplayed,3,255 pSplashCommentDisplayed2 ""& CommentDisplayed,3,40 pSplashAddScoreDisplayed "" & FormatNumber(AddScoreMoltenFire,0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(AddScoreMoltenFire,0),3,40 MoltenFire(CurrentPlayer) = 4 MoltenFireShots(CurrentPlayer) = 0 AddTimeForMission(CurrentPlayer) = 1 NumberOfMissioncomplete(CurrentPlayer) = NumberOfMissioncomplete(CurrentPlayer) + 1 NumberOfHitForStartMission(CurrentPlayer) = 0 ShieldIsReadyToActivateMission(CurrentPlayer) = False MoltenFireShotsNeeded(CurrentPlayer) = MoltenFireShotsNeeded(CurrentPlayer) + 2 ' increase number of shots neded for next battle If PowerSwordActivated = True then PowerSwordActivated = False PowerSwordMultipler = 1 PowerSwordAnimated.enabled = False PowerSwordLevel(CurrentPlayer) = 0 updatePowersword() End If horloge.enabled = False ModeTotalFireElement.Interval = 4000 ModeTotalFireElement.Enabled = True Else ' Normal Attack Select Case Int(Rnd*3)+1 Case 1 : pupevent 135 Case 2 : pupevent 136 Case 3 : pupevent 137 End Select ' play comment pSplashCommentDisplayed ""& CommentDisplayed,3,255 pSplashCommentDisplayed2 ""& CommentDisplayed,3,40 pSplashAddScoreDisplayed "" & FormatNumber(AddScoreMoltenFire,0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(AddScoreMoltenFire,0),3,40 AddTimeForMission(CurrentPlayer) = AddTimeForMission(CurrentPlayer) + MissionAttackTimeBoost ' adds 15 seconds to mission timer ' check if knight letter added (half of number neded) If MoltenFireShots(CurrentPlayer) = Int(MoltenFireShotsNeeded(CurrentPlayer)/2) Then KnightLamp(CurrentPlayer) = KnightLamp(CurrentPlayer) + 1 If KnightLamp(CurrentPlayer) > 12 Then KnightLamp(CurrentPlayer) =12 Else Video_Knight End if End if DelayCallout 5,RndInt(267,268) End If checklamp.interval = 100 checklamp.Enabled = True End Sub ' sandworm burning sands Sub VideoSandwormattack_timer() VideoSandwormattack.Enabled = False WarHideHurryUp If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If ' BurningSandsHit = 0 1 or 2 when 2 third part hit so increase set if BurningSandsHit = 2 then BurningSandsSetsCounter(CurrentPlayer) = BurningSandsSetsCounter(CurrentPlayer) + 1 BurningSandsHit = 0 CommentDisplayed = "Sandworm " & FormatNumber(BurningSandsSetsCounter(CurrentPlayer),0) & " Destroyed!" AddScoreSandWorm = (150000 * ((BurningSandsSetsCounter(CurrentPlayer)+1)) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6) ) * PowerSwordMultipler Else BurningSandsHit = BurningSandsHit + 1 CommentDisplayed = "Sandworm Hit!" AddScoreSandWorm = (50000 * (BurningSandsSetsCounter(CurrentPlayer)+1)) * PowerSwordMultipler End If Addscore AddScoreSandWorm AddScoreSandWormTotal(CurrentPlayer) = AddScoreSandWormTotal(CurrentPlayer) + AddScoreSandWorm ' play attack check if defeated if BurningSandsSetsCounter(CurrentPlayer) => BurningSandsSetsNeeded(CurrentPlayer) Then pupevent 199 'all sandworm defeated CommentDisplayed = "Sandworms Defeated!" ' play comment pSplashCommentDisplayed ""& CommentDisplayed,3,255 pSplashCommentDisplayed2 ""& CommentDisplayed,3,40 pSplashAddScoreDisplayed "" & FormatNumber(AddScoreSandWorm,0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(AddScoreSandWorm,0),3,40 BurningSands(CurrentPlayer) = 4 ' Burning sands completed BurningSandsSetsCounter(CurrentPlayer) = 0 AddTimeForMission(CurrentPlayer) = 1 NumberOfMissioncomplete(CurrentPlayer) = NumberOfMissioncomplete(CurrentPlayer) + 1 NumberOfHitForStartMission(CurrentPlayer) = 0 ShieldIsReadyToActivateMission(CurrentPlayer) = False BurningSandsSetsNeeded(CurrentPlayer) = BurningSandsSetsNeeded(CurrentPlayer) + 1 ' increase number of sets needed for next battle If PowerSwordActivated = True then PowerSwordActivated = False PowerSwordMultipler = 1 PowerSwordAnimated.enabled = False PowerSwordLevel(CurrentPlayer) = 0 updatePowersword() End If horloge.enabled = False ModeTotalSandWorm.Interval = 4000 ModeTotalSandWorm.Enabled = True Else ' play normal attack WarHideHurryUp Select Case Int(Rnd*3)+1 Case 1 : pupevent 196 Case 2 : pupevent 197 Case 3 : pupevent 198 End Select If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If ' play comment? pSplashCommentDisplayed ""& CommentDisplayed,3,255 pSplashCommentDisplayed2 ""& CommentDisplayed,3,40 pSplashAddScoreDisplayed "" & FormatNumber(AddScoreSandWorm ,0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(AddScoreSandWorm ,0),3,40 AddTimeForMission(CurrentPlayer) = AddTimeForMission(CurrentPlayer) + MissionAttackTimeBoost ' adds seconds to mission timer ' check if knight letter added (half of number neded) If BurningSandsSetsCounter(CurrentPlayer) = Int(BurningSandsSetsCounter(CurrentPlayer)/2) Then KnightLamp(CurrentPlayer) = KnightLamp(CurrentPlayer) + 1 If KnightLamp(CurrentPlayer) > 12 Then KnightLamp(CurrentPlayer) =12 Else Video_Knight End if End if DelayCallout 5,RndInt(262,263) End If checklamp.interval = 100 checklamp.Enabled = True End Sub Sub VideoHandHolderattack_timer() VideoHandHolderattack.Enabled = False WarHideHurryUp If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If If WickedCavernShots(CurrentPlayer) => WickedCavernShotsNeeded(CurrentPlayer) Then pupevent 145 CommentDisplayed = "Hand Holder Defeated!" ' play comment pSplashCommentDisplayed ""& CommentDisplayed,3,255 pSplashCommentDisplayed2 ""& CommentDisplayed,3,40 pSplashAddScoreDisplayed "" & FormatNumber(AddScoreWickedCavern,0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(AddScoreWickedCavern,0),3,40 WickedCavern(CurrentPlayer) = 4 WickedCavernShots(CurrentPlayer) = 0 AddTimeForMission(CurrentPlayer) = 1 NumberOfMissioncomplete(CurrentPlayer) = NumberOfMissioncomplete(CurrentPlayer) + 1 NumberOfHitForStartMission(CurrentPlayer) = 0 ShieldIsReadyToActivateMission(CurrentPlayer) = False WickedCavernShotsNeeded(CurrentPlayer) = WickedCavernShotsNeeded(CurrentPlayer) + 2 ' increase number of shots neded for next battle If PowerSwordActivated = True then PowerSwordActivated = False PowerSwordMultipler = 1 PowerSwordAnimated.enabled = False PowerSwordLevel(CurrentPlayer) = 0 updatePowersword() End If horloge.enabled = False ModeTotalHandHolder.Interval = 4500 ModeTotalHandHolder.Enabled = True Else ' Normal Attack Select Case Int(Rnd*3)+1 Case 1 : pupevent 142 Case 2 : pupevent 143 Case 3 : pupevent 144 End Select ' play comment pSplashCommentDisplayed ""& CommentDisplayed,3,255 pSplashCommentDisplayed2 ""& CommentDisplayed,3,40 pSplashAddScoreDisplayed "" & FormatNumber(AddScoreWickedCavern,0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(AddScoreWickedCavern,0),3,40 AddTimeForMission(CurrentPlayer) = AddTimeForMission(CurrentPlayer) + MissionAttackTimeBoost ' adds 15 seconds to mission timer ' check if knight letter added (half of number neded) If WickedCavernShots(CurrentPlayer) = Int(WickedCavernShotsNeeded(CurrentPlayer)/2) Then KnightLamp(CurrentPlayer) = KnightLamp(CurrentPlayer) + 1 If KnightLamp(CurrentPlayer) > 12 Then KnightLamp(CurrentPlayer) =12 Else Video_Knight End if End if DelayCallout 5,RndInt(271,272) End If checklamp.interval = 100 checklamp.Enabled = True End Sub Sub VideoLichattack_timer() VideoLichattack.Enabled = False WarHideHurryUp If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If If DeepFreezeLordsCounter(CurrentPlayer) => DeepFreezeLordsNeeded(CurrentPlayer) Then pupevent 185 CommentDisplayed = "Lych Lords Defeated!" ' play comment pSplashCommentDisplayed ""& CommentDisplayed,3,255 pSplashCommentDisplayed2 ""& CommentDisplayed,3,40 pSplashAddScoreDisplayed "" & FormatNumber(AddScoreDeepFreeze,0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(AddScoreDeepFreeze,0),3,40 DeepFreeze(CurrentPlayer) = 4 DeepFreezeLordsCounter(CurrentPlayer) = 0 AddTimeForMission(CurrentPlayer) = 1 NumberOfMissioncomplete(CurrentPlayer) = NumberOfMissioncomplete(CurrentPlayer) + 1 NumberOfHitForStartMission(CurrentPlayer) = 0 ShieldIsReadyToActivateMission(CurrentPlayer) = False DeepFreezeLordsNeeded(CurrentPlayer) = DeepFreezeLordsNeeded(CurrentPlayer) + 1 ' increase number of Lords neded for next battle If PowerSwordActivated = True then PowerSwordActivated = False PowerSwordMultipler = 1 PowerSwordAnimated.enabled = False PowerSwordLevel(CurrentPlayer) = 0 updatePowersword() End If horloge.enabled = False ModeTotalLich.Interval = 4000 ModeTotalLich.Enabled = True Else ' Normal Attack Select Case Int(Rnd*3)+1 Case 1 : pupevent 182 Case 2 : pupevent 183 Case 3 : pupevent 184 End Select ' play comment pSplashCommentDisplayed ""& CommentDisplayed,3,255 pSplashCommentDisplayed2 ""& CommentDisplayed,3,40 pSplashAddScoreDisplayed "" & FormatNumber(AddScoreDeepFreeze,0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(AddScoreDeepFreeze,0),3,40 AddTimeForMission(CurrentPlayer) = AddTimeForMission(CurrentPlayer) + MissionAttackTimeBoost ' adds 15 seconds to mission timer ' check if knight letter added (half of number neded) If DeepFreezeLordsCounter(CurrentPlayer) = Int(DeepFreezeLordsNeeded(CurrentPlayer)/2) Then KnightLamp(CurrentPlayer) = KnightLamp(CurrentPlayer) + 1 If KnightLamp(CurrentPlayer) > 12 Then KnightLamp(CurrentPlayer) =12 Else Video_Knight End if End if DelayCallout 5,RndInt(264,266) End If checklamp.interval = 100 checklamp.Enabled = True End Sub Sub VideoBlackCastleattack_timer() VideoBlackCastleattack.Enabled = False WarHideHurryUp If BlackCastleHitCounter = 0 Then ' play big hit here pupevent 211 ' NB no attack animations for black castle so Made my own from clips ' play comment pSplashCommentDisplayed ""& CommentDisplayed,3,255 pSplashCommentDisplayed2 ""& CommentDisplayed,3,40 pSplashAddScoreDisplayed "" & FormatNumber(AddScoreBlackCastle,0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(AddScoreBlackCastle,0),3,40 timer2.interval= 5 * (BlackCastleRoundsNeeded(CurrentPlayer) + 1 - BlackCastleRoundCounter) timer2.Enabled=True 'StopRotating.Enabled=False StopBouleFlag = False FlailReset.Enabled = True ' Set safeguard in place to reset flail every 30 seconds Else ' play smaller hit here pupevent 210 ' NB no attack animations for black castle so Made my own from clips ' play comment pSplashCommentDisplayed ""& CommentDisplayed,3,255 pSplashCommentDisplayed2 ""& CommentDisplayed,3,40 pSplashAddScoreDisplayed "" & FormatNumber(AddScoreBlackCastle,0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(AddScoreBlackCastle,0),3,40 End If If BlackCastleRoundCounter => BlackCastleRoundsNeeded(CurrentPlayer) Then pupevent 215 ' play Black knight defeated here pupevent 212 ' NB no attack animations for black castle so Made my own from clips CommentDisplayed = "Black Knight Defeated!" ' play comment pSplashCommentDisplayed ""& CommentDisplayed,3,255 pSplashCommentDisplayed2 ""& CommentDisplayed,3,40 pSplashAddScoreDisplayed "" & FormatNumber(AddScoreBlackCastle,0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(AddScoreBlackCastle,0),3,40 ' lights handled in LampCheck using BlackCastle(CurrentPlayer) = 4 for Rage Multiball ' stop horloge set to multiball no timer needed horloge.Enabled = False ' black castle complete light balls for Rage Multiball L66State(CurrentPlayer) = 0 L75State(CurrentPlayer) = 0 L79State(CurrentPlayer) = 0 L85State(CurrentPlayer) = 0 L91State(CurrentPlayer) = 2 L98State(CurrentPlayer) = 0 L106State(CurrentPlayer) = 0 BlackCastle(CurrentPlayer) = 4 BlackCastleRoundCounter = 0 AddTimeForMission(CurrentPlayer) = 1 NumberOfMissioncomplete(CurrentPlayer) = NumberOfMissioncomplete(CurrentPlayer) + 1 BlackCastleRoundsNeeded(CurrentPlayer) = BlackCastleRoundsNeeded(CurrentPlayer) + 1 ShieldRemainsLock = False NumberOfHitForStartMission(CurrentPlayer) = 0 ShieldIsReadyToActivateMission(CurrentPlayer) = False horloge.enabled = False ModeTotalBlackCastle.Interval = 5000 ModeTotalBlackCastle.Enabled = True BlackCastleMissionHitStart = False Else ' increase time for successful hit AddTimeForMission(CurrentPlayer) = AddTimeForMission(CurrentPlayer) + BlackCastleTimeBoost DelayCallout 5,RndInt(273,278) End If End Sub sub RageMultiballIntro_Timer() RageMultiballIntro.enabled = False ' start rage Multiball RageMultiball = True ' bibble ' set BackGround 'pupevent 214 ' Setting music and Ball saver pupevent 411 ' Rage Multiball Music Plays once whilst ball saver CurrentMissionFlag(CurrentPlayer) = 2 MultiballAmount = 6 MultiballKicker.Enabled = True EnableBallSaver 90 ' set to 90 special ball saver to match music hence Hard coded ' forcing shield down ShieldRemainsLock = True Shield_New_Status = "unlock" ' ShieldTimer.Enabled=True ShieldNumberOfMove = 2 ShieldTimer.interval=100 ShieldTimer.Enabled=True ' spin the flail StopBouleFlag = False StopRotating.Enabled=False timer2.interval=5 timer2.Enabled=True FlailReset.Enabled = True ' Set safeguard in place to reset flail every 30 seconds ' Optional Timed Rage Multiball setting if RageMultiballTimed = true Then AddTimeForMission(CurrentPlayer) = 90 ' special Multiball set to music length test set to 10 horloge.Interval=1000 horloge.Enabled = True End If end Sub Sub video_SavedBall BypassVideo = False 'HideOverlay = True 'VideoHideOverlay 'EndOfVideo.Interval=4000 'EndOfVideo.Enabled=True 'playmedia "BallSave.mp4","Ball Save",pFullDMD,"cineon",4000,"",1,5 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 103 End Sub Sub Video_Knight BypassVideo = False WarHideHurryUp If KnightLamp(CurrentPlayer) = 1 Then pupevent 172 : KnightLamp(CurrentPlayer) = KnightLamp(CurrentPlayer) + 1 End If'(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) If KnightLamp(CurrentPlayer) = 3 Then pupevent 173 : KnightLamp(CurrentPlayer) = KnightLamp(CurrentPlayer) + 1 End If'(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) If KnightLamp(CurrentPlayer) = 5 Then pupevent 174 : KnightLamp(CurrentPlayer) = KnightLamp(CurrentPlayer) + 1 End If'(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) If KnightLamp(CurrentPlayer) = 7 Then pupevent 175 : KnightLamp(CurrentPlayer) = KnightLamp(CurrentPlayer) + 1 End If'(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) If KnightLamp(CurrentPlayer) = 9 Then pupevent 176 : KnightLamp(CurrentPlayer) = KnightLamp(CurrentPlayer) + 1 End If'(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) If KnightLamp(CurrentPlayer) = 11 Then pupevent 177 : KnightLamp(CurrentPlayer) = KnightLamp(CurrentPlayer) + 1 End If'(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End Sub Sub Video_Catapult_Multball_1 BypassVideo = False 'HideOverlay = True 'VideoHideOverlay ' EndOfVideo.Interval=4000 ' EndOfVideo.Enabled=True If LastChanceCatapultMode = False Then WarHideHurryUp Select Case Int(Rnd*2)+1 Case 1 : pupevent 119 Case 2 : pupevent 120 End Select DelayCallout 3,RndInt(364,366) If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If Else WarHideHurryUp Select Case Int(Rnd*2)+1 Case 1 : pupevent 121 Case 2 : pupevent 122 End Select DelayCallout 3,RndInt(363,364) If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End If ' puPlayer.LabelSet pFullDMD,"CommentDisplayed","Catapult Jackpot!",1,"" ' puPlayer.LabelSet pFullDMD,"CommentDisplayed2","Catapult Jackpot!",1,"" ' puPlayer.LabelSet pFullDMD,"AddScoreDisplayed","" & FormatNumber(AddscoreCatapultBonus,0),1,"" ' puPlayer.LabelSet pFullDMD,"AddScoreDisplayed2","" & FormatNumber(AddscoreCatapultBonus,0),1,"" pSplashCommentDisplayed "" & CommentDisplayed,3,255 pSplashCommentDisplayed2 "" & CommentDisplayed,3,40 pSplashAddScoreDisplayed "" & FormatNumber(AddscoreCatapultBonus,0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(AddscoreCatapultBonus,0),3,40 End Sub 'Sub Video_Catapult_Multball_2 ' HideOverlay = True ' VideoHideOverlay ' EndOfVideo.Interval=4000 ' EndOfVideo.Enabled=True ' playmedia "BlackKnight_CatapultMultiball_AttackVariations_2.mp4","Catapult Multiball",pFullDMD,"cineon",4000,"",1,5 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) '' pupevent 521 'End Sub Sub Video_Catapult_Multball_jacpot BypassVideo = False 'HideOverlay = True 'VideoHideOverlay ' EndOfVideo.Interval=4000 ' EndOfVideo.Enabled=True ' playmedia "BlackKnight_CatapultMultiball_SuperJackpot.mp4","Catapult Multiball",pFullDMD,"cineon",4000,"",1,16 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' puPlayer.LabelSet pFullDMD,"CommentDisplayed","" & CommentDisplayed,1,"" ' puPlayer.LabelSet pFullDMD,"CommentDisplayed2","" & CommentDisplayed,1,"" ' puPlayer.LabelSet pFullDMD,"AddScoreDisplayed","" & FormatNumber(Catapult_jackpot_collected,0),1,"" ' puPlayer.LabelSet pFullDMD,"AddScoreDisplayed2","" & FormatNumber(Catapult_jackpot_collected,0),1,"" pSplashCommentDisplayed "" & CommentDisplayed,3,255 pSplashCommentDisplayed2 "" & CommentDisplayed,3,40 pSplashAddScoreDisplayed "" & FormatNumber(Catapult_jackpot_collected,0),3,255 pSplashAddScoreDisplayed2 "" & FormatNumber(Catapult_jackpot_collected,0),3,40 Catapult_jackpot_collected = 0 WarHideHurryUp pupevent 124 DelayCallout 3,RndInt(363,366) If WarHurryFlag = True Then WarDelayShow.Interval = 4000 ' 4 second delay WarDelayShow.enabled = True End If End Sub Sub Video_Add_Ball_Ready BypassVideo = False 'HideOverlay = True 'VideoHideOverlay ' EndOfVideo.Interval=4000 ' EndOfVideo.Enabled=True ' playmedia "AddABallReady.mp4","Add a ball",pFullDMD,"cineon",4000,"",1,5 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 102 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End Sub Sub Video_Add_Ball BypassVideo = False 'HideOverlay = True 'VideoHideOverlay ' EndOfVideo.Interval=4000 ' EndOfVideo.Enabled=True ' playmedia "AddABall.mp4","Add a ball",pFullDMD,"cineon",4000,"",1,5 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 101 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End Sub Sub Video_Danger BypassVideo = False 'HideOverlay = True 'VideoHideOverlay ' EndOfVideo.Interval=4000 ' EndOfVideo.Enabled=True 'PuPlayer.PlayStop pBackglass ' playmedia "Danger.mp4","Danger",pFullDMD,"cineon",4000,"",1,70 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 125 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End Sub Sub Video_Tilt BypassVideo = False 'HideOverlay = True 'VideoHideOverlay ' EndOfVideo.Interval=7400 ' EndOfVideo.Enabled=True 'PuPlayer.PlayStop pBackglass ' playmedia "Tilt.mp4","Tilt",pFullDMD,"cineon",7400,"",1,71 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) if WarHurryFlag = True Then WarStop pupevent 126 End Sub Sub Video_Magna_Save BypassVideo = False 'HideOverlay = True 'VideoHideOverlay ' EndOfVideo.Interval=4000 ' EndOfVideo.Enabled=True ' playmedia "BK_MagnaSave.mp4","Magna Save",pFullDMD,"cineon",4000,"",1,5 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) WarHideHurryUp pupevent 187 If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End Sub ' bobble Sub Video_Black_Knight_Retro BypassVideo = False 'HideOverlay = True 'VideoHideOverlay If BlackKnightRetro(CurrentPlayer) = 1 Then 'playmedia "WizardModeBKOG_Intro.mp4","BK2000",pFullDMD,"cineon",5000,"",1,21 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) pupevent 399 ' stop the music pupevent 107 RetroMode = 1 horloge.Enabled = False StartBlackKnightRetroMulti.Interval=5000 StartBlackKnightRetroMulti.Enabled=True restoreOverlay.interval = 5000 restoreOverlay.enabled = true If PMdebug = true Then PuPlayer.LabelSet pFullDMD,"curplayer","Retro 1",1,"{'mt':2}" End If If BlackKnightRetro(CurrentPlayer) = 3 Then pupevent 399 ' stop the music pupevent 104 RetroMode = 3 MultiballAmount = 3 'EnableBallSaver Bk2000Time AddTimeForMission(CurrentPlayer) = Bk2000Time horloge.Interval=1000 horloge.Enabled = True StartBlackKnightRetroMulti.Interval=4200 StartBlackKnightRetroMulti.Enabled=True 'horloge.Enabled=True 'BK2000Bonus.Interval=5000 'BK2000Bonus.Enabled=True restoreOverlay.interval = 5000 restoreOverlay.enabled = true If PMdebug = true Then PuPlayer.LabelSet pFullDMD,"curplayer","Retro 2",1,"{'mt':2}" End If End Sub Sub BK2000Bonus_Timer() 'BypassVideo = False BK2000Bonus.Enabled=False 'playmedia "BK2000 - Bonus.mp4","BK2000",pFullDMD,"cineon",22000,"",1,21 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) if WarHurryFlag = True Then WarStop pupevent 106 'EndOfVideo.Interval=22000 'EndOfVideo.Enabled=True RetroMode = 3 StartBlackKnightRetroMulti.Interval=22000 StartBlackKnightRetroMulti.Enabled=True GiOff TurnOffRoundLights bk2000_01.Interval=6100 bk2000_01.Enabled=True bk2000_02.Interval=8280 bk2000_02.Enabled=True bk2000_03.Interval=11100 bk2000_03.Enabled=True bk2000_04.Interval=14600 bk2000_04.Enabled=True bk2000_05.Interval=16260 bk2000_05.Enabled=True bk2000_06.Interval=19040 bk2000_06.Enabled=True bk2000_07.Interval=22040 bk2000_07.Enabled=True Light054.State=2 Light055.State=2 Light056.State=2 Light057.State=2 Light058.State=2 Light059.State=2 Light060.State=2 Light061.State=2 Light062.State=2 Light063.State=2 L163.State = 2 L83.State = 0 L82.State = 0 L79.State = 0 L72.State = 0 L103.State = 0 L115.State = 0 L116.State = 0 L117.State = 0 End Sub Sub bk2000_01_Timer() bk2000_01.Enabled=False CheckLamp.Enabled = False TurnOffAllRegularLights Light054.State=0 Light055.State=0 Light056.State=0 Light057.State=0 Light058.State=0 Light059.State=0 Light060.State=0 Light061.State=0 Light062.State=0 Light063.State=0 L163.State = 0 End Sub Sub bk2000_02_Timer() bk2000_02.Enabled=False L83.State = 2 L82.State = 2 L79.State = 2 StopBouleFlag = False StopRotating.Enabled=False timer2.interval=8 timer2.Enabled=True FlailReset.Enabled = True ' Set safeguard in place to reset flail every 30 seconds End Sub Sub bk2000_03_Timer() bk2000_03.Enabled=False L83.State = 0 L82.State = 0 L79.State = 0 L72.State = 2 L103.State = 2 End Sub Sub bk2000_04_Timer() bk2000_04.Enabled=False L115.State = 2 L116.State = 2 L117.State = 2 L72.State = 0 L103.State = 0 End Sub Sub bk2000_05_Timer() bk2000_05.Enabled=False L115.State = 0 L116.State = 0 L117.State = 0 L95.State = 2 End Sub Sub bk2000_06_Timer() bk2000_06.Enabled=False ExtraBallsIsLit = True CheckLamp.Enabled = True End Sub Sub bk2000_07_Timer() bk2000_07.Enabled=False GiOn End Sub ' this time now used for end of battle mode Sub EndOfVideo_Timer() BypassVideo = False EndOfVideo.Enabled=False HideOverlay = False 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True GiOn ''' SetBackGroundGeneral puPlayer.LabelSet pFullDMD,"CommentDisplayed","",1,"" puPlayer.LabelSet pFullDMD,"CommentDisplayed2","",1,"" puPlayer.LabelSet pFullDMD,"AddScoreDisplayed","",1,"" puPlayer.LabelSet pFullDMD,"AddScoreDisplayed2","",1,"" VideoSetBackgroundPM MusicResetPM End Sub ' end of battle Sub EndOfMode_Timer() ' BypassVideo = False EndOfMode.Enabled=False 'HideOverlay = False 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True 'MissionSelect GiOn VideoSetBackgroundPM MusicResetPM if ExtraBallAfterMissionNum <> 0 Then ' If ExtraBallAfterMissionNum<0 then its one particaulr mission that awards extra ball once eg -1 is first mission Only, -2 2nd mission only If ExtraBallAfterMissionNum < 0 Then if NumberOfMissioncomplete(CurrentPlayer) = (-1 * ExtraBallAfterMissionNum) Then DelayCallout 3,-99 Else ' every nth matching extra ball is lit (eg 1 is every mission, 2 is every even mission, 3 is every 3rd missin etc.) if NumberOfMissioncomplete(CurrentPlayer) Mod ExtraBallAfterMissionNum = 0 Then DelayCallout 3,-99 End If End If End If ' get new mission 'RampLightsMove(CurrentPlayer) = "Blinking" MissionRandomTimer.Interval=100 MissionRandomTimer.Enabled=True End Sub Sub EndOfVideoLastChance_Timer() If PMdebug = true Then PuPlayer.LabelSet pFullDMD,"curplayer","LCvideois on",1,"{'mt':2}" HideOverlay = False EndOfVideoLastChance.Enabled = False AddTimeForMission(CurrentPlayer) = MissionTimeLastChance LastChanceStart = True AddscoreCatapult = 250000 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True End Sub Sub EndOfVideoGameOver_Timer() BypassVideo = False EndOfVideoGameOver.Enabled=False 'HideOverlay = True 'videoHideOverlay StartAttractMode 'after the end of MatchingScore PuPlayer.LabelSet pFullDMD,"matchscore","",1,"" ' video_init2 End Sub ' ************************************************************************************** ' Meakin Overlay new version using labels, supermode routines and powersword routines ' ************************************************************************************** Sub restoreOverlay_timer restoreOverlay.enabled=False ' check if normal overlay or Blackknight RetroMode if retromode = 0 then ' basic background pupevent 99 'PuPlayer.LabelSet pFullDMD,"Overlay","pupoverlays\\Overlay.png",1,"{'mt':2,'color':255, 'width': 100, 'height': 100, 'xpos': 0, 'xalign': 0, 'ypos': 0, 'yalign': 0}" 'playmedia "overlay.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' Super Modes Icons PuPlayer.LabelSet pFullDMD,"LTargets","pupoverlays\\Targets" & SuperTargetsLevel & ".png",1,"{'mt':2,'color':255, 'width': 5, 'height': 10, 'xpos': 3, 'xalign': 0, 'ypos': 12, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"LSlings","pupoverlays\\Slings" & SuperSlingsLevel& ".png",1,"{'mt':2,'color':255, 'width': 5, 'height': 10, 'xpos': 3, 'xalign': 0, 'ypos': 22, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"LLanes","pupoverlays\\Lanes" & SuperLanesLevel & ".png",1,"{'mt':2,'color':255, 'width': 5, 'height': 10, 'xpos': 3, 'xalign': 0, 'ypos': 32, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"LPops","pupoverlays\\Pops" & SuperPopsLevel & ".png",1,"{'mt':2,'color':255, 'width': 5, 'height': 10, 'xpos': 3, 'xalign': 0, 'ypos': 42, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"LOrbits","pupoverlays\\Orbits" & SuperOrbitsLevel & ".png",1,"{'mt':2,'color':255, 'width': 5, 'height': 10, 'xpos': 3, 'xalign': 0, 'ypos': 52, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"LSpinner","pupoverlays\\Spinner" & SuperSpinnerLevel & ".png",1,"{'mt':2,'color':255, 'width': 5, 'height': 10, 'xpos': 3, 'xalign': 0, 'ypos': 62, 'yalign': 0}" 'AddScoreChestJackpot = 1000000 ' mission timer 'CurrentMissionFlag(CurrentPlayer) = 2 'AddTimeForMission(CurrentPlayer) = 88 If CurrentMissionFlag(CurrentPlayer) = 2 Then If AddTimeForMission(CurrentPlayer) = 0 Then PuPlayer.LabelSet pFullDMD,"MissionTimer","",1,"" Else PuPlayer.LabelSet pFullDMD,"MissionTimer","" & FormatNumber(AddTimeForMission(CurrentPlayer),0),1,"" End If Else PuPlayer.LabelSet pFullDMD,"MissionTimer","",1,"" End If PuPlayer.LabelSet pFullDMD,"Play1score","",1,"{'mt':2,'color':4491006, 'size': 4, 'xpos': 100, 'xalign': 1, 'ypos': 100, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play1","Player 1",1,"{'mt':2,'color':3753717 }" PuPlayer.LabelSet pFullDMD,"curscore",FormatNumber(Score(CurrentPlayer),0),1,"{'mt':2,'color':2477823, 'size': 6.2, 'xpos': 50, 'xalign': 1, 'ypos': 89.2, 'yalign': 1}" ' If PMdebug = False Then PuPlayer.LabelSet pFullDMD,"curplayer","FreePlay",1,"" PuPlayer.LabelSet pFullDMD,"Ball","Ball " & ballNumDisplay ,1,"" PuPlayer.LabelSet pFullDMD,"curscore3","",1,"" PuPlayer.LabelSet pFullDMD,"Ball2","",1,"" Else if RetroMode = 1 Then pupevent 98 Else pupevent 104 End if ' Super Modes Icons PuPlayer.LabelSet pFullDMD,"LTargets","",0,"{'mt':2,'color':255, 'width': 5, 'height': 10, 'xpos': 3, 'xalign': 0, 'ypos': 12, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"LSlings","",0,"{'mt':2,'color':255, 'width': 5, 'height': 10, 'xpos': 3, 'xalign': 0, 'ypos': 22, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"LLanes","",0,"{'mt':2,'color':255, 'width': 5, 'height': 10, 'xpos': 3, 'xalign': 0, 'ypos': 32, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"LPops","",0,"{'mt':2,'color':255, 'width': 5, 'height': 10, 'xpos': 3, 'xalign': 0, 'ypos': 42, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"LOrbits","",0,"{'mt':2,'color':255, 'width': 5, 'height': 10, 'xpos': 3, 'xalign': 0, 'ypos': 52, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"LSpinner","",0,"{'mt':2,'color':255, 'width': 5, 'height': 10, 'xpos': 3, 'xalign': 0, 'ypos': 62, 'yalign': 0}" If CurrentMissionFlag(CurrentPlayer) = 2 Then If AddTimeForMission(CurrentPlayer) = 0 Then PuPlayer.LabelSet pFullDMD,"MissionTimer","",1,"" Else PuPlayer.LabelSet pFullDMD,"MissionTimer","" & FormatNumber(AddTimeForMission(CurrentPlayer),0),1,"" End If Else PuPlayer.LabelSet pFullDMD,"MissionTimer","",1,"" End If PuPlayer.LabelSet pFullDMD,"Play1score","",1,"{'mt':2,'color':4491006, 'size': 4, 'xpos': 100, 'xalign': 1, 'ypos': 100, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play1","",1,"{'mt':2,'color':3753717 }" PuPlayer.LabelSet pFullDMD,"curscore","",1,"{'mt':2,'color':2477823, 'size': 6.2, 'xpos': 50, 'xalign': 1, 'ypos': 89.2, 'yalign': 1}" ' If PMdebug = False Then PuPlayer.LabelSet pFullDMD,"curplayer","FreePlay",1,"" PuPlayer.LabelSet pFullDMD,"Ball","",1,"" ' Show retro style letters PuPlayer.LabelSet pFullDMD,"curscore3",FormatNumber(Score(CurrentPlayer),0),1,"{'mt':2,'color':2477823, 'size': 6.2, 'xpos': 50, 'xalign': 1, 'ypos': 89.2, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"Ball2","" & BallsOnPlayfield & " ",1,"" End If ' wheel settings 'LightType(1) = 0 : Set LightObjectColor(1) = L26 'MUD BOG 'LightType(2) = 0 : Set LightObjectColor(2) = L29 'SUPER TARGETS 'LightType(3) = 0 : Set LightObjectColor(3) = L32 'MOLTEN FIRE 'LightType(4) = 0 : Set LightObjectColor(4) = L35 'SUPER SPINS 'LightType(5) = 0 : Set LightObjectColor(5) = L38 'BURNING SANDS 'LightType(6) = 0 : Set LightObjectColor(6) = L41 'SUPER POPS 'LightType(7) = 0 : Set LightObjectColor(7) = L44 'WICKED CAVERN 'LightType(8) = 0 : Set LightObjectColor(8) = L47 'SUPER ORBITS 'LightType(9) = 0 : Set LightObjectColor(9) = L50 'DEEP FREEZE 'LightType(10) = 0 : Set LightObjectColor(10) = L53 'SUPER LANES 'LightType(11) = 0 : Set LightObjectColor(11) = L56 'BLACK CASTLE 'LightType(12) = 0 : Set LightObjectColor(12) = L59 'SUPER SLINGS End Sub Sub SuperModeRandom() If SuperTargetsLevel>0 And SuperSlingsLevel>0 And SuperLanesLevel>0 and SuperPopsLevel>0 and SuperOrbitsLevel>0 and SuperSpinnerLevel>0 Then ' all in 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True SuperIsLit = False Else tempNum = Int(Rnd*6)+1 AllocateSuperMode() End If End Sub Sub AllocateSuperMode() if TempNum = 1 Then If SuperTargetsLevel > 0 Then SuperModeRandom Else SuperTargetsLevel = 1 AddScoreSuperTargets = SuperTargetsLevel * 50000 + 50000 L29State = 1 LightObjectColor(2).color = RGB(0, 255, 0) LightObjectColor(2).colorfull = RGB(0, 255, 0) Callout 501 End If End If if TempNum = 2 Then If SuperSlingsLevel > 0 Then SuperModeRandom Else SuperSlingsLevel = 1 AddScoreSuperSlings = SuperSlingsLevel * 100000 L59State = 1 LightObjectColor(12).color = RGB(0, 255, 0) LightObjectColor(12).colorfull = RGB(0, 255, 0) Callout 499 End If End If if TempNum = 3 Then If SuperLanesLevel > 0 Then SuperModeRandom Else SuperLanesLevel = 1 AddScoreSuperLanes = SuperLanesLevel * 25000 + 25000 L53State = 1 LightObjectColor(10).color = RGB(0, 255, 0) LightObjectColor(10).colorfull = RGB(0, 255, 0) Callout 496 End If End If if TempNum = 4 Then If SuperPopsLevel > 0 Then SuperModeRandom Else SuperPopsLevel = 1 AddScoreSuperPops = SuperPopsLevel * 15000 + 20000 L41State = 1 LightObjectColor(6).color = RGB(0, 255, 0) LightObjectColor(6).colorfull = RGB(0, 255, 0) Callout 498 End If End If if TempNum = 5 Then If SuperOrbitsLevel > 0 Then SuperModeRandom Else SuperOrbitsLevel = 1 AddScoreSuperOrbits = SuperOrbitsLevel * 90000 + 25000 L47State = 1 LightObjectColor(8).color = RGB(0, 255, 0) LightObjectColor(8).colorfull = RGB(0, 255, 0) Callout 497 End If End If if TempNum = 6 Then If SuperSpinnerLevel > 0 Then SuperModeRandom Else SuperSpinnerLevel = 1 AddScoreSuperSpinner = SuperSpinnerLevel * 10000 + 4000 L35State = 1 LightObjectColor(4).color = RGB(0, 255, 0) LightObjectColor(4).colorfull = RGB(0, 255, 0) Callout 500 End If End If SuperIsLit = False ' setup the Lights CheckLamp.interval = 100 CheckLamp.Enabled = True restoreOverlay.Interval=100 restoreOverlay.Enabled=True End Sub Sub StopSuperMode AddScoreChestJackpot = 0 SuperTargetsLevel = 0 SuperSlingsLevel = 0 SuperLanesLevel = 0 SuperPopsLevel = 0 SuperOrbitsLevel = 0 SuperSpinnerLevel = 0 SuperCollect = False ' resetlights for Supers L29State = 0 ' superTargets L35State = 0 ' SuperSpinner L41State = 0 ' SuperPops L47State = 0 ' SuperOrbits L53State = 0 ' SuperLanes L59State = 0 ' SuperSlings CheckLamp.Interval = 100 CheckLamp.Enabled = True restoreOverlay.Interval=100 restoreOverlay.Enabled=True End Sub sub superModeBoosted ' routine to boost the superFeatures tempFlag = False if SuperTargetsLevel > 0 Then SuperTargetsLevel = SuperTargetsLevel + 1 tempFlag = True if SuperTargetsLevel >= 5 then SuperTargetsLevel = 4 End If if SuperSlingsLevel > 0 Then SuperSlingsLevel = SuperSlingsLevel + 1 tempFlag = True if SuperSlingsLevel >= 5 then SuperSlingsLevel = 4 End If if SuperLanesLevel > 0 Then SuperLanesLevel = SuperLanesLevel + 1 tempFlag = True if SuperLanesLevel >= 5 then SuperLanesLevel = 4 End If if SuperPopsLevel > 0 Then SuperPopsLevel = SuperPopsLevel + 1 tempFlag = True if SuperPopsLevel >= 5 then SuperPopsLevel = 4 End If if SuperOrbitsLevel > 0 Then SuperOrbitsLevel = SuperOrbitsLevel + 1 tempFlag = True if SuperOrbitsLevel >= 5 then SuperOrbitsLevel = 4 End If if SuperSpinnerLevel > 0 Then SuperSpinnerLevel = SuperSpinnerLevel + 1 tempFlag = True if SuperSpinnerLevel >= 5 then SuperSpinnerLevel = 4 End If ' resetlights for Supers L29State = 0 ' superTargets L35State = 0 ' SuperSpinner L41State = 0 ' SuperPops L47State = 0 ' SuperOrbits L53State = 0 ' SuperLanes L59State = 0 ' SuperSlings ' supers scores and Lights If SuperTargetsLevel>0 Then AddScoreSuperTargets = SuperTargetsLevel * 50000 + 50000 L29State = 1 if SuperTargetsLevel = 1 Then LightObjectColor(2).color = RGB(0, 255, 0) : LightObjectColor(2).colorfull = RGB(0, 255, 0) : End If if SuperTargetsLevel = 2 Then LightObjectColor(2).color = RGB(255, 255, 0) : LightObjectColor(2).colorfull = RGB(255, 255, 0) : End If if SuperTargetsLevel = 3 Then LightObjectColor(2).color = RGB(255, 0, 0) : LightObjectColor(2).colorfull = RGB(255, 0, 0) : End If if SuperTargetsLevel = 4 Then LightObjectColor(2).color = RGB(255, 0, 255) : LightObjectColor(2).colorfull = RGB(255, 0, 255) : End If End If If SuperSpinnerLevel>0 Then AddScoreSuperSpinner = SuperSpinnerLevel * 10000 + 4000 L35State = 1 if SuperSpinnerLevel = 1 Then LightObjectColor(4).color = RGB(0, 255, 0) : LightObjectColor(4).colorfull = RGB(0, 255, 0) : End If if SuperSpinnerLevel = 2 Then LightObjectColor(4).color = RGB(255, 255, 0) : LightObjectColor(4).colorfull = RGB(255, 255, 0) : End If if SuperSpinnerLevel = 3 Then LightObjectColor(4).color = RGB(255, 0, 0) : LightObjectColor(4).colorfull = RGB(255, 0, 0) : End If if SuperSpinnerLevel = 4 Then LightObjectColor(4).color = RGB(255, 0, 255) : LightObjectColor(4).colorfull = RGB(255, 0, 255) : End If End If If SuperPopsLevel>0 Then AddScoreSuperPops = SuperPopsLevel * 15000 + 20000 L41State = 1 if SuperPopsLevel = 1 Then LightObjectColor(6).color = RGB(0, 255, 0) : LightObjectColor(6).colorfull = RGB(0, 255, 0) : End If if SuperPopsLevel = 2 Then LightObjectColor(6).color = RGB(255, 255, 0) : LightObjectColor(6).colorfull = RGB(255, 255, 0) : End If if SuperPopsLevel = 3 Then LightObjectColor(6).color = RGB(255, 0, 0) : LightObjectColor(6).colorfull = RGB(255, 0, 0) : End If if SuperPopsLevel = 4 Then LightObjectColor(6).color = RGB(255, 0, 255) : LightObjectColor(6).colorfull = RGB(255, 0, 255) : End If End If If SuperOrbitsLevel>0 Then AddScoreSuperOrbits = SuperOrbitsLevel * 90000 + 25000 L47State = 1 if SuperOrbitsLevel = 1 Then LightObjectColor(8).color = RGB(0, 255, 0) : LightObjectColor(8).colorfull = RGB(0, 255, 0) : End If if SuperOrbitsLevel = 2 Then LightObjectColor(8).color = RGB(255, 255, 0) : LightObjectColor(8).colorfull = RGB(255, 255, 0) : End If if SuperOrbitsLevel = 3 Then LightObjectColor(8).color = RGB(255, 0, 0) : LightObjectColor(8).colorfull = RGB(255, 0, 0) : End If if SuperOrbitsLevel = 4 Then LightObjectColor(8).color = RGB(255, 0, 255) : LightObjectColor(8).colorfull = RGB(255, 0, 255) : End If End If If SuperLanesLevel>0 Then AddScoreSuperLanes = SuperLanesLevel * 25000 + 25000 L53State = 1 if SuperLanesLevel = 1 Then LightObjectColor(10).color = RGB(0, 255, 0) : LightObjectColor(10).colorfull = RGB(0, 255, 0) : End If if SuperLanesLevel = 2 Then LightObjectColor(10).color = RGB(255, 255, 0) : LightObjectColor(10).colorfull = RGB(255, 255, 0) : End If if SuperLanesLevel = 3 Then LightObjectColor(10).color = RGB(255, 0, 0) : LightObjectColor(10).colorfull = RGB(255, 0, 0) : End If if SuperLanesLevel = 4 Then LightObjectColor(10).color = RGB(255, 0, 255) : LightObjectColor(10).colorfull = RGB(255, 0, 255) : End If End If If SuperSlingsLevel>0 Then AddScoreSuperSlings = SuperSlingsLevel * 100000 L59State = 1 if SuperSlingsLevel = 1 Then LightObjectColor(12).color = RGB(0, 255, 0) : LightObjectColor(12).colorfull = RGB(0, 255, 0) : End If if SuperSlingsLevel = 2 Then LightObjectColor(12).color = RGB(255, 255, 0) : LightObjectColor(12).colorfull = RGB(255, 255, 0) : End If if SuperSlingsLevel = 3 Then LightObjectColor(12).color = RGB(255, 0, 0) : LightObjectColor(12).colorfull = RGB(255, 0, 0) : End If if SuperSlingsLevel = 4 Then LightObjectColor(12).color = RGB(255, 0, 255) : LightObjectColor(12).colorfull = RGB(255, 0, 255) : End If End If ' setup the Lights CheckLamp.interval = 100 CheckLamp.Enabled = True If tempFlag = True Then restoreOverlay.interval = 100 restoreOverlay.Enabled = True 'Play event sound Super Features is Boosted callout 494 Else If SuperIsLit = False Then SuperIsLit = True L88.State = 1 ' ' playmedia "Sound-0x08FE.mp3","Audiocomment",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) callout 493 End If End If end Sub ' supermode timer for fro collecting Bonus sub SuperModeTimer_Timer() SuperModeTimer.enabled = False ' play sound of hurry hurry or similar SuperCollect = False end Sub ' Powersword routines Sub updatePowersword() ' PuPlayer.LabelNew pFullDMD,"Sword","sword",10,77749231,0,1,1,0,0,1,1 'tempnum = tempNum + 1 if PowerSwordLevel(CurrentPlayer) > 99 then if PowerSwordAnimated.enabled = False Then PowerSwordAnimated.Enabled = True Else PuPlayer.LabelSet pFullDMD,"Sword","PowerSword\\PowerSword"& PowerSwordLevel(CurrentPlayer) &".png",1,"{'mt':2,'color':255, 'width': 11.5, 'height': 73, 'xpos': 88.7, 'xalign': 0, 'ypos': 8.7, 'yalign': 0}" End If End Sub sub PowerSwordAnimated_Timer() PowerSwordFrame = PowerSwordFrame + 1 if PowerSwordFrame > 6 then PowerSwordFrame = 1 If PowerSwordActivated = False Then PuPlayer.LabelSet pFullDMD,"Sword","PowerSword\\PowerSword10"& PowerSwordFrame &".png",1,"{'mt':2,'color':255, 'width': 11.5, 'height': 73, 'xpos': 88.7, 'xalign': 0, 'ypos': 8.7, 'yalign': 0}" Else PuPlayer.LabelSet pFullDMD,"Sword","PowerSword\\PowerSword20"& PowerSwordFrame &".png",1,"{'mt':2,'color':255, 'width': 11.5, 'height': 73, 'xpos': 88.7, 'xalign': 0, 'ypos': 8.7, 'yalign': 0}" End If end Sub '************************************************************************************************************************************* '************************************************************************************************************************************* '************************************************************************************************************************************* '******************************************** NEW PUP PLAYER .. ************************************************** '************************************************************************************************************************************* '************************************************************************************************************************************* '************************************************************************************************************************************* 'DMD " ", " ", "", eNone, eNone, eNone, 1000, True, "" ' COPY EVERYTHING BELOW TO THE TOP OF YOUR TABLE SCRIPT UNDER OPTION EXPLICIT Start Pup Pack '//////////////////// PINUP PLAYER: STARTUP & CONTROL SECTION ////////////////////////// ' This is used for the startup and control of Pinup Player Sub PuPStart(cPuPPack) If PUPStatus=true then Exit Sub If usePUP=true then Set PuPlayer = CreateObject("PinUpPlayer.PinDisplay") If PuPlayer is Nothing Then usePUP=false PUPStatus=false Else PuPlayer.B2SInit "",cPuPPack 'start the Pup-Pack PUPStatus=true End If End If End Sub Sub pupevent(EventNum) if (usePUP=false or PUPStatus=false) then Exit Sub PuPlayer.B2SData "E"&EventNum,1 'send event to Pup-Pack End Sub ' ******* How to use PUPEvent to trigger / control a PuP-Pack ******* ' Usage: pupevent(EventNum) ' EventNum = PuP Exxx trigger from the PuP-Pack ' Example: pupevent 102 ' This will trigger E102 from the table's PuP-Pack ' DO NOT use any Exxx triggers already used for DOF (if used) to avoid any possible confusion '************ PuP-Pack Startup ************** PuPStart(cPuPPack) 'Check for PuP - If found, then start Pinup Player / PuP-Pack '******************** 'Light definitions '******************** LightType(1) = 0 : Set LightObjectColor(1) = L26 'MUD BOG LightType(2) = 0 : Set LightObjectColor(2) = L29 'SUPER TARGETS LightType(3) = 0 : Set LightObjectColor(3) = L32 'MOLTEN FIRE LightType(4) = 0 : Set LightObjectColor(4) = L35 'SUPER SPINS LightType(5) = 0 : Set LightObjectColor(5) = L38 'BURNING SANDS LightType(6) = 0 : Set LightObjectColor(6) = L41 'SUPER POPS LightType(7) = 0 : Set LightObjectColor(7) = L44 'WICKED CAVERN LightType(8) = 0 : Set LightObjectColor(8) = L47 'SUPER ORBITS LightType(9) = 0 : Set LightObjectColor(9) = L50 'DEEP FREEZE LightType(10) = 0 : Set LightObjectColor(10) = L53 'SUPER LANES LightType(11) = 0 : Set LightObjectColor(11) = L56 'BLACK CASTLE LightType(12) = 0 : Set LightObjectColor(12) = L59 'SUPER SLINGS '*************************************************** ' Lamps & Flashers '*************************************************** Sub LampRoundAnimation_Timer() Dim chgLamp, ii 'chgLamp = Controller.ChangedLamps If lightstateflag = 1 Then LightObjectColor(Lightcounter).FadeSpeedDown = LightObjectColor(Lightcounter).Intensity / 80000 LightObjectColor(Lightcounter).state = 0 lightstateflag = 0 Lightcounter = Lightcounter + 1 'LampRoundAnimation.interval= 200 Else LightObjectColor(Lightcounter).Intensity= 500 LightObjectColor(Lightcounter).state = 1 ' Lightobjectsimplify(1).state = 1 lightstateflag = 1 'LampRoundAnimation.interval= 200 End If If Lightcounter = 13 Then Lightcounter = 1 LampRoundAnimation.Enabled=False 'ColorRoundLight = 1 animation_start_and_finish_flag = 1 End If End Sub Sub LampRoundAnimation2_Timer() If Lightcounter2 = 1 Then TurnOffRoundLights End If If lightstateflag = 1 Then lightstateflag = 0 LightObjectColor(1).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(1).state = 0 LightObjectColor(2).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(2).state = 2 LightObjectColor(3).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(3).state = 0 LightObjectColor(4).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(4).state = 2 LightObjectColor(5).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(5).state = 0 LightObjectColor(6).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(6).state = 2 LightObjectColor(7).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(7).state = 0 LightObjectColor(8).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(8).state = 2 LightObjectColor(9).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(9).state = 0 LightObjectColor(10).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(10).state = 2 LightObjectColor(11).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(11).state = 0 LightObjectColor(12).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(12).state = 2 Lightcounter2 = Lightcounter2 + 1 'LampRoundAnimation2.interval= 200 ' Lightobjectsimplify(1).state = 2 Else lightstateflag = 1 LightObjectColor(1).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(1).state = 2 LightObjectColor(2).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(2).state = 0 LightObjectColor(3).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(3).state = 2 LightObjectColor(4).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(4).state = 0 LightObjectColor(5).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(5).state = 2 LightObjectColor(6).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(6).state = 0 LightObjectColor(7).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(7).state = 2 LightObjectColor(8).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(8).state = 0 LightObjectColor(9).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(9).state = 2 LightObjectColor(10).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(10).state = 0 LightObjectColor(11).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(11).state = 2 LightObjectColor(12).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(12).state = 0 'LampRoundAnimation2.interval= 200 End If If Lightcounter2 = 13 Then Lightcounter2 = 1 LampRoundAnimation2.Enabled=False 'ColorRoundLight = 1 TurnOffRoundLights animation_start_and_finish_flag = 1 End If End Sub Sub LampRoundAnimation3_Timer() If Lightcounter2 = 1 Then TurnOffRoundLights End If If lightstateflag = 1 Then lightstateflag = 0 LightObjectColor(1).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(1).state = 2 LightObjectColor(2).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(2).state = 2 LightObjectColor(3).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(3).state = 2 LightObjectColor(4).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(4).state = 2 LightObjectColor(5).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(5).state = 2 LightObjectColor(6).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(6).state = 2 LightObjectColor(7).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(7).state = 2 LightObjectColor(8).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(8).state = 2 LightObjectColor(9).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(9).state = 2 LightObjectColor(10).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(10).state = 2 LightObjectColor(11).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(11).state = 2 LightObjectColor(12).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(12).state = 2 Lightcounter2 = Lightcounter2 + 1 Else lightstateflag = 1 TurnOffRoundLights End If If Lightcounter2 = 13 Then Lightcounter2 = 1 LampRoundAnimation3.Enabled=False 'ColorRoundLight = 1 TurnOffRoundLights animation_start_and_finish_flag = 1 End If End Sub Sub LampRoundAnimation4_Timer() If Lightcounter2 = 1 Then TurnOffRoundLights 'lightstateflag = 0 End If If Lightcounter2 = 8 Then Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 7 Then LightObjectColor(12).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(12).state = 1 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 6 Then LightObjectColor(1).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(1).state = 1 LightObjectColor(11).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(11).state = 1 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 5 Then LightObjectColor(2).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(2).state = 1 LightObjectColor(10).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(10).state = 1 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 4 Then LightObjectColor(3).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(3).state = 1 LightObjectColor(9).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(9).state = 1 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 3 Then LightObjectColor(4).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(4).state = 1 LightObjectColor(8).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(8).state = 1 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 2 Then LightObjectColor(5).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(5).state = 1 LightObjectColor(7).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(7).state = 1 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 1 Then LightObjectColor(6).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(6).state = 1 Lightcounter2 = Lightcounter2 + 1 End If If LightCounter2 = 9 Then Lightcounter2 = 1 LampRoundAnimation4.Enabled=False TurnOffRoundLights animation_start_and_finish_flag = 1 End If End Sub Sub LampRoundAnimation5_Timer() If Lightcounter2 = 1 Then TurnOffRoundLights 'lightstateflag = 0 End If If Lightcounter2 = 35 Then Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 34 Then LightObjectColor(1).state = 1 LightObjectColor(2).state = 1 LightObjectColor(3).state = 1 LightObjectColor(4).state = 1 LightObjectColor(5).state = 1 LightObjectColor(6).state = 1 LightObjectColor(7).state = 1 LightObjectColor(8).state = 1 LightObjectColor(9).state = 1 LightObjectColor(10).state = 1 LightObjectColor(11).state = 1 LightObjectColor(12).state = 1 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 33 Then LightObjectColor(8).state = 1 LightObjectColor(9).state = 1 LightObjectColor(10).state = 1 LightObjectColor(11).state = 1 LightObjectColor(12).state = 1 LightObjectColor(2).state = 1 LightObjectColor(3).state = 1 LightObjectColor(4).state = 1 LightObjectColor(5).state = 1 LightObjectColor(6).state = 1 LightObjectColor(1).state = 0 LightObjectColor(7).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 32 Then LightObjectColor(9).state = 1 LightObjectColor(10).state = 1 LightObjectColor(11).state = 1 LightObjectColor(12).state = 1 LightObjectColor(1).state = 1 LightObjectColor(3).state = 1 LightObjectColor(4).state = 1 LightObjectColor(5).state = 1 LightObjectColor(6).state = 1 LightObjectColor(7).state = 1 LightObjectColor(2).state = 0 LightObjectColor(8).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 31 Then LightObjectColor(10).state = 1 LightObjectColor(11).state = 1 LightObjectColor(12).state = 1 LightObjectColor(1).state = 1 LightObjectColor(2).state = 1 LightObjectColor(4).state = 1 LightObjectColor(5).state = 1 LightObjectColor(6).state = 1 LightObjectColor(7).state = 1 LightObjectColor(8).state = 1 LightObjectColor(3).state = 0 LightObjectColor(9).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 30 Then LightObjectColor(12).state = 1 LightObjectColor(1).state = 1 LightObjectColor(2).state = 1 LightObjectColor(3).state = 1 LightObjectColor(6).state = 1 LightObjectColor(7).state = 1 LightObjectColor(8).state = 1 LightObjectColor(9).state = 1 LightObjectColor(4).state = 0 LightObjectColor(5).state = 0 LightObjectColor(10).state = 0 LightObjectColor(11).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 29 Then LightObjectColor(1).state = 1 LightObjectColor(2).state = 1 LightObjectColor(3).state = 1 LightObjectColor(4).state = 1 LightObjectColor(7).state = 1 LightObjectColor(8).state = 1 LightObjectColor(9).state = 1 LightObjectColor(10).state = 1 LightObjectColor(5).state = 0 LightObjectColor(6).state = 0 LightObjectColor(11).state = 0 LightObjectColor(12).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 28 Then LightObjectColor(2).state = 1 LightObjectColor(3).state = 1 LightObjectColor(4).state = 1 LightObjectColor(5).state = 1 LightObjectColor(8).state = 1 LightObjectColor(9).state = 1 LightObjectColor(10).state = 1 LightObjectColor(11).state = 1 LightObjectColor(1).state = 0 LightObjectColor(6).state = 0 LightObjectColor(7).state = 0 LightObjectColor(12).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 27 Then LightObjectColor(3).state = 1 LightObjectColor(4).state = 1 LightObjectColor(5).state = 1 LightObjectColor(6).state = 1 LightObjectColor(10).state = 1 LightObjectColor(11).state = 1 LightObjectColor(12).state = 1 LightObjectColor(1).state = 0 LightObjectColor(2).state = 0 LightObjectColor(7).state = 0 LightObjectColor(8).state = 0 LightObjectColor(9).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 26 Then LightObjectColor(5).state = 1 LightObjectColor(6).state = 1 LightObjectColor(7).state = 1 LightObjectColor(11).state = 1 LightObjectColor(12).state = 1 LightObjectColor(1).state = 1 LightObjectColor(2).state = 0 LightObjectColor(3).state = 0 LightObjectColor(4).state = 0 LightObjectColor(8).state = 0 LightObjectColor(9).state = 0 LightObjectColor(10).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 25 Then LightObjectColor(7).state = 1 LightObjectColor(8).state = 1 LightObjectColor(9).state = 1 LightObjectColor(12).state = 1 LightObjectColor(1).state = 1 LightObjectColor(2).state = 1 LightObjectColor(3).state = 0 LightObjectColor(4).state = 0 LightObjectColor(5).state = 0 LightObjectColor(6).state = 0 LightObjectColor(10).state = 0 LightObjectColor(11).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 24 Then LightObjectColor(8).state = 1 LightObjectColor(9).state = 1 LightObjectColor(10).state = 1 LightObjectColor(1).state = 1 LightObjectColor(2).state = 1 LightObjectColor(3).state = 1 LightObjectColor(4).state = 0 LightObjectColor(5).state = 0 LightObjectColor(6).state = 0 LightObjectColor(7).state = 0 LightObjectColor(11).state = 0 LightObjectColor(12).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 23 Then LightObjectColor(9).state = 1 LightObjectColor(10).state = 1 LightObjectColor(11).state = 1 LightObjectColor(2).state = 1 LightObjectColor(3).state = 1 LightObjectColor(4).state = 1 LightObjectColor(1).state = 0 LightObjectColor(5).state = 0 LightObjectColor(6).state = 0 LightObjectColor(7).state = 0 LightObjectColor(8).state = 0 LightObjectColor(12).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 22 Then LightObjectColor(10).state = 1 LightObjectColor(11).state = 1 LightObjectColor(12).state = 1 LightObjectColor(3).state = 1 LightObjectColor(4).state = 1 LightObjectColor(5).state = 1 LightObjectColor(1).state = 0 LightObjectColor(2).state = 0 LightObjectColor(6).state = 0 LightObjectColor(7).state = 0 LightObjectColor(8).state = 0 LightObjectColor(9).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 21 Then LightObjectColor(11).state = 1 LightObjectColor(12).state = 1 LightObjectColor(1).state = 1 LightObjectColor(4).state = 1 LightObjectColor(6).state = 1 LightObjectColor(7).state = 1 LightObjectColor(2).state = 0 LightObjectColor(3).state = 0 LightObjectColor(5).state = 0 LightObjectColor(8).state = 0 LightObjectColor(9).state = 0 LightObjectColor(10).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 20 Then LightObjectColor(12).state = 1 LightObjectColor(1).state = 1 LightObjectColor(2).state = 1 LightObjectColor(5).state = 1 LightObjectColor(7).state = 1 LightObjectColor(8).state = 1 LightObjectColor(3).state = 0 LightObjectColor(4).state = 0 LightObjectColor(6).state = 0 LightObjectColor(9).state = 0 LightObjectColor(10).state = 0 LightObjectColor(11).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 19 Then LightObjectColor(6).state = 1 LightObjectColor(8).state = 1 LightObjectColor(9).state = 1 LightObjectColor(1).state = 0 LightObjectColor(2).state = 0 LightObjectColor(3).state = 0 LightObjectColor(4).state = 0 LightObjectColor(5).state = 0 LightObjectColor(7).state = 0 LightObjectColor(10).state = 0 LightObjectColor(11).state = 0 LightObjectColor(12).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 18 Then LightObjectColor(7).state = 1 LightObjectColor(9).state = 1 LightObjectColor(10).state = 1 LightObjectColor(1).state = 0 LightObjectColor(2).state = 0 LightObjectColor(3).state = 0 LightObjectColor(4).state = 0 LightObjectColor(5).state = 0 LightObjectColor(6).state = 0 LightObjectColor(8).state = 0 LightObjectColor(11).state = 0 LightObjectColor(12).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 17 Then LightObjectColor(8).state = 1 LightObjectColor(10).state = 1 LightObjectColor(11).state = 1 LightObjectColor(1).state = 0 LightObjectColor(2).state = 0 LightObjectColor(3).state = 0 LightObjectColor(4).state = 0 LightObjectColor(5).state = 0 LightObjectColor(6).state = 0 LightObjectColor(7).state = 0 LightObjectColor(9).state = 0 LightObjectColor(12).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 16 Then LightObjectColor(9).state = 1 LightObjectColor(11).state = 1 LightObjectColor(12).state = 1 LightObjectColor(1).state = 0 LightObjectColor(2).state = 0 LightObjectColor(3).state = 0 LightObjectColor(4).state = 0 LightObjectColor(5).state = 0 LightObjectColor(6).state = 0 LightObjectColor(7).state = 0 LightObjectColor(8).state = 0 LightObjectColor(10).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 15 Then LightObjectColor(10).state = 1 LightObjectColor(1).state = 1 LightObjectColor(2).state = 0 LightObjectColor(3).state = 0 LightObjectColor(4).state = 0 LightObjectColor(5).state = 0 LightObjectColor(6).state = 0 LightObjectColor(7).state = 0 LightObjectColor(8).state = 0 LightObjectColor(9).state = 0 LightObjectColor(11).state = 0 LightObjectColor(12).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 14 Then LightObjectColor(11).state = 1 LightObjectColor(2).state = 1 LightObjectColor(1).state = 0 LightObjectColor(3).state = 0 LightObjectColor(4).state = 0 LightObjectColor(5).state = 0 LightObjectColor(6).state = 0 LightObjectColor(7).state = 0 LightObjectColor(8).state = 0 LightObjectColor(9).state = 0 LightObjectColor(10).state = 0 LightObjectColor(12).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 13 Then LightObjectColor(12).state = 1 LightObjectColor(3).state = 1 LightObjectColor(1).state = 0 LightObjectColor(2).state = 0 LightObjectColor(4).state = 0 LightObjectColor(5).state = 0 LightObjectColor(6).state = 0 LightObjectColor(7).state = 0 LightObjectColor(8).state = 0 LightObjectColor(9).state = 0 LightObjectColor(10).state = 0 LightObjectColor(11).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 12 Then LightObjectColor(1).state = 1 LightObjectColor(4).state = 1 LightObjectColor(2).state = 0 LightObjectColor(3).state = 0 LightObjectColor(5).state = 0 LightObjectColor(6).state = 0 LightObjectColor(7).state = 0 LightObjectColor(8).state = 0 LightObjectColor(9).state = 0 LightObjectColor(10).state = 0 LightObjectColor(11).state = 0 LightObjectColor(12).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 11 Then LightObjectColor(2).state = 1 LightObjectColor(5).state = 1 LightObjectColor(1).state = 0 LightObjectColor(3).state = 0 LightObjectColor(4).state = 0 LightObjectColor(6).state = 0 LightObjectColor(7).state = 0 LightObjectColor(8).state = 0 LightObjectColor(9).state = 0 LightObjectColor(10).state = 0 LightObjectColor(11).state = 0 LightObjectColor(12).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 10 Then LightObjectColor(3).state = 1 LightObjectColor(6).state = 1 LightObjectColor(1).state = 0 LightObjectColor(2).state = 0 LightObjectColor(4).state = 0 LightObjectColor(5).state = 0 LightObjectColor(7).state = 0 LightObjectColor(8).state = 0 LightObjectColor(9).state = 0 LightObjectColor(10).state = 0 LightObjectColor(11).state = 0 LightObjectColor(12).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 9 Then LightObjectColor(4).state = 1 LightObjectColor(7).state = 1 LightObjectColor(1).state = 0 LightObjectColor(2).state = 0 LightObjectColor(3).state = 0 LightObjectColor(5).state = 0 LightObjectColor(6).state = 0 LightObjectColor(8).state = 0 LightObjectColor(9).state = 0 LightObjectColor(10).state = 0 LightObjectColor(11).state = 0 LightObjectColor(12).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 8 Then LightObjectColor(5).state = 1 LightObjectColor(8).state = 1 LightObjectColor(1).state = 0 LightObjectColor(2).state = 0 LightObjectColor(3).state = 0 LightObjectColor(4).state = 0 LightObjectColor(6).state = 0 LightObjectColor(7).state = 0 LightObjectColor(9).state = 0 LightObjectColor(10).state = 0 LightObjectColor(11).state = 0 LightObjectColor(12).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 7 Then LightObjectColor(6).state = 1 LightObjectColor(9).state = 1 LightObjectColor(1).state = 0 LightObjectColor(2).state = 0 LightObjectColor(3).state = 0 LightObjectColor(4).state = 0 LightObjectColor(5).state = 0 LightObjectColor(7).state = 0 LightObjectColor(8).state = 0 LightObjectColor(10).state = 0 LightObjectColor(11).state = 0 LightObjectColor(12).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 6 Then LightObjectColor(7).state = 1 LightObjectColor(10).state = 1 LightObjectColor(1).state = 0 LightObjectColor(2).state = 0 LightObjectColor(3).state = 0 LightObjectColor(4).state = 0 LightObjectColor(5).state = 0 LightObjectColor(6).state = 0 LightObjectColor(8).state = 0 LightObjectColor(9).state = 0 LightObjectColor(11).state = 0 LightObjectColor(12).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 5 Then LightObjectColor(8).state = 1 LightObjectColor(11).state = 1 LightObjectColor(1).state = 0 LightObjectColor(2).state = 0 LightObjectColor(3).state = 0 LightObjectColor(4).state = 0 LightObjectColor(5).state = 0 LightObjectColor(6).state = 0 LightObjectColor(7).state = 0 LightObjectColor(9).state = 0 LightObjectColor(10).state = 0 LightObjectColor(12).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 4 Then LightObjectColor(9).state = 1 LightObjectColor(12).state = 1 LightObjectColor(1).state = 0 LightObjectColor(2).state = 0 LightObjectColor(3).state = 0 LightObjectColor(4).state = 0 LightObjectColor(5).state = 0 LightObjectColor(6).state = 0 LightObjectColor(7).state = 0 LightObjectColor(8).state = 0 LightObjectColor(10).state = 0 LightObjectColor(11).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 3 Then LightObjectColor(10).state = 1 LightObjectColor(1).state = 0 LightObjectColor(2).state = 0 LightObjectColor(3).state = 0 LightObjectColor(4).state = 0 LightObjectColor(5).state = 0 LightObjectColor(6).state = 0 LightObjectColor(7).state = 0 LightObjectColor(8).state = 0 LightObjectColor(9).state = 0 LightObjectColor(11).state = 0 LightObjectColor(12).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 2 Then LightObjectColor(11).state = 1 LightObjectColor(1).state = 0 LightObjectColor(2).state = 0 LightObjectColor(3).state = 0 LightObjectColor(4).state = 0 LightObjectColor(5).state = 0 LightObjectColor(6).state = 0 LightObjectColor(7).state = 0 LightObjectColor(8).state = 0 LightObjectColor(9).state = 0 LightObjectColor(10).state = 0 LightObjectColor(12).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 1 Then LightObjectColor(12).state = 1 LightObjectColor(1).state = 0 LightObjectColor(2).state = 0 LightObjectColor(3).state = 0 LightObjectColor(4).state = 0 LightObjectColor(5).state = 0 LightObjectColor(6).state = 0 LightObjectColor(7).state = 0 LightObjectColor(8).state = 0 LightObjectColor(9).state = 0 LightObjectColor(10).state = 0 LightObjectColor(11).state = 0 LightObjectColor(1).FadeSpeedDown = LightObjectColor(1).Intensity / 1 LightObjectColor(2).FadeSpeedDown = LightObjectColor(1).Intensity / 1 LightObjectColor(3).FadeSpeedDown = LightObjectColor(1).Intensity / 1 LightObjectColor(4).FadeSpeedDown = LightObjectColor(1).Intensity / 1 LightObjectColor(5).FadeSpeedDown = LightObjectColor(1).Intensity / 1 LightObjectColor(6).FadeSpeedDown = LightObjectColor(1).Intensity / 1 LightObjectColor(7).FadeSpeedDown = LightObjectColor(1).Intensity / 1 LightObjectColor(8).FadeSpeedDown = LightObjectColor(1).Intensity / 1 LightObjectColor(9).FadeSpeedDown = LightObjectColor(1).Intensity / 1 LightObjectColor(10).FadeSpeedDown = LightObjectColor(1).Intensity / 1 LightObjectColor(11).FadeSpeedDown = LightObjectColor(1).Intensity / 1 LightObjectColor(12).FadeSpeedDown = LightObjectColor(1).Intensity / 1 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 36 Then Lightcounter2 = 1 LampRoundAnimation5.Enabled=False TurnOffRoundLights animation_start_and_finish_flag = 1 End If End Sub Sub LampRoundAnimation6_Timer() If lightstateflag = 1 Then reverseLightcounter = 13 - Lightcounter LightObjectColor(reverseLightcounter).FadeSpeedDown = LightObjectColor(1).Intensity / 1 LightObjectColor(reverseLightcounter).state = 1 lightstateflag = 0 'LampRoundAnimation6.interval= 200 Else reverseLightcounter2 = 13 - Lightcounter Lightcounter = Lightcounter + 1 'LightObjectColor(reverseLightcounter2).Intensity= 500 LightObjectColor(reverseLightcounter2).state = 0 lightstateflag = 1 'LampRoundAnimation6.interval= 200 End If If Lightcounter = 13 Then Lightcounter = 1 LampRoundAnimation6.Enabled=False animation_start_and_finish_flag = 1 End If End Sub 'LightObjectColor(12).FadeSpeedDown = LightObjectColor(1).Intensity / 10 Sub LampRoundAnimation7_Timer() If Lightcounter2 = 3 Then Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 2 Then 'lightstateflag = 1 ' TurnOffRoundLights LampRoundAnimation7.interval= 20 LightObjectColor(1).state = 0 LightObjectColor(2).state = 0 LightObjectColor(3).state = 0 LightObjectColor(4).state = 0 LightObjectColor(5).state = 0 LightObjectColor(6).state = 0 LightObjectColor(7).state = 0 LightObjectColor(8).state = 0 LightObjectColor(9).state = 0 LightObjectColor(10).state = 0 LightObjectColor(11).state = 0 LightObjectColor(12).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 1 Then TurnOffRoundLights 'lightstateflag = 1 End If If Lightcounter2 = 1 Then 'lightstateflag = 0 LampRoundAnimation7.interval= 800 LightObjectColor(1).FadeSpeedDown = LightObjectColor(1).Intensity / 800000000 LightObjectColor(1).state = 1 LightObjectColor(2).FadeSpeedDown = LightObjectColor(1).Intensity / 800000000 LightObjectColor(2).state = 1 LightObjectColor(3).FadeSpeedDown = LightObjectColor(1).Intensity / 800000000 LightObjectColor(3).state = 1 LightObjectColor(4).FadeSpeedDown = LightObjectColor(1).Intensity / 800000000 LightObjectColor(4).state = 1 LightObjectColor(5).FadeSpeedDown = LightObjectColor(1).Intensity / 800000000 LightObjectColor(5).state = 1 LightObjectColor(6).FadeSpeedDown = LightObjectColor(1).Intensity / 800000000 LightObjectColor(6).state = 1 LightObjectColor(7).FadeSpeedDown = LightObjectColor(1).Intensity / 800000000 LightObjectColor(7).state = 1 LightObjectColor(8).FadeSpeedDown = LightObjectColor(1).Intensity / 800000000 LightObjectColor(8).state = 1 LightObjectColor(9).FadeSpeedDown = LightObjectColor(1).Intensity / 800000000 LightObjectColor(9).state = 1 LightObjectColor(10).FadeSpeedDown = LightObjectColor(1).Intensity / 800000000 LightObjectColor(10).state = 1 LightObjectColor(11).FadeSpeedDown = LightObjectColor(1).Intensity / 800000000 LightObjectColor(11).state = 1 LightObjectColor(12).FadeSpeedDown = LightObjectColor(1).Intensity / 800000000 LightObjectColor(12).state = 1 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 4 Then Lightcounter2 = 1 LampRoundAnimation7.Enabled=False 'ColorRoundLight = 1 TurnOffRoundLights animation_start_and_finish_flag = 1 End If End Sub Sub LampRoundAnimation8_Timer() If Lightcounter2 = 1 Then TurnOffRoundLights End If If lightstateflag = 1 Then lightstateflag = 0 Else lightstateflag = 1 ' TurnOffRoundLights Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 2 Then Lightcounter2 = 1 LampRoundAnimation8.Enabled=False 'ColorRoundLight = 1 TurnOffRoundLights animation_start_and_finish_flag = 1 End If End Sub Sub LampRoundAnimation9_Timer() If Lightcounter2 = 4 Then Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 3 Then lightstateflag = 1 LightObjectColor(1).color = RGB(0, 0, 255) 'Color change only for Light L26 LightObjectColor(1).colorfull = RGB(0, 0, 255) 'Color change only for Light L26 LightObjectColor(1).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(1).state = 0 LightObjectColor(1).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(1).state = 1 LightObjectColor(2).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(2).state = 0 LightObjectColor(3).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(3).state = 1 LightObjectColor(4).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(4).state = 1 LightObjectColor(5).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(5).state = 1 LightObjectColor(6).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(6).state = 0 LightObjectColor(7).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(7).state = 1 LightObjectColor(8).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(8).state = 1 LightObjectColor(9).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(9).state = 1 LightObjectColor(10).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(10).state = 0 LightObjectColor(11).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(11).state = 0 LightObjectColor(12).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(12).state = 0 LightObjectColor(11).color = RGB(0, 0, 255) 'Color change only for Light L56 LightObjectColor(11).colorfull = RGB(0, 0, 255) 'Color change only for Light L56 LightObjectColor(12).color = RGB(0, 0, 255) 'Color change only for Light L59 LightObjectColor(12).colorfull = RGB(0, 0, 255) 'Color change only for Light L59 LightObjectColor(11).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(11).state = 1 LightObjectColor(12).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(12).state = 1 Lightcounter2 = Lightcounter2 + 1 'LampRoundAnimation2.interval= 200 End If If Lightcounter2 = 2 Then lightstateflag = 1 LightObjectColor(1).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(1).state = 1 LightObjectColor(2).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(2).state = 0 LightObjectColor(3).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(3).state = 1 LightObjectColor(4).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(4).state = 1 LightObjectColor(5).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(5).state = 1 LightObjectColor(6).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(6).state = 0 LightObjectColor(7).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(7).state = 1 LightObjectColor(8).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(8).state = 1 LightObjectColor(9).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(9).state = 1 LightObjectColor(10).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(10).state = 0 LightObjectColor(11).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(11).state = 1 LightObjectColor(12).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(12).state = 1 'LampRoundAnimation2.interval= 200 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 1 Then TurnOffRoundLights End If If Lightcounter2 = 1 Then lightstateflag = 0 LightObjectColor(1).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(1).state = 0 LightObjectColor(2).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(2).state = 1 LightObjectColor(3).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(3).state = 0 LightObjectColor(4).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(4).state = 1 LightObjectColor(5).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(5).state = 0 LightObjectColor(6).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(6).state = 1 LightObjectColor(7).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(7).state = 0 LightObjectColor(8).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(8).state = 1 LightObjectColor(9).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(9).state = 0 LightObjectColor(10).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(10).state = 1 LightObjectColor(11).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(11).state = 0 LightObjectColor(12).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(12).state = 1 Lightcounter2 = Lightcounter2 + 1 'LampRoundAnimation2.interval= 200 End If If Lightcounter2 = 5 Then Lightcounter2 = 1 LampRoundAnimation9.Enabled=False 'ColorRoundLight = 1 TurnOffRoundLights animation_start_and_finish_flag = 1 End If End Sub Sub LampRoundAnimation10_Timer() If Lightcounter2 = 1 Then TurnOffRoundLights 'lightstateflag = 0 End If If Lightcounter2 = 5 Then Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 4 Then LightObjectColor(3).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(3).state = 1 LightObjectColor(9).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(9).state = 1 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 3 Then LightObjectColor(4).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(4).state = 1 LightObjectColor(8).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(8).state = 1 LightObjectColor(2).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(2).state = 1 LightObjectColor(10).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(10).state = 1 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 2 Then LightObjectColor(5).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(5).state = 1 LightObjectColor(7).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(7).state = 1 LightObjectColor(1).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(1).state = 1 LightObjectColor(11).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(11).state = 1 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 1 Then LightObjectColor(6).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(6).state = 1 LightObjectColor(12).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(12).state = 1 Lightcounter2 = Lightcounter2 + 1 End If If LightCounter2 = 6 Then Lightcounter2 = 1 LampRoundAnimation10.Enabled=False TurnOffRoundLights animation_start_and_finish_flag = 1 End If End Sub Sub LampRoundAnimation11_Timer() If Lightcounter2 = 1 Then TurnOffRoundLights 'lightstateflag = 0 End If If Lightcounter2 = 8 Then Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 7 Then LightObjectColor(5).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(5).state = 1 LightObjectColor(6).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(6).state = 1 LightObjectColor(7).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(7).state = 1 LightObjectColor(1).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(1).state = 1 LightObjectColor(11).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(11).state = 1 LightObjectColor(12).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(12).state = 1 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 6 Then LightObjectColor(5).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(5).state = 0 LightObjectColor(6).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(6).state = 0 LightObjectColor(7).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(7).state = 0 LightObjectColor(1).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(1).state = 0 LightObjectColor(11).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(11).state = 0 LightObjectColor(12).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(12).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 5 Then LightObjectColor(5).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(5).state = 1 LightObjectColor(6).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(6).state = 1 LightObjectColor(7).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(7).state = 1 LightObjectColor(1).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(1).state = 1 LightObjectColor(11).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(11).state = 1 LightObjectColor(12).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(12).state = 1 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 4 Then LightObjectColor(6).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(6).state = 0 LightObjectColor(12).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(12).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 3 Then LightObjectColor(6).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(6).state = 1 LightObjectColor(12).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(12).state = 1 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 2 Then LightObjectColor(6).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(6).state = 0 LightObjectColor(12).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(12).state = 0 Lightcounter2 = Lightcounter2 + 1 End If If Lightcounter2 = 1 Then LightObjectColor(6).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(6).state = 1 LightObjectColor(12).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(12).state = 1 Lightcounter2 = Lightcounter2 + 1 End If If LightCounter2 = 9 Then Lightcounter2 = 1 LampRoundAnimation11.Enabled=False TurnOffRoundLights animation_start_and_finish_flag = 1 End If End Sub Sub LampRoundAnimation12_Timer() If Lightcounter2 = 1 Then LightObjectColor(1).BlinkPattern = "10" LightObjectColor(1).BlinkInterval=50 LightObjectColor(1).state = 2 LightObjectColor(2).BlinkPattern = "01" LightObjectColor(2).BlinkInterval=50 LightObjectColor(2).state = 2 LightObjectColor(3).BlinkPattern = "10" LightObjectColor(3).BlinkInterval=50 LightObjectColor(3).state = 2 LightObjectColor(4).BlinkPattern = "01" LightObjectColor(4).BlinkInterval=50 LightObjectColor(4).state = 2 LightObjectColor(5).BlinkPattern = "10" LightObjectColor(5).BlinkInterval=50 LightObjectColor(5).state = 2 LightObjectColor(6).BlinkPattern = "01" LightObjectColor(6).BlinkInterval=50 LightObjectColor(6).state = 2 LightObjectColor(7).BlinkPattern = "10" LightObjectColor(7).BlinkInterval=50 LightObjectColor(7).state = 2 LightObjectColor(8).BlinkPattern = "01" LightObjectColor(8).BlinkInterval=50 LightObjectColor(8).state = 2 LightObjectColor(9).BlinkPattern = "10" LightObjectColor(9).BlinkInterval=50 LightObjectColor(9).state = 2 LightObjectColor(10).BlinkPattern = "01" LightObjectColor(10).BlinkInterval=50 LightObjectColor(10).state = 2 LightObjectColor(11).BlinkPattern = "10" LightObjectColor(11).BlinkInterval=50 LightObjectColor(11).state = 2 LightObjectColor(12).BlinkPattern = "01" LightObjectColor(12).BlinkInterval=50 LightObjectColor(12).state = 2 End If If Lightcounter2 = 12 Then Lightcounter2 = 1 LampRoundAnimation12.Enabled=False 'ColorRoundLight = 1 TurnOffRoundLights lightstateflag = 1 animation_start_and_finish_flag = 1 End If Lightcounter2 = Lightcounter2 + 1 End Sub '******************************************** '*****GI Lights On*************************** '******************************************** 'dim xx 'For each xx in GI:xx.State = 1: Next '******************************************** '**********KEYS DOWN************************* '******************************************** Sub TurnOffRoundLights() Dim a For each a in RoundLights a.FadeSpeedDown = a.Intensity / 10 a.State = 0 Next End Sub Sub SaveStateLightturnlight() 'new sub for problem : when the ball is drained if you push on the right or leftflipper a new state 1 is added OldState_L12(CurrentPlayer) = L12.state OldState_L15(CurrentPlayer) = L15.state OldState_L16(CurrentPlayer) = L16.state OldState_L11(CurrentPlayer) = L11.state OldState_L116(CurrentPlayer) = L116.state OldState_L117(CurrentPlayer) = L117.state OldState_L115(CurrentPlayer) = L115.state ' OldState_L131(CurrentPlayer) = L131.state ' OldState_L132(CurrentPlayer) = L132.state ' OldState_L133(CurrentPlayer) = L133.state End Sub Sub SaveStateLight() OldState_L101(CurrentPlayer)=L101.state OldState_L106(CurrentPlayer)=L106.state OldState_L103(CurrentPlayer)=L103.state ' OldState_L11(CurrentPlayer)=L11.state OldState_L110(CurrentPlayer)=L110.state OldState_L111(CurrentPlayer)=L111.state OldState_L112(CurrentPlayer)=L112.state ' OldState_L115(CurrentPlayer)=L115.state ' OldState_L116(CurrentPlayer)=L116.state ' OldState_L117(CurrentPlayer)=L117.state ' OldState_L12(CurrentPlayer)=L12.state OldState_L13(CurrentPlayer)=L13.state ' OldState_L131(CurrentPlayer)=L131.state ' OldState_L132(CurrentPlayer)=L132.state ' OldState_L133(CurrentPlayer)=L133.state OldState_L14(CurrentPlayer)=L14.state ' OldState_L15(CurrentPlayer)=L15.state ' OldState_L16(CurrentPlayer)=L16.state OldState_L163(CurrentPlayer)=L163.state OldState_L165(CurrentPlayer)=L165.state OldState_L166(CurrentPlayer)=L166.state OldState_L170(CurrentPlayer)=L170.state OldState_L171(CurrentPlayer)=L171.state OldState_L172(CurrentPlayer)=L172.state OldState_L18(CurrentPlayer)=L18.state OldState_L19(CurrentPlayer)=L19.state OldState_L20(CurrentPlayer)=L20.state OldState_L21(CurrentPlayer)=L21.state OldState_L22(CurrentPlayer)=L22.state OldState_L23(CurrentPlayer)=L23.state OldState_L24(CurrentPlayer)=L24.state ' OldState_L26(CurrentPlayer)=L26.state ' OldState_L29(CurrentPlayer)=L29.state ' OldState_L32(CurrentPlayer)=L32.state ' OldState_L35(CurrentPlayer)=L35.state ' OldState_L38(CurrentPlayer)=L38.state ' OldState_L41(CurrentPlayer)=L41.state ' OldState_L44(CurrentPlayer)=L44.state ' OldState_L47(CurrentPlayer)=L47.state ' OldState_L50(CurrentPlayer)=L50.state ' OldState_L53(CurrentPlayer)=L53.state ' OldState_L56(CurrentPlayer)=L56.state ' OldState_L59(CurrentPlayer)=L59.state OldState_L63(CurrentPlayer)=L63.state OldState_L64(CurrentPlayer)=L64.state OldState_L66(CurrentPlayer)=L66.state OldState_L69(CurrentPlayer)=L69.state OldState_L70(CurrentPlayer)=L70.state OldState_L75(CurrentPlayer)=L75.state OldState_L72(CurrentPlayer)=L72.state OldState_L79(CurrentPlayer)=L79.state OldState_L82(CurrentPlayer)=L82.state OldState_L83(CurrentPlayer)=L83.state OldState_L85(CurrentPlayer)=L85.state OldState_L88(CurrentPlayer)=L88.state OldState_L89(CurrentPlayer)=L89.state OldState_L91(CurrentPlayer)=L91.state OldState_L94(CurrentPlayer)=L94.state OldState_L95(CurrentPlayer)=L95.state OldState_L96(CurrentPlayer)=L96.state OldState_L98(CurrentPlayer)=L98.state OldState_Light026(CurrentPlayer)=Light026.state OldState_Light054(CurrentPlayer)=Light054.state OldState_Light055(CurrentPlayer)=Light055.state OldState_Light056(CurrentPlayer)=Light056.state OldState_Light057(CurrentPlayer)=Light057.state OldState_Light058(CurrentPlayer)=Light058.state OldState_Light059(CurrentPlayer)=Light059.state OldState_Light060(CurrentPlayer)=Light060.state OldState_Light061(CurrentPlayer)=Light061.state OldState_Light062(CurrentPlayer)=Light062.state OldState_Light063(CurrentPlayer)=Light063.state 'OldState_L13 = L13.state 'OldAllLights = AllLights End Sub Sub TurnOffAllLights() RampChangeStatus(CurrentPlayer) = "OFF" Dim a For each a in AllLights a.State = 0 Next End Sub Sub TurnOffAllRegularLights() RampChangeStatus(CurrentPlayer) = "OFF" Dim a For each a in AnimationRegular a.State = 0 Next End Sub '************************************************************************************ ' ' ' Light Sequence Animation Timer ' ------------------------------ ' ' ' 'seq_animation_array(Number of color choice + animation choice, Color choice 1, Animation choice 1, Color choice 2, Animation choice 2, ETC... ) 'seq_animation_array(X,0-6,7-17,0-6,7-17,etc...) ' 'EG: 'seq_animation_array(4,0,10,1,12) 'LightsequenceAnimation.Enabled=True '************************************************************************************ Sub LightsequenceAnimation_timer() ' ' CheckLamp.Enabled = False CheckLamp.Enabled = False MissionRandomTimer.Enabled=False If animation_start_and_finish_flag = 1 Then If SeqAnimation <> seq_animation_array(0) Then SeqAnimation = SeqAnimation + 1 Select Case seq_animation_array(SeqAnimation) ' Select Case ColorRoundLight 'ColorRoundLight : 0 = Red | 1 = Green | 2 = Blue | 3 = Yellow | 4 = white | 5 = Magenta | 6 = Orange Case 0 : LightObjectColor(1).color = RGB(255, 0, 0) : LightObjectColor(1).colorfull = RGB(255, 0, 0) : LightObjectColor(2).color = RGB(255, 0, 0) : LightObjectColor(2).colorfull = RGB(255, 0, 0) : LightObjectColor(3).color = RGB(255, 0, 0) : LightObjectColor(3).colorfull = RGB(255, 0, 0) : LightObjectColor(4).color = RGB(255, 0, 0) : LightObjectColor(4).colorfull = RGB(255, 0, 0) : LightObjectColor(5).color = RGB(255, 0, 0) : LightObjectColor(5).colorfull = RGB(255, 0, 0) : LightObjectColor(6).color = RGB(255, 0, 0) : LightObjectColor(6).colorfull = RGB(255, 0, 0) : LightObjectColor(7).color = RGB(255, 0, 0) : LightObjectColor(7).colorfull = RGB(255, 0, 0) : LightObjectColor(8).color = RGB(255, 0, 0) : LightObjectColor(8).colorfull = RGB(255, 0, 0) : LightObjectColor(9).color = RGB(255, 0, 0) : LightObjectColor(9).colorfull = RGB(255, 0, 0) : LightObjectColor(10).color = RGB(255, 0, 0) : LightObjectColor(10).colorfull = RGB(255, 0, 0) : LightObjectColor(11).color = RGB(255, 0, 0) : LightObjectColor(11).colorfull = RGB(255, 0, 0) : LightObjectColor(12).color = RGB(255, 0, 0) : LightObjectColor(12).colorfull = RGB(255, 0, 0) : 'RED Case 1 : LightObjectColor(1).color = RGB(0, 255, 0) : LightObjectColor(1).colorfull = RGB(0, 255, 0) : LightObjectColor(2).color = RGB(0, 255, 0) : LightObjectColor(2).colorfull = RGB(0, 255, 0) : LightObjectColor(3).color = RGB(0, 255, 0) : LightObjectColor(3).colorfull = RGB(0, 255, 0) : LightObjectColor(4).color = RGB(0, 255, 0) : LightObjectColor(4).colorfull = RGB(0, 255, 0) : LightObjectColor(5).color = RGB(0, 255, 0) : LightObjectColor(5).colorfull = RGB(0, 255, 0) : LightObjectColor(6).color = RGB(0, 255, 0) : LightObjectColor(6).colorfull = RGB(0, 255, 0) : LightObjectColor(7).color = RGB(0, 255, 0) : LightObjectColor(7).colorfull = RGB(0, 255, 0) : LightObjectColor(8).color = RGB(0, 255, 0) : LightObjectColor(8).colorfull = RGB(0, 255, 0) : LightObjectColor(9).color = RGB(0, 255, 0) : LightObjectColor(9).colorfull = RGB(0, 255, 0) : LightObjectColor(10).color = RGB(0, 255, 0) : LightObjectColor(10).colorfull = RGB(0, 255, 0) : LightObjectColor(11).color = RGB(0, 255, 0) : LightObjectColor(11).colorfull = RGB(0, 255, 0) : LightObjectColor(12).color = RGB(0, 255, 0) : LightObjectColor(12).colorfull = RGB(0, 255, 0) : 'GREEN Case 2 : LightObjectColor(1).color = RGB(0, 0, 255) : LightObjectColor(1).colorfull = RGB(0, 0, 255) : LightObjectColor(2).color = RGB(0, 0, 255) : LightObjectColor(2).colorfull = RGB(0, 0, 255) : LightObjectColor(3).color = RGB(0, 0, 255) : LightObjectColor(3).colorfull = RGB(0, 0, 255) : LightObjectColor(4).color = RGB(0, 0, 255) : LightObjectColor(4).colorfull = RGB(0, 0, 255) : LightObjectColor(5).color = RGB(0, 0, 255) : LightObjectColor(5).colorfull = RGB(0, 0, 255) : LightObjectColor(6).color = RGB(0, 0, 255) : LightObjectColor(6).colorfull = RGB(0, 0, 255) : LightObjectColor(7).color = RGB(0, 0, 255) : LightObjectColor(7).colorfull = RGB(0, 0, 255) : LightObjectColor(8).color = RGB(0, 0, 255) : LightObjectColor(8).colorfull = RGB(0, 0, 255) : LightObjectColor(9).color = RGB(0, 0, 255) : LightObjectColor(9).colorfull = RGB(0, 0, 255) : LightObjectColor(10).color = RGB(0, 0, 255) : LightObjectColor(10).colorfull = RGB(0, 0, 255) : LightObjectColor(11).color = RGB(0, 0, 255) : LightObjectColor(11).colorfull = RGB(0, 0, 255) : LightObjectColor(12).color = RGB(0, 0, 255) : LightObjectColor(12).colorfull = RGB(0, 0, 255) : 'BLUE Case 3 : LightObjectColor(1).color = RGB(255, 255, 0) : LightObjectColor(1).colorfull = RGB(255, 255, 0) : LightObjectColor(2).color = RGB(255, 255, 0) : LightObjectColor(2).colorfull = RGB(255, 255, 0) : LightObjectColor(3).color = RGB(255, 255, 0) : LightObjectColor(3).colorfull = RGB(255, 255, 0) : LightObjectColor(4).color = RGB(255, 255, 0) : LightObjectColor(4).colorfull = RGB(255, 255, 0) : LightObjectColor(5).color = RGB(255, 255, 0) : LightObjectColor(5).colorfull = RGB(255, 255, 0) : LightObjectColor(6).color = RGB(255, 255, 0) : LightObjectColor(6).colorfull = RGB(255, 255, 0) : LightObjectColor(7).color = RGB(255, 255, 0) : LightObjectColor(7).colorfull = RGB(255, 255, 0) : LightObjectColor(8).color = RGB(255, 255, 0) : LightObjectColor(8).colorfull = RGB(255, 255, 0) : LightObjectColor(9).color = RGB(255, 255, 0) : LightObjectColor(9).colorfull = RGB(255, 255, 0) : LightObjectColor(10).color = RGB(255, 255, 0) : LightObjectColor(10).colorfull = RGB(255, 255, 0) : LightObjectColor(11).color = RGB(255, 255, 0) : LightObjectColor(11).colorfull = RGB(255, 255, 0) : LightObjectColor(12).color = RGB(255, 255, 0) : LightObjectColor(12).colorfull = RGB(255, 255, 0) : 'YELLOW Case 4 : LightObjectColor(1).color = RGB(255, 255, 255) : LightObjectColor(1).colorfull = RGB(255, 255, 255) : LightObjectColor(2).color = RGB(255, 255, 255) : LightObjectColor(2).colorfull = RGB(255, 255, 255) : LightObjectColor(3).color = RGB(255, 255, 255) : LightObjectColor(3).colorfull = RGB(255, 255, 255) : LightObjectColor(4).color = RGB(255, 255, 255) : LightObjectColor(4).colorfull = RGB(255, 255, 255) : LightObjectColor(5).color = RGB(255, 255, 255) : LightObjectColor(5).colorfull = RGB(255, 255, 255) : LightObjectColor(6).color = RGB(255, 255, 255) : LightObjectColor(6).colorfull = RGB(255, 255, 255) : LightObjectColor(7).color = RGB(255, 255, 255) : LightObjectColor(7).colorfull = RGB(255, 255, 255) : LightObjectColor(8).color = RGB(255, 255, 255) : LightObjectColor(8).colorfull = RGB(255, 255, 255) : LightObjectColor(9).color = RGB(255, 255, 255) : LightObjectColor(9).colorfull = RGB(255, 255, 255) : LightObjectColor(10).color = RGB(255, 255, 255) : LightObjectColor(10).colorfull = RGB(255, 255, 255) : LightObjectColor(11).color = RGB(255, 255, 255) : LightObjectColor(11).colorfull = RGB(255, 255, 255) : LightObjectColor(12).color = RGB(255, 255, 255) : LightObjectColor(12).colorfull = RGB(255, 255, 255) : 'WHITE Case 5 : LightObjectColor(1).color = RGB(255, 0, 255) : LightObjectColor(1).colorfull = RGB(255, 0, 255) : LightObjectColor(2).color = RGB(255, 0, 255) : LightObjectColor(2).colorfull = RGB(255, 0, 255) : LightObjectColor(3).color = RGB(255, 0, 255) : LightObjectColor(3).colorfull = RGB(255, 0, 255) : LightObjectColor(4).color = RGB(255, 0, 255) : LightObjectColor(4).colorfull = RGB(255, 0, 255) : LightObjectColor(5).color = RGB(255, 0, 255) : LightObjectColor(5).colorfull = RGB(255, 0, 255) : LightObjectColor(6).color = RGB(255, 0, 255) : LightObjectColor(6).colorfull = RGB(255, 0, 255) : LightObjectColor(7).color = RGB(255, 0, 255) : LightObjectColor(7).colorfull = RGB(255, 0, 255) : LightObjectColor(8).color = RGB(255, 0, 255) : LightObjectColor(8).colorfull = RGB(255, 0, 255) : LightObjectColor(9).color = RGB(255, 0, 255) : LightObjectColor(9).colorfull = RGB(255, 0, 255) : LightObjectColor(10).color = RGB(255, 0, 255) : LightObjectColor(10).colorfull = RGB(255, 0, 255) : LightObjectColor(11).color = RGB(255, 0, 255) : LightObjectColor(11).colorfull = RGB(255, 0, 255) : LightObjectColor(12).color = RGB(255, 0, 255) : LightObjectColor(12).colorfull = RGB(255, 0, 255) : 'MAGENTA Case 6 : LightObjectColor(1).color = RGB(255, 50, 0) : LightObjectColor(1).colorfull = RGB(255, 50, 0) : LightObjectColor(2).color = RGB(255, 50, 0) : LightObjectColor(2).colorfull = RGB(255, 50, 0) : LightObjectColor(3).color = RGB(255, 50, 0) : LightObjectColor(3).colorfull = RGB(255, 50, 0) : LightObjectColor(4).color = RGB(255, 50, 0) : LightObjectColor(4).colorfull = RGB(255, 50, 0) : LightObjectColor(5).color = RGB(255, 50, 0) : LightObjectColor(5).colorfull = RGB(255, 50, 0) : LightObjectColor(6).color = RGB(255, 50, 0) : LightObjectColor(6).colorfull = RGB(255, 50, 0) : LightObjectColor(7).color = RGB(255, 50, 0) : LightObjectColor(7).colorfull = RGB(255, 50, 0) : LightObjectColor(8).color = RGB(255, 50, 0) : LightObjectColor(8).colorfull = RGB(255, 50, 0) : LightObjectColor(9).color = RGB(255, 50, 0) : LightObjectColor(9).colorfull = RGB(255, 50, 0) : LightObjectColor(10).color = RGB(255, 50, 0) : LightObjectColor(10).colorfull = RGB(255, 50, 0) : LightObjectColor(11).color = RGB(255, 50, 0) : LightObjectColor(11).colorfull = RGB(255, 50, 0) : LightObjectColor(12).color = RGB(255, 50, 0) : LightObjectColor(12).colorfull = RGB(255, 50, 0) : 'ORANGE case 7 : LampRoundAnimation.Enabled=True 'ANIMATION 1 7 (light on turn clockwise) animation_start_and_finish_flag = 0 case 8 : LampRoundAnimation2.Enabled=True 'ANIMATION 2 8 (Even and odd lamps light up alternately.) animation_start_and_finish_flag = 0 case 9 : LampRoundAnimation3.Enabled=True 'ANIMATION 3 9 (All lamps in the circle flash 4 times) animation_start_and_finish_flag = 0 case 10: LampRoundAnimation4.Enabled=True 'ANIMATION 4 10(Circle lamps light up from bottom to top - used for Hydra) animation_start_and_finish_flag = 0 case 11 : LampRoundAnimation5.Enabled=True 'ANIMATION 5 11 (The lamps rotate counterclockwise and the number of lit lamps increases to completely fill the circle) animation_start_and_finish_flag = 0 case 12 : LampRoundAnimation6.Enabled=True 'ANIMATION 6 12 (light on turn counterclockwise) animation_start_and_finish_flag = 0 case 13 : LampRoundAnimation7.Enabled=True 'ANIMATION 7 13 (round lights turn on for 800ms and shutdown in 20ms) animation_start_and_finish_flag = 0 case 14 : LampRoundAnimation8.Enabled=True 'ANIMATION 8 14 (all round lights is off) animation_start_and_finish_flag = 0 case 15 : LampRoundAnimation9.Enabled=True 'ANIMATION 9 15 (Even lamps light up, | 11,12,1 + 3,4,5 + 7,8,9 is up with the choice color| 11,12,1->(in blue) + (3,4,5 + 7,8,9) Choice color) used for Deep Freeze animation_start_and_finish_flag = 0 case 16 : LampRoundAnimation10.Enabled=True 'ANIMATION 10 16 (the top and bottom lamps light up gradually to close the circle) used for Black Castle animation_start_and_finish_flag = 0 case 17 : LampRoundAnimation11.Enabled=True 'ANIMATION 11 17 (lamps 12 and 6 flash 2x then, lamps 11,12,1 and 5,6,7 flash 2x) used for Black Castle animation_start_and_finish_flag = 0 case 18 : LampRoundAnimation12.Enabled=True 'ANIMATION 12 18 (50% of the lamp is On the rest is OFF, the next sequence is reverse) animation_start_and_finish_flag = 0 End Select End If End If If SeqAnimation = seq_animation_array(0) Then If animation_start_and_finish_flag = 1 Then SeqAnimation = 0 LightsequenceAnimation.Enabled = False EndLightsequenceAnimation.Enabled=True End If End If End Sub Sub EndLightsequenceAnimation_timer() EndLightsequenceAnimation.Enabled=False relighttable CheckLamp.interval=100 CheckLamp.Enabled=True MissionRandomTimer.Enabled=True 'TurnOnAmbiantLight End Sub 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' Controller VBS stuff, but with b2s not started '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '***Controller.vbs version 1.2***' Sub LoadEM LoadController("EM") End Sub Sub LoadPROC(VPMver, VBSfile, VBSver) LoadVBSFiles VPMver, VBSfile, VBSver LoadController("PROC") End Sub Sub LoadVPM(VPMver, VBSfile, VBSver) LoadVBSFiles VPMver, VBSfile, VBSver LoadController("VPM") End Sub Sub LoadVPMALT(VPMver, VBSfile, VBSver) LoadVBSFiles VPMver, VBSfile, VBSver LoadController("VPMALT") End Sub Sub LoadVBSFiles(VPMver, VBSfile, VBSver) On Error Resume Next If ScriptEngineMajorVersion < 5 Then MsgBox "VB Script Engine 5.0 or higher required" ExecuteGlobal GetTextFile(VBSfile) If Err Then MsgBox "Unable to open " & VBSfile & ". Ensure that it is in the same folder as this table. " & vbNewLine & Err.Description InitializeOptions End Sub Sub LoadVPinMAME Set Controller = CreateObject("VPinMAME.Controller") If Err Then MsgBox "Can't load VPinMAME." & vbNewLine & Err.Description If VPMver > "" Then If Controller.Version < VPMver Or Err Then MsgBox "VPinMAME ver " & VPMver & " required." If VPinMAMEDriverVer < VBSver Or Err Then MsgBox VBSFile & " ver " & VBSver & " or higher required." On Error Goto 0 End Sub Sub LoadController(TableType) Dim FileObj Dim DOFConfig Dim TextStr2 Dim tempC Dim count Dim ISDOF Dim Answer B2SOn = False B2SOnALT = False tempC = 0 on error resume next Set objShell = CreateObject("WScript.Shell") objShell.RegRead(directory & "ForceDisableB2S") If Err.number <> 0 Then PopupMessage = "This latest version of Controller.vbs stores its settings in the registry. To adjust the values, you must use VP 10.2 (or newer) and setup your configuration in the DOF section of the -Keys, Nudge and DOF- dialog of Visual Pinball." objShell.RegWrite directory & "ForceDisableB2S",0, "REG_DWORD" objShell.RegWrite directory & "DOFContactors",2, "REG_DWORD" objShell.RegWrite directory & "DOFKnocker",2, "REG_DWORD" objShell.RegWrite directory & "DOFChimes",2, "REG_DWORD" objShell.RegWrite directory & "DOFBell",2, "REG_DWORD" objShell.RegWrite directory & "DOFGear",2, "REG_DWORD" objShell.RegWrite directory & "DOFShaker",2, "REG_DWORD" objShell.RegWrite directory & "DOFFlippers",2, "REG_DWORD" objShell.RegWrite directory & "DOFTargets",2, "REG_DWORD" objShell.RegWrite directory & "DOFDropTargets",2, "REG_DWORD" MsgBox PopupMessage End If tempC = objShell.RegRead(directory & "ForceDisableB2S") DOFeffects(1)=objShell.RegRead(directory & "DOFContactors") DOFeffects(2)=objShell.RegRead(directory & "DOFKnocker") DOFeffects(3)=objShell.RegRead(directory & "DOFChimes") DOFeffects(4)=objShell.RegRead(directory & "DOFBell") DOFeffects(5)=objShell.RegRead(directory & "DOFGear") DOFeffects(6)=objShell.RegRead(directory & "DOFShaker") DOFeffects(7)=objShell.RegRead(directory & "DOFFlippers") DOFeffects(8)=objShell.RegRead(directory & "DOFTargets") DOFeffects(9)=objShell.RegRead(directory & "DOFDropTargets") Set objShell = nothing If TableType = "PROC" or TableType = "VPMALT" Then If TableType = "PROC" Then Set Controller = CreateObject("VPROC.Controller") If Err Then MsgBox "Can't load PROC" Else LoadVPinMAME End If If tempC = 0 Then On Error Resume Next If Controller is Nothing Then Err.Clear Else Set B2SController = CreateObject("B2S.Server") If B2SController is Nothing Then Err.Clear Else B2SController.B2SName = B2ScGameName B2SController.Run() On Error Goto 0 B2SOn = True B2SOnALT = True End If End If End If Else If tempC = 0 Then On Error Resume Next Set Controller = CreateObject("B2S.Server") If Controller is Nothing Then Err.Clear If TableType = "VPM" Then LoadVPinMAME End If Else Controller.B2SName = cGameName If TableType = "EM" Then Controller.Run() End If On Error Goto 0 B2SOn = True End If Else If TableType = "VPM" Then LoadVPinMAME End If End If Set DOFConfig=Nothing Set FileObj=Nothing End If End sub Function SoundFX (Sound, Effect) If ((Effect = 0 And B2SOn) Or DOFeffects(Effect)=1) Then SoundFX = "" Else SoundFX = Sound End If End Function Function SoundFXDOF (Sound, DOFevent, State, Effect) If DOFeffects(Effect)=1 Then SoundFXDOF = "" DOF DOFevent, State ElseIf DOFeffects(Effect)=2 Then SoundFXDOF = Sound DOF DOFevent, State Else SoundFXDOF = Sound End If End Function Function SoundFXDOFALT (Sound, DOFevent, State, Effect) If DOFeffects(Effect)=1 Then SoundFXDOFALT = "" DOFALT DOFevent, State ElseIf DOFeffects(Effect)=2 Then SoundFXDOFALT = Sound DOFALT DOFevent, State Else SoundFXDOFALT = Sound End If End Function Sub DOF(DOFevent, State) If B2SOn Then If State = 2 Then Controller.B2SSetData DOFevent, 1 :Controller.B2SSetData DOFevent, 0 Else Controller.B2SSetData DOFevent, State End If End If End Sub Sub DOFALT(DOFevent, State) If B2SOnALT Then If State = 2 Then B2SController.B2SSetData DOFevent, 1:B2SController.B2SSetData DOFevent, 0 Else B2SController.B2SSetData DOFevent, State End If End If End Sub 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' TABLE INITS & MATHS '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X Sub StartingPinball_timer() ' Playsound "Sound-0x000C" ' PlaySound "Sound-0x000C", 0, SongVolume callout 418 StartingPinball.Enabled=False PleaseWait = False ' video_init End Sub Sub Table1_Init() SpeakTime = 1000 ' ResetValue 'Add HighScore Stern (replaced by another Sub) If ResetHighScores = True Then ResetHs 'Clear Everything BallControlTimer.Enabled = False RetroMode = 0 mMagnetSave.MagnetOn = 0 LastChanceStart = False 'compteuri = 901 RetroMode = 0 HideOverlay = False ' PleaseWait = True CheckLampAction.Enabled=False if notinus = 1 then setlocale(1033) end If Lightcounter = 1 Lightcounter2 = 1 StartMission = 0 ' video_init resetbackglass 'HitsToActivateMission = 1 'SaveValue TableName, "BKSOR01", "XXX" 'SaveValue TableName, "BKSOR02", 1 LoadEM Dim i Randomize Loadhs bAttractMode = False bOnTheFirstBall = False bBallSaverActive = False bBallSaverReady = False bMultiBallMode = False bGameInPlay = False BallsOnPlayfield = 0 BallInLocker = 0 Tilt = 0 TiltSensitivity = 6 Tilted = False GiOff 'PuPlayer.SendMSG "{ ""mt"":301, ""SN"": 2, ""FN"":4, ""FS"":1 }" StartAttractMode if usePUPDMD Then PUPInit Else pupDMDupdate.enabled=0 'init pupdmd driver End if End Sub 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' KEYS '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X Sub Table1_KeyDown(ByVal Keycode) ''********************************* ''Keydown Sounds ''********************************* ' ' ' If KeyCode = PlungerKey Then Plunger.Pullback: ' ' if keycode=StartGameKey then ' new version IF keycode = PlungerKey Then SoundPlungerPull() 'PlaySoundAt "plungerpull", Plunger Plunger.Pullback END IF IF keycode = RightMagnaSave And LastChanceStart = True Then 'MAGNA SAVE BUTTON and lastchance --> Used For Last Chance AutoFireTimer.Enabled=true End If If keycode = RightMagnaSave and BallsOnPlayfield >0 and L24.state = 1 Then ' MagnaSave pupevent 187 ' play magna save animation mMagnetSave.MagnetOn = 1 magnettimer.enabled = True SuperModeTimer.enabled = True SuperCollect = True 'L24.State=0 End If if keycode = LeftMagnaSave Then 'left Magna save used for debug possible LUT channges in future if PMdebug = True Then If PMdebug = true Then PuPlayer.LabelSet pFullDMD,"curplayer","PmTest: " & NumberOfMissioncomplete(CurrentPlayer) ,1,"{'mt':2}" End If End If ' added coin sounds although its freeplay will add callouts to this ' If keycode = AddCredit1 or keycode = AddCredit2 Then ' Select Case Int(rnd*3) ' Case 0: PlaySound ("Coin_In_1"), 0, CoinSoundLevel, 0, 0.25 ' Case 1: PlaySound ("Coin_In_2"), 0, CoinSoundLevel, 0, 0.25 ' Case 2: PlaySound ("Coin_In_3"), 0, CoinSoundLevel, 0, 0.25 ' ' End Select ' End If ' Tilt/Nudge keys NB Not sure these will work as I have no nudge ooptions on table If keycode = LeftTiltKey Then Nudge 90, 6 SoundNudgeLeft() CheckTilt End If If keycode = RightTiltKey Then Nudge 270, 6 SoundNudgeRight() CheckTilt End If If keycode = CenterTiltKey Then Nudge 0, 7 SoundNudgeCenter() CheckTilt End If If hsbModeActive = True Then EnterHighScoreKey(keycode) Else ' Normal Flipper operation if keycode = LeftFlipperKey Then if Gamerover_flag = False And retroMode <> -1 Then ' check Tilted if Not Tilted Then FlipperActivate LeftFlipper, LFPress LF.Fire 'leftflipper.rotatetoend 'LeftFlipper.RotateToEnd ldown = 1 BallControlTimer.Enabled = False checkdown If leftflipper.currentangle < leftflipper.endangle + ReflipAngle Then RandomSoundReflipUpLeft LeftFlipper Else SoundFlipperUpAttackLeft LeftFlipper RandomSoundFlipperUpLeft LeftFlipper End If If LightsequenceAnimation.Enabled = False Then SaveStateLightturnlight ' saves lights as they are into oldStates L11.state=OldState_L12(CurrentPlayer) 'R update L12.state=OldState_L15(CurrentPlayer) 'A update L15.state=OldState_L16(CurrentPlayer) 'G update L16.state=OldState_L11(CurrentPlayer) 'E update L115.state=OldState_L116(CurrentPlayer) 'W update L116.state=OldState_L117(CurrentPlayer) 'A update L117.state=OldState_L115(CurrentPlayer) 'R update SaveStateLightturnlight End If end If ' end check tilted Else ' force down LeftFlipper.RotateToStart End If ' check Gameover_flag or retromode end end If if keycode = RightFlipperKey Then if Gamerover_flag = False And retroMode <> -1 Then ' check Tilted if Not Tilted Then FlipperActivate RightFlipper, RFPress RF.Fire 'rightflipper.rotatetoend FlipperActivate UPRightFlipper, UPRFPress 'RightFlipper.RotateToEnd UPRightFlipper.RotateToEnd rdown = 1 BallControlTimer.Enabled = False checkdown If rightflipper.currentangle > rightflipper.endangle - ReflipAngle Then RandomSoundReflipUpRight RightFlipper Else SoundFlipperUpAttackRight RightFlipper RandomSoundFlipperUpRight RightFlipper End If If LightsequenceAnimation.Enabled = False Then SaveStateLightturnlight ' saves lights as they are into oldStates L11.state=OldState_L16(CurrentPlayer) 'R update L12.state=OldState_L11(CurrentPlayer) 'A update L15.state=OldState_L12(CurrentPlayer) 'G update L16.state=OldState_L15(CurrentPlayer) 'E update L115.state=OldState_L117(CurrentPlayer) 'W update L116.state=OldState_L115(CurrentPlayer) 'A update L117.state=OldState_L116(CurrentPlayer) 'R update SaveStateLightturnlight End If End If ' end check tilted Else RightFlipper.RotateToStart UPRightFlipper.RotateToStart End If ' check Gamerover_flag or end retromode End If If keycode = StartGameKey Then soundStartButton() ' FxTxP - VPXS: the old gate was 'if Gamerover_flag = True'. That flag is set at the top ' of EndOfGame, while LockerTimer is still releasing locked balls and the match ' sequence is still running. Starting there left real balls on the table with ' BallsOnPlayfield reset to 0, so the first stale ball to drain ended the new ' ball. Now the press is queued and fires the moment the table is actually clear. If TableReadyForNewGame() Then BeginNewGame ElseIf Gamerover_flag = True Then bStartPending = True StartPendingTicks = 0 End If End If End If End Sub '************************************** END Table1_KeyDown ************************************ '********************************************************************************************** Sub Table1_KeyUp(ByVal keycode) If keycode = PlungerKey Then If BIPL = 1 Then SoundPlungerReleaseBall() 'Plunger release sound when there is a ball in shooter lane Else SoundPlungerReleaseNoBall() 'Plunger release sound when there is no ball in shooter lane End If Plunger.Fire End If ' Table specific If bGameInPLay and hsbModeActive <> True Then If keycode = LeftFlipperKey Then ldown = 0 If rdown = 0 And ldown = 0 Then BallControlTimer.Enabled = True End If FlipperDeActivate LeftFlipper, LFPress LeftFlipper.RotateToStart If LeftFlipper.currentangle < LeftFlipper.startAngle - 5 Then RandomSoundFlipperDownLeft LeftFlipper End If FlipperLeftHitParm = FlipperUpSoundLevel End If If keycode = RightFlipperKey Then rdown = 0 If rdown = 0 And ldown = 0 Then BallControlTimer.Enabled = True End If FlipperDeActivate RightFlipper, RFPress FlipperDeActivate UPRightFlipper, UPRFPress RightFlipper.RotateToStart UPRightFlipper.RotateToStart If RightFlipper.currentangle > RightFlipper.startAngle + 5 Then RandomSoundFlipperDownRight RightFlipper RandomSoundFlipperDownRight UPRightFlipper End If FlipperRightHitParm = FlipperUpSoundLevel End If Else End If End Sub '************** Meakin shield saucer hit Sub PMShieldSaucerHit 'pupevent 399 SW60videoDelay = 1000 ' minimum 1 second for kick out ' check for Rage Multiball start if BlackCastle(CurrentPlayer) = 4 And RageMultiball = False Then ' start the Rage Multiball ' add delay to Sw60VideoDelay for kickout RageMultiballIntro.enabled = True 'pupevent 400 ' set music back to normal background May change later pupevent 213 SW60videoDelay = SW60videoDelay + 10000 Else ' check retromode if retromode = 1 or retromode = 3 or retromode = -1 or RageMultiball = True Then ' dont do any checks Retromode just add a Score addscore 25000 Else WarHideHurryUp ' hides hurry up Puplayer.setVolumeCurrent pMusic, 50 vcount = 0 ' reset vcount ready to pick up which videos to play ImWaiting.Enabled = False ' hit shield saucer so stop the Im Waiting callouts if MysteryFlag = true then PMVideoQueueID(vcount) = 191 ' setup mystery background PMVideoQueueTimes(vcount) = 5000 ' setup timer for showing the mystery awardd SequenceAnimation = 1 ' set up table animation TableAnimation RandomMysterySelect1 = "" MysteryRandom RandomMysterySelect2 = "" MysteryRandom RandomMysterySelect3 = "" MysteryRandom RandomMysterySelect4 = "" MysteryRandom pSplashMystery "Mystery",1,30719 RandomMystery1.Enabled = True RandomMystery2.Enabled = True RandomMystery3.Enabled = True RandomMystery4.Enabled = True MysteryFlag = False L96.State = 0 ' force OldState OldState_L96(CurrentPlayer) = 0 SW60videoDelay = SW60videoDelay + 5000 vcount = vcount + 1 End If ' ExtraBallsIsLit = True If ExtraBallsIsLit = True Then ExtraBallsIsLit = False ' force old state and light offchars OldState_L95(CurrentPlayer) = 0 L95.state = 0 'SW60videoDelay = 9000 'VideoExtraBall PMVideoQueueID(vcount) = 128 ' video extra ball awarded PMVideoQueueTimes(vcount) = 9000 ' setup timer for showing extra ball awardd AwardExtraBall SW60videoDelay = SW60videoDelay + 9000 vcount = vcount + 1 end If ' SW60Timer=8500 ' hold ball timer? ' check for ball locks If RetroMode = 0 Then If Knight_challenge(CurrentPlayer) = 1 Then Knight_challenge(CurrentPlayer) = 2 'playmedia "ball one locked Sound-0x0580.mp3","Audiocomment",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PMVideoQueueID(vcount) = 154 ' video tkc BALL LOCK 1 PMVideoQueueTimes(vcount) = 6000 ' setup timer for showing extra ball awardd vcount = vcount + 1 SW60videoDelay = SW60videoDelay + 6000 ElseIf Knight_challenge(CurrentPlayer) = 3 Then Knight_challenge(CurrentPlayer) = 4 'playmedia "ball two locked Sound-0x01BE.mp3","Audiocomment",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PMVideoQueueID(vcount) = 156 ' video tkc BALL LOCK 2 PMVideoQueueTimes(vcount) = 6000 ' setup timer for showing extra ball awardd vcount = vcount + 1 SW60videoDelay = SW60videoDelay + 6000 ElseIf Knight_challenge(CurrentPlayer) = 5 Then Knight_challenge(CurrentPlayer) = 6 'playmedia "ball three locked.mp3","Audiocomment",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PMVideoQueueID(vcount) = 158 ' video tkc BALL LOCK 3 starting TKC PMVideoQueueTimes(vcount) = 6000 ' setup timer for showing extra ball awardd vcount = vcount + 1 SW60videoDelay = SW60videoDelay + 6000 end If End If ' If ShieldIsReadyToActivateMission(CurrentPlayer) = True And CatapultModeFlag = False And Knight_challenge_flag = False Then If ShieldIsReadyToActivateMission(CurrentPlayer) = True And CurrentMissionFlag(CurrentPlayer) = 0 And WarHurryFlag = False Then vModeIntroTime = 0 ' time added on for intro ' start or restart battle mode ' hydra mode If (MudBog(CurrentPlayer) = 1 Or MudBog(CurrentPlayer) = 3) And MissionRandom = "MudBog" Then MudBog(CurrentPlayer) = 2 'SW60Timer=8500 TurnOffAllRegularLights seq_animation_array = Array (8,1,10,1,13,1,13,1,13) SeqAnimation = 0 LightsequenceAnimation.Enabled = True vModeBG = 147 ' when mission/mode is started needs triggre for BG loop vModeIntro = 146 ' trigger number of the intro to be played vModeIntroTime = 7000 ' time for intro to play ' start lights initial state L66State(CurrentPlayer) = 2 L75State(CurrentPlayer) = 2 L79State(CurrentPlayer) = 2 L85State(CurrentPlayer) = 0 L91State(CurrentPlayer) = 0 L98State(CurrentPlayer) = 2 L106State(CurrentPlayer) = 2 SW41_Flag = 0 SW48_Flag = 0 SW51_Flag = 0 SW59_Flag = 0 SW64_Flag = 0 End If ' magma beast (fire elemental) If (MoltenFire(CurrentPlayer) = 1 Or MoltenFire(CurrentPlayer) = 3) And MissionRandom = "MoltenFire" Then MoltenFire(CurrentPlayer) = 2 'SW60Timer=6900 TurnOffAllRegularLights seq_animation_array = Array (6,0,11,0,13,3,13) 'seq_animation_array = Array (4,1,8,1,7) SeqAnimation = 0 LightsequenceAnimation.Enabled = True vModeBG = 133 ' when mission/mode is started needs triggre for BG loop vModeIntro = 132 ' trigger number of the intro to be played vModeIntroTime = 6000 ' time for intro to play ' start lights initial state L66State(CurrentPlayer) = 2 L75State(CurrentPlayer) = 2 L79State(CurrentPlayer) = 2 L85State(CurrentPlayer) = 2 L91State(CurrentPlayer) = 2 L98State(CurrentPlayer) = 2 L106State(CurrentPlayer) = 2 End If ' sandworm If (BurningSands(CurrentPlayer) = 1 Or BurningSands(CurrentPlayer) = 3) And MissionRandom = "BurningSands" Then BurningSands(CurrentPlayer) = 2 'SW60Timer=6000 TurnOffAllRegularLights seq_animation_array = Array (6,3,10,3,13,3,13) SeqAnimation = 0 LightsequenceAnimation.Enabled = True vModeBG = 194 ' when mission/mode is started needs triggre for BG loop vModeIntro = 193 ' trigger number of the intro to be played vModeIntroTime = 5000 ' time for intro to play if PowerSwordActivated = False then BurningSandsLightMove.Enabled=True End If 'hell hand holder If (WickedCavern(CurrentPlayer) = 1 OR WickedCavern(CurrentPlayer) = 3) And MissionRandom = "WickedCavern" Then WickedCavern(CurrentPlayer) = 2 'SW60Timer=8500 TurnOffAllRegularLights SeqAnimation = 0 seq_animation_array = Array (12,5,13,4,13,5,12,0,14,0,13,4,13) LightsequenceAnimation.Enabled = True vModeBG = 140 ' when mission/mode is started needs triggre for BG loop vModeIntro = 139 ' trigger number of the intro to be played vModeIntroTime = 7000 ' time for intro to play End If ' lych If (DeepFreeze(CurrentPlayer) = 1 Or DeepFreeze(CurrentPlayer) = 3) And MissionRandom = "DeepFreeze" Then DeepFreeze(CurrentPlayer) = 2 'SW60Timer=8500 TurnOffAllRegularLights SeqAnimation = 0 seq_animation_array = Array (6,5,15,5,13,2,13) LightsequenceAnimation.Enabled = True vModeBG = 180 ' when mission/mode is started needs triggre for BG loop vModeIntro = 179 ' trigger number of the intro to be played vModeIntroTime = 7000 ' time for intro to play End If ' wow you made it Black Castle (good luck) No restart If BlackCastle(CurrentPlayer) = 1 And MissionRandom = "BlackCastle" Then BlackCastle(CurrentPlayer) = 2 'SW60Timer=15500 TurnOffAllRegularLights SeqAnimation = 0 seq_animation_array = Array (10,5,16,4,13,3,16,0,17,0,9) 'Black Castle LightsequenceAnimation.Enabled = True vModeBG = 109 ' when mission/mode is started needs triggre for BG loop vModeIntro = 108 ' trigger number of the intro to be played vModeIntroTime = 15000 ' time for intro to play timer2.interval= 5 * (BlackCastleRoundsNeeded(CurrentPlayer) + 1 - BlackCastleRoundCounter) timer2.Enabled=True FlailReset.Enabled = True ' Set safeguard in place to reset flail every 30 seconds 'StopRotating.Enabled=False StopBouleFlag = False ' forcing shield down ShieldRemainsLock = True Shield_New_Status = "unlock" ' ShieldTimer.Enabled=True ShieldNumberOfMove = 2 ShieldTimer.interval=100 ShieldTimer.Enabled=True End If if vModeIntroTime > 0 Then ' we have an intro to play ' meakin setting current mission On ' left ramp set pattern and rate L79.BlinkPattern="10" L79.BlinkInterval = 125 'L79.state = 2 ' stop War hurry up remove this check at top ensures cannot start battle if hurryup 'if WarHurryFlag = True Then WarStop CurrentMissionFlag(CurrentPlayer) = 1 if BlackCastle(CurrentPlayer) = 2 Then AddTimeForMission(CurrentPlayer) = BlackCastleMissionTime Else AddTimeForMission(CurrentPlayer) = MissionTime ' spin the flail to 0 to stop double shots up ramp StopBouleAngle = 0 'StopBouleFlag = True 'timer2.interval=5 'timer2.Enabled=True 'StopRotating.Interval = 15000 StopRotating.Enabled=True FlailReset.enabled = False End If horloge.Enabled = False if pmdebug = True Then PuPlayer.LabelSet pFullDMD,"curplayer","intro: " & vModeIntro,1,"{'mt':2}" PMVideoQueueID(vcount) = vModeBG ' setup background first wait 10th second PMVideoQueueTimes(vcount) = 100 vcount = vcount + 1 PMVideoQueueID(vcount) = vModeIntro ' play intro PMVideoQueueTimes(vcount) = vModeIntroTime SW60videoDelay = SW60videoDelay + vModeIntroTime End If End If 'fire video PMVideoTimer.interval = 300 PMVideoTimer.Enabled = True ' change credit display (bottom left) to give feedbac 'PuPlayer.LabelSet pFullDMD,"curplayer","E" & PMtest,1,"{'mt':2}" 'PuPlayer.LabelSet pFullDMD,"curplayer","vcount: " & vcount,1,"{'mt':2}" ' set timer for kickback End If End If SW60video.Interval = SW60videoDelay SW60video.Enabled = True End Sub Sub PMVideoTimer_timer ' video queue player this uses a queue of videos until empty ' play video if ID is 0 no video to play if PMVideoQueueID(0)>0 then WarHideHurryUp pupevent PMVideoQueueID(0) ' play video if it exists if PMVideoQueueID(0) = 128 Then DelayCallout 2, RndInt(415,416) ' extra ball callout Puplayer.setVolumeCurrent pMusic, 20 ' make BG music quieter end If If PMVideoQueueTimes(0) = 0 then PMVideoTimer.enabled = False ' turn off timer last video played Puplayer.setVolumeCurrent pMusic, 100 ' make BG music back up again If WarHurryFlag = True Then WarDelayShow.Interval = 1000 ' 1 second delay used to show Hurryup WarDelayShow.enabled = True End If vcount = 0 'VideoSetBackgroundPM Else PMVideoTimer.interval = PMVideoQueueTimes(0) PMVideoTimer.enabled = True ' turn on timer more videos to play ' reduce queue for vcount = 0 to 8 PMVideoQueueID(vcount) = PMVideoQueueID(vcount+1) PMVideoQueueTimes(vcount) = PMVideoQueueTimes(vcount+1) next End If End Sub 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' SHADOWS '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '***************************************** ' ninuzzu's FLIPPER SHADOWS '***************************************** sub FlipperTimer_Timer() FlipperLSh.RotZ = LeftFlipper.currentangle FlipperRSh.RotZ = RightFlipper.currentangle 'FlipperLSh1.RotZ = LeftFlipper1.currentangle End Sub '***************************************** ' ninuzzu's BALL SHADOW '***************************************** ' Dim BallShadow ' BallShadow = Array (BallShadow1,BallShadow2,BallShadow3,BallShadow4,BallShadow5,BallShadow6,BallShadow7,BallShadow8,BallShadow9,BallShadow10) ' ' Sub BallShadowUpdate_timer() ' Dim gBOT, b ' gBOT = GetBalls ' ' hide shadow of deleted balls ' If UBound(gBOT)<(tnob-1) Then ' For b = (UBound(gBOT) + 1) to (tnob-1) ' BallShadow(b).visible = 0 ' Next ' End If ' ' exit the Sub if no balls on the table ' If UBound(gBOT) = -1 Then Exit Sub ' ' render the shadow for each ball ' For b = 0 to UBound(gBOT) ' If gBOT(b).X < Table1.Width/2 Then ' BallShadow(b).X = ((gBOT(b).X) - (Ballsize/6) + ((gBOT(b).X - (Table1.Width/2))/7)) + 6 ' Else ' BallShadow(b).X = ((gBOT(b).X) + (Ballsize/6) + ((gBOT(b).X - (Table1.Width/2))/7)) - 6 ' End If ' ballShadow(b).Y = gBOT(b).Y + 12 ' If gBOT(b).Z > 20 Then ' BallShadow(b).visible = 1 ' Else ' BallShadow(b).visible = 0 ' End If ' Next ' End Sub 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' TILT NB NOT touched by Meakin - Dont have nudge features on my table '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X 'NOTE: The TiltDecreaseTimer Subtracts .01 from the "Tilt" variable every round Sub CheckTilt 'Called when table is nudged Tilt = Tilt + TiltSensitivity 'Add to tilt count TiltDecreaseTimer.Enabled = True ' If CurrentMissionFlag(CurrentPlayer) = 0 Then Select Case Int(Rnd*22)+1 Case 1 : audioknight = "Sound-0x01B0.mp3":SpeakTime = 2526 'Super Feats is Boosted Case 2 : audioknight = "Sound-0x017C.mp3":SpeakTime = 1083 'Super Feats is Boosted Case 3 : audioknight = "Sound-0x01F0.mp3":SpeakTime = 2588 'Super Feats is Boosted Case 4 : audioknight = "Sound-0x02C6.mp3":SpeakTime = 1119 'Super Feats is Boosted Case 5 : audioknight = "Sound-0x03B3.mp3":SpeakTime = 1757 'Super Feats is Boosted Case 6 : audioknight = "Sound-0x03E5.mp3":SpeakTime = 1078 'Super Feats is Boosted Case 7 : audioknight = "Sound-0x03F0.mp3":SpeakTime = 1634 'Super Feats is Boosted Case 8 : audioknight = "Sound-0x0461.mp3":SpeakTime = 2046 'Super Feats is Boosted Case 9 : audioknight = "Sound-0x0417.mp3":SpeakTime = 1718 'Super Feats is Boosted Case 10 : audioknight = "Sound-0x0186.mp3":SpeakTime = 1527 'Super Feats is Boosted Case 11 : audioknight = "Sound-0x0249.mp3":SpeakTime = 1751 'Super Feats is Boosted Case 12 : audioknight = "Sound-0x0381.mp3":SpeakTime = 1950 'Super Feats is Boosted Case 13 : audioknight = "Sound-0x03A9.mp3":SpeakTime = 2260 'Super Feats is Boosted Case 14 : audioknight = "Sound-0x03B3.mp3":SpeakTime = 1757 'Super Feats is Boosted Case 15 : audioknight = "Sound-0x0480.mp3":SpeakTime = 2316 'Super Feats is Boosted Case 16 : audioknight = "Sound-0x01B8.mp3":SpeakTime = 2436 'Super Feats is Boosted Case 17 : audioknight = "Sound-0x023D.mp3":SpeakTime = 1903 'Super Feats is Boosted Case 18 : audioknight = "Sound-0x02B9.mp3":SpeakTime = 1475 'Super Feats is Boosted Case 19 : audioknight = "Sound-0x03D8.mp3":SpeakTime = 1117 'Super Feats is Boosted Case 20 : audioknight = "Sound-0x0271.mp3":SpeakTime = 2103 'Super Feats is Boosted Case 21 : audioknight = "Sound-0x040f.mp3":SpeakTime = 2312 'Super Feats is Boosted Case 22 : audioknight = "Sound-0x041A.mp3":SpeakTime = 2237 'Super Feats is Boosted End Select LightEyesBK playmedia audioknight,"audioknight",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' End If If(Tilt> TiltSensitivity) AND(Tilt <15) Then 'show a warning If RetroMode = 1 or RetroMode = 3 Or RetroMode = -1 Or RageMultiball = True Then 'playmedia "Sound-0x0047.mp3","Audionoise",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) Else pNote "CAREFUL!","TILT WARNING" ' pupDMDDisplay "-","Tilt^Warning!",dmdnote,3,0,10 'PlaySound "buzz" ' PuPlayer.playlistplayex pFullDMD,"videotilt","",100,1 ' playmedia "Danger.mp4","Danger",pFullDMD,"",3000,"",1,1 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) 'Video_Danger ' playmedia "Sound-0x01B0.mp3","Audioknight",pAudio,"",0,"",1,10 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' DOF 311, DOFPulse 'DOF MX - Tilt Warning End If End if If Tilt> 15 Then 'If more that 15 then TILT the table Tilted = True UnblockDrainHited.Enabled = True pNote "TILT","" ' pupDMDDisplay "-","TILT^TILT",dmdnote,3,0,10 'PlaySound "powerdownn" 'playmedia "brilliant that makes me feel loads better.mp4","videodrains",pFullDMD,"",3000,"",1,1 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) If RetroMode = 1 or RetroMode = 3 Or RageMultiball = True Or RetroMode = -1 Then playmedia "Sound-0x0149.mp3","Audionoise",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) Else ' playmedia "Tilt.mp4","Tilt",pFullDMD,"",3000,"",1,1 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) Video_Tilt End If 'DOF 310, DOFPulse 'DOF MX - TILT DisableTable True tilttime = 0 tilttableclear.enabled = true TiltRecoveryTimer.Enabled = True 'start the Tilt delay to check for all the balls to be drained End If End Sub sub tilttableclear_timer tilttime = tilttime + 1 Select Case tilttime Case 10 tableclearing End Select End Sub Sub tableclearing End Sub Sub posttiltreset End Sub Sub TiltDecreaseTimer_Timer If Tilt> 0 Then Tilt = Tilt - 0.1 Else TiltDecreaseTimer.Enabled = False End If End Sub Sub DisableTable(Enabled) If Enabled Then GiOff ' LightSeqTilt.Play SeqAllOff LeftFlipper.RotateToStart UPRightFlipper.RotateToStart RightFlipper.RotateToStart LeftSlingshot.Disabled = 1 RightSlingshot.Disabled = 1 'PuPlayer.playresume 4 playclear pAudio playclear pMusic Else GiOn ' LightSeqTilt.StopPlay LeftSlingshot.Disabled = 0 RightSlingshot.Disabled = 0 End If End Sub Sub TiltRecoveryTimer_Timer() If(BallsOnPlayfield = 0) Then EndOfBall() TiltRecoveryTimer.Enabled = False End If End Sub 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' START GAME, END GAME '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '**************************************************************************** ' FxTxP - VPXS NEW-GAME GATE ' EndOfGame sets Gamerover_flag=True immediately, then leaves LockerTimer ' releasing locked balls and Video_Display_Match running the match sequence. ' The table is only genuinely idle once both timers are off AND no ball ' objects remain. GetBalls() counts locked balls too, since they are real ' balls sitting in kickers, so UBound = -1 is the true 'table is empty' test. '**************************************************************************** Function TableReadyForNewGame() TableReadyForNewGame = False If Gamerover_flag <> True Then Exit Function If LockerTimer.Enabled Then Exit Function If Video_Display_Match.Enabled Then Exit Function If UBound(GetBalls()) >= 0 Then Exit Function TableReadyForNewGame = True End Function ' The original body of the StartGameKey handler, called from the key press when ' the table is already idle, or from RollingTimer_Timer once a queued press clears. Sub BeginNewGame() bStartPending = False StartPendingTicks = 0 ' belt and braces: nothing stale left in the ramp-roll queue at game start RampPurgeDeadBalls PlayersPlayingGame = 1 WarHideHurryUp pupevent 209 ' show title screen callout RndInt(182,189) If PlayersPlayingGame = 1 Then ' this will allow for more players in the future restoreOverlay.Interval=100 restoreOverlay.Enabled=True End If TotalGamesPlayed = TotalGamesPlayed + 1 ResetForNewGame() End Sub Sub ResetForNewGame() ' Trun off attract display PuPlayer.LabelSet pFullDMD,"high1name","",1,"" PuPlayer.LabelSet pFullDMD,"high1score","",1,"" PuPlayer.LabelSet pFullDMD,"high2name","",1,"" PuPlayer.LabelSet pFullDMD,"high2score","",1,"" PuPlayer.LabelSet pFullDMD,"high3name","",1,"" PuPlayer.LabelSet pFullDMD,"high3score","",1,"" PuPlayer.LabelSet pFullDMD,"high4name","",1,"" PuPlayer.LabelSet pFullDMD,"high4score","",1,"" PuPlayer.LabelShowPage pFullDMD,1,0,"" pUpdateScores PuPlayer.LabelSet pFullDMD,"Play1","PLAYER 1",1,"{'mt':2,'color':16777215}" PuPlayer.LabelSet pFullDMD,"notetitle","",1,"" PuPlayer.LabelSet pFullDMD,"notecopy","",1,"" resetbackglass clearosblabels clearhslabels LastChanceCatapultMode = False WarHurryUp51Touch=0 WarHurryUp56Touch=0 WarHurryUp58Touch=0 BaseBonus = 0 SuperFeatures = 0 Combos = 0 Loops = 0 ' EndOfGameFlag = False ' SCORE rules AddScoreLoopBonus = 500000 AddscoreCatapult = 0 ' End SCORE rules Gamerover_flag = False Dim i StopAttractMode bGameInPLay = True 'GiOn TotalGamesPlayed = TotalGamesPlayed + 1 savegp CurrentPlayer = 1 PlayersPlayingGame = 1 BallsOnPlayfield = 0 bOnTheFirstBall = True lightstateflag=1 MysteryFlag = False SeqAnimation=0 TurnOffRoundLights Knight_challenge_flag = False KnightRemaining = 3 L11.state=0 L12.state=0 L15.state=0 L16.state=0 L115.state=0 L116.state=0 L117.state=0 L131.state=0 L132.state=0 L133.state=0 RampLightsMove(CurrentPlayer) = "Blinking" CheckLamp.Interval=100 CheckLamp.Enabled = True StopBouleFlag = False StopRotating.interval=5000 StopBouleAngle = 0 StopRotating.Enabled=True BallInLocker = 0 WickedCavernLeftOrRight = "" WickedCavernLeftOrRightOld = "" DeepFreezeTargetRedHit = False ' only set for one player at the moment but initialising arrays for 4 players in case this is changed in the future. For i = 1 To 4 L66color(i) = "white" L75color(i) = "white" L79color(i) = "white" L85color(i) = "white" L91color(i) = "white" L98color(i) = "white" L106color(i) = "white" MagnaSaveFlag(i) = 1 RemainingHit(i) = 0 RampChangeStatus(i) = 0 KnightLamp(i) = KnightLampDefault * 2 'default usually 2 lights which is * 2 to give the state BallInCatapult(i) = 0 BlackKnightRetro(i) = 0 'default 0 ' BlackKnightRetro(i) = 2 'default 0 Score(i) = 0 BonusPoints(i) = 0 BonusHeld(i) = False BonusMultiplier(i) = 1 BallsRemaining(i) = bpgcurrent ExtraBallsAwards(i) = 0 BallSaveAvailable(i) = False Knight_challenge(i) = 0 catapult_lock_is_lit(i) = True RampActivForValidateMission(i) = False ShieldIsReadyToActivateMission(i) = False NumberOfHitForStartMission(i) = 1 ' set as 1 so new game is red to start NumberOfMissioncomplete(i) = 0 CountSW45used(i) = 0 Pop1Hits(i) = 0 Pop2Hits(i) = 0 Pop3Hits(i) = 0 L66State(i) = 0 L75State(i) = 0 L79State(i) = 0 L85State(i) = 0 L91State(i) = 0 L98State(i) = 0 L106State(i) = 0 RandomL01(i) = "" RandomL02(i) = "" RandomL03(i) = "" RandomR01(i) = "" RandomR02(i) = "" RandomR03(i) = "" DeepFreezeMissionHitStart(i) = False AddScoreMudBogTotal(i) = 0 AddScoreMoltenFireTotal(i) = 0 AddScoreDeepFreezeTotal(i) = 0 AddScoreSandWormTotal(i) = 0 AddScoreWickedCavernTotal(i) = 0 AddScoreBlackCastleTotal(i) = 0 AddscoreCatapultTotal(i) = 0 AddScoreTripleKnightChallengeTotal(i) = 0 AddScoreWarHurryUpTotal(i) = 0 Catapult_Mode_Total_score(i) = 0 LastChanceChronoStart(i) = False ReplayPlayer(i) = False AddscoreCatapultTotalEndGame(i) = 0 AddScoreTripleKnightChallengeTotalEndGame(i) = 0 AddScoreWarHurryUpTotalEndGame(i) = 0 '***************** Variable used for Check the HighScore ****************************** ScoreComboChampion(i) = 0 ScoreKnightChampion(i) = 0 ScoreBlackCastleChampion(i) = 0 ScoreLoopChampion(i) = 0 ScoreWarChampion(i) = 0 ScoreBonusChampion(i) = 0 ScoreTripleKnightsMBChampion(i) = 0 ScoreCatapultMBChampion(i) = 0 ScoreMoltenFireChampion(i) = 0 ScoreDeepFreezeChampion(i) = 0 ScoreMudBogChampion(i) = 0 ScoreWickedCavernChampion(i) = 0 ScoreBurningSandsChampion(i) = 0 ScoreSuperChampion(i) = 0 CurrentMissionFlag(i) = 0 ' set the start points of the missions HitsToActivateMission(i) = 1 ' how many hits of three way to start mission arrayed for each player MudBogHeadsNeeded(i) = MudBogHeadsDefault ' How many Hydra heads need sealing for battle to be won MoltenFireShotsNeeded(i) = MoltenFireShotsDefault ' How many Magna Beast shots needed for battle to be won WickedCavernShotsNeeded(i) = WickedCavernShotsDefault ' How many Hell Hand shots needed for battle to be won BurningSandsSetsNeeded(i) = BurningSandsSetsDefault ' How many Sandworm Sets completed needed for battle to be won DeepFreezeLordsNeeded(i) = DeepFreezeLordsDefault ' How many Lych lords completed needed for battle to be won BlackCastleRoundsNeeded(i) = BlackCastleRoundsDefault ' how many rounds need to complete battle MudBogHeadsCounter(i)= 0 MoltenFireShots(i)= 0 BurningSandsSetsCounter(i) = 0 WickedCavernShots(i)= 0 DeepFreezeLordsCounter(i)= 0 MudBog(i)=0 MoltenFire(i)=0 BurningSands(i)=0 WickedCavern(i)=0 DeepFreeze(i)=0 BlackCastle(i)= 0 PowerSwordLevel(i) = PowerSwordStartLevel ' start level for powerswor default 50 RampChangeStatus(i) = "" RampLightsMove(i) = "Blinking" Next BlackCastleRoundCounter = 0 BlackCastleMissionHitStart = False PowerSwordActivated = False PowerSwordMultipler = 1 PowerSwordAnimated.enabled = False RetroMode = 0 LastChanceFlag = False LastChanceStart = False Tilt = 0 BouleHited = 0 'Game_Init() 'pDMDStartGame ShieldRemainsLock = False BallInLocker = 0 'vpmtimer.addtimer 1500, "FirstBall '" 'FirstBall FirstBall.Enabled=True ShieldNumberOfMove = 4 ShieldTimer.interval=250 ShieldTimer.Enabled=True UPLock.collidable=True UPLock.TransY=0 boule.rotx=0 ' PlaySound "Sound-0x0111",-1 PlaySound "Sound-0x0111", 0, SongVolume WarHideHurryUp pupevent 499 ' play background video ' meakin added start video 'playmedia "MainplayV2.mp4","Background Main Play",pFullDMD,"cineon",4000,"",1,5 Timer2.Enabled=True ColorRoundLight = 0 MissionRandomTimer.Interval=500 MissionRandomTimer.enabled=True SelectMission BeginCurrentMissionFlag = 0 Tilt = 0 ballNumDisplay = 1 ' turn off ball saver bBallSaverActiveL13 = False bBallSaverActive = False l13.state = 0 'L14.state = 2 L63.state = 0 L64.state = 0 ExtraBallsIsLit = False MysteryFlag = False CheckLampAction.Enabled=True CheckLamp.Interval=100 CheckLamp.Enabled = True 'rememberlights CheckLamp.enabled = True End Sub Sub EndOfGame() BallControlTimer.Enabled = False BallKeptInLocker = 0 LockerTimer.Enabled=True CheckLamp.Enabled=False CheckLampAction.Enabled=False horloge.Enabled = False MissionRandomTimer.enabled=False TurnOffRoundLights LeftFlipper.RotateToStart:UPRightFlipper.RotateToStart:RightFlipper.RotateToStart Video_Display_Match.Interval=2500 Video_Display_Match.Enabled=True playclear pMusic Gamerover_flag = True MysteryFlag = False pupevent 399 pNote "GAME OVER","PLAY AGAIN" PuPlayer.LabelSet pFullDMD,"HighScore","",1,"" PuPlayer.LabelSet pFullDMD,"HighScore2","",1,"" PuPlayer.LabelSet pFullDMD,"HighScore2","",1,"" PuPlayer.LabelSet pFullDMD,"HighScoreL1","",1,"" PuPlayer.LabelSet pFullDMD,"HighScoreL2","",1,"" PuPlayer.LabelSet pFullDMD,"HighScoreL3","",1,"" PuPlayer.LabelSet pFullDMD,"high1name","",1,"" PuPlayer.LabelSet pFullDMD,"high1score","",1,"" PuPlayer.LabelSet pFullDMD,"high2name","",1,"" PuPlayer.LabelSet pFullDMD,"high2score","",1,"" PuPlayer.LabelSet pFullDMD,"high3name","",1,"" PuPlayer.LabelSet pFullDMD,"high3score","",1,"" PuPlayer.LabelSet pFullDMD,"high4name","",1,"" PuPlayer.LabelSet pFullDMD,"high4score","",1,"" PuPlayer.LabelSet pFullDMD,"high5name","",1,"" PuPlayer.LabelSet pFullDMD,"high5score","",1,"" setlightvalues gameovervids pDMDGameOver introposition = 0 bGameInPLay = False hsbModeActive = False Dim i GiOff End Sub sub gameovervids GiOff StartLightSeq cineon = 1 StartRainbow alights StartRainbow GI DMDattract.Enabled = 1 'bAttractMode = True end Sub 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' Pinup Active Backglass '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '************************** ' PinUp Player Config ' Change HasPuP = True if using PinUp Player Videos '************************** ' Dim HasPup:HasPuP = True ' ' Dim PuPlayer ' ' Const pTopper=0 ' Const pDMD=11 ' Const pBackglass=1 '' Const pDMD=1 '' Const pBackglass=2 ' Const pPlayfield=3 ' Const pMusic=4 ' Const pAudio=5 ' Const pCallouts=6 ' Const pBackGlass2=7 ' Const pOvervid=14 ' Const pGame=15 if HasPuP Then on error resume next Set PuPlayer = CreateObject("PinUpPlayer.PinDisplay") 'PuPlayer.Init pFullDMD,pGameName PuPlayer.B2SInit "", pGameName 'use new method to startup pup with dmd via puppack on error goto 0 if not IsObject(PuPlayer) then HasPuP = False end If if HasPuP Then PuPlayer.LabelInit pFullDMD ' FxTxP - VPXS: was outside the HasPuP guard above; ' if PuPlayer failed to create, this threw 'Setup Pages. Note if you use fonts they must be in FONTS folder of the pupVideos\tablename\FONTS 'syntax - PuPlayer.LabelNew ,,,,,,,,,,, 'Page 1 (default score display) 'colors 'dark - 2697513 'yellow - 2477823 'light - 15066597 ' DMD Images PuPlayer.LabelNew pFullDMD,"aaaOverlay","overlay",10,77749231,0,1,1,0,0,1,1 PuPlayer.LabelNew pFullDMD,"LTargets","LTargets",10,77749231,0,1,1,0,0,1,1 PuPlayer.LabelNew pFullDMD,"LSlings","LSlings",10,77749231,0,1,1,0,0,1,1 PuPlayer.LabelNew pFullDMD,"LLanes","LLanes",10,77749231,0,1,1,0,0,1,1 PuPlayer.LabelNew pFullDMD,"LPops","LPops",10,77749231,0,1,1,0,0,1,1 PuPlayer.LabelNew pFullDMD,"LOrbits","LOrbits",10,77749231,0,1,1,0,0,1,1 PuPlayer.LabelNew pFullDMD,"Lspinner","LSpinner",10,77749231,0,1,1,0,0,1,1 PuPlayer.LabelNew pFullDMD,"Skel1","skel1",10,77749231,0,1,1,0,0,1,1 PuPlayer.LabelNew pFullDMD,"Skel2","skel2",10,77749231,0,1,1,0,0,1,1 PuPlayer.LabelNew pFullDMD,"Skel3","skel3",10,77749231,0,1,1,0,0,1,1 PuPlayer.LabelNew pFullDMD,"Sword","sword",10,77749231,0,1,1,0,0,1,1 PuPlayer.LabelNew pFullDMD,"Pop1",numberfont, 5,16777215 ,0,1,1,36,30,1,1 PuPlayer.LabelNew pFullDMD,"Pop2",numberfont, 5,16777215 ,0,1,1,36,30,1,1 PuPlayer.LabelNew pFullDMD,"Pop3",numberfont, 5,16777215 ,0,1,1,36,30,1,1 PuPlayer.LabelNew pFullDMD,"PopTotal",numberfont, 5,16777215 ,0,1,1,36,30,1,1 'Normal Play PuPlayer.LabelNew pFullDMD,"Ball",typefont, 2,2477823 ,0,1,1,50,81,1,1 PuPlayer.LabelNew pFullDMD,"Ball2",typefont2, 2,2477823 ,0,1,1,50,81,1,1 PuPlayer.LabelNew pFullDMD,"curplayer",typefont, 3,2477823 ,0,1,1,50,93,1,1 PuPlayer.LabelNew pFullDMD,"curscore",numberfont, 7,2477823 ,0,1,1,50,87,1,1 PuPlayer.LabelNew pFullDMD,"curscore2",numberfont2, 7,2477823 ,0,1,1,50,87,1,1 PuPlayer.LabelNew pFullDMD,"curscore3",typefont2, 7,2477823 ,0,1,1,50,87,1,1 PuPlayer.LabelNew pFullDMD,"AddScoreChest",numberfont, 6,28671 ,0,0,1,14,69,1,1 PuPlayer.LabelNew pFullDMD,"MissionTimer",typefont, 3,15066597 ,0,0,1,23,81,1,0 PuPlayer.LabelNew pFullDMD,"combonum",typefont, 3,2477823 ,0,0,1,23,81,1,0 PuPlayer.LabelNew pFullDMD,"modetimernum",typefont, 3,2477823 ,0,0,1,23,81,1,0 PuPlayer.LabelNew pFullDMD,"TitleBonus",numberfont, 7,2477823 ,0,1,1,50,87,1,1 PuPlayer.LabelNew pFullDMD,"TextBaseBonus",numberfont, 7,2477823 ,0,1,1,50,87,1,1 PuPlayer.LabelNew pFullDMD,"TextSuperFeatures",numberfont, 7,2477823 ,0,1,1,50,87,1,1 PuPlayer.LabelNew pFullDMD,"TextCombos",numberfont, 7,2477823 ,0,1,1,50,87,1,1 PuPlayer.LabelNew pFullDMD,"TextLoops",numberfont, 7,2477823 ,0,1,1,50,87,1,1 PuPlayer.LabelNew pFullDMD,"TextTotalBonus",numberfont, 7,2477823 ,0,1,1,50,87,1,1 PuPlayer.LabelNew pFullDMD,"BaseBonus",numberfont, 7,2477823 ,0,1,1,50,87,1,1 PuPlayer.LabelNew pFullDMD,"SuperFeatures",numberfont, 7,2477823 ,0,1,1,50,87,1,1 PuPlayer.LabelNew pFullDMD,"Combos",numberfont, 7,2477823 ,0,1,1,50,87,1,1 PuPlayer.LabelNew pFullDMD,"Loops",numberfont, 7,2477823 ,0,1,1,50,87,1,1 PuPlayer.LabelNew pFullDMD,"BonusMultiplier",numberfont, 7,2477823 ,0,1,1,50,87,1,1 PuPlayer.LabelNew pFullDMD,"TotalBonus",numberfont, 7,2477823 ,0,1,1,50,87,1,1 PuPlayer.LabelNew pFullDMD,"TotalScoreBonus",numberfont, 7,2477823 ,0,1,1,50,87,1,1 PuPlayer.LabelNew pFullDMD,"AddScoreDisplayed",typefontbold, 7,2477823 ,0,1,1,50,87,1,1 PuPlayer.LabelNew pFullDMD,"AddScoreDisplayed2",numberfont, 7,2477823 ,0,1,1,50,87,1,1 PuPlayer.LabelNew pFullDMD,"CommentDisplayed",typefontbold, 10,2477823 ,0,1,1,50,87,1,1 PuPlayer.LabelNew pFullDMD,"CommentDisplayed2",numberfont, 10,2477823 ,0,1,1,50,35,1,1 PuPlayer.LabelNew pFullDMD,"Mystery",numberfont, 10,30719 ,0,1,1,50,87,1,1 PuPlayer.LabelNew pFullDMD,"RandomMystery",numberfont, 10,30719 ,0,1,1,50,35,1,1 PuPlayer.LabelNew pFullDMD,"LastChanceBallToLock",numberfont, 10,16440832 ,0,1,1,50,25,1,1 PuPlayer.LabelNew pFullDMD,"LastChanceTime",typefont2, 30,255 ,0,1,1,50,50,1,1 PuPlayer.LabelNew pFullDMD,"LastChanceJackpot",numberfont, 10,16440832 ,0,1,1,50,75,1,1 PuPlayer.LabelNew pFullDMD,"Play1score",numberfont, 3,2477823 ,0,0,1,31,81,1,0 PuPlayer.LabelNew pFullDMD,"Play2score",numberfont, 3,2477823 ,0,0,1,31,85,1,0 PuPlayer.LabelNew pFullDMD,"Play3score",numberfont, 3,2477823 ,0,0,1,31,89,1,0 PuPlayer.LabelNew pFullDMD,"Play4score",numberfont, 3,2477823 ,0,0,1,31,93,1,0 PuPlayer.LabelNew pFullDMD,"ruletitle",numberfont, 3,15066597 ,0,1,1,50,12,1,1 PuPlayer.LabelNew pFullDMD,"rulecopy1",typefont, 2,15066597 ,0,1,1,50,15,1,1 PuPlayer.LabelNew pFullDMD,"rulecopy2",typefont, 2,15066597 ,0,1,1,50,15,1,1 'onverlay PuPlayer.LabelNew pFullDMD,"titleimg",zoomfont, 6,16777215 ,0,1,1, 0,0,1,1 PuPlayer.LabelSet pFullDMD,"titleimg","DMDImages\\popframe.png",1,"{'mt':2,'width': 0, 'height': 0, 'yalign': 0}" PuPlayer.LabelNew pFullDMD,"titlebg",zoombgfont, 9,0 ,0,1,1,50,50,1,1 PuPlayer.LabelNew pFullDMD,"title",zoomfont, 9,16777215 ,0,1,1,50,50,1,1 PuPlayer.LabelNew pFullDMD,"titlebg2",zoombgfont, 6,0 ,0,1,1,50,50,1,1 PuPlayer.LabelNew pFullDMD,"title2",zoomfont, 6,16777215 ,0,1,1,50,50,1,1 PuPlayer.LabelNew pFullDMD,"mgscore",numberfont, 9,15066597 ,0,1,1,50,47,1,1 PuPlayer.LabelNew pFullDMD,"matchscore",numberfont, 15,15066597 ,0,1,1,50,25,1,1 'attract PuPlayer.LabelNew pFullDMD,"high1name",typefont, 5,16777215 ,0,1,1,22,30,1,1 PuPlayer.LabelNew pFullDMD,"high1score",numberfont, 5,16777215 ,0,1,1,36,30,1,1 PuPlayer.LabelNew pFullDMD,"high2name",typefont, 5,16777215 ,0,1,1,22,38,1,1 PuPlayer.LabelNew pFullDMD,"high2score",numberfont, 5,16777215 ,0,1,1,36,38,1,1 PuPlayer.LabelNew pFullDMD,"high3name",typefont, 5,16777215 ,0,1,1,22,46,1,1 PuPlayer.LabelNew pFullDMD,"high3score",numberfont, 5,16777215 ,0,1,1,36,46,1,1 PuPlayer.LabelNew pFullDMD,"high4name",typefont, 5,16777215 ,0,1,1,22,54,1,1 PuPlayer.LabelNew pFullDMD,"high4score",numberfont, 5,16777215 ,0,1,1,36,54,1,1 PuPlayer.LabelNew pFullDMD,"high5name",typefont, 5,16777215 ,0,1,1,22,62,1,1 PuPlayer.LabelNew pFullDMD,"high5score",numberfont, 5,16777215 ,0,1,1,36,62,1,1 PuPlayer.LabelNew pFullDMD,"HighScore",typefont, 6,16777215 ,0,0,1,20,30,1,1 PuPlayer.LabelNew pFullDMD,"HighScore2",typefont, 6,16777215 ,0,0,1,20,30,1,1 PuPlayer.LabelNew pFullDMD,"HighScoreL1",numberfont, 8,16777215 ,0,0,1,46,50,1,1 PuPlayer.LabelNew pFullDMD,"HighScoreL2",numberfont, 8,16777215 ,0,0,1,50,50,1,1 PuPlayer.LabelNew pFullDMD,"HighScoreL3",numberfont, 8,16777215 ,0,0,1,54,50,1,1 PuPlayer.LabelNew pFullDMD,"HighScoreL4",numberfont, 4,16777215 ,0,0,1,20,50,1,1 PuPlayer.LabelNew pFullDMD,"CurImage","Arial", 50,391231 ,0,1,1, 0, 0,1,1 'new image type PuPlayer.LabelNew pFullDMD,"AttractTitleL1",numberfont, 18,6655 ,0,0,1,30,21,1,1 PuPlayer.LabelNew pFullDMD,"AttractNameL2",numberfont, 28,28671 ,0,0,1,30,43,1,1 PuPlayer.LabelNew pFullDMD,"AttractScoreL3",numberfont, 16,28671 ,0,0,1,30,65,1,1 PuPlayer.LabelNew pFullDMD,"AttractCreditsL4",numberfont, 10,6655 ,0,0,1,30,91,1,1 PuPlayer.LabelNew pFullDMD,"GameOverPlayer1",numberfont, 6,28671 ,0,0,1,25,16,1,1 PuPlayer.LabelNew pFullDMD,"ScoreGameOverPlayer1",numberfont, 6,28671 ,0,0,1,25,24,1,1 PuPlayer.LabelNew pFullDMD,"GameOverPlayer2",numberfont, 6,28671 ,0,0,1,75,16,1,1 PuPlayer.LabelNew pFullDMD,"ScoreGameOverPlayer2",numberfont, 6,28671 ,0,0,1,75,24,1,1 PuPlayer.LabelNew pFullDMD,"GameOverPlayer3",numberfont, 6,28671 ,0,0,1,25,60,1,1 PuPlayer.LabelNew pFullDMD,"ScoreGameOverPlayer3",numberfont, 6,28671 ,0,0,1,25,68,1,1 PuPlayer.LabelNew pFullDMD,"GameOverPlayer4",numberfont, 6,28671 ,0,0,1,75,60,1,1 PuPlayer.LabelNew pFullDMD,"ScoreGameOverPlayer4",numberfont, 6,28671 ,0,0,1,75,68,1,1 PuPlayer.LabelNew pFullDMD,"TimerSuperMode",numberfont, 6,16777215 ,0,0,1,5,9,1,1 'obslabels 'week 'called on table load Sub resetbackglass PuPlayer.LabelSet pFullDMD,"titleimg","",1,"{'mt':2,'color':111111, 'width': 0, 'height': 0, 'yalign': 0}" PuPlayer.LabelShowPage pFullDMD,1,0,"" PuPlayer.LabelSet pFullDMD,"curplayer","",1,"{'mt':2,'color':2477823, 'size': 3, 'xpos': 7.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"Ball","",1,"{'mt':2,'color':2477823, 'size': 3, 'xpos': 87.5, 'xalign': 0, 'ypos': 94.5, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"Ball2","",1,"{'mt':2,'color':2477823, 'size': 4, 'xpos': 18, 'xalign': 0, 'ypos': 89.2, 'yalign': 0}" 'PuPlayer.LabelSet pFullDMD,"curscore","",1,"{'mt':2,'color':2477823, 'size': 6.2, 'xpos': 50, 'xalign': 1, 'ypos': 89.2, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"curscore2","",1,"{'mt':2,'color':2477823, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 20, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"curscore3","",1,"{'mt':2,'color':2477823, 'size': 6.2, 'xpos': 50, 'xalign': 1, 'ypos': 89.2, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"MissionTimer","",1,"{'mt':2,'color':2477823, 'size': 4., 'xpos': 95, 'xalign': 1, 'ypos': 5, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"TitleBonus","",1,"{'mt':2,'color':814827, 'size': 15, 'xpos': 50, 'xalign': 1, 'ypos': 18, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"TextBaseBonus","",1,"{'mt':2,'color':814827, 'size': 8, 'xpos': 47, 'xalign': 2, 'ypos': 34.4, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"TextSuperFeatures","",1,"{'mt':2,'color':814827, 'size': 8, 'xpos': 47, 'xalign': 2, 'ypos': 49.2, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"TextCombos","",1,"{'mt':2,'color':814827, 'size': 8, 'xpos': 47, 'xalign': 2, 'ypos': 62.9, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"TextLoops","",1,"{'mt':2,'color':814827, 'size': 8, 'xpos': 47, 'xalign': 2, 'ypos': 77.5, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"TextTotalBonus","",1,"{'mt':2,'color':814827, 'size': 20, 'xpos': 50, 'xalign': 1, 'ypos': 37, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"BaseBonus","",1,"{'mt':2,'color':814827, 'size': 6, 'xpos': 55, 'xalign': 0, 'ypos': 34.4, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"SuperFeatures","",1,"{'mt':2,'color':814827, 'size': 6, 'xpos': 55, 'xalign': 0, 'ypos': 47.2, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"Combos","",1,"{'mt':2,'color':814827, 'size': 6, 'xpos': 55, 'xalign': 0, 'ypos': 62.9, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"Loops","",1,"{'mt':2,'color':814827, 'size': 6, 'xpos': 55, 'xalign': 0, 'ypos': 77.5, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"BonusMultiplier","",1,"{'mt':2,'color':814827, 'size': 40, 'xpos': 50, 'xalign': 1, 'ypos': 45, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"TotalBonus","",1,"{'mt':2,'color':814827, 'size': 16, 'xpos': 50, 'xalign': 1, 'ypos': 57, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"TotalScoreBonus","",1,"{'mt':2,'color':814827, 'size': 12, 'xpos': 50, 'xalign': 1, 'ypos': 89, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AddScoreDisplayed","",1,"{'mt':2,'color':255, 'size': 12, 'xpos': 50, 'xalign': 1, 'ypos': 50, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AddScoreDisplayed2","",1,"{'mt':2,'color':0, 'size': 12, 'xpos': 50, 'xalign': 1, 'ypos': 50, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"CommentDisplayed","",1,"{'mt':2,'color':255, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 35, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"CommentDisplayed2","",0,"{'mt':1,'color':2477823, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 35, 'yalign': 1, 'at':3,'hstart':50,'hend':180,'len':" & (2000) & ",'mlen':" & (1000) & ",'tt':15,'fc':" & 200 & "}" PuPlayer.LabelSet pFullDMD,"Mystery","",1,"{'mt':2,'color':30719, 'size': 12, 'xpos': 50, 'xalign': 1, 'ypos': 50, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"RandomMystery","",1,"{'mt':2,'color':30719, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 35, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"LastChanceTime ","",0,"{'mt':1,'color':255, 'size': 20, 'xpos': 50, 'xalign': 1, 'ypos': 50, 'yalign': 1}" ' PuPlayer.LabelSet pFullDMD,"ruletitle","Black Knight Sword of Rage",1,"{'mt':2,'color':15066597, 'size': 2, 'xpos': 82.5, 'xalign': 1, 'ypos': 86.8, 'yalign': 1}" ' PuPlayer.LabelSet pFullDMD,"rulecopy1","Games Played: " & TotalGamesPlayed,1,"{'mt':2,'color':15066597, 'size': 2, 'xpos': 82.5, 'xalign': 1, 'ypos': 89.8, 'yalign': 1}" ' PuPlayer.LabelSet pFullDMD,"rulecopy2","This is a fan game meant only for fun.",1,"{'mt':2,'color':15066597, 'size': 2, 'xpos': 82.5, 'xalign': 1, 'ypos': 92.8, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"Pop1","",1,"{'mt':2,'color':255, 'size': 6, 'xpos': 20, 'xalign': 1, 'ypos': 10, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"Pop2","",1,"{'mt':2,'color':255, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 10, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"Pop3","",1,"{'mt':2,'color':255, 'size': 6, 'xpos': 80, 'xalign': 1, 'ypos': 10, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"PopTotal","",1,"{'mt':2,'color':255, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 50, 'yalign': 0}" End Sub 'called each time a player changes Sub currentplayerbackglass ' puPlayer.LabelSet pFullDMD,"titleimg","",1,"{'mt':2,'color':111111, 'width': 0, 'height': 0, 'yalign': 0}" End Sub Sub titletimer_timer titlepos = titlepos + 1 Select Case titlepos Case 1 PuPlayer.LabelSet pFullDMD,"titleimg","DMDImages\\popframe.png",1,"{'mt':2,'width': 99, 'height': 99, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"title",title,1,"{'mt':2,'color':2565927, 'size': 0, 'xpos': 50, 'xalign': 1, 'ypos': 36, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"titlebg",title,1,"{'mt':2,'color':0, 'size': 0, 'xpos': 50, 'xalign': 1, 'ypos': 36, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"title2",subtitle,1,"{'mt':2,'color':2565927, 'size': 0, 'xpos': 50, 'xalign': 1, 'ypos': 45, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"titlebg2",subtitle,1,"{'mt':2,'color':0, 'size': 0, 'xpos': 50, 'xalign': 1, 'ypos': 45, 'yalign': 0}" Case 2 PuPlayer.LabelSet pFullDMD,"textbg","",1,"" PuPlayer.LabelSet pFullDMD,"title",title,1,"{'mt':2,'color':5066061, 'size': 0.6, 'xpos': 50, 'xalign': 1, 'ypos': 36, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"titlebg",title,1,"{'mt':2,'color':0, 'size': 0.6, 'xpos': 50, 'xalign': 1, 'ypos': 36, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"title2",subtitle,1,"{'mt':2,'color':5066061, 'size': 0.4, 'xpos': 50, 'xalign': 1, 'ypos': 45, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"titlebg2",subtitle,1,"{'mt':2,'color':0, 'size': 0.4, 'xpos': 50, 'xalign': 1, 'ypos': 45, 'yalign': 0}" Case 3 PuPlayer.LabelSet pFullDMD,"title",title,1,"{'mt':2,'color':7960953, 'size': 1.2, 'xpos': 50, 'xalign': 1, 'ypos': 36, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"titlebg",title,1,"{'mt':2,'color':0, 'size': 1.2, 'xpos': 50, 'xalign': 1, 'ypos': 36, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"title2",subtitle,1,"{'mt':2,'color':7960953, 'size': 0.8, 'xpos': 50, 'xalign': 1, 'ypos': 45, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"titlebg2",subtitle,1,"{'mt':2,'color':0, 'size': 0.8, 'xpos': 50, 'xalign': 1, 'ypos': 45, 'yalign': 0}" Case 4 PuPlayer.LabelSet pFullDMD,"title",title,1,"{'mt':2,'color':9671571, 'size': 1.8, 'xpos': 50, 'xalign': 1, 'ypos': 36, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"titlebg",title,1,"{'mt':2,'color':0, 'size': 1.8, 'xpos': 50, 'xalign': 1, 'ypos': 36, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"title2",subtitle,1,"{'mt':2,'color':9671571, 'size': 1.2, 'xpos': 50, 'xalign': 1, 'ypos': 45, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"titlebg2",subtitle,1,"{'mt':2,'color':0, 'size': 1.2, 'xpos': 50, 'xalign': 1, 'ypos': 45, 'yalign': 0}" Case 5 PuPlayer.LabelSet pFullDMD,"title",title,1,"{'mt':2,'color':11842740, 'size': 2.4, 'xpos': 50, 'xalign': 1, 'ypos': 36, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"titlebg",title,1,"{'mt':2,'color':0, 'size': 2.4, 'xpos': 50, 'xalign': 1, 'ypos': 36, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"title2",subtitle,1,"{'mt':2,'color':11842740, 'size': 1.6, 'xpos': 50, 'xalign': 1, 'ypos': 45, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"titlebg2",subtitle,1,"{'mt':2,'color':0, 'size': 1.6, 'xpos': 50, 'xalign': 1, 'ypos': 45, 'yalign': 0}" Case 6 PuPlayer.LabelSet pFullDMD,"title",title,1,"{'mt':2,'color':13224393, 'size': 3, 'xpos': 50, 'xalign': 1, 'ypos': 36, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"titlebg",title,1,"{'mt':2,'color':0, 'size': 3, 'xpos': 50, 'xalign': 1, 'ypos': 36, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"title2",subtitle,1,"{'mt':2,'color':13224393, 'size': 2, 'xpos': 50, 'xalign': 1, 'ypos': 45, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"titlebg2",subtitle,1,"{'mt':2,'color':0, 'size': 2, 'xpos': 50, 'xalign': 1, 'ypos': 45, 'yalign': 0}" Case 7 PuPlayer.LabelSet pFullDMD,"title",title,1,"{'mt':2,'color':14671839, 'size': 3.6, 'xpos': 50, 'xalign': 1, 'ypos': 36, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"titlebg",title,1,"{'mt':2,'color':0, 'size': 3.6, 'xpos': 50, 'xalign': 1, 'ypos': 36, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"title2",subtitle,1,"{'mt':2,'color':14671839, 'size': 2.4, 'xpos': 50, 'xalign': 1, 'ypos': 45, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"titlebg2",subtitle,1,"{'mt':2,'color':0, 'size': 2.4, 'xpos': 50, 'xalign': 1, 'ypos': 45, 'yalign': 0}" Case 8 PuPlayer.LabelSet pFullDMD,"title",title,1,"{'mt':2,'color':15790320, 'size': 4.2, 'xpos': 50, 'xalign': 1, 'ypos': 36, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"titlebg",title,1,"{'mt':2,'color':0, 'size': 4.2, 'xpos': 50, 'xalign': 1, 'ypos': 36, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"title2",subtitle,1,"{'mt':2,'color':15790320, 'size': 2.8, 'xpos': 50, 'xalign': 1, 'ypos': 45, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"titlebg2",subtitle,1,"{'mt':2,'color':0, 'size': 2.8, 'xpos': 50, 'xalign': 1, 'ypos': 45, 'yalign': 0}" Case 9 PuPlayer.LabelSet pFullDMD,"title",title,1,"{'mt':2,'color':16316664, 'size': 4.8, 'xpos': 50, 'xalign': 1, 'ypos': 36, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"titlebg",title,1,"{'mt':2,'color':0, 'size': 4.8, 'xpos': 50, 'xalign': 1, 'ypos': 36, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"title2",subtitle,1,"{'mt':2,'color':16316664, 'size': 3.2, 'xpos': 50, 'xalign': 1, 'ypos': 45, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"titlebg2",subtitle,1,"{'mt':2,'color':0, 'size': 3.2, 'xpos': 50, 'xalign': 1, 'ypos': 45, 'yalign': 0}" Case 10 PuPlayer.LabelSet pFullDMD,"title",title,1,"{'mt':2,'color':16777215, 'size': 5.4, 'xpos': 50, 'xalign': 1, 'ypos': 36, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"titlebg",title,1,"{'mt':2,'color':0, 'size': 5.4, 'xpos': 50, 'xalign': 1, 'ypos': 36, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"title2",subtitle,1,"{'mt':2,'color':16777215, 'size': 3.6, 'xpos': 50, 'xalign': 1, 'ypos': 45, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"titlebg2",subtitle,1,"{'mt':2,'color':0, 'size': 3.6, 'xpos': 50, 'xalign': 1, 'ypos': 45, 'yalign': 0}" Case 11 puPlayer.LabelSet pFullDMD,"titleimg","DMDImages\\popframe.png",1,"{'mt':2,'width': 90, 'height': 90, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"title",title,1,"{'mt':2,'color':16777215, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 36.4, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"titlebg",title,1,"{'mt':2,'color':0, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 36, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"title2",subtitle,1,"{'mt':2,'color':16777215, 'size': 4, 'xpos': 50, 'xalign': 1, 'ypos': 45.3, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"titlebg2",subtitle,1,"{'mt':2,'color':0, 'size': 4, 'xpos': 50, 'xalign': 1, 'ypos': 45, 'yalign': 0}" Case 150 puPlayer.LabelSet pFullDMD,"titleimg","",1,"{'mt':2,'color':111111, 'width': 0, 'height': 0, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"title","",1,"{'mt':2,'color':16777215, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 36, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"titlebg","",1,"{'mt':2,'color':0, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 36, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"title2","",1,"{'mt':2,'color':16777215, 'size': 4, 'xpos': 50, 'xalign': 1, 'ypos': 45, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"titlebg2","",1,"{'mt':2,'color':0, 'size': 4, 'xpos': 50, 'xalign': 1, 'ypos': 45, 'yalign': 0}" titlepos = 0 titletimer.enabled = 0 End Select End Sub Sub pNote(msgText,msg2text) If usePuPDMD=true then exit sub title = msgText subtitle = msg2text If titlepos = 0 Then titletimer.enabled = 1 Else titlepos = 0 titletimer.enabled = 1 PuPlayer.LabelSet pFullDMD,"title","",1,"{'mt':2,'color':16777215, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 36, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"titlebg","",1,"{'mt':2,'color':0, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 36, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"title2","",1,"{'mt':2,'color':16777215, 'size': 4, 'xpos': 50, 'xalign': 1, 'ypos': 45, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"titlebg2","",1,"{'mt':2,'color':0, 'size': 4, 'xpos': 50, 'xalign': 1, 'ypos': 45, 'yalign': 0}" End If End Sub Sub MatchingScore If MatchRandom = 0 Then PuPlayer.LabelSet pFullDMD,"matchscore","00",1,"{'mt':2,'color':0, 'size': 35 }" Else PuPlayer.LabelSet pFullDMD,"matchscore","" & FormatNumber(MatchRandom,0),1,"{'mt':2,'color':0, 'size': 35 }" End If End Sub '******************************************************************************************************* ' PuPlayer.LabelSet pFullDMD,"spellnum",0,1,"{'mt':2,'color':15066597, 'size': 4, 'xpos': 93.6, 'xalign': 1, 'ypos': 5.4, 'yalign': 1}" '*------------------------------------------------------------------------------------ '*------------------------------ Score Update Here ----------------------------------- '*------------------------------------------------------------------------------------ Sub scoretimer_timer pUpdateScores end Sub Sub pUpdateScores If HideOverlay = True Then 'PuPlayer.LabelSet pFullDMD,"curscore","",1,"" PuPlayer.LabelSet pFullDMD,"curscore2","",1,"" PuPlayer.LabelSet pFullDMD,"curscore3","",1,"" PuPlayer.LabelSet pFullDMD,"curplayer","",1,"" PuPlayer.LabelSet pFullDMD,"MissionTimer","",1,"" PuPlayer.LabelSet pFullDMD,"matchscore","",1,"" PuPlayer.LabelSet pFullDMD,"Play1score","",1,"{'mt':2,'color':3753717, 'size': 4 }" PuPlayer.LabelSet pFullDMD,"Play1","Player 1",1,"{'mt':2,'color':2477823}" PuPlayer.LabelSet pFullDMD,"Play2score","",1,"{'mt':2,'color':3753717, 'size': 4 }" PuPlayer.LabelSet pFullDMD,"Play2","Player 2",1,"{'mt':2,'color':2477823}" PuPlayer.LabelSet pFullDMD,"Play3score","",1,"{'mt':2,'color':3753717, 'size': 4 }" PuPlayer.LabelSet pFullDMD,"Play3","Player 3",1,"{'mt':2,'color':2477823}" PuPlayer.LabelSet pFullDMD,"Play4score","",1,"{'mt':2,'color':3753717, 'size': 4 }" PuPlayer.LabelSet pFullDMD,"Play4","Player 4",1,"{'mt':2,'color':2477823}" PuPlayer.LabelSet pFullDMD,"Ball","",1,"" puPlayer.LabelSet pFullDMD,"Ball2","",1,"" Else If Gamerover_flag = True And bAttractMode = False Then If PlayersPlayingGame = 1 Then PuPlayer.LabelSet pFullDMD,"curscore",FormatNumber(Score(CurrentPlayer),0),1,"{'mt':2,'color':2477823, 'size': 6.2, 'xpos': 50, 'xalign': 1, 'ypos': 89.2, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"curplayer","FreePlay",1,"" PuPlayer.LabelSet pFullDMD,"Ball","",1,"{'mt':2,'color':2477823, 'size': 3, 'xpos': 87.5, 'xalign': 0, 'ypos': 83.2, 'yalign': 0}" ' PuPlayer.LabelSet pFullDMD,"Play1score","" & FormatNumber(Score(1),0),1,"{'mt':2,'color':3753717, 'size': 4 }" ' PuPlayer.LabelSet pFullDMD,"Play1","Player 1",1,"{'mt':2,'color':2477823}" End If If PlayersPlayingGame = 2 Then PuPlayer.LabelSet pFullDMD,"Play1score","" & FormatNumber(Score(1),0),1,"{'mt':2,'color':3753717, 'size': 4 }" PuPlayer.LabelSet pFullDMD,"Play1","Player 1",1,"{'mt':2,'color':2477823}" PuPlayer.LabelSet pFullDMD,"Play2score","" & FormatNumber(Score(2),0),1,"{'mt':2,'color':3753717, 'size': 4 }" PuPlayer.LabelSet pFullDMD,"Play2","Player 2",1,"{'mt':2,'color':3753717}" PuPlayer.LabelSet pFullDMD,"Ball","",1,"{'mt':2,'color':2477823, 'size': 3, 'xpos': 87.5, 'xalign': 0, 'ypos': 83.2, 'yalign': 0}" End If If PlayersPlayingGame = 3 Then PuPlayer.LabelSet pFullDMD,"Play1score","" & FormatNumber(Score(1),0),1,"{'mt':2,'color':3753717, 'size': 4 }" PuPlayer.LabelSet pFullDMD,"Play1","Player 1",1,"{'mt':2,'color':2477823}" PuPlayer.LabelSet pFullDMD,"Play2score","" & FormatNumber(Score(2),0),1,"{'mt':2,'color':3753717, 'size': 4 }" PuPlayer.LabelSet pFullDMD,"Play2","Player 2",1,"{'mt':2,'color':3753717}" PuPlayer.LabelSet pFullDMD,"Play3score","" & FormatNumber(Score(3),0),1,"{'mt':2,'color':3753717, 'size': 4 }" PuPlayer.LabelSet pFullDMD,"Play3","Player 3",1,"{'mt':2,'color':3753717}" PuPlayer.LabelSet pFullDMD,"Ball","",1,"{'mt':2,'color':2477823, 'size': 3, 'xpos': 87.5, 'xalign': 0, 'ypos': 83.2, 'yalign': 0}" End If If PlayersPlayingGame = 4 Then PuPlayer.LabelSet pFullDMD,"Play1score","" & FormatNumber(Score(1),0),1,"{'mt':2,'color':3753717, 'size': 4 }" PuPlayer.LabelSet pFullDMD,"Play1","Player 1",1,"{'mt':2,'color':2477823}" PuPlayer.LabelSet pFullDMD,"Play2score","" & FormatNumber(Score(2),0),1,"{'mt':2,'color':3753717, 'size': 4 }" PuPlayer.LabelSet pFullDMD,"Play2","Player 2",1,"{'mt':2,'color':3753717}" PuPlayer.LabelSet pFullDMD,"Play3score","" & FormatNumber(Score(3),0),1,"{'mt':2,'color':3753717, 'size': 4 }" PuPlayer.LabelSet pFullDMD,"Play3","Player 3",1,"{'mt':2,'color':3753717}" PuPlayer.LabelSet pFullDMD,"Play4score","" & FormatNumber(Score(4),0),1,"{'mt':2,'color':3753717, 'size': 4 }" PuPlayer.LabelSet pFullDMD,"Play4","Player 4",1,"{'mt':2,'color':3753717}" PuPlayer.LabelSet pFullDMD,"Ball","",1,"{'mt':2,'color':2477823, 'size': 3, 'xpos': 87.5, 'xalign': 0, 'ypos': 83.2, 'yalign': 0}" End If ElseIf NewRecord = True Then 'PuPlayer.LabelSet pFullDMD,"curscore","",1,"" PuPlayer.LabelSet pFullDMD,"curscore2","",1,"" PuPlayer.LabelSet pFullDMD,"curscore3","",1,"" PuPlayer.LabelSet pFullDMD,"curplayer","",1,"" PuPlayer.LabelSet pFullDMD,"MissionTimer","",1,"" PuPlayer.LabelSet pFullDMD,"matchscore","",1,"" PuPlayer.LabelSet pFullDMD,"Play1score","",1,"{'mt':2,'color':3753717, 'size': 4, 'xpos': 12.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"Play2score","",1,"{'mt':2,'color':3753717, 'size': 4, 'xpos': 37.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"Play3score","",1,"{'mt':2,'color':3753717, 'size': 4, 'xpos': 62.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"Play4score","",1,"{'mt':2,'color':3753717, 'size': 4, 'xpos': 87.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"Ball","",1,"{'mt':2,'color':2477823, 'size': 3, 'xpos': 87.5, 'xalign': 0, 'ypos': 83.2, 'yalign': 0}" ElseIf bAttractMode = True Then 'PuPlayer.LabelSet pFullDMD,"curscore","",1,"" PuPlayer.LabelSet pFullDMD,"curplayer","",1,"" PuPlayer.LabelSet pFullDMD,"Play1score","",1,"{'mt':2,'color':3753717, 'size': 4 }" PuPlayer.LabelSet pFullDMD,"Play1","",1,"{'mt':2,'color':2477823}" PuPlayer.LabelSet pFullDMD,"Play2score","",1,"{'mt':2,'color':3753717, 'size': 4 }" PuPlayer.LabelSet pFullDMD,"Play2","",1,"{'mt':2,'color':3753717}" PuPlayer.LabelSet pFullDMD,"Play3score","",1,"{'mt':2,'color':3753717, 'size': 4 }" PuPlayer.LabelSet pFullDMD,"Play3","",1,"{'mt':2,'color':3753717}" PuPlayer.LabelSet pFullDMD,"Play4score","",1,"{'mt':2,'color':3753717, 'size': 4 }" PuPlayer.LabelSet pFullDMD,"Play4","",1,"{'mt':2,'color':3753717}" PuPlayer.LabelSet pFullDMD,"Ball","",1,"{'mt':2,'color':2477823, 'size': 3, 'xpos': 87.5, 'xalign': 0, 'ypos': 83.2, 'yalign': 0}" '************************************************************************************************************************************************************************************************************************* ElseIf CurrentMissionFlag(CurrentPlayer) = 2 Then If BlackKnightRetro(CurrentPlayer) = 1 Then PuPlayer.LabelSet pFullDMD,"curscore3",FormatNumber(Score(CurrentPlayer),0),1,"{'mt':2,'color':2477823, 'size': 6.2, 'xpos': 50, 'xalign': 1, 'ypos': 89.2, 'yalign': 1}" 'PuPlayer.LabelSet pFullDMD,"curscore3",FormatNumber(Score(CurrentPlayer),0) & " ",1,"" PuPlayer.LabelSet pFullDMD,"Ball2","" & BallsOnPlayfield & " ",1,"" puPlayer.LabelSet pFullDMD,"Ball","",1,"" PuPlayer.LabelSet pFullDMD,"curscore","",1,"" ElseIf BlackKnightRetro(CurrentPlayer) = 3 Then PuPlayer.LabelSet pFullDMD,"curscore3",FormatNumber(Score(CurrentPlayer),0),1,"{'mt':2,'color':2477823, 'size': 6.2, 'xpos': 50, 'xalign': 1, 'ypos': 89.2, 'yalign': 1}" 'PuPlayer.LabelSet pFullDMD,"curscore2",FormatNumber(Score(CurrentPlayer),0),1,"" If AddTimeForMission(CurrentPlayer) = 0 Then PuPlayer.LabelSet pFullDMD,"MissionTimer","",1,"" Else PuPlayer.LabelSet pFullDMD,"MissionTimer","" & FormatNumber(AddTimeForMission(CurrentPlayer),0),1,"" End If PuPlayer.LabelSet pFullDMD,"curscore","",1,"" ElseIf RageMultiball = True Then If AddTimeForMission(CurrentPlayer) > 0 Then PuPlayer.LabelSet pFullDMD,"MissionTimer","" & FormatNumber(AddTimeForMission(CurrentPlayer),0),1,"" Else PuPlayer.LabelSet pFullDMD,"MissionTimer","",1,"" End If PuPlayer.LabelSet pFullDMD,"curscore",FormatNumber(Score(CurrentPlayer),0),1,"{'mt':2,'color':2477823, 'size': 6.2, 'xpos': 50, 'xalign': 1, 'ypos': 89.2, 'yalign': 1}" If PMdebug = False Then PuPlayer.LabelSet pFullDMD,"curplayer","FreePlay",1,"" PuPlayer.LabelSet pFullDMD,"Ball","Ball " & ballNumDisplay ,1,"" End If 'PuPlayer.LabelSet pFullDMD,"curplayer","",1,"" 'PuPlayer.LabelSet pFullDMD,"curscore2","",1,"" 'PuPlayer.LabelSet pFullDMD,"curscore3","",1,"" '************************************************************************************************************************************************************************************************************************* '******************************************************************************** OVERLAY DISPLAYED DURING GAME NO MODE STARTED ****************************************************************************************** '************************************************************************************************************************************************************************************************************************* ElseIf CurrentMissionFlag(CurrentPlayer) = 0 or CurrentMissionFlag(CurrentPlayer) = 1 Then If CurrentMissionFlag(CurrentPlayer) = 1 And AddTimeForMission(CurrentPlayer) > 0 Then PuPlayer.LabelSet pFullDMD,"MissionTimer","" & FormatNumber(AddTimeForMission(CurrentPlayer),0),1,"" Else PuPlayer.LabelSet pFullDMD,"MissionTimer","",1,"" End If PuPlayer.LabelSet pFullDMD,"curscore2","",1,"" ' Hide - used For BK RETRO Mode PuPlayer.LabelSet pFullDMD,"curscore3","",1,"" ' Hide - used For BK RETRO Mode puPlayer.LabelSet pFullDMD,"Ball2","",1,"" ' Hide - used For BK RETRO Mode 'if ballNumDisplay > bpgcurrent Then ' PuPlayer.LabelSet pFullDMD,"Ball","",1,"" ' puPlayer.LabelSet pFullDMD,"Ball2","",1,"" 'end If '******************************************* 1 PLAYER **************************************** If PlayersPlayingGame = 1 Then If CurrentPlayer = 1 Then PuPlayer.LabelSet pFullDMD,"Play1score","",1,"{'mt':2,'color':4491006, 'size': 4, 'xpos': 100, 'xalign': 1, 'ypos': 100, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play1","Player 1",1,"{'mt':2,'color':3753717 }" PuPlayer.LabelSet pFullDMD,"curscore",FormatNumber(Score(CurrentPlayer),0),1,"{'mt':2,'color':2477823, 'size': 6.2, 'xpos': 50, 'xalign': 1, 'ypos': 89.2, 'yalign': 1}" If PMdebug = False Then PuPlayer.LabelSet pFullDMD,"curplayer","FreePlay",1,"" PuPlayer.LabelSet pFullDMD,"Ball","Ball " & ballNumDisplay ,1,"" End If '******************************************* 2 PLAYER **************************************** ElseIf PlayersPlayingGame = 2 Then PuPlayer.LabelSet pFullDMD,"curscore",FormatNumber(Score(CurrentPlayer),0),1,"{'mt':2,'color':2477823, 'size': 6.2, 'xpos': 50, 'xalign': 1, 'ypos': 82.2, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"curplayer","FreePlay",1,"{'mt':2,'color':2477823, 'size': 3, 'xpos': 7.5, 'xalign': 1, 'ypos': 83.2, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"Ball","Ball " & ballNumDisplay ,1,"{'mt':2,'color':2477823, 'size': 3, 'xpos': 87.5, 'xalign': 0, 'ypos': 83.2, 'yalign': 0}" If CurrentPlayer = 1 Then PuPlayer.LabelSet pFullDMD,"Play1score","PLAYER 1",1,"{'mt':2,'color':4491006, 'size': 4, 'xpos': 12.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play1","Player 1",1,"{'mt':2,'color':3753717 }" PuPlayer.LabelSet pFullDMD,"Play2score","" & FormatNumber(Score(2),0),1,"{'mt':2,'color':3753717, 'size': 4, 'xpos': 87.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play2","Player 2",1,"{'mt':2,'color':3753717}" ElseIf CurrentPlayer = 2 Then PuPlayer.LabelSet pFullDMD,"Play1score","" & FormatNumber(Score(1),0),1,"{'mt':2,'color':3753717, 'size': 4, 'xpos': 12.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play1","Player 1",1,"{'mt':2,'color':2477823}" PuPlayer.LabelSet pFullDMD,"Play2score","PLAYER 2",1,"{'mt':2,'color':4491006, 'size': 4, 'xpos': 87.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play2","Player 2",1,"{'mt':2,'color':2477823 }" End If '******************************************* 3 PLAYER **************************************** ElseIf PlayersPlayingGame = 3 Then PuPlayer.LabelSet pFullDMD,"curscore",FormatNumber(Score(CurrentPlayer),0),1,"{'mt':2,'color':2477823, 'size': 6.2, 'xpos': 50, 'xalign': 1, 'ypos': 89.2, 'yalign': 1}" 'PuPlayer.LabelSet pFullDMD,"curscore",FormatNumber(Score(CurrentPlayer),0),1,"{'mt':2,'color':2477823, 'size': 6.2, 'xpos': 50, 'xalign': 1, 'ypos': 77.2, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"curplayer","FreePlay","{'mt':2,'color':2477823, 'size': 3, 'xpos': 7.5, 'xalign': 1, 'ypos': 83.2, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"Ball","Ball " & ballNumDisplay,1,"{'mt':2,'color':2477823, 'size': 3, 'xpos': 87.5, 'xalign': 0, 'ypos': 83.2, 'yalign': 0}" If CurrentPlayer = 1 Then PuPlayer.LabelSet pFullDMD,"Play1score","PLAYER 1",1,"{'mt':2,'color':4491006, 'size': 4, 'xpos': 12.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play1","Player 1",1,"{'mt':2,'color':3753717 }" PuPlayer.LabelSet pFullDMD,"Play2score","" & FormatNumber(Score(2),0),1,"{'mt':2,'color':3753717, 'size': 4, 'xpos': 37.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play2","Player 2",1,"{'mt':2,'color':3753717}" PuPlayer.LabelSet pFullDMD,"Play3score","" & FormatNumber(Score(3),0),1,"{'mt':2,'color':3753717, 'size': 4, 'xpos': 62.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play3","Player 3",1,"{'mt':2,'color':3753717}" ElseIf CurrentPlayer = 2 Then PuPlayer.LabelSet pFullDMD,"Play1score","" & FormatNumber(Score(1),0),1,"{'mt':2,'color':3753717, 'size': 4, 'xpos': 12.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play1","Player 1",1,"{'mt':2,'color':2477823}" PuPlayer.LabelSet pFullDMD,"Play2score","PLAYER 2",1,"{'mt':2,'color':4491006, 'size': 4, 'xpos': 37.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play2","Player 2",1,"{'mt':2,'color':2477823 }" PuPlayer.LabelSet pFullDMD,"Play3score","" & FormatNumber(Score(3),0),1,"{'mt':2,'color':3753717, 'size': 4, 'xpos': 62.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play3","Player 3",1,"{'mt':2,'color':2477823}" ElseIf CurrentPlayer = 3 Then PuPlayer.LabelSet pFullDMD,"Play1score","" & FormatNumber(Score(1),0),1,"{'mt':2,'color':3753717, 'size': 4, 'xpos': 12.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play1","Player 1",1,"{'mt':2,'color':2477823}" PuPlayer.LabelSet pFullDMD,"Play2score","" & FormatNumber(Score(2),0),1,"{'mt':2,'color':3753717, 'size': 4, 'xpos': 37.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play2","Player 2",1,"{'mt':2,'color':2477823}" PuPlayer.LabelSet pFullDMD,"Play3score","PLAYER 3",1,"{'mt':2,'color':4491006, 'size': 4, 'xpos': 62.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play3","Player 3",1,"{'mt':2,'color':2477823 }" End If '******************************************* 4 PLAYER **************************************** ElseIf PlayersPlayingGame = 4 Then PuPlayer.LabelSet pFullDMD,"curscore",FormatNumber(Score(CurrentPlayer),0),1,"{'mt':2,'color':2477823, 'size': 6.2, 'xpos': 50, 'xalign': 1, 'ypos': 89.2, 'yalign': 1}" 'PuPlayer.LabelSet pFullDMD,"curscore",FormatNumber(Score(CurrentPlayer),0),1,"{'mt':2,'color':2477823, 'size': 6.2, 'xpos': 50, 'xalign': 1, 'ypos': 77.2, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"curplayer","FreePlay",1,"{'mt':2,'color':2477823, 'size': 3, 'xpos': 7.5, 'xalign': 1, 'ypos': 83.2, 'yalign': 0}" PuPlayer.LabelSet pFullDMD,"Ball","Ball " & ballNumDisplay ,1,"{'mt':2,'color':2477823, 'size': 3, 'xpos': 87.5, 'xalign': 0, 'ypos': 83.2, 'yalign': 0}" If CurrentPlayer = 1 Then PuPlayer.LabelSet pFullDMD,"Play1score","PLAYER 1",1,"{'mt':2,'color':4491006, 'size': 4, 'xpos': 12.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"Play1","Player 1",1,"{'mt':2,'color':3753717 }" PuPlayer.LabelSet pFullDMD,"Play2score","" & FormatNumber(Score(2),0),1,"{'mt':2,'color':3753717, 'size': 4, 'xpos': 37.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play2","Player 2",1,"{'mt':2,'color':3753717}" PuPlayer.LabelSet pFullDMD,"Play3score","" & FormatNumber(Score(3),0),1,"{'mt':2,'color':3753717, 'size': 4, 'xpos': 62.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play3","Player 3",1,"{'mt':2,'color':3753717}" PuPlayer.LabelSet pFullDMD,"Play4score","" & FormatNumber(Score(4),0),1,"{'mt':2,'color':3753717, 'size': 4, 'xpos': 87.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play4","Player 4",1,"{'mt':2,'color':3753717}" ElseIf CurrentPlayer = 2 Then PuPlayer.LabelSet pFullDMD,"Play1score","" & FormatNumber(Score(1),0),1,"{'mt':2,'color':3753717, 'size': 4, 'xpos': 12.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play1","Player 1",1,"{'mt':2,'color':2477823}" PuPlayer.LabelSet pFullDMD,"Play2score","PLAYER 2",1,"{'mt':2,'color':4491006, 'size': 4, 'xpos': 37.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play2","Player 2",1,"{'mt':2,'color':2477823 }" PuPlayer.LabelSet pFullDMD,"Play3score","" & FormatNumber(Score(3),0),1,"{'mt':2,'color':3753717, 'size': 4, 'xpos': 62.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play3","Player 3",1,"{'mt':2,'color':2477823}" PuPlayer.LabelSet pFullDMD,"Play4score","" & FormatNumber(Score(4),0),1,"{'mt':2,'color':3753717, 'size': 4, 'xpos': 87.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play4","Player 4",1,"{'mt':2,'color':2477823}" ElseIf CurrentPlayer = 3 Then PuPlayer.LabelSet pFullDMD,"Play1score","" & FormatNumber(Score(1),0),1,"{'mt':2,'color':3753717, 'size': 4, 'xpos': 12.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"Play1","Player 1",1,"{'mt':2,'color':2477823}" PuPlayer.LabelSet pFullDMD,"Play2score","" & FormatNumber(Score(2),0),1,"{'mt':2,'color':3753717, 'size': 4, 'xpos': 37.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play2","Player 2",1,"{'mt':2,'color':2477823}" PuPlayer.LabelSet pFullDMD,"Play3score","PLAYER 3",1,"{'mt':2,'color':4491006, 'size': 4, 'xpos': 62.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play3","Player 3",1,"{'mt':2,'color':2477823 }" PuPlayer.LabelSet pFullDMD,"Play4score","" & FormatNumber(Score(4),0),1,"{'mt':2,'color':3753717, 'size': 4, 'xpos': 87.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play4","Player 4",1,"{'mt':2,'color':2477823}" ElseIf CurrentPlayer = 4 Then PuPlayer.LabelSet pFullDMD,"Play1score","" & FormatNumber(Score(1),0),1,"{'mt':2,'color':3753717, 'size': 4, 'xpos': 12.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play1","Player 1",1,"{'mt':2,'color':2477823}" PuPlayer.LabelSet pFullDMD,"Play2score","" & FormatNumber(Score(2),0),1,"{'mt':2,'color':3753717, 'size': 4, 'xpos': 37.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play2","Player 2",1,"{'mt':2,'color':2477823}" PuPlayer.LabelSet pFullDMD,"Play3score","" & FormatNumber(Score(3),0),1,"{'mt':2,'color':3753717, 'size': 4, 'xpos': 62.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play3","Player 3",1,"{'mt':2,'color':2477823}" PuPlayer.LabelSet pFullDMD,"Play4score","PLAYER 4",1,"{'mt':2,'color':4491006, 'size': 4, 'xpos': 87.5, 'xalign': 1, 'ypos': 94.5, 'yalign': 1 }" PuPlayer.LabelSet pFullDMD,"Play4","Player 4",1,"{'mt':2,'color':2477823 }" End If End If End If End If end Sub Sub IncScore(val) curScore = curScore + val pUpdateDMD end Sub 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' Pupdmd Settings '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X 'PUPDMD Layout for each Table1 'Setup Pages. Note if you use fonts they must be in FONTS folder of the pupVideos\tablename\FONTS "case sensitive exact naming fonts!" '***************************************************************** Sub pSetPageLayouts DIM dmddef DIM dmdalt DIM dmdscr DIM dmdfixed 'labelNew , , ,,,,,,,,, '***********************************************************************' ', in standard we’d set this to pDMD ( or 1) ', your name of the label. keep it short no spaces (like 8 chars) although you can call it anything really. When setting the label you will use this labelname to access the label. ' Windows font name, this must be exact match of OS front name. if you are using custom TTF fonts then double check the name of font names. ', Height as a percent of display height. 20=20% of screen height. ', integer value of windows color. ', degrees in tenths (900=90 degrees) ', 0= horizontal left align, 1 = center horizontal, 2= right horizontal ', 0 = top, 1 = center, 2=bottom vertical alignment ', this should be 0, but if you want to ‘force’ a position you can set this. it is a % of horizontal width. 20=20% of screen width. ' same as xpos. ' IMPORTANT… this will assign this label to this ‘page’ or group. ' initial state of label. visible=1 show, 0 = off. if PuPDMDDriverType=pDMDTypeReal Then 'using RealDMD Mirroring. ********** 128x32 Real Color DMD dmdalt="PKMN Pinball" dmdfixed="Instruction" dmdscr="Impact" 'main scorefont dmddef="Zig" 'Page 1 (default score display) PuPlayer.LabelNew pDMD,"FreePlay" ,dmddef,20,2477823 ,0,2,2,95,0,1,0 PuPlayer.LabelNew pDMD,"Play1" ,dmdalt,21,2477823 ,1,0,0,15,0,1,0 PuPlayer.LabelNew pDMD,"Ball" ,dmdalt,21,2477823 ,1,2,0,85,0,1,0 PuPlayer.LabelNew pDMD,"Ball2" ,dmdalt,21,2477823 ,1,2,0,85,0,1,0 PuPlayer.LabelNew pDMD,"MsgScore",dmddef,45,2477823 ,0,1,0, 0,40,1,0 PuPlayer.LabelNew pDMD,"CurScore",dmdscr,60,2477823 ,0,1,1, 0,0,1,0 PuPlayer.LabelNew pDMD,"CurScore2",dmdscr,60,2477823 ,0,1,1, 0,0,1,0 PuPlayer.LabelNew pDMD,"CurScore3",dmdscr,60,2477823 ,0,1,1, 0,0,1,0 'Page 2 (default Text Splash 1 Big Line) PuPlayer.LabelNew pDMD,"Splash" ,dmdalt,40,2477823,0,1,1,0,0,2,0 'Page 3 (default Text Splash 2 and 3 Lines) PuPlayer.LabelNew pDMD,"Splash3a",dmddef,30,2477823,0,1,0,0,2,3,0 PuPlayer.LabelNew pDMD,"Splash3b",dmdalt,30,2477823,0,1,0,0,30,3,0 PuPlayer.LabelNew pDMD,"Splash3c",dmdalt,25,2477823,0,1,0,0,55,3,0 'Page 4 (2 Line Gameplay DMD) PuPlayer.LabelNew pDMD,"Splash4a",dmddef,13,2477823,0,1,0,0,30,4,0 PuPlayer.LabelNew pDMD,"Splash4b",dmddef,10,2477823,0,1,2,0,55,4,0 'Page 5 (3 layer large text for overlay targets function, must you fixed width font! PuPlayer.LabelNew pDMD,"Back5" ,dmdfixed,80,8421504,0,1,1,0,0,5,0 PuPlayer.LabelNew pDMD,"Middle5" ,dmdfixed,80,65535 ,0,1,1,0,0,5,0 PuPlayer.LabelNew pDMD,"Flash5" ,dmdfixed,80,65535 ,0,1,1,0,0,5,0 'Page 6 (3 Lines for big # with two lines, "19^Orbits^Count") PuPlayer.LabelNew pDMD,"Splash6a",dmddef,90,65280,0,0,0,15,1,6,0 PuPlayer.LabelNew pDMD,"Splash6b",dmddef,50,33023,0,1,0,60,0,6,0 PuPlayer.LabelNew pDMD,"Splash6c",dmddef,40,33023,0,1,0,60,50,6,0 'Page 7 (Show High Scores Fixed Fonts) PuPlayer.LabelNew pDMD,"Splash7a",dmddef,20,8454143,0,1,0,0,2,7,0 PuPlayer.LabelNew pDMD,"Splash7b",dmdfixed,40,33023,0,1,0,0,20,7,0 PuPlayer.LabelNew pDMD,"Splash7c",dmdfixed,40,33023,0,1,0,0,50,7,0 pDMDStartBackLoop "DMDSplash","intro1.mp4" dmdnote="1-shortnote.mp4" END IF ' use PuPDMDDriver if PuPDMDDriverType=pDMDTypeLCD THEN 'Using 4:1 Standard ratio LCD PuPDMD ************ lcd ************** 'dmddef="Impact" dmdalt=typefont dmdfixed=typefont dmdscr=typefont 'main score font dmddef=typefont 'Page 1 (default score display) PuPlayer.LabelNew pDMD,"FreePlay" ,dmddef,20,2477823 ,0,2,2,95,0,1,0 PuPlayer.LabelNew pDMD,"Play1" ,dmdalt,20,2477823 ,1,0,0,15,0,1,0 PuPlayer.LabelNew pDMD,"Ball" ,dmdalt,20,2477823 ,1,2,0,85,0,1,0 PuPlayer.LabelNew pDMD,"Ball2" ,dmdalt,20,2477823 ,1,2,0,85,0,1,0 PuPlayer.LabelNew pDMD,"MsgScore",dmddef,45,2477823 ,0,1,0, 0,40,1,0 PuPlayer.LabelNew pDMD,"CurScore",dmdscr,60,2477823 ,0,1,1, 0,0,1,0 PuPlayer.LabelNew pDMD,"CurScore2",dmdscr,60,2477823 ,0,1,1, 0,0,1,0 PuPlayer.LabelNew pDMD,"CurScore3",dmdscr,60,2477823 ,0,1,1, 0,0,1,0 'Page 2 (default Text Splash 1 Big Line) PuPlayer.LabelNew pDMD,"Splash" ,dmdalt,40,2477823,0,1,1,0,0,2,0 'Page 3 (default Text 3 Lines) PuPlayer.LabelNew pDMD,"Splash3a",dmddef,30,2477823,0,1,0,0,2,3,0 PuPlayer.LabelNew pDMD,"Splash3b",dmdalt,30,2477823,0,1,0,0,30,3,0 PuPlayer.LabelNew pDMD,"Splash3c",dmdalt,25,2477823,0,1,0,0,57,3,0 'Page 4 (default Text 2 Line) PuPlayer.LabelNew pDMD,"Splash4a",dmddef,20,2477823,0,1,0,0,20,4,0 PuPlayer.LabelNew pDMD,"Splash4b",dmddef,15,2477823,0,1,2,0,65,4,0 'Page 5 (3 layer large text for overlay targets function, must you fixed width font! PuPlayer.LabelNew pDMD,"Back5" ,dmdfixed,80,2477823,0,1,1,0,0,5,0 PuPlayer.LabelNew pDMD,"Middle5" ,dmdfixed,80,2477823 ,0,1,1,0,0,5,0 PuPlayer.LabelNew pDMD,"Flash5" ,dmdfixed,80,2477823 ,0,1,1,0,0,5,0 'Page 6 (3 Lines for big # with two lines, "19^Orbits^Count") PuPlayer.LabelNew pDMD,"Splash6a",dmddef,90,2477823,0,0,0,15,1,6,0 PuPlayer.LabelNew pDMD,"Splash6b",dmddef,50,2477823,0,1,0,60,0,6,0 PuPlayer.LabelNew pDMD,"Splash6c",dmddef,40,2477823,0,1,0,60,50,6,0 'Page 7 (Show High Scores Fixed Fonts) PuPlayer.LabelNew pDMD,"Splash7a",dmddef,20,2477823,0,1,0,0,2,7,0 PuPlayer.LabelNew pDMD,"Splash7b",dmdfixed,40,2477823,0,1,0,0,20,7,0 PuPlayer.LabelNew pDMD,"Splash7c",dmdfixed,40,2477823,0,1,0,0,50,7,0 pDMDStartBackLoop "DMDSplash","intro1.mp4" dmdnote="1-shortnote.mp4" END IF ' use PuPDMDDriver if PuPDMDDriverType=pDMDTypeFULL THEN 'Using FULL BIG LCD PuPDMD ************ lcd ************** 'dmddef="Impact" dmdalt=typefont dmdfixed=typefont dmdscr=typefont 'main score font dmddef=typefont 'Page 1 (default score display) PuPlayer.LabelNew pDMD,"FreePlay",dmddef,20,2477823 ,0,2,2,95,0,1,0 PuPlayer.LabelNew pDMD,"Play1" ,dmdalt,20,2477823 ,1,0,0,15,0,1,0 PuPlayer.LabelNew pDMD,"Ball" ,dmdalt,20,2477823 ,1,2,0,85,0,1,0 PuPlayer.LabelNew pDMD,"Ball2" ,dmdalt,20,2477823 ,1,2,0,85,0,1,0 PuPlayer.LabelNew pDMD,"MsgScore",dmddef,45,2477823 ,0,1,0, 0,40,1,0 PuPlayer.LabelNew pDMD,"CurScore",dmdscr,60,2477823 ,0,1,1, 0,0,1,0 PuPlayer.LabelNew pDMD,"CurScore2",dmdscr,60,2477823 ,0,1,1, 0,0,1,0 PuPlayer.LabelNew pDMD,"CurScore3",dmdscr,60,2477823 ,0,1,1, 0,0,1,0 'Page 2 (default Text Splash 1 Big Line) PuPlayer.LabelNew pDMD,"Splash" ,dmdalt,20,2477823,0,1,1,0,50,2,0 'Page 3 (default Text 3 Lines) PuPlayer.LabelNew pDMD,"Splash3a",dmddef,15,2477823,0,1,0,0,35,3,0 PuPlayer.LabelNew pDMD,"Splash3b",dmdalt,10,2477823,0,1,0,0,50,3,0 PuPlayer.LabelNew pDMD,"Splash3c",dmdalt,10,2477823,0,1,0,0,65,3,0 'Page 4 (default Text 2 Line) PuPlayer.LabelNew pDMD,"Splash4a",dmddef,10,2110797,0,1,0,0,40,4,0 PuPlayer.LabelNew pDMD,"Splash4b",dmddef,8,2110797,0,1,2,0,60,4,0 'Page 5 (3 layer large text for overlay targets function, must you fixed width font! PuPlayer.LabelNew pDMD,"Back5" ,dmdfixed,80,2477823,0,1,1,0,0,5,0 PuPlayer.LabelNew pDMD,"Middle5" ,dmdfixed,80,2477823 ,0,1,1,0,0,5,0 PuPlayer.LabelNew pDMD,"Flash5" ,dmdfixed,80,2477823 ,0,1,1,0,0,5,0 'Page 6 (3 Lines for big # with two lines, "19^Orbits^Count") PuPlayer.LabelNew pDMD,"Splash6a",dmddef,90,2477823,0,0,0,15,1,6,0 PuPlayer.LabelNew pDMD,"Splash6b",dmddef,50,2477823,0,1,0,60,0,6,0 PuPlayer.LabelNew pDMD,"Splash6c",dmddef,40,2477823,0,1,0,60,50,6,0 'Page 7 (Show High Scores Fixed Fonts) PuPlayer.LabelNew pDMD,"Splash7a",dmddef,20,2477823,0,1,0,0,2,7,0 PuPlayer.LabelNew pDMD,"Splash7b",dmdfixed,40,2477823,0,1,0,0,20,7,0 PuPlayer.LabelNew pDMD,"Splash7c",dmdfixed,40,2477823,0,1,0,0,50,7,0 pDMDStartBackLoop "DMDSplash","intro2.mp4" dmdnote="2-shortnote.mp4" END IF ' use PuPDMDDriver end Sub 'page Layouts '***************************************************************** ' PUPDMD Custom SUBS/Events for each Table1 ' ********** MODIFY THIS SECTION!!! *************** '***************************************************************** ' Sub pDMDStartBall end Sub Sub pDMDGameOver pAttractStart pDMDStartBackLoop "DMDSplash","intro" & dmdver &".mp4" end Sub Sub pAttractStart pDMDSetPage(pDMDBlank) 'set blank text overlay page. pCurAttractPos=0 pInAttract=True 'Startup in AttractMode pAttractNext end Sub Sub pDMDStartUP 'pupDMDDisplay "attract","","intro" & dmdver &".mp4",71,0,10 pInAttract=true ' will startup attract after startup video end Sub Sub pDMDStartGame ' pDMDStartBackLoop "Attract loop","ATTRACT_LOOP1.mp4" ' pupDMDDisplay "attract","",dmdver & "-background.mp4",71,0,1 'pupDMDDisplay "attract","",dmdver & "-background.mp4",3,0,20 'PuPlayer.SetLoop 3,1 '3???? 'pInAttract=false ' will startup attract after startup video end Sub '********************** gets called auto each page next and timed already in DMD_Timer. make sure you use pupDMDDisplay or it wont advance auto. Sub pAttractNext ' pCurAttractPos=pCurAttractPos+1 ' Select Case pCurAttractPos ' Case 1 pupDMDDisplay "Attract loop","","ATTRACT_LOOP1.mp4",71,0,1 ' Case 2 pupDMDDisplay "Attract loop","ATTRACT_LOOP2.mp4","",71,0,10 ' Case 3 pupDMDDisplay "attract","Attract^3","",2,0,10 ' Case 4 pupDMDDisplay "attract","Attract^4","",3,1,10 ' Case 5 pupDMDDisplay "attract","Attract^5","",1,0,10 ' Case 6 pupDMDDisplay "attract","Attract^6","",3,1,10 ' Case 7 pupDMDDisplay "attract","Attract^7","",2,0,10 ' Case 8 pupDMDDisplay "attract","Attract^8","",1,0,10 ' Case 9 pupDMDDisplay "attract","Attract^9","",1,1,10 ' Case 10 pupDMDDisplay "attract","Attract^10","",3,1,10 ' Case Else ' pCurAttractPos=0 ' pAttractNext 'reset to beginning ' end Select end Sub '************************ called during gameplay to update Scores *************************** Sub pDMDUpdateScores 'call this ONLY on timer 300ms is good enough if pDMDCurPage <> pScores then Exit Sub If HideOverlay = False Then If CurrentMissionFlag(CurrentPlayer) = 2 Then If BlackKnightRetro(CurrentPlayer) = 3 Then puPlayer.LabelSet pDMD,"CurScore2","" & "" & FormatNumber(Score(CurrentPlayer),0),1,"" End If If BlackKnightRetro(CurrentPlayer) = 1 Then puPlayer.LabelSet pDMD,"CurScore3","" & "" & FormatNumber(Score(CurrentPlayer),0) & " ",1,"" End If puPlayer.LabelSet pDMD,"CurScore","",1,"" puPlayer.LabelSet pDMD,"Play1","",1,"" puPlayer.LabelSet pDMD,"Ball","",1,"" puPlayer.LabelSet pDMD,"Ball2","",1,"" Else puPlayer.LabelSet pDMD,"CurScore","" & "" & FormatNumber(Score(CurrentPlayer),0),1,"" puPlayer.LabelSet pDMD,"CurScore2","",1,"" puPlayer.LabelSet pDMD,"CurScore3","",1,"" puPlayer.LabelSet pDMD,"Play1","play " & CurrentPlayer,1,"" puPlayer.LabelSet pDMD,"Ball","ball " & (bpgcurrent - BallsRemaining(CurrentPlayer)) + 1,1,"" puPlayer.LabelSet pDMD,"Ball2","",1,"" ' if (bpgcurrent - BallsRemaining(CurrentPlayer) + 1) < 6 Then 'updated for 5 Balls ' ' else ' puPlayer.LabelSet pDMD,"Ball","ball ",1,"" ' puPlayer.LabelSet pDMD,"Ball2","",1,"" ' End if End If Else ' in comment but Else condition can be removed End If End Sub 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' High Scores '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X Sub ResetValue ' Load Score With Default Value SaveValue TableName, "HighScore1", "750000000" SaveValue TableName, "HighScore1Name", "SSR" SaveValue TableName, "HighScore2", "550000000" SaveValue TableName, "HighScore2Name", "TSX" SaveValue TableName, "HighScore3", "400000000" SaveValue TableName, "HighScore3Name", "JMR" SaveValue TableName, "HighScore4", "300000000" SaveValue TableName, "HighScore4Name", "J C" SaveValue TableName, "HighScore5", "250000000" SaveValue TableName, "HighScore5Name", "D K" End Sub Sub PutSternScore (CheckScore,CheckScoreName) hschecker = 1 hs4 = HighScore(4) hs3 = HighScore(3) hs2 = HighScore(2) hs1 = HighScore(1) hs0 = HighScore(0) hsn4 = HighScoreName(4) hsn3 = HighScoreName(3) hsn2 = HighScoreName(2) hsn1 = HighScoreName(1) hsn0 = HighScoreName(0) If CheckScore > hs0 Then HighScore(0) = CheckScore HighScoreName(0) = CheckScoreName HighScore(1) = hs0 HighScoreName(1) = hsn0 HighScore(2) = hs1 HighScoreName(2) = hsn1 HighScore(3) = hs2 HighScoreName(3) = hsn2 HighScore(4) = hs3 HighScoreName(4) = hsn3 ElseIf CheckScore = hs0 And CheckScoreName = hsn0 Then 'Nothing ElseIf CheckScore > hs1 Then HighScore(0) = hs0 HighScoreName(0) = hsn0 HighScore(1) = CheckScore HighScoreName(1) = CheckScoreName HighScore(2) = hs1 HighScoreName(2) = hsn1 HighScore(3) = hs2 HighScoreName(3) = hsn2 HighScore(4) = hs3 HighScoreName(4) = hsn3 ElseIf CheckScore = hs1 And CheckScoreName = hsn1 Then 'Nothing ElseIf CheckScore > hs2 Then HighScore(0) = hs0 HighScoreName(0) = hsn0 HighScore(1) = hs1 HighScoreName(1) = hsn1 HighScore(2) = CheckScore HighScoreName(2) = CheckScoreName HighScore(3) = hs2 HighScoreName(3) = hsn2 HighScore(4) = hs3 HighScoreName(4) = hsn3 ElseIf CheckScore = hs2 And CheckScoreName = hsn2 Then 'Nothing ElseIf CheckScore > hs3 Then HighScore(0) = hs0 HighScoreName(0) = hsn0 HighScore(1) = hs1 HighScoreName(1) = hsn1 HighScore(2) = hs2 HighScoreName(2) = hsn2 HighScore(3) = CheckScore HighScoreName(3) = CheckScoreName HighScore(4) = hs3 HighScoreName(4) = hsn3 ElseIf CheckScore = hs3 And CheckScoreName = hsn3 Then 'Nothing ElseIf CheckScore > hs4 Then HighScore(0) = hs0 HighScoreName(0) = hsn0 HighScore(1) = hs1 HighScoreName(1) = hsn1 HighScore(2) = hs2 HighScoreName(2) = hsn2 HighScore(3) = hs3 HighScoreName(3) = hsn3 HighScore(4) = CheckScore HighScoreName(4) = CheckScoreName ElseIf CheckScore = hs4 And CheckScoreName = hsn4 Then 'Nothing Else HighScore(0) = hs0 HighScoreName(0) = hsn0 HighScore(1) = hs1 HighScoreName(1) = hsn1 HighScore(2) = hs2 HighScoreName(2) = hsn2 HighScore(3) = hs3 HighScoreName(3) = hsn3 HighScore(4) = hs4 HighScoreName(4) = hsn4 End If savehs End Sub Sub Loadhs Dim x x = LoadValue(TableName, "HighScore1") If(x <> "") Then HighScore(0) = CDbl(x) Else HighScore(0) = 0 End If x = LoadValue(TableName, "HighScore1Name") If(x <> "") Then HighScoreName(0) = x Else HighScoreName(0) = "" End If x = LoadValue(TableName, "HighScore2") If(x <> "") then HighScore(1) = CDbl(x) Else HighScore(1) = 0 End If x = LoadValue(TableName, "HighScore2Name") If(x <> "") then HighScoreName(1) = x Else HighScoreName(1) = "" End If x = LoadValue(TableName, "HighScore3") If(x <> "") then HighScore(2) = CDbl(x) Else HighScore(2) = 0 End If x = LoadValue(TableName, "HighScore3Name") If(x <> "") then HighScoreName(2) = x Else HighScoreName(2) = "" End If x = LoadValue(TableName, "HighScore4") If(x <> "") then HighScore(3) = CDbl(x) Else HighScore(3) = 0 End If x = LoadValue(TableName, "HighScore4Name") If(x <> "") then HighScoreName(3) = x Else HighScoreName(3) = "" End If x = LoadValue(TableName, "HighScore5") If(x <> "") then HighScore(4) = CDbl(x) Else HighScore(4) = 0 End If x = LoadValue(TableName, "HighScore5Name") If(x <> "") then HighScoreName(4) = x Else HighScoreName(4) = "" End If x = LoadValue(TableName, "Credits") If(x <> "") then Credits = CInt(x) Else Credits = 0 End If x = LoadValue(TableName, "TotalGamesPlayed") If(x <> "") then TotalGamesPlayed = CDbl(x) Else TotalGamesPlayed = 0 End If x = LoadValue(TableName, "BKSOR01") If(x <> "") then HighScoreComboChampionName = x Else HighScoreComboChampionName = "" End If x = LoadValue(TableName, "BKSOR02") If(x <> "") then HighScoreComboChampion = CDbl(x) Else HighScoreComboChampion = 0 End If x = LoadValue(TableName, "BKSOR03") If(x <> "") then HighScoreKnightChampionName = x Else HighScoreKnightChampionName = "" End If x = LoadValue(TableName, "BKSOR04") If(x <> "") then HighScoreKnightChampion = CDbl(x) Else HighScoreKnightChampion = 0 End If x = LoadValue(TableName, "BKSOR05") If(x <> "") then HighScoreBlackCastleChampionName = x Else HighScoreBlackCastleChampionName = "" End If x = LoadValue(TableName, "BKSOR06") If(x <> "") then HighScoreBlackCastleChampion = CDbl(x) Else HighScoreBlackCastleChampion = 0 End If x = LoadValue(TableName, "BKSOR07") If(x <> "") then HighScoreLoopChampionName = x Else HighScoreLoopChampionName = "" End If x = LoadValue(TableName, "BKSOR08") If(x <> "") then HighScoreLoopChampion = CDbl(x) Else HighScoreLoopChampion = 0 End If x = LoadValue(TableName, "BKSOR09") If(x <> "") then HighScoreWarChampionName = x Else HighScoreWarChampionName = "" End If x = LoadValue(TableName, "BKSOR10") If(x <> "") then HighScoreWarChampion = CDbl(x) Else HighScoreWarChampion = 0 End If x = LoadValue(TableName, "BKSOR11") If(x <> "") then HighScoreBonusChampionName = x Else HighScoreBonusChampionName = "" End If x = LoadValue(TableName, "BKSOR12") If(x <> "") then HighScoreBonusChampion = CDbl(x) Else HighScoreBonusChampion = 0 End If x = LoadValue(TableName, "BKSOR13") If(x <> "") then HighScoreTripleKnightsMBChampionName = x Else HighScoreTripleKnightsMBChampionName = "" End If x = LoadValue(TableName, "BKSOR14") If(x <> "") then HighScoreTripleKnightsMBChampion = CDbl(x) Else HighScoreTripleKnightsMBChampion = 0 End If x = LoadValue(TableName, "BKSOR15") If(x <> "") then HighScoreCatapultMBChampionName = x Else HighScoreCatapultMBChampionName = "" End If x = LoadValue(TableName, "BKSOR16") If(x <> "") then HighScoreCatapultMBChampion = CDbl(x) Else HighScoreCatapultMBChampion = 0 End If x = LoadValue(TableName, "BKSOR17") If(x <> "") then HighScoreMoltenFireChampionName = x Else HighScoreMoltenFireChampionName = "" End If x = LoadValue(TableName, "BKSOR18") If(x <> "") then HighScoreMoltenFireChampion = CDbl(x) Else HighScoreMoltenFireChampion = 0 End If x = LoadValue(TableName, "BKSOR19") If(x <> "") then HighScoreDeepFreezeChampionName = x Else HighScoreDeepFreezeChampionName = "" End If x = LoadValue(TableName, "BKSOR20") If(x <> "") then HighScoreDeepFreezeChampion = CDbl(x) Else HighScoreDeepFreezeChampion = 0 End If x = LoadValue(TableName, "BKSOR21") If(x <> "") then HighScoreMudBogChampionName = x Else HighScoreMudBogChampionName = "" End If x = LoadValue(TableName, "BKSOR22") If(x <> "") then HighScoreMudBogChampion = CDbl(x) Else HighScoreMudBogChampion = 0 End If x = LoadValue(TableName, "BKSOR23") If(x <> "") then HighScoreWickedCavernChampionName = x Else HighScoreWickedCavernChampionName = "" End If x = LoadValue(TableName, "BKSOR24") If(x <> "") then HighScoreWickedCavernChampion = CDbl(x) Else HighScoreWickedCavernChampion = 0 End If x = LoadValue(TableName, "BKSOR25") If(x <> "") then HighScoreBurningSandsChampionName = x Else HighScoreBurningSandsChampionName = "" End If x = LoadValue(TableName, "BKSOR26") If(x <> "") then HighScoreBurningSandsChampion = CDbl(x) Else HighScoreBurningSandsChampion = 0 End If x = LoadValue(TableName, "BKSOR27") If(x <> "") then HighScoreSuperChampionName = x Else HighScoreSuperChampionName = "" End If x = LoadValue(TableName, "BKSOR28") If(x <> "") then HighScoreSuperChampion = CDbl(x) Else HighScoreSuperChampion = 0 End If If hschecker = 0 Then checkorder UpdateSternScore.Enabled = True End If Savehs End Sub Sub UpdateSternScore_time() ScoreSternupdated = ScoreSternupdated + 1 If ScoreSternupdated = 1 Then PutSternScore 0,"" End If If ScoreSternupdated = 2 Then PutSternScore 0,"" End If If ScoreSternupdated = 3 Then PutSternScore 0,"" End If If ScoreSternupdated = 4 Then PutSternScore 0,"" End If If ScoreSternupdated = 5 Then PutSternScore 0,"" : UpdateSternScore.Enabled = False: End If End Sub Sub checkorder hschecker = 1 hs4 = HighScore(4) hs3 = HighScore(3) hs2 = HighScore(2) hs1 = HighScore(1) hs0 = HighScore(0) hsn4 = HighScoreName(4) hsn3 = HighScoreName(3) hsn2 = HighScoreName(2) hsn1 = HighScoreName(1) hsn0 = HighScoreName(0) If hs4 > hs0 Then HighScore(0) = hs4 HighScoreName(0) = hsn4 HighScore(1) = hs0 HighScoreName(1) = hsn0 HighScore(2) = hs1 HighScoreName(2) = hsn1 HighScore(3) = hs2 HighScoreName(3) = hsn2 HighScore(4) = hs3 HighScoreName(4) = hsn3 ElseIf hs4 > hs1 Then HighScore(0) = hs0 HighScoreName(0) = hsn0 HighScore(1) = hs4 HighScoreName(1) = hsn4 HighScore(2) = hs1 HighScoreName(2) = hsn1 HighScore(3) = hs2 HighScoreName(3) = hsn2 HighScore(4) = hs3 HighScoreName(4) = hsn3 ElseIf hs4 > hs2 Then HighScore(0) = hs0 HighScoreName(0) = hsn0 HighScore(1) = hs1 HighScoreName(1) = hsn1 HighScore(2) = hs4 HighScoreName(2) = hsn4 HighScore(3) = hs2 HighScoreName(3) = hsn2 HighScore(4) = hs3 HighScoreName(4) = hsn3 ElseIf hs4 > hs3 Then HighScore(0) = hs0 HighScoreName(0) = hsn0 HighScore(1) = hs1 HighScoreName(1) = hsn1 HighScore(2) = hs2 HighScoreName(2) = hsn2 HighScore(3) = hs4 HighScoreName(3) = hsn4 HighScore(4) = hs3 HighScoreName(4) = hsn3 ElseIf hs4 < hs3 Then HighScore(0) = hs0 HighScoreName(0) = hsn0 HighScore(1) = hs1 HighScoreName(1) = hsn1 HighScore(2) = hs2 HighScoreName(2) = hsn2 HighScore(3) = hs3 HighScoreName(3) = hsn3 HighScore(4) = hs4 HighScoreName(4) = hsn4 End If ' savehs 'Commented because saved after in 'sub HighScoreCommitName() End Sub Sub SaveCredits SaveValue TableName, "Credits", Credits End Sub Sub Savehs SaveValue TableName, "HighScore1", HighScore(0) SaveValue TableName, "HighScore1Name", HighScoreName(0) SaveValue TableName, "HighScore2", HighScore(1) SaveValue TableName, "HighScore2Name", HighScoreName(1) SaveValue TableName, "HighScore3", HighScore(2) SaveValue TableName, "HighScore3Name", HighScoreName(2) SaveValue TableName, "HighScore4", HighScore(3) SaveValue TableName, "HighScore4Name", HighScoreName(3) SaveValue TableName, "HighScore5", HighScore(4) SaveValue TableName, "HighScore5Name", HighScoreName(4) SaveValue TableName, "Credits", Credits SaveValue TableName, "BKSOR01", HighScoreComboChampionName SaveValue TableName, "BKSOR02", HighScoreComboChampion SaveValue TableName, "BKSOR03", HighScoreKnightChampionName SaveValue TableName, "BKSOR04", HighScoreKnightChampion SaveValue TableName, "BKSOR05", HighScoreBlackCastleChampionName SaveValue TableName, "BKSOR06", HighScoreBlackCastleChampion SaveValue TableName, "BKSOR07", HighScoreLoopChampionName SaveValue TableName, "BKSOR08", HighScoreLoopChampion SaveValue TableName, "BKSOR09", HighScoreWarChampionName SaveValue TableName, "BKSOR10", HighScoreWarChampion SaveValue TableName, "BKSOR11", HighScoreBonusChampionName SaveValue TableName, "BKSOR12", HighScoreBonusChampion SaveValue TableName, "BKSOR13", HighScoreTripleKnightsMBChampionName SaveValue TableName, "BKSOR14", HighScoreTripleKnightsMBChampion SaveValue TableName, "BKSOR15", HighScoreCatapultMBChampionName SaveValue TableName, "BKSOR16", HighScoreCatapultMBChampion SaveValue TableName, "BKSOR17", HighScoreMoltenFireChampionName SaveValue TableName, "BKSOR18", HighScoreMoltenFireChampion SaveValue TableName, "BKSOR19", HighScoreDeepFreezeChampionName SaveValue TableName, "BKSOR20", HighScoreDeepFreezeChampion SaveValue TableName, "BKSOR21", HighScoreMudBogChampionName SaveValue TableName, "BKSOR22", HighScoreMudBogChampion SaveValue TableName, "BKSOR23", HighScoreWickedCavernChampionName SaveValue TableName, "BKSOR24", HighScoreWickedCavernChampion SaveValue TableName, "BKSOR25", HighScoreBurningSandsChampionName SaveValue TableName, "BKSOR26", HighScoreBurningSandsChampion SaveValue TableName, "BKSOR27", HighScoreSuperChampionName SaveValue TableName, "BKSOR28", HighScoreSuperChampion End Sub Sub ResetHs SaveValue TableName, "HighScore1", HighScore(0) SaveValue TableName, "HighScore1Name", HighScoreName(0) SaveValue TableName, "HighScore2", HighScore(1) SaveValue TableName, "HighScore2Name", HighScoreName(1) SaveValue TableName, "HighScore3", HighScore(2) SaveValue TableName, "HighScore3Name", HighScoreName(2) SaveValue TableName, "HighScore4", HighScore(3) SaveValue TableName, "HighScore4Name", HighScoreName(3) SaveValue TableName, "HighScore5", HighScore(4) SaveValue TableName, "HighScore5Name", HighScoreName(4) SaveValue TableName, "Credits", Credits SaveValue TableName, "BKSOR01", "" SaveValue TableName, "BKSOR02", "0" SaveValue TableName, "BKSOR03", "" SaveValue TableName, "BKSOR04", "0" SaveValue TableName, "BKSOR05", "" SaveValue TableName, "BKSOR06", "0" SaveValue TableName, "BKSOR07", "" SaveValue TableName, "BKSOR08", "0" SaveValue TableName, "BKSOR09", "" SaveValue TableName, "BKSOR10", "0" SaveValue TableName, "BKSOR11", "" SaveValue TableName, "BKSOR12", "0" SaveValue TableName, "BKSOR13", "" SaveValue TableName, "BKSOR14", "0" SaveValue TableName, "BKSOR15", "" SaveValue TableName, "BKSOR16", "0" SaveValue TableName, "BKSOR17", "" SaveValue TableName, "BKSOR18", "0" SaveValue TableName, "BKSOR19", "" SaveValue TableName, "BKSOR20", "0" SaveValue TableName, "BKSOR21", "" SaveValue TableName, "BKSOR22", "0" SaveValue TableName, "BKSOR23", "" SaveValue TableName, "BKSOR24", "0" SaveValue TableName, "BKSOR25", "" SaveValue TableName, "BKSOR26", "0" SaveValue TableName, "BKSOR27", "" SaveValue TableName, "BKSOR28", "0" End Sub Sub Savegp SaveValue TableName, "TotalGamesPlayed", TotalGamesPlayed 'vpmtimer.addtimer 1000, "Loadhs'" ' Loadhs End Sub Sub CheckHighscore (PlayerCheck) BallControlTimer.Enabled = False UnblockDrainHited.Enabled = False LastChanceButtonPush(CurrentPlayer) = False 'This line is Add, because, the Last chance is started during the matching score (when the sub CheckHighscore is used the game is finish for all players) tmpScore = Score(PlayerCheck) '/**/ PlayerCheckCurrent = PlayerCheck tmpComboChampion = ScoreComboChampion(PlayerCheck) tmpKnightChampion = ScoreKnightChampion(PlayerCheck) tmpBlackCastleChampion = ScoreBlackCastleChampion(PlayerCheck) tmpLoopChampion = ScoreLoopChampion(PlayerCheck) tmpWarChampion = ScoreWarChampion(PlayerCheck) tmpBonusChampion = ScoreBonusChampion(PlayerCheck) tmpTripleKnightsMBChampion = ScoreTripleKnightsMBChampion(PlayerCheck) tmpCatapultMBChampion = ScoreCatapultMBChampion(PlayerCheck) tmpMoltenFireChampion = ScoreMoltenFireChampion(PlayerCheck) tmpDeepFreezeChampion = ScoreDeepFreezeChampion(PlayerCheck) tmpMudBogChampion = ScoreMudBogChampion(PlayerCheck) tmpWickedCavernChampion = ScoreWickedCavernChampion(PlayerCheck) tmpBurningSandsChampion = ScoreBurningSandsChampion(PlayerCheck) tmpSuperChampion = ScoreSuperChampion(PlayerCheck) '/**/ NewRecord = False If tmpScore > HighScore(4) Then NewRecord = True ElseIf tmpComboChampion > HighScoreComboChampion Then NewRecord = True ElseIf tmpKnightChampion > HighScoreKnightChampion Then NewRecord = True ElseIf tmpBlackCastleChampion > HighScoreBlackCastleChampion Then NewRecord = True ElseIf tmpLoopChampion > HighScoreLoopChampion Then NewRecord = True ElseIf tmpWarChampion > HighScoreWarChampion Then NewRecord = True ElseIf tmpBonusChampion > HighScoreBonusChampion Then NewRecord = True ElseIf tmpTripleKnightsMBChampion > HighScoreTripleKnightsMBChampion Then NewRecord = True ElseIf tmpCatapultMBChampion > HighScoreCatapultMBChampion Then NewRecord = True ElseIf tmpMoltenFireChampion > HighScoreMoltenFireChampion Then NewRecord = True ElseIf tmpDeepFreezeChampion > HighScoreDeepFreezeChampion Then NewRecord = True ElseIf tmpMudBogChampion > HighScoreMudBogChampion Then NewRecord = True ElseIf tmpWickedCavernChampion > HighScoreWickedCavernChampion Then NewRecord = True ElseIf tmpBurningSandsChampion > HighScoreBurningSandsChampion Then NewRecord = True ElseIf tmpSuperChampion > HighScoreSuperChampion Then NewRecord = True End If '/**/ If NewRecord = True Then ' playclear pBackglass ' AwardSpecial ' HighScore(4) = tmp 'enter player's name TempoDisplay.Enabled = True VideoNewRecord Else If PlayerCheckCurrent > 1 Then 'Check If There is another Champion (Check player 4 to 1 ) PlayerCheckCurrent = PlayerCheckCurrent - 1 CheckHighScore PlayerCheckCurrent Else ' EndOfBallComplete() EndOfGame PuPlayer.LabelSet pFullDMD,"HighScore","",1,"" PuPlayer.LabelSet pFullDMD,"HighScore2","",1,"" PuPlayer.LabelSet pFullDMD,"HighScoreL1","",1,"" PuPlayer.LabelSet pFullDMD,"HighScoreL2"," ",1,"" PuPlayer.LabelSet pFullDMD,"HighScoreL3"," ",1,"" PuPlayer.LabelSet pFullDMD,"HighScoreL4"," ",1,"" hsbModeActive = False End If End If '/**/ End Sub Sub HighScoreEntryInit() hsbModeActive = True ' PlaySound "vo_enteryourinitials" 'modify later hsEnteredDigits(1) = "A" hsEnteredDigits(2) = " " hsEnteredDigits(3) = " " hsCurrentDigit = 1 'PuPlayer.playlistplayex pCallouts,"audiocallouts","yougotahighscore.mp3",vovol,1 'playmedia "yougotahighscore.mp3","audiocallouts",pCallouts,"",2000,"",1,1 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' pupDMDDisplay "-","You Got a^High Score",dmdnote,3,0,10 'chilloutthemusic 'PuPlayer.playpause 4 'playclear pMusic 'playmedia "hs.mp3","audiomultiballs",pAudio,"cineon",10000,"",1,0,1 // (name,playlist,channel,cinematic,length,nextitem,audiolevel,priority)) 'playmedia "hs.mp3","audiomultiballs",pAudio,0,0,"",1,1 'playmedia "hs.mp3","audiomultiballs",pAudio,"cineon",10000,"",1,0,1 // (name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) 'playmedia "highscore.mp4","videoscenes",pFullDMD,0,0,"",1,2 'PuPlayer.SetLoop 2,1 WarHideHurryUp pupevent 189 pupevent 407 KnockerSolenoid HighScoreDisplayName() HighScorelabels End Sub ' flipper moving around the letters Sub EnterHighScoreKey(keycode) If keycode = LeftFlipperKey Then ' Playsound "Sound-0x0010" 'modify Later PlaySound "Sound-0x0010", 0, SongVolume 'modify Later If hsletter = 0 Then hsletter = 26 Else hsLetter = hsLetter - 1 End If HighScoreDisplayName() End If If keycode = RightFlipperKey Then ' Playsound "Sound-0x0019" 'modify Later PlaySound "Sound-0x0019", 0, SongVolume 'modify Later If hsletter = 26 Then hsletter = 0 Else hsLetter = hsLetter + 1 End If HighScoreDisplayName() End If If keycode = StartGameKey or keycode = PlungerKey Then ' PlaySound "Sound-0x0008" 'modify Later PlaySound "Sound-0x0008", 0, SongVolume 'modify Later If hsCurrentDigit = 3 Then If hsletter = 0 Then hsCurrentDigit = hsCurrentDigit -1 Else assignletter 'vpmtimer.addtimer 700, "HighScoreCommitName()'" HighScoreCommitName() playclear pBackglass End If End If If hsCurrentDigit < 3 Then If hsletter = 0 Then If hsCurrentDigit = 1 Then Else hsCurrentDigit = hsCurrentDigit -1 End If Else assignletter hsCurrentDigit = hsCurrentDigit + 1 HighScoreDisplayName() End If End If End if End Sub Sub assignletter if hscurrentdigit = 1 Then hsdigit = 1 End If if hscurrentdigit = 2 Then hsdigit = 2 End If if hscurrentdigit = 3 Then hsdigit = 3 End If If hsletter = 1 Then hsEnteredDigits(hsdigit) = "A" End If If hsletter = 2 Then hsEnteredDigits(hsdigit) = "B" End If If hsletter = 3 Then hsEnteredDigits(hsdigit) = "C" End If If hsletter = 4 Then hsEnteredDigits(hsdigit) = "D" End If If hsletter = 5 Then hsEnteredDigits(hsdigit) = "E" End If If hsletter = 6 Then hsEnteredDigits(hsdigit) = "F" End If If hsletter = 7 Then hsEnteredDigits(hsdigit) = "G" End If If hsletter = 8 Then hsEnteredDigits(hsdigit) = "H" End If If hsletter = 9 Then hsEnteredDigits(hsdigit) = "I" End If If hsletter = 10 Then hsEnteredDigits(hsdigit) = "J" End If If hsletter = 11 Then hsEnteredDigits(hsdigit) = "K" End If If hsletter = 12 Then hsEnteredDigits(hsdigit) = "L" End If If hsletter = 13 Then hsEnteredDigits(hsdigit) = "M" End If If hsletter = 14 Then hsEnteredDigits(hsdigit) = "N" End If If hsletter = 15 Then hsEnteredDigits(hsdigit) = "O" End If If hsletter = 16 Then hsEnteredDigits(hsdigit) = "P" End If If hsletter = 17 Then hsEnteredDigits(hsdigit) = "Q" End If If hsletter = 18 Then hsEnteredDigits(hsdigit) = "R" End If If hsletter = 19 Then hsEnteredDigits(hsdigit) = "S" End If If hsletter = 20 Then hsEnteredDigits(hsdigit) = "T" End If If hsletter = 21 Then hsEnteredDigits(hsdigit) = "U" End If If hsletter = 22 Then hsEnteredDigits(hsdigit) = "V" End If If hsletter = 23 Then hsEnteredDigits(hsdigit) = "W" End If If hsletter = 24 Then hsEnteredDigits(hsdigit) = "X" End If If hsletter = 25 Then hsEnteredDigits(hsdigit) = "Y" End If If hsletter = 26 Then hsEnteredDigits(hsdigit) = "Z" End If End Sub Sub TempoDisplay_Timer() TempoDisplay.Enabled = False HighScoreEntryInit() ' HighScorelabels HideOverlay = True PuPlayer.LabelSet pFullDMD,"AddScoreChest","",1,"{'mt':2,'color':28671, 'size': 5, 'xpos': 14, 'xalign': 1, 'ypos': 69, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"TimerSuperMode","",1,"{'mt':2,'color':16777215, 'size': 6, 'xpos': 5, 'xalign': 1, 'ypos': 9, 'yalign': 1}" puPlayer.LabelSet pFullDMD,"LastChanceBallToLock","",1,"" puPlayer.LabelSet pFullDMD,"LastChanceTime","",1,"" puPlayer.LabelSet pFullDMD,"LastChanceJackpot","",1,"" pSplashCommentDisplayed "",3,255 pSplashCommentDisplayed2 "",3,40 pSplashAddScoreDisplayed "",3,255 pSplashAddScoreDisplayed2 "",3,40 End Sub Sub HighScorelabels PuPlayer.LabelSet pFullDMD,"HighScore","Player "&PlayerCheckCurrent&" - Enter Initial",1,"{'mt':2,'color':30719, 'size': 8, 'xpos': 50, 'xalign': 1, 'ypos': 16, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"HighScore2","grand champion",1,"{'mt':2,'color':30719, 'size': 8, 'xpos': 50, 'xalign': 1, 'ypos': 36, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"HighScoreL1","A",1,"{'mt':2,'color':30719, 'size': 10, 'xpos': 42, 'xalign': 1, 'ypos': 65, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"HighScoreL2","",1,"{'mt':2,'color':30719, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 65, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"HighScoreL3","",1,"{'mt':2,'color':30719, 'size': 10, 'xpos': 58, 'xalign': 1, 'ypos': 65, 'yalign': 1}" ' PuPlayer.LabelSet pFullDMD,"HighScoreL4",Score(CurrentPlayer),1,"{'mt':2,'color':2477823, 'size': 6, 'xpos': 10.5, 'xalign': 0, 'ypos': 58.8, 'yalign': 1}" hsletter = 1 HideOverlay = True End Sub Sub HighScoreDisplayName() Select case hsLetter Case 0 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","<",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","<",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","<",1,"" Case 1 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","A",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","A",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","A",1,"" Case 2 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","B",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","B",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","B",1,"" Case 3 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","C",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","C",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","C",1,"" Case 4 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","D",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","D",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","D",1,"" Case 5 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","E",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","E",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","E",1,"" Case 6 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","F",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","F",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","F",1,"" Case 7 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","G",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","G",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","G",1,"" Case 8 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","H",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","H",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","H",1,"" Case 9 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","I",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","I",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","I",1,"" Case 10 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","J",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","J",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","J",1,"" Case 11 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","K",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","K",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","K",1,"" Case 12 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","L",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","L",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","L",1,"" Case 13 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","M",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","M",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","M",1,"" Case 14 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","N",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","N",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","N",1,"" Case 15 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","O",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","O",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","O",1,"" Case 16 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","P",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","P",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","P",1,"" Case 17 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","Q",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","Q",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","Q",1,"" Case 18 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","R",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","R",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","R",1,"" Case 19 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","S",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","S",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","S",1,"" Case 20 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","T",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","T",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","T",1,"" Case 21 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","U",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","U",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","U",1,"" Case 22 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","V",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","V",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","V",1,"" Case 23 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","W",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","W",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","W",1,"" Case 24 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","X",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","X",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","X",1,"" Case 25 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","Y",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","Y",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","Y",1,"" Case 26 if(hsCurrentDigit = 1) then PuPlayer.LabelSet pFullDMD,"HighScoreL1","Z",1,"" if(hsCurrentDigit = 2) then PuPlayer.LabelSet pFullDMD,"HighScoreL2","Z",1,"" if(hsCurrentDigit = 3) then PuPlayer.LabelSet pFullDMD,"HighScoreL3","Z",1,"" End Select End Sub ' post the high score letters Sub HighScoreCommitName() 'PuPlayer.playresume 4 playclear pBackglass PuPlayer.SetLoop 2,0 'PuPlayer.playresume 4 playclear pAudio PuPlayer.SetLoop 7,0 hsEnteredName = hsEnteredDigits(1) & hsEnteredDigits(2) & hsEnteredDigits(3) ' HighScoreName(4) = hsEnteredName ' checkorder If tmpScore > HighScore(4) Then HighScore(4) = tmpScore HighScoreName(4) = hsEnteredName checkorder End If If tmpComboChampion > HighScoreComboChampion Then HighScoreComboChampion = tmpComboChampion HighScoreComboChampionName = hsEnteredName End If If tmpKnightChampion > HighScoreKnightChampion Then HighScoreKnightChampion = tmpKnightChampion HighScoreKnightChampionName = hsEnteredName End If If tmpBlackCastleChampion > HighScoreBlackCastleChampion Then HighScoreBlackCastleChampion = tmpBlackCastleChampion HighScoreBlackCastleChampionName = hsEnteredName End If If tmpLoopChampion > HighScoreLoopChampion Then HighScoreLoopChampion = tmpLoopChampion HighScoreLoopChampionName = hsEnteredName End If If tmpWarChampion > HighScoreWarChampion Then HighScoreWarChampion = tmpWarChampion HighScoreWarChampionName = hsEnteredName End If If tmpBonusChampion > HighScoreBonusChampion Then HighScoreBonusChampion = tmpBonusChampion HighScoreBonusChampionName = hsEnteredName End If If tmpTripleKnightsMBChampion > HighScoreTripleKnightsMBChampion Then HighScoreTripleKnightsMBChampion = tmpTripleKnightsMBChampion HighScoreTripleKnightsMBChampionName = hsEnteredName End If If tmpCatapultMBChampion > HighScoreCatapultMBChampion Then HighScoreCatapultMBChampion = tmpCatapultMBChampion HighScoreCatapultMBChampionName = hsEnteredName End If If tmpMoltenFireChampion > HighScoreMoltenFireChampion Then HighScoreMoltenFireChampion = tmpMoltenFireChampion HighScoreMoltenFireChampionName = hsEnteredName End If If tmpDeepFreezeChampion > HighScoreDeepFreezeChampion Then HighScoreDeepFreezeChampion = tmpDeepFreezeChampion HighScoreDeepFreezeChampionName = hsEnteredName End If If tmpMudBogChampion > HighScoreMudBogChampion Then HighScoreMudBogChampion = tmpMudBogChampion HighScoreMudBogChampionName = hsEnteredName End If If tmpWickedCavernChampion > HighScoreWickedCavernChampion Then HighScoreWickedCavernChampion = tmpWickedCavernChampion HighScoreWickedCavernChampionName = hsEnteredName End If If tmpBurningSandsChampion > HighScoreBurningSandsChampion Then HighScoreBurningSandsChampion = tmpBurningSandsChampion HighScoreBurningSandsChampionName = hsEnteredName End If If tmpSuperChampion > HighScoreSuperChampion Then HighScoreSuperChampion = tmpSuperChampion HighScoreSuperChampionName = hsEnteredName End If checkorder Savehs If NewRecord = True Then NewRecord = False BypassVideo = False EndOfMode.Enabled=False HideOverlay = False restoreOverlay.Interval=100 restoreOverlay.Enabled=True End If If PlayerCheckCurrent > 1 Then 'Check If There is another Champion (Check player 4 to 1 ) PlayerCheckCurrent = PlayerCheckCurrent - 1 CheckHighScore PlayerCheckCurrent Else ' EndOfBallComplete() EndOfGame PuPlayer.LabelSet pFullDMD,"HighScore","",1,"" PuPlayer.LabelSet pFullDMD,"HighScore2","",1,"" PuPlayer.LabelSet pFullDMD,"HighScoreL1","",1,"" PuPlayer.LabelSet pFullDMD,"HighScoreL2"," ",1,"" PuPlayer.LabelSet pFullDMD,"HighScoreL3"," ",1,"" PuPlayer.LabelSet pFullDMD,"HighScoreL4"," ",1,"" hsbModeActive = False End If End Sub 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' ATTRACT MODE '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X ' Sub StartAttractMode() RedColorOnly = True 'pNote "Game Set","Start Anytime" ' pupDMDDisplay "-","Game Set^Start Anytime",dmdnote,3,0,10 'cineon =0 'if bBallSaverActive = True then exit sub 'PuPlayer.playpause 4 playclear pMusic puPlayer.LabelSet pFullDMD,"titleimg","",1,"{'mt':2,'color':111111, 'width': 0, 'height': 0, 'yalign': 0}" DOF 323, DOFOn 'DOF MX - Attract Mode ON bAttractMode = True StartLightSeq 'ShowTableInfo DMDintroloop dim xx For each xx in GI:xx.State = 1: Next '(plastics lights) 'StartRainbow alights StartRainbow GI 'StartRainbow aGIlights DMDattract.Enabled = 1 intromover.enabled = true 'playmedia "BlackKnight_AttractModeLoopingBG.mp4","Background Looping",pFullDMD,"cineon",4000,"",1,5 End Sub Sub StopAttractMode() RedColorOnly = False pDMDStartGame DOF 323, DOFOff 'DOF MX - Attract Mode Off bAttractMode = False LightSeqAttract.StopPlay LightSeq002.StopPlay '' LightSeqAttract2.StopPlay StopRainbow alights ' StopRainbow2 GI ResetAllLightsColor DMDattract.Enabled = 0 intromover.enabled = false 'StopSong End Sub 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' LIGHTING / RAINBOW LIGHTS '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X ' '******************************************************************************************** ' Only for VPX 10.2 and higher. ' FlashForMs will blink light or a flasher for TotalPeriod(ms) at rate of BlinkPeriod(ms) ' When TotalPeriod done, light or flasher will be set to FinalState value where ' Final State values are: 0=Off, 1=On, 2=Return to previous State '******************************************************************************************** Sub FlashForMs(MyLight, TotalPeriod, BlinkPeriod, FinalState) 'thanks gtxjoe for the first version If TypeName(MyLight) = "Light" Then If FinalState = 2 Then FinalState = MyLight.State 'Keep the current light state End If MyLight.BlinkInterval = BlinkPeriod MyLight.Duration 2, TotalPeriod, FinalState ElseIf TypeName(MyLight) = "Flasher" Then Dim steps ' Store all blink information steps = Int(TotalPeriod / BlinkPeriod + .5) 'Number of ON/OFF steps to perform If FinalState = 2 Then 'Keep the current flasher state FinalState = ABS(MyLight.Visible) End If MyLight.UserValue = steps * 10 + FinalState 'Store # of blinks, and final state ' Start blink timer and create timer subroutine MyLight.TimerInterval = BlinkPeriod MyLight.TimerEnabled = 0 MyLight.TimerEnabled = 1 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" End If End Sub '****************************************** ' Change light color - simulate color leds ' changes the light color and state ' 10 colors: red, orange, amber, yellow... '****************************************** ' in this table this colors are use to keep track of the progress during the acts and battles 'colors Sub gicolor(n) dim a End Sub Sub SetLightColor(n, col, stat) Select Case col Case red n.color = RGB(18, 0, 0) n.colorfull = RGB(255, 0, 0) Case orange n.color = RGB(18, 3, 0) n.colorfull = RGB(255, 64, 0) Case amber n.color = RGB(193, 49, 0) n.colorfull = RGB(255, 153, 0) Case yellow n.color = RGB(18, 18, 0) n.colorfull = RGB(255, 255, 0) Case darkgreen n.color = RGB(0, 8, 0) n.colorfull = RGB(0, 64, 0) Case green n.color = RGB(0, 18, 0) n.colorfull = RGB(0, 255, 0) Case blue n.color = RGB(0, 18, 18) n.colorfull = RGB(0, 255, 255) Case darkblue n.color = RGB(0, 8, 8) n.colorfull = RGB(0, 64, 64) Case purple n.color = RGB(128, 0, 128) n.colorfull = RGB(255, 0, 255) Case white n.color = RGB(255, 252, 224) n.colorfull = RGB(193, 91, 0) Case white n.color = RGB(255, 252, 224) n.colorfull = RGB(193, 91, 0) Case base n.color = RGB(255, 197, 143) n.colorfull = RGB(255, 255, 236) End Select If stat <> -1 Then n.State = 0 n.State = stat End If End Sub Sub ResetAllLightsColor ' Called at a new game SetLightColor l13, red, -1 End Sub Sub UpdateBonusColors End Sub '************************* ' Rainbow Changing Lights '************************* Sub StartRainbow(n) set RainbowLights = n RGBStep = 0 RGBFactor = 5 rRed = 255 rGreen = 0 rBlue = 0 RainbowTimer.Enabled = 1 End Sub Sub StopRainbow(n) Dim obj RainbowTimer.Enabled = 0 RainbowTimer.Enabled = 0 For each obj in RainbowLights SetLightColor obj, "white", 0 Next End Sub Sub RainbowTimer_Timer 'rainbow led light color changing Dim obj For each obj in GI obj.color = RGB(rRed \ 10, rGreen \ 10, rBlue \ 10) obj.colorfull = RGB(rRed, rGreen, rBlue) Next End Sub Sub RainbowTimer1_Timer 'rainbow led light color changing Dim obj Select Case RGBStep2 Case 0 'Green rGreen2 = rGreen2 + RGBFactor2 If rGreen2 > 255 then rGreen2 = 255 RGBStep2 = 1 End If Case 1 'Red rRed2 = rRed2 - RGBFactor2 If rRed2 < 0 then rRed2 = 0 RGBStep2 = 2 End If Case 2 'Blue rBlue2 = rBlue2 + RGBFactor2 If rBlue2 > 255 then rBlue2 = 255 RGBStep2 = 3 End If Case 3 'Green rGreen2 = rGreen2 - RGBFactor2 If rGreen2 < 0 then rGreen2 = 0 RGBStep2 = 4 End If Case 4 'Red rRed2 = rRed2 + RGBFactor2 If rRed2 > 255 then rRed2 = 255 RGBStep2 = 5 End If Case 5 'Blue rBlue2 = rBlue2 - RGBFactor2 If rBlue2 < 0 then rBlue2 = 0 RGBStep2 = 0 End If End Select For each obj in RainbowLights2 obj.color = RGB(rRed2 \ 10, rGreen2 \ 10, rBlue2 \ 10) obj.colorfull = RGB(rRed2, rGreen2, rBlue2) Next End Sub Sub TableAnimation 'SaveStateLight AfterSaveStateLight.Enabled=True End Sub sub AfterSaveStateLight_Timer() GiOff2 AfterSaveStateLight.Enabled=False On Error Resume Next ' Dim a ' For each a in alights ' a.State = 1 ' Next CheckLamp.Enabled=False If SequenceAnimation = "1" Then TableAnimation01.Interval=4000 TableAnimation01.Enabled=True L163.State = 1 LightSeq003.UpdateInterval = 50 LightSeq003.Play SeqBlinking, , 10, 40 LightSeq004.UpdateInterval = 80 LightSeq004.Play SeqBlinking, , 10, 40 End If If SequenceAnimation = "2" Then TableAnimation01.Interval=4000 TableAnimation01.Enabled=True L163.State = 1 LightSeq002.UpdateInterval = 5 LightSeq002.Play SeqUpOn, , 5, 1 End If end Sub Sub TableAnimation01_Timer() StopAttractMode CheckLamp.Interval=100 CheckLamp.Enabled=True ' GiOff2 TableAnimation01.Enabled=False relighttable ActionWhenHitOneOfThreeWay GiOn L163.State = 0 End Sub Sub StartLightSeq() On Error Resume Next Dim a '************ Change Lamp in round in RED ***************** LightObjectColor(1).color = RGB(255, 0, 0) LightObjectColor(1).colorfull = RGB(255, 0, 0) LightObjectColor(2).color = RGB(255, 0, 0) LightObjectColor(2).colorfull = RGB(255, 0, 0) LightObjectColor(3).color = RGB(255, 0, 0) LightObjectColor(3).colorfull = RGB(255, 0, 0) LightObjectColor(4).color = RGB(255, 0, 0) LightObjectColor(4).colorfull = RGB(255, 0, 0) LightObjectColor(5).color = RGB(255, 0, 0) LightObjectColor(5).colorfull = RGB(255, 0, 0) LightObjectColor(6).color = RGB(255, 0, 0) LightObjectColor(6).colorfull = RGB(255, 0, 0) LightObjectColor(7).color = RGB(255, 0, 0) LightObjectColor(7).colorfull = RGB(255, 0, 0) LightObjectColor(8).color = RGB(255, 0, 0) LightObjectColor(8).colorfull = RGB(255, 0, 0) LightObjectColor(9).color = RGB(255, 0, 0) LightObjectColor(9).colorfull = RGB(255, 0, 0) LightObjectColor(10).color = RGB(255, 0, 0) LightObjectColor(10).colorfull = RGB(255, 0, 0) LightObjectColor(11).color = RGB(255, 0, 0) LightObjectColor(11).colorfull = RGB(255, 0, 0) LightObjectColor(12).color = RGB(255, 0, 0) LightObjectColor(12).colorfull = RGB(255, 0, 0) For each a in alights a.State = 1 Next LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqUpOn, 50, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqDownOn, 25, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqCircleOutOn, 15, 2 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqUpOn, 25, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqDownOn, 25, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqUpOn, 25, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqDownOn, 25, 1 LightSeqAttract.UpdateInterval = 10 LightSeqAttract.Play SeqCircleOutOn, 15, 3 LightSeqAttract.UpdateInterval = 5 LightSeqAttract.Play SeqRightOn, 50, 1 LightSeqAttract.UpdateInterval = 5 LightSeqAttract.Play SeqLeftOn, 50, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqRightOn, 50, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqLeftOn, 50, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqRightOn, 40, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqLeftOn, 40, 1 LightSeqAttract.UpdateInterval = 10 LightSeqAttract.Play SeqRightOn, 30, 1 LightSeqAttract.UpdateInterval = 10 LightSeqAttract.Play SeqLeftOn, 30, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqRightOn, 25, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqLeftOn, 25, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqRightOn, 15, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqLeftOn, 15, 1 LightSeqAttract.UpdateInterval = 10 LightSeqAttract.Play SeqCircleOutOn, 15, 3 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqLeftOn, 25, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqRightOn, 25, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqLeftOn, 25, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqUpOn, 25, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqDownOn, 25, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqUpOn, 25, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqDownOn, 25, 1 LightSeqAttract.UpdateInterval = 5 LightSeqAttract.Play SeqStripe1VertOn, 50, 2 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqCircleOutOn, 15, 2 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqStripe1VertOn, 50, 3 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqLeftOn, 25, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqRightOn, 25, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqLeftOn, 25, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqUpOn, 25, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqDownOn, 25, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqCircleOutOn, 15, 2 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqStripe2VertOn, 50, 3 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqLeftOn, 25, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqRightOn, 25, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqLeftOn, 25, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqUpOn, 25, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqDownOn, 25, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqUpOn, 25, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqDownOn, 25, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqStripe1VertOn, 25, 3 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqStripe2VertOn, 25, 3 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqUpOn, 15, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqDownOn, 15, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqUpOn, 15, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqDownOn, 15, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqUpOn, 15, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqDownOn, 15, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqRightOn, 15, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqLeftOn, 15, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqRightOn, 15, 1 LightSeqAttract.UpdateInterval = 8 LightSeqAttract.Play SeqLeftOn, 15, 1 End Sub Sub LightSeqAttract_PlayDone() StartLightSeq() End Sub Sub LightSeqTilt_PlayDone() ' LightSeqTilt.Play SeqAllOff End Sub Sub LightSeqSkillshot_PlayDone() LightSeqSkillshot.Play SeqAllOff End Sub '********************** ' GI effects ' independent routine ' it turns on the gi ' when there is a ball ' in play '********************** Sub ChangeGi(col) 'changes the gi color Dim bulb For each bulb in GI SetLightColor bulb, col, -1 Next End Sub Sub GIUpdateTimer_Timer Dim tmp, obj tmp = Getballs If UBound(tmp) <> OldGiState Then OldGiState = Ubound(tmp) If UBound(tmp) = 3 Then 'we have 4 captive balls on the table (-1 means no balls, 0 is the first ball, 1 is the second..) 'GiOff ' turn off the gi if no active balls on the table, we could also have used the variable ballsonplayfield. Else 'Gion End If End If End Sub sub giflashing Dim bulb For each bulb in GI SetLightColor bulb, base, -1 bulb.State = 1 bulb.intensity = gibase Next end Sub Sub GiOn ' L270.State=1 ' L271.State=1 ' L272.State=1 gistatus = 1 ' GI_On_DOF_Undercab Dim bulb For each bulb in GI ' SetLightColor bulb, base, -1 bulb.State = 1 ' bulb.intensity = gibase Next StartRainbow GI End Sub Sub GiOff gistatus = 0 ' GI_Off_DOF_Undercab Dim bulb For each bulb in GI bulb.State = 0 Next ' spotsoff End Sub Sub GiOff2 gistatus = 0 ' GI_Off_DOF_Undercab Dim bulb For each bulb in GI2 bulb.State = 0 Next ' spotsoff End Sub ' GI & light sequence effects Sub GiEffect(n) Select Case n Case 0 'all off 'LightSeqGi.Play SeqAlloff Case 1 'all blink 'LightSeqGi.UpdateInterval = 4 'LightSeqGi.Play SeqBlinking, , 5, 100 Case 2 'random 'LightSeqGi.UpdateInterval = 10 'LightSeqGi.Play SeqRandom, 5, , 1000 Case 3 'upon 'LightSeqGi.UpdateInterval = 4 'LightSeqGi.Play SeqUpOn, 5, 1 Case 4 ' left-right-left 'LightSeqGi.UpdateInterval = 5 'LightSeqGi.Play SeqLeftOn, 10, 1 'LightSeqGi.UpdateInterval = 5 'LightSeqGi.Play SeqRightOn, 10, 1 End Select End Sub Sub LightEffect(n) Select Case n Case 0 ' all off 'LightSeqInserts.Play SeqAlloff Case 1 'all blink 'LightSeqInserts.UpdateInterval = 4 'LightSeqInserts.Play SeqBlinking, , 5, 100 Case 2 'random 'LightSeqInserts.UpdateInterval = 10 'LightSeqInserts.Play SeqRandom, 5, , 1000 Case 3 'upon 'LightSeqInserts.UpdateInterval = 4 'LightSeqInserts.Play SeqUpOn, 10, 1 Case 4 ' left-right-left 'LightSeqInserts.UpdateInterval = 5 'LightSeqInserts.Play SeqLeftOn, 10, 1 'LightSeqInserts.UpdateInterval = 5 'LightSeqInserts.Play SeqRightOn, 10, 1 Case 5 'random 'LightSeqbumper.UpdateInterval = 4 'LightSeqbumper.Play SeqBlinking, , 5, 10 Case 6 'random 'LightSeqRSling.UpdateInterval = 4 'LightSeqRSling.Play SeqBlinking, , 5, 6 Case 7 'random 'LightSeqLSling.UpdateInterval = 4 'LightSeqLSling.Play SeqBlinking, , 5, 6 Case 8 'random 'LightSeqBack.UpdateInterval = 4 'LightSeqBack.Play SeqBlinking, , 5, 6 Case 12 'random 'LightSeqlr.UpdateInterval = 4 'LightSeqlr.Play SeqBlinking, , 5, 10 End Select End Sub ' Flasher Effects using lights Sub FlashEffect(n) Select case n Case 0 ' all off LightSeqFlasher.Play SeqAlloff Case 1 'all blink LightSeqFlasher.UpdateInterval = 4 LightSeqFlasher.Play SeqBlinking, , 5, 100 Case 2 'random LightSeqFlasher.UpdateInterval = 10 LightSeqFlasher.Play SeqRandom, 5, , 1000 Case 3 'upon LightSeqFlasher.UpdateInterval = 4 LightSeqFlasher.Play SeqUpOn, 10, 1 Case 4 ' left-right-left LightSeqFlasher.UpdateInterval = 5 LightSeqFlasher.Play SeqLeftOn, 10, 1 LightSeqFlasher.UpdateInterval = 5 LightSeqFlasher.Play SeqRightOn, 10, 1 Case 5 ' top flashers blink fast End Select End Sub '*************************************************** ' JP's VP10 Flashers v2 for original tables ' Based on PD's Fading Light System ' SetFlash 0 is Off, 1 is On, 2 is blinking '*************************************************** InitFlashers() Sub FlashTimer_Timer() Flash 1, Flasher1 Flash 2, Flasher2 Flash 6, Flasher3 Flash 7, Flasher4 Flash 8, Flasher5 End Sub Sub InitFlashers() Dim x For x = 0 to 100 FlashState(x) = 0 ' current state: 0 off, 1 on, 2 blinking FlashSpeedUp(x) = 0.5 ' faster speed when turning on the flasher FlashSpeedDown(x) = 0.25 ' slower speed when turning off the flasher FlashMax(x) = 1 ' the maximum value when on, usually 1 FlashMin(x) = 0 ' the minimum value when off, usually 0 FlashLevel(x) = 0 ' the intensity of the flashers, usually from 0 to 1 FlashRepeat(x) = 20 ' the default number of blinks in the state 2 Next ' Fast flashers - the dome flashers For x = 9 to 12 FlashSpeedUp(x) = 1 'instant on FlashSpeedDown(x) = 0.5 ' only 2 step Next FlashTimer.Interval = 20 FlashTimer.Enabled = True End Sub Sub AllFlashersOff Dim x For x = 0 to 100 SetFlash x, 0 Next End Sub Sub SetFlash(n, value) If value <> FlashState(n) Then FlashState(n) = value FadingLevel(n) = value End If End Sub Sub Flash(n, object) Select Case FadingLevel(n) Case 0 'off FlashLevel(n) = FlashLevel(n) - FlashSpeedDown(n) If FlashLevel(n) < FlashMin(n) Then FlashLevel(n) = FlashMin(n) FadingLevel(n) = -1 'stopped End if Object.IntensityScale = FlashLevel(n) Case 1 ' on FlashLevel(n) = FlashLevel(n) + FlashSpeedUp(n) If FlashLevel(n) > FlashMax(n) Then FlashLevel(n) = FlashMax(n) FadingLevel(n) = -1 'stopped End if Object.IntensityScale = FlashLevel(n) Case 2 'blink -turn on flasher FlashLevel(n) = FlashLevel(n) + FlashSpeedUp(n) If FlashLevel(n) > FlashMax(n) Then FlashLevel(n) = FlashMax(n) FadingLevel(n) = 3 End if Object.IntensityScale = FlashLevel(n) Case 3 'blink -turn off flasher FlashLevel(n) = FlashLevel(n) - FlashSpeedDown(n) If FlashLevel(n) < FlashMin(n) Then FlashLevel(n) = FlashMin(n) FlashRepeat(n) = FlashRepeat(n) - 1 If FlashRepeat(n) = 0 Then FlashRepeat(n) = 20 'reset for next time FlashState(n) = 0 FadingLevel(n) = -1 Else FadingLevel(n) = 2 End If End if Object.IntensityScale = FlashLevel(n) End Select End Sub Sub Flashm(n, object) 'multiple flashers, it just sets the flashlevel Object.IntensityScale = FlashLevel(n) End Sub 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' SCORING FUNCTIONS '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X Sub AddScore(points) If Gamerover_flag = False Then If Score(CurrentPlayer) => ReplayAt And ReplayPlayer(CurrentPlayer) = False Then ReplayPlayer(CurrentPlayer) = True VideoReplay AwardSpecial End If If(Tilted = False) Then ' add the points to the current players score variable dim dubpnts If RetroMode = 1 or RetroMode = 3 Then dubpnts = points * BallsOnPlayfield Score(CurrentPlayer) = Score(CurrentPlayer) + dubpnts PuPlayer.LabelSet pFullDMD,"curscore3",FormatNumber(Score(CurrentPlayer),0),1,"{'mt':2,'color':2477823, 'size': 6.2, 'xpos': 50, 'xalign': 1, 'ypos': 89.2, 'yalign': 1}" Else Score(CurrentPlayer) = Score(CurrentPlayer) + points PuPlayer.LabelSet pFullDMD,"curscore",FormatNumber(Score(CurrentPlayer),0),1,"{'mt':2,'color':2477823, 'size': 6.2, 'xpos': 50, 'xalign': 1, 'ypos': 89.2, 'yalign': 1}" End If End If ' Super Mode Jackpot If AddScoreChestJackpot>0 Then PuPlayer.LabelSet pFullDMD,"AddScoreChest",FormatNumber(AddScoreChestJackpot,0),1,"{'mt':2,'color':28671, 'size': 3, 'xpos': 5, 'xalign': 1, 'ypos': 5, 'yalign': 1}" Else PuPlayer.LabelSet pFullDMD,"AddScoreChest","",0,"" End if End if End Sub Sub AwardExtraBall() if vcount = 0 Then WarHideHurryUp pupevent 128 DelayCallout 2, RndInt(415,416) If WarHurryFlag = True Then WarDelayShow.Interval = 3000 ' 3 second delay used by most callouts WarDelayShow.enabled = True End If End if ExtraBallsAwards(CurrentPlayer) = ExtraBallsAwards(CurrentPlayer) + 1 L14.state = 1 checkLamp.enabled = True End Sub Sub AwardSpecial() if specialAward = "Credit" Then Credits = Credits + 1 Elseif specialAward = "Ball" Then AwardExtraBall() Else AddScore(specialScore) End if ' SaveCredits 'In comment because, in game the image block ~0,100m second ' Savehs 'In comment because, in game the image block ~1,500m second ' DOF 140, DOFOn KnockerSolenoid playmedia "Sound-0x08E4.mp3","Audiocomment",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) 'DOF 115, DOFPulse 'Strobe GiEffect 1 LightEffect 1 ' DOF 400, DOFPulse 'DOF MX - Special End Sub 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' BALL FUNCTIONS & DRAINS '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X Function Balls Dim tmp tmp = bpgcurrent - BallsRemaining(CurrentPlayer) + 1 If tmp> bpgcurrent Then Balls = bpgcurrent Else Balls = tmp End If End Function Sub FirstBall_timer() FirstBall.Enabled=False ResetForNewPlayerBall() relighttable CreateNewBall() 'PuPlayer.playlistplayex pFullDMD,"videoscenes","triwizardcup.mp4",0,1 'playmedia "triwizardcup.mp4","videoscenes",pFullDMD,"",3000,"",0,1 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' meakin added start video 'playmedia "MainplayV2.mp4","Background Main Play",pFullDMD,"cineon",4000,"",1,5 'PuPlayer.SetLoop pFullDMD, 1 End Sub ' Reset New Ball Player Sub ResetForNewPlayerBall() WarHideHurryUp newBall = True 'If PMdebug = true Then PuPlayer.LabelSet pFullDMD,"curplayer","SubResetFornewPlayerBall",1,"{'mt':2}" OrbitStatus.Enabled = True OrbitFlag = False BallControlTimer.Enabled = False DisableTable False SuperIsLit = False StopSuperMode ' clear all supermodes RetroMode = 0 ' make sure retromode is off ' turn off powersword activated level stops within PowerSwordLevel(CurrentPlayer) by player PowerSwordActivated = False PowerSwordMultipler = 1 horloge.Interval=1000 LastChanceStart = False LastChanceFlag = False LastChanceSuccess = False LastChanceCatapultMode = False LastChanceChronoStart(CurrentPlayer) = False LastChanceButtonPush(CurrentPlayer) = False 'BonusMultiplier(CurrentPlayer) = 1 AddScoreMudBog = 0 AddScoreMoltenFire = 0 AddScoreSandWorm = 0 AddScoreDeepFreeze = 0 ' Reset the scoring AddScoreTripleKnightChallengeKnightHited = 1000000 AddScoreTripleKnightChallengeGoldRoom = 1000000 AddScoreTripleKnightChallenge = 0 AddScoreWarHurryUp = 1000000 AddScoreLoopBonus = 500000 AddscoreCatapultBonus = 400000 RageMultiballJackPot = 100000 Catapult_jackpot_collected = 0 WarHurryUp51Touch=0 WarHurryUp56Touch=0 WarHurryUp58Touch=0 WarHurryFlag = False WarHurryPhase = 0 BurningSandsHit = 0 AddscoreCatapult = 0 NewRecord = False RightGate.Collidable=False RightGateTW.Collidable=True If SW41Dropped = True Then SW41.IsDropped=False SW41Dropped = False RandomSoundDropTargetReset SW41 'playsound "fx2_droptargetreset" Else ' Comment End If ' Black castle reset BC41Hit = 0 ' used for outer loops as in normal mode they have to each be hit (powersord allows 4 of the same) BC48Hit = 0 BC59Hit = 0 BC64Hit = 0 RageMultiball = False 'ExtraBallsIsLit = False 'MysteryFlag = False 'PuPlayer.playlistplayex pCallouts,"audiocallouts","ballready.mp3",vovol,1 'playmedia "ballready.mp3","audiocallouts",pCallouts,"",1000,"",1,1 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) 'PuPlayer.playresume 4 ' extra part for multple players ' If PlayersPlayingGame > 1 Then ' If CurrentPlayer = 1 Then ' 'playmedia "player1.mp4","videoscenes",pFullDMD,"",5000,"",1,5 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' SpeakTime = 1257 ' LightEyesBK ' playmedia "Sound-0x0215.mp3","Audioknight",pCallouts,"",1000,"",1,1 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' 'playmedia "","videodrains",pFullDMD,"",6500,"",1,1 ' ' Elseif currentplayer = 2 Then ' 'playmedia "player2.mp4","videoscenes",pFullDMD,"",5000,"",1,5 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' SpeakTime = 1510 ' LightEyesBK ' playmedia "Sound-0x031B.mp3","Audioknight",pCallouts,"",1000,"",1,1 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' Elseif currentplayer = 3 Then ' 'playmedia "player3.mp4","videoscenes",pFullDMD,"",5000,"",1,5 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' SpeakTime = 1617 ' LightEyesBK ' ' playmedia "Sound-0x017A.mp3","Audioknight",pCallouts,"",1000,"",1,1 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' Elseif currentplayer = 4 Then ' '' playmedia "player4.mp4","videoscenes",pFullDMD,"",5000,"",1,5 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' SpeakTime = 1503 ' LightEyesBK ' ' playmedia "Sound-0x0353.mp3","Audioknight",pCallouts,"",1000,"",1,1 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' End If ' Else ' '' playmedia "player1.mp4","videoscenes",pFullDMD,"",5000,"",1,1 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' ' playmedia "player1.mp3","audiocallouts",pCallouts,"",1000,"",1,1 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' End If If BallSaveAvailable(CurrentPlayer) = True Then L13.state = 1 Else L13.state = 0 End If AddScore 0 ' Check If Bonus Held for current player if BonusHeld(CurrentPlayer) = False Then BonusPoints(CurrentPlayer) = 0 Else BonusHeld(CurrentPlayer) = False End If ResetNewBallLights() relighttable KnightChallengeTimer.Enabled = False StartMission = 0 End Sub Sub CreateNewBall() ' Meakin Create new ball this routine for new ball for player to plunge If PMdebug = true Then PuPlayer.LabelSet pFullDMD,"curplayer","CreateNewBall",1,"{'mt':2}" currentqueue = " " Kicker1.CreateBall BallsOnPlayfield = BallsOnPlayfield + 1 if ballNumDisplay <> bpgcurrent - BallsRemaining(CurrentPlayer) +1 Then ballNumDisplay = bpgcurrent - BallsRemaining(CurrentPlayer) + 1 ' updtae display for when new ball is created showing bal ' PlaySoundAt SoundFXDOF("ballrelease", 114, DOFPulse, DOFContactors), BallRelease Kicker1.Kick 300, 30, 1.56 RandomSoundBallRelease Kicker1 restoreOverlay.interval = 100 restoreOverlay.enabled = true End Sub ' Meakin New version of end of ball sets timer for launch of new ball taking into account bonus and extra ball or Not Sub EndOfBall() NewBallDelayTime = 7000 ' delay for displaying bonus ' check for tilted if so then delay is different ' last chance not implemented at the moment 'If LastChanceSuccess = False Then ' bGameInPlay = True 'End If 'playclear pAudio ' Meakin thses will need checking bMultiBallMode = False bOnTheFirstBall = False Tilted = False Tilt = 0 DisableTable False tilttableclear.enabled = False tilttime = 0 ShootAgain = False ' newer routine starts here BallChecker.enabled = False ' turn off ballchecker If PowerSwordActivated = True Then PowerSwordActivated = False PowerSwordMultipler = 1 PowerSwordLevel(CurrentPlayer) = 0 PowerSwordAnimated.Enabled = False updatePowersword() End If ' check for ExtraBall If ExtraBallsAwards(CurrentPlayer) > 0 Then ExtraBallsAwards(CurrentPlayer) = ExtraBallsAwards(CurrentPlayer) - 1 ' set flag to show shoot agian event on EmdOfBallComplete ShootAgain = True 'NewBallDelayTime = NewBallDelayTime + 4000 ' time to play "shoot again If PMdebug = true Then PuPlayer.LabelSet pFullDMD,"Ball","ExtraBall",1,"{'mt':2}" EndOfBallComplete.Interval = NewBallDelayTime EndOfBallComplete.Enabled = True Else ' check if more than one player here BallsRemaining(CurrentPlayer) = BallsRemaining(CurrentPlayer) - 1 If BallsRemaining(CurrentPlayer) = 0 Then If PMdebug = true Then PuPlayer.LabelSet pBackglass,"curplayer","EndOfGame",1,"" WarHideHurryUp 'pupevent 0 ' end of game so letting bonus play before checking highscore or match WaitForBonus.interval = 6000 WaitForBonus.enabled = True lastplayer = 0 Else ' next Ball CheckLamp.Enabled=True AddScore 0 ResetForNewPlayerBall() DisableTable False bGameInPlay = True If PMdebug = true Then PuPlayer.LabelSet pBackglass,"curplayer","Next Ball",1,"" EndOfBallComplete.Interval = NewBallDelayTime EndOfBallComplete.Enabled = True End If End If End Sub Sub EndOfBallComplete_Timer() ' new end of ball timer this is simple delay for creating a new ball EndOfBallComplete.Enabled = False if ShootAgain = True Then Pupevent 129 ShootAgain = False end If restoreOverlay.interval = 100 restoreOverlay.Enabled = True relighttable CreateNewBall() End Sub sub WaitForBonus_timer() WaitForBonus.enabled = False pupevent 399 CheckHighScore CurrentPlayer End Sub ' ************************** Meakin New Version of drain hit as old version had problems with multiballs and ending Sub Drain_hit() ' forms an if that checks for eacj possibility and then destroys and launches ball back at the plunger (either autoplunge or for PlayerCheck) ' FxTxP - VPXS: pull this ball out of the ramp-roll queue BEFORE destroying it, otherwise ' a ball that drains straight off a ramp leaves a stale BallEx in RampBalls. WRemoveBall ActiveBall.ID Drain.DestroyBall RandomSoundDrain Drain ' redementary check for tilt here (I don;t have nudge facilities so will have to see if this works) if Tilted = True Then BallsOnPlayfield = (UBound(GetBalls()) + 1) - BallInLocker if BallsOnPlayfield = 0 Then EndOfBall end If ' multiballs have checker for ball launching whilst ballsaver in action enabled so remove ball Elseif (RageMultiball = True Or Retromode = 3) And bBallSaverActive = True Then BallsOnPlayfield = (UBound(GetBalls()) + 1) - BallInLocker 'BallsOnPlayfield = BallsOnPlayfield -1 ' remove ball from playfield (timer MultiballKicker will relaunch a Ball) If PMdebug = true Then PuPlayer.LabelSet pFullDMD,"curplayer","DrainHita: " & BallsOnPlayfield ,1,"{'mt':2}" If RageMultiball = True And BallsOnPlayfield = 1 Then RageMultiball = False ' stop flail StopBouleAngle = 0 StopRotating.interval=100 StopRotating.Enabled=True ' set shield to be able to raised again ShieldRemainsLock = False ' total rage multiball dispaly here CurrentMissionFlag(CurrentPlayer) = 0 VideoSetBackgroundPM MusicResetPM End If ' retro modes check for ending or unlimited Elseif RetroMode = -1 Then ' end of RetroModes and RageMultiball BallsOnPlayfield = BallsOnPlayfield -1 if BallsOnPlayfield <= 0 Then ' all balls collected create a ball at the Plunger back to normal 'BallsOnPlayfield = 0 CreateNewBall() ' put ball in plunger and retro mode is finished RetroMode = 0 CurrentMissionFlag(CurrentPlayer) = 0 ' check if ball drained on last ball rather than timer then check retro is set for the next time if BlackKnightRetro(CurrentPlayer) = 1 Then BlackKnightRetro(CurrentPlayer) = 2 if BlackKnightRetro(CurrentPlayer) = 3 Then BlackKnightRetro(CurrentPlayer) = 0 restoreOverlay.interval = 100 restoreOverlay.enabled = true ' back to normal VideoSetBackgroundPM MusicResetPM ' if using timed RageMultiball then this resets after last ball goes through if RageMultiball = True Then RageMultiball = False ' stop flail StopBouleAngle = 0 StopRotating.interval=100 StopRotating.Enabled=True ' set shield to be able to raised again ShieldRemainsLock = False ' total rage multiball dispaly here CurrentMissionFlag(CurrentPlayer) = 0 VideoSetBackgroundPM MusicResetPM End If End If ' ball save timer is flashing (ie immune) bBallSaverActive = True ElseIf bBallSaverActive = True Then if BallsOnPlayfield = 1 and RetroMode = 0 Then 'pupevent 103 ' play ball saved video as only one on the Playfield Callout RndInt(315,329) end if AutoFireTimer.Enabled=true 'Send new ball because BBSaverIsActive ' ball saver (left hand lane Hit) uses bBallSaverActiveL13 = True ie you hit the left hand ball saver lane Elseif bBallSaverActiveL13 = True Then bBallSaverActiveL13 = False ' play ballsaved event here pupevent 103 AutoFireTimer.Enabled=true 'Send new ball, because BBSaverActiveL13 ' turn off lights for restart L13.state = 0 L63.state = 0 L64.state = 0 BallSaveAvailable(CurrentPlayer) = False ' Multiball checks go here to see if its just losing BallsOnPlayfield Elseif BallsOnPlayfield >1 Then BallsOnPlayfield = BallsOnPlayfield - 1 If PMdebug = true Then PuPlayer.LabelSet pFullDMD,"curplayer","DrainHitb:" & BallsOnPlayfield ,1,"{'mt':2}" if BallsOnPlayfield = 1 Then ' Check which multiball is finishing If Knight_challenge_flag = True Then Knight_challenge_flag = False KnightRemaining = 3 TimerBeforeBonusScore = 100 'Display Mode Total Knight_challenge.interval = 100 ModeTotalKnightChallenge.Enabled = True 'CurrentMissionFlag(CurrentPlayer) = 0 VideoSetBackgroundPM MusicResetPM ' music to background End If If CatapultModeFlag = True Then CatapultModeFlag = False StopBouleAngle = 90 StopRotating.interval=100 StopRotating.Enabled=True Catapult_Super_Jackpot_Multi = 1 ModeTotalCatapult.Enabled = True VideoSetBackgroundPM MusicResetPM 'music restart End If If RetroMode = 1 Then ' set 10 second timer to end black knight multiball AddTimeForMission(CurrentPlayer) = 10 horloge.interval = 1000 horloge.Enabled = True 'EndBLackKnightRetroMode.Interval = 10000 'EndBLackKnightRetroMode.Enabled = True 'RetroMode = -1 End If If RageMultiball = True Then RageMultiball = False ' stop flail StopBouleAngle = 0 StopRotating.interval=100 StopRotating.Enabled=True ' set shield to be able to raised again ShieldRemainsLock = False ' total rage multiball dispaly here CurrentMissionFlag(CurrentPlayer) = 0 VideoSetBackgroundPM MusicResetPM End If End If Elseif Gamerover_flag = True Then ' do nothing balls draining BallsOnPlayfield = BallsOnPlayfield -1 ' lose a ball (ie this is the lost Ball) Else BallsOnPlayfield = BallsOnPlayfield -1 'puplayer.setVolume pMusic,0 ' kill war Hurryup ' turn off imwaiting taunts ImWaiting.Enabled = False ' check lost last ball in retromode if RetroMode = 1 Then horloge.Enabled = False RetroMode = 0 CurrentMissionFlag(CurrentPlayer) = 0 ' check if ball drained on last ball rather than timer then check retro is set for the next time if BlackKnightRetro(CurrentPlayer) = 1 Then BlackKnightRetro(CurrentPlayer) = 2 if BlackKnightRetro(CurrentPlayer) = 3 Then BlackKnightRetro(CurrentPlayer) = 0 restoreOverlay.interval = 100 restoreOverlay.enabled = true ' back to normal VideoSetBackgroundPM MusicResetPM End If If PowerSwordActivated = True then PowerSwordActivated = False PowerSwordMultipler = 1 PowerSwordAnimated.enabled = False PowerSwordLevel(CurrentPlayer) = 0 updatePowersword() End If If BlackCastle(CurrentPlayer) = 2 and BlackCastleMode = 0 Then ' black castle is lost reset back to the beginning BlackCastle(CurrentPlayer) = 0 MudBog(CurrentPlayer) = 0 MoltenFire(CurrentPlayer) = 0 BurningSands(CurrentPlayer) = 0 WickedCavern(CurrentPlayer) = 0 DeepFreeze(CurrentPlayer) = 0 LightObjectColor(11).State=0 TurnOffRoundLights ' force select Mission SelectMission CurrentMissionFlag(CurrentPlayer) = 0 End If Callout RndInt(116,160) FlailReset.enabled = False StopSuperMode WarHideHurryUp if WarHurryFlag = True Then WarStop rememberlights ' playbonus DisplayEndOfBallBonus ' call end of ball this sets up extra ball or next player EndOfBall End If End Sub ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' *ATTRACT MODE* '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X ' introposition = 0 Sub DMDintroloop WarHideHurryUp pupevent 0 ' start intro background loop ' ' playmedia "BlackKnight_AttractModeLoopingBG.mp4","Background Looping",pFullDMD,"cineon",4000,"",1,5 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' PuPlayer.LabelSet pFullDMD,"modetitle","",1,"{'mt':2,'color':16777215, 'size': 0, 'xpos': 80.7, 'xalign': 1, 'ypos': 72.6, 'yalign': 0}" introtime = 0 clearhslabels clearosblabels introposition = introposition + 1 Select Case introposition Case 1 clearhslabels clearosblabels playclear pMusic 'PuPlayer.playpause 4 '' playmedia "BlackKnight_AttractModeLoopingBG.mp4","Background looping",pFullDMD,"",53000,"",1,10 DOF 504, DOFPulse playclear pMusic ' Last Player --> Player 1 | 00 Case 2 'PuPlayer.playpause 4 playclear pMusic clearhslabels clearosblabels ' playmedia "LogoStern.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) Case 3 clearosblabels ' playmedia "overlay_blank.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) If PlayersPlayingGame = 4 Then ' playmedia "4PGameOver.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PuPlayer.LabelSet pFullDMD,"GameOverPlayer1","Player 1",1,"{'mt':2,'color':28671, 'size': 6, 'xpos': 25, 'xalign': 1, 'ypos': 16, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"ScoreGameOverPlayer1",FormatNumber(Score(1),0),1,"{'mt':2,'color':28671, 'size': 6, 'xpos': 25, 'xalign': 1, 'ypos': 24, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"GameOverPlayer2","Player 2",1,"{'mt':2,'color':28671, 'size': 6, 'xpos': 75, 'xalign': 1, 'ypos': 16, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"ScoreGameOverPlayer2",FormatNumber(Score(2),0),1,"{'mt':2,'color':28671, 'size': 6, 'xpos': 75, 'xalign': 1, 'ypos': 24, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"GameOverPlayer3","Player 3",1,"{'mt':2,'color':28671, 'size': 6, 'xpos': 25, 'xalign': 1, 'ypos': 60, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"ScoreGameOverPlayer3",FormatNumber(Score(3),0),1,"{'mt':2,'color':28671, 'size': 6, 'xpos': 25, 'xalign': 1, 'ypos': 68, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"GameOverPlayer4","Player 4",1,"{'mt':2,'color':28671, 'size': 6, 'xpos': 75, 'xalign': 1, 'ypos': 60, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"ScoreGameOverPlayer4",FormatNumber(Score(4),0),1,"{'mt':2,'color':28671, 'size': 6, 'xpos': 75, 'xalign': 1, 'ypos': 68, 'yalign': 1}" ElseIf PlayersPlayingGame = 3 Then ' playmedia "3PGameOver.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PuPlayer.LabelSet pFullDMD,"GameOverPlayer1","Player 1",1,"{'mt':2,'color':28671, 'size': 6, 'xpos': 25, 'xalign': 1, 'ypos': 16, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"ScoreGameOverPlayer1",FormatNumber(Score(1),0),1,"{'mt':2,'color':28671, 'size': 6, 'xpos': 25, 'xalign': 1, 'ypos': 24, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"GameOverPlayer2","Player 2",1,"{'mt':2,'color':28671, 'size': 6, 'xpos': 75, 'xalign': 1, 'ypos': 16, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"ScoreGameOverPlayer2",FormatNumber(Score(2),0),1,"{'mt':2,'color':28671, 'size': 6, 'xpos': 75, 'xalign': 1, 'ypos': 24, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"GameOverPlayer3","Player 3",1,"{'mt':2,'color':28671, 'size': 6, 'xpos': 25, 'xalign': 1, 'ypos': 60, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"ScoreGameOverPlayer3",FormatNumber(Score(3),0),1,"{'mt':2,'color':28671, 'size': 6, 'xpos': 25, 'xalign': 1, 'ypos': 68, 'yalign': 1}" ElseIf PlayersPlayingGame = 2 Then ' playmedia "2PGameOver.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PuPlayer.LabelSet pFullDMD,"GameOverPlayer1","Player 1",1,"{'mt':2,'color':28671, 'size': 6, 'xpos': 25, 'xalign': 1, 'ypos': 16, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"ScoreGameOverPlayer1",FormatNumber(Score(1),0),1,"{'mt':2,'color':28671, 'size': 6, 'xpos': 25, 'xalign': 1, 'ypos': 24, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"GameOverPlayer2","Player 2",1,"{'mt':2,'color':28671, 'size': 6, 'xpos': 75, 'xalign': 1, 'ypos': 16, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"ScoreGameOverPlayer2",FormatNumber(Score(2),0),1,"{'mt':2,'color':28671, 'size': 6, 'xpos': 75, 'xalign': 1, 'ypos': 24, 'yalign': 1}" Else ' playmedia "1PGameOver.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PuPlayer.LabelSet pFullDMD,"GameOverPlayer1","Player 1",1,"{'mt':2,'color':28671, 'size': 6, 'xpos': 25, 'xalign': 1, 'ypos': 16, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"ScoreGameOverPlayer1",FormatNumber(Score(1),0),1,"{'mt':2,'color':28671, 'size': 6, 'xpos': 25, 'xalign': 1, 'ypos': 24, 'yalign': 1}" callout 418 End If Case 4 clearhslabels clearosblabels ' playmedia "overlay_blank.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PuPlayer.LabelSet pFullDMD,"AttractTitleL1","",1,"{'mt':2,'color':6655, 'size': 13, 'xpos': 50, 'xalign': 1, 'ypos': 21, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractNameL2","REPLAY AT",1,"{'mt':2,'color':28671, 'size': 15, 'xpos': 50, 'xalign': 1, 'ypos': 43, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractScoreL3",FormatNumber(ReplayAt,0),1,"{'mt':2,'color':28671, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 64, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractCreditsL4","FreePlay",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" Case 5 clearosblabels ' loadhs 'If Credits = 0 Then ' MessageCredits = "FreePlay" 'Else ' MessageCredits = "press start" 'End If MessageCredits = "press start" PuPlayer.LabelSet pFullDMD,"AttractTitleL1","",1,"{'mt':2,'color':6655, 'size': 13, 'xpos': 50, 'xalign': 1, 'ypos': 21, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractNameL2","FreePlay",1,"{'mt':2,'color':28671, 'size': 15, 'xpos': 50, 'xalign': 1, 'ypos': 43, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractScoreL3",MessageCredits,1,"{'mt':2,'color':28671, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 64, 'yalign': 1}" 'PuPlayer.LabelSet pFullDMD,"AttractCreditsL4","FreePlay",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" Case 6 clearosblabels ' playmedia "overlay_blank.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PuPlayer.LabelSet pFullDMD,"AttractTitleL1","grand champion",1,"{'mt':2,'color':6655, 'size': 13, 'xpos': 50, 'xalign': 1, 'ypos': 21, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractNameL2",HighScoreName(0),1,"{'mt':2,'color':28671, 'size': 15, 'xpos': 50, 'xalign': 1, 'ypos': 43, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractScoreL3",FormatNumber(HighScore(0),0),1,"{'mt':2,'color':28671, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 64, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractCreditsL4","FreePlay",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" Case 7 clearhslabels clearosblabels ' playmedia "overlay_blank.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PuPlayer.LabelSet pFullDMD,"AttractTitleL1","high score #1",1,"{'mt':2,'color':6655, 'size': 13, 'xpos': 50, 'xalign': 1, 'ypos': 21, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractNameL2",HighScoreName(1),1,"{'mt':2,'color':28671, 'size': 15, 'xpos': 50, 'xalign': 1, 'ypos': 43, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractScoreL3",FormatNumber(HighScore(1),0),1,"{'mt':2,'color':28671, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 64, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractCreditsL4","FreePlay",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" Case 8 clearhslabels clearosblabels ' playmedia "overlay_blank.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PuPlayer.LabelSet pFullDMD,"AttractTitleL1","high score #2",1,"{'mt':2,'color':6655, 'size': 13, 'xpos': 50, 'xalign': 1, 'ypos': 21, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractNameL2",HighScoreName(2),1,"{'mt':2,'color':28671, 'size': 15, 'xpos': 50, 'xalign': 1, 'ypos': 43, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractScoreL3",FormatNumber(HighScore(2),0),1,"{'mt':2,'color':28671, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 64, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractCreditsL4","FreePlay",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" Case 9 clearhslabels clearosblabels ' playmedia "overlay_blank.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PuPlayer.LabelSet pFullDMD,"AttractTitleL1","high score #3",1,"{'mt':2,'color':6655, 'size': 13, 'xpos': 50, 'xalign': 1, 'ypos': 21, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractNameL2",HighScoreName(3),1,"{'mt':2,'color':28671, 'size': 15, 'xpos': 50, 'xalign': 1, 'ypos': 43, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractScoreL3",FormatNumber(HighScore(3),0),1,"{'mt':2,'color':28671, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 64, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractCreditsL4","FreePlay",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" Case 10 clearhslabels clearosblabels ' playmedia "overlay_blank.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PuPlayer.LabelSet pFullDMD,"AttractTitleL1","high score #4",1,"{'mt':2,'color':6655, 'size': 13, 'xpos': 50, 'xalign': 1, 'ypos': 21, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractNameL2",HighScoreName(4),1,"{'mt':2,'color':28671, 'size': 15, 'xpos': 50, 'xalign': 1, 'ypos': 43, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractScoreL3",FormatNumber(HighScore(4),0),1,"{'mt':2,'color':28671, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 64, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractCreditsL4","FreePlay",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" Case 11 clearhslabels clearosblabels ' playmedia "overlay_blank.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PuPlayer.LabelSet pFullDMD,"AttractTitleL1","combo champion",1,"{'mt':2,'color':6655, 'size': 13, 'xpos': 50, 'xalign': 1, 'ypos': 21, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractNameL2",HighScoreComboChampionName,1,"{'mt':2,'color':28671, 'size': 15, 'xpos': 50, 'xalign': 1, 'ypos': 43, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractScoreL3",FormatNumber(HighScoreComboChampion,0),1,"{'mt':2,'color':28671, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 64, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractCreditsL4","FreePlay",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" Case 12 clearhslabels clearosblabels ' playmedia "overlay_blank.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PuPlayer.LabelSet pFullDMD,"AttractTitleL1","Knight Champion",1,"{'mt':2,'color':6655, 'size': 13, 'xpos': 50, 'xalign': 1, 'ypos': 21, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractNameL2",HighScoreKnightChampionName,1,"{'mt':2,'color':28671, 'size': 15, 'xpos': 50, 'xalign': 1, 'ypos': 43, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractScoreL3",FormatNumber(HighScoreKnightChampion,0),1,"{'mt':2,'color':28671, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 64, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractCreditsL4","FreePlay",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" Case 13 clearhslabels clearosblabels ' playmedia "overlay_blank.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PuPlayer.LabelSet pFullDMD,"AttractTitleL1","black castle champion",1,"{'mt':2,'color':6655, 'size': 13, 'xpos': 50, 'xalign': 1, 'ypos': 21, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractNameL2",HighScoreBlackCastleChampionName,1,"{'mt':2,'color':28671, 'size': 15, 'xpos': 50, 'xalign': 1, 'ypos': 43, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractScoreL3",FormatNumber(HighScoreBlackCastleChampion,0),1,"{'mt':2,'color':28671, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 64, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractCreditsL4","FreePlay",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" Case 14 clearhslabels clearosblabels ' playmedia "overlay_blank.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PuPlayer.LabelSet pFullDMD,"AttractTitleL1","loop champion",1,"{'mt':2,'color':6655, 'size': 13, 'xpos': 50, 'xalign': 1, 'ypos': 21, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractNameL2",HighScoreLoopChampionName,1,"{'mt':2,'color':28671, 'size': 15, 'xpos': 50, 'xalign': 1, 'ypos': 43, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractScoreL3",FormatNumber(HighScoreLoopChampion,0),1,"{'mt':2,'color':28671, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 64, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractCreditsL4","FreePlay",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" Case 15 clearhslabels clearosblabels ' playmedia "overlay_blank.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PuPlayer.LabelSet pFullDMD,"AttractTitleL1","war champion",1,"{'mt':2,'color':6655, 'size': 13, 'xpos': 50, 'xalign': 1, 'ypos': 21, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractNameL2",HighScoreWarChampionName,1,"{'mt':2,'color':28671, 'size': 15, 'xpos': 50, 'xalign': 1, 'ypos': 43, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractScoreL3",FormatNumber(HighScoreWarChampion,0),1,"{'mt':2,'color':28671, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 64, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractCreditsL4","FreePlay",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" Case 16 clearhslabels clearosblabels ' playmedia "overlay_blank.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PuPlayer.LabelSet pFullDMD,"AttractTitleL1","bonus champion",1,"{'mt':2,'color':6655, 'size': 13, 'xpos': 50, 'xalign': 1, 'ypos': 21, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractNameL2",HighScoreBonusChampionName,1,"{'mt':2,'color':28671, 'size': 15, 'xpos': 50, 'xalign': 1, 'ypos': 43, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractScoreL3",FormatNumber(HighScoreBonusChampion,0),1,"{'mt':2,'color':28671, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 64, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractCreditsL4","FreePlay",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" Case 17 clearhslabels clearosblabels ' playmedia "overlay_blank.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PuPlayer.LabelSet pFullDMD,"AttractTitleL1","triple knights mb champion",1,"{'mt':2,'color':6655, 'size': 13, 'xpos': 50, 'xalign': 1, 'ypos': 21, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractNameL2",HighScoreTripleKnightsMBChampionName,1,"{'mt':2,'color':28671, 'size': 15, 'xpos': 50, 'xalign': 1, 'ypos': 43, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractScoreL3",FormatNumber(HighScoreTripleKnightsMBChampion,0),1,"{'mt':2,'color':28671, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 64, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractCreditsL4","FreePlay",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" Case 18 clearhslabels clearosblabels ' playmedia "overlay_blank.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PuPlayer.LabelSet pFullDMD,"AttractTitleL1","catapult mb champion",1,"{'mt':2,'color':6655, 'size': 13, 'xpos': 50, 'xalign': 1, 'ypos': 21, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractNameL2",HighScoreCatapultMBChampionName,1,"{'mt':2,'color':28671, 'size': 15, 'xpos': 50, 'xalign': 1, 'ypos': 43, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractScoreL3",FormatNumber(HighScoreCatapultMBChampion,0),1,"{'mt':2,'color':28671, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 64, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractCreditsL4","FreePlay",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" Case 19 clearhslabels clearosblabels ' playmedia "overlay_blank.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PuPlayer.LabelSet pFullDMD,"AttractTitleL1","molten fire champion",1,"{'mt':2,'color':6655, 'size': 13, 'xpos': 50, 'xalign': 1, 'ypos': 21, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractNameL2",HighScoreMoltenFireChampionName,1,"{'mt':2,'color':28671, 'size': 15, 'xpos': 50, 'xalign': 1, 'ypos': 43, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractScoreL3",FormatNumber(HighScoreMoltenFireChampion,0),1,"{'mt':2,'color':28671, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 64, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractCreditsL4","FreePlay",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" Case 20 clearhslabels clearosblabels ' playmedia "overlay_blank.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PuPlayer.LabelSet pFullDMD,"AttractTitleL1","deep freeze champion",1,"{'mt':2,'color':6655, 'size': 13, 'xpos': 50, 'xalign': 1, 'ypos': 21, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractNameL2",HighScoreDeepFreezeChampionName,1,"{'mt':2,'color':28671, 'size': 15, 'xpos': 50, 'xalign': 1, 'ypos': 43, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractScoreL3",FormatNumber(HighScoreDeepFreezeChampion,0),1,"{'mt':2,'color':28671, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 64, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractCreditsL4","FreePlay",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" Case 21 clearhslabels clearosblabels ' playmedia "overlay_blank.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PuPlayer.LabelSet pFullDMD,"AttractTitleL1","mud bog champion",1,"{'mt':2,'color':6655, 'size': 13, 'xpos': 50, 'xalign': 1, 'ypos': 21, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractNameL2",HighScoreMudBogChampionName,1,"{'mt':2,'color':28671, 'size': 15, 'xpos': 50, 'xalign': 1, 'ypos': 43, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractScoreL3",FormatNumber(HighScoreMudBogChampion,0),1,"{'mt':2,'color':28671, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 64, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractCreditsL4","FreePlay",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" Case 22 clearhslabels clearosblabels ' playmedia "overlay_blank.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PuPlayer.LabelSet pFullDMD,"AttractTitleL1","wicked cavern champion",1,"{'mt':2,'color':6655, 'size': 13, 'xpos': 50, 'xalign': 1, 'ypos': 21, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractNameL2",HighScoreWickedCavernChampionName,1,"{'mt':2,'color':28671, 'size': 15, 'xpos': 50, 'xalign': 1, 'ypos': 43, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractScoreL3",FormatNumber(HighScoreWickedCavernChampion,0),1,"{'mt':2,'color':28671, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 64, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractCreditsL4","FreePlay",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" Case 23 clearhslabels clearosblabels ' playmedia "overlay_blank.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PuPlayer.LabelSet pFullDMD,"AttractTitleL1","Burning Sands Champion",1,"{'mt':2,'color':6655, 'size': 13, 'xpos': 50, 'xalign': 1, 'ypos': 21, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractNameL2",HighScoreBurningSandsChampionName,1,"{'mt':2,'color':28671, 'size': 15, 'xpos': 50, 'xalign': 1, 'ypos': 43, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractScoreL3",FormatNumber(HighScoreBurningSandsChampion,0),1,"{'mt':2,'color':28671, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 64, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractCreditsL4","FreePlay",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" Case 24 clearhslabels clearosblabels ' playmedia "overlay_blank.png","PuPOverlays",pFullDMD,"cineon",100,"",1,compteuri '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) PuPlayer.LabelSet pFullDMD,"AttractTitleL1","super champion",1,"{'mt':2,'color':6655, 'size': 13, 'xpos': 50, 'xalign': 1, 'ypos': 21, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractNameL2",HighScoreSuperChampionName,1,"{'mt':2,'color':28671, 'size': 15, 'xpos': 50, 'xalign': 1, 'ypos': 43, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractScoreL3",FormatNumber(HighScoreSuperChampion,0),1,"{'mt':2,'color':28671, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 64, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractCreditsL4","FreePlay",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" Case 25 clearhslabels clearosblabels DOF 499, DOFPulse DelayVideoAttract = 3 playclear pMusic ' Last Player --> Player 1 | 00 Case 26 clearhslabels clearosblabels playclear pMusic ' Last Player --> Player 1 | 00 dim attractlooprnd attractlooprnd=RndInt(1,6) 'select case attractlooprnd ' case 1:' playmedia "ATTRACT_LOOP1.mp4","Attract loop",pFullDMD,"cineon",100,"",1,compteuri : DelayVideoAttract = 18 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' case 2:' playmedia "ATTRACT_LOOP2.mp4","Attract loop",pFullDMD,"cineon",100,"",1,compteuri : DelayVideoAttract = 16 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' case 3:' playmedia "ATTRACT_LOOP3.mp4","Attract loop",pFullDMD,"cineon",100,"",1,compteuri : DelayVideoAttract = 16 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' case 4:' playmedia "ATTRACT_LOOP1_BW.mp4","Attract loop",pFullDMD,"cineon",100,"",1,compteuri : DelayVideoAttract = 18 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' case 5:' playmedia "ATTRACT_LOOP2_BW.mp4","Attract loop",pFullDMD,"cineon",100,"",1,compteuri : DelayVideoAttract = 16 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' case 6:' playmedia "ATTRACT_LOOP3_BW.mp4","Attract loop",pFullDMD,"cineon",100,"",1,compteuri : DelayVideoAttract = 16 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) 'end Select Case 27 clearhslabels clearosblabels playclear pMusic ' Last Player --> Player 1 | 00 dim tutopremrnd tutopremrnd=RndInt(1,4) 'select case tutopremrnd ' case 1:' playmedia "Black Knight Premium - Catapult Multiball.mp4","Tutorial Premium",pFullDMD,"cineon",100,"",1,compteuri : DelayVideoAttract = 35 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' case 2:' playmedia "Black Knight Premium - Lightning Wheel Modes.mp4","Tutorial Premium",pFullDMD,"cineon",100,"",1,compteuri : DelayVideoAttract = 46 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' case 3:' playmedia "Black Knight Premium - Triple Knights Challenge Multiball.mp4","Tutorial Premium",pFullDMD,"cineon",100,"",1,compteuri : DelayVideoAttract = 44 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' case 4:' playmedia "Black Knight Premium - War Hurry-ups.mp4","Tutorial Premium",pFullDMD,"cineon",100,"",1,compteuri : DelayVideoAttract = 55 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' 'end Select Case 28 playclear pBackglass introposition = 0 clearhslabels clearosblabels 'PuPlayer.playpause 4 '' playmedia "BlackKnight_AttractModeLoopingBG.mp4","Background looping",pFullDMD,"",53000,"",1,10 'DOF 504, DOFPulse playclear pMusic End Select End Sub sub clearosblabels PuPlayer.LabelSet pFullDMD,"AttractTitleL1","",1,"{'mt':2,'color':6655, 'size': 13, 'xpos': 50, 'xalign': 1, 'ypos': 21, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractNameL2","",1,"{'mt':2,'color':28671, 'size': 15, 'xpos': 50, 'xalign': 1, 'ypos': 43, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractScoreL3","",1,"{'mt':2,'color':28671, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 64, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"AttractCreditsL4","",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"GameOverPlayer1","",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"ScoreGameOverPlayer1","",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"GameOverPlayer2","",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"ScoreGameOverPlayer2","",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"GameOverPlayer3","",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"ScoreGameOverPlayer3","",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"GameOverPlayer4","",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" PuPlayer.LabelSet pFullDMD,"ScoreGameOverPlayer4","",1,"{'mt':2,'color':6655, 'size': 6, 'xpos': 50, 'xalign': 1, 'ypos': 90, 'yalign': 1}" end Sub sub clearhslabels PuPlayer.LabelSet pFullDMD,"HighScore","",1,"" PuPlayer.LabelSet pFullDMD,"HighScore2","",1,"" PuPlayer.LabelSet pFullDMD,"HighScoreL1","",1,"" PuPlayer.LabelSet pFullDMD,"HighScoreL2","",1,"" PuPlayer.LabelSet pFullDMD,"HighScoreL3","",1,"" PuPlayer.LabelSet pFullDMD,"HighScore","",1,"" PuPlayer.LabelSet pFullDMD,"HighScore2","",1,"" PuPlayer.LabelSet pFullDMD,"HighScoreL1","",1,"" PuPlayer.LabelSet pFullDMD,"HighScoreL2","",1,"" PuPlayer.LabelSet pFullDMD,"HighScoreL3","",1,"" PuPlayer.LabelSet pFullDMD,"high1name","",1,"" PuPlayer.LabelSet pFullDMD,"high1score","",1,"" PuPlayer.LabelSet pFullDMD,"high2name","",1,"" PuPlayer.LabelSet pFullDMD,"high2score","",1,"" PuPlayer.LabelSet pFullDMD,"high3name","",1,"" PuPlayer.LabelSet pFullDMD,"high3score","",1,"" PuPlayer.LabelSet pFullDMD,"high4name","",1,"" PuPlayer.LabelSet pFullDMD,"high4score","",1,"" PuPlayer.LabelSet pFullDMD,"high5name","",1,"" PuPlayer.LabelSet pFullDMD,"high5score","",1,"" end Sub Sub intromover_timer introtime = introtime + 1 If introposition = 1 Then If introtime = 1 Then DMDintroloop End If End If If introposition = 2 Then If introtime = 2 Then DMDintroloop End If End If If introposition = 3 Then If introtime = 5 Then DMDintroloop End If End If If introposition = 4 Then If introtime = 2 Then DMDintroloop End If End If If introposition = 5 Then If introtime = 3 Then DMDintroloop End If End If If introposition = 6 Then If introtime = 2 Then DMDintroloop End If End If If introposition = 7 Then If introtime = 2 Then DMDintroloop End If End If If introposition = 8 Then If introtime = 2 Then DMDintroloop End If End If If introposition = 9 Then If introtime = 2 Then DMDintroloop End If End If If introposition = 10 Then If introtime = 2 Then DMDintroloop End If End If If introposition = 11 Then If introtime = 2 Then DMDintroloop End If End If If introposition = 12 Then If introtime = 2 Then DMDintroloop End If End If If introposition = 13 Then If introtime = 2 Then DMDintroloop End If End If If introposition = 14 Then If introtime = 2 Then DMDintroloop End If End If If introposition = 15 Then If introtime = 2 Then DMDintroloop End If End If If introposition = 16 Then If introtime = 2 Then DMDintroloop End If End If If introposition = 17 Then If introtime = 2 Then DMDintroloop End If End If If introposition = 18 Then If introtime = 2 Then DMDintroloop End If End If If introposition = 19 Then If introtime = 2 Then DMDintroloop End If End If If introposition = 20 Then If introtime = 2 Then DMDintroloop End If End If If introposition = 21 Then If introtime = 2 Then DMDintroloop End If End If If introposition = 22 Then If introtime = 2 Then DMDintroloop End If End If If introposition = 23 Then If introtime = 2 Then DMDintroloop End If End If If introposition = 24 Then If introtime = 2 Then DMDintroloop End If End If If introposition = 25 Then If introtime = DelayVideoAttract Then DMDintroloop End If End If If introposition = 26 Then If introtime = DelayVideoAttract Then DMDintroloop End If End If If introposition = 27 Then If introtime = DelayVideoAttract Then DMDintroloop End If End If If introposition = 28 Then introposition = 0 DMDintroloop End If If introposition = 0 Then DMDintroloop End If End Sub 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' GAME STARTING & RESETS '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X ' Sub Game_Init() 'called at the start of a new game playclear pBackglass setlightvalues cineon = 0 Dim i For i = 1 to 4 ' L131.State(i) = 0 ' L132.State(i) = 0 ' L133.State(i) = 0 Next ' lrflashtime.Enabled = False PuPlayer.LabelSet pFullDMD,"high1name","",1,"" PuPlayer.LabelSet pFullDMD,"high1score","",1,"" PuPlayer.LabelSet pFullDMD,"high2name","",1,"" PuPlayer.LabelSet pFullDMD,"high2score","",1,"" PuPlayer.LabelSet pFullDMD,"high3name","",1,"" PuPlayer.LabelSet pFullDMD,"high3score","",1,"" PuPlayer.LabelSet pFullDMD,"high4name","",1,"" PuPlayer.LabelSet pFullDMD,"high4score","",1,"" PuPlayer.LabelShowPage pFullDMD,1,0,"" pUpdateScores PuPlayer.LabelSet pFullDMD,"Play1","PLAYER 1",1,"{'mt':2,'color':16777215}" PuPlayer.LabelSet pFullDMD,"notetitle","",1,"" PuPlayer.LabelSet pFullDMD,"notecopy","",1,"" resetbackglass clearosblabels clearhslabels 'PuPlayer.playlistplayex pFullDMD,"backglass","base.mp4",0,1 'should be an attract background (no text is displayed) 'PuPlayer.SetBackground pFullDMD,1 ActionWhenHitOneOfThreeWay End Sub Sub TurnOffPlayfieldLights() Dim a For each a in alights a.State = 0 Next End Sub Sub ResetNewBallLights() 'turn on or off the needed lights before a new ball is released TurnOffPlayfieldLights() End Sub Sub WickedCavernCheckLeft_Timer() WickedCavernCheckLeft.Enabled=False If WickedCavernCheckCountRandomLeft(CurrentPlayer) = 0 Then RandomL01(CurrentPlayer) = randomLeft WickedCavernCheckCountRandomLeft(CurrentPlayer) = WickedCavernCheckCountRandomLeft(CurrentPlayer) +1 CheckLamp.interval = 100 CheckLamp.Enabled = True ElseIf WickedCavernCheckCountRandomLeft(CurrentPlayer) = 1 Then If RandomL01(CurrentPlayer) = randomLeft Then WickedCavernRandomLeftLight Else RandomL02(CurrentPlayer) = randomLeft WickedCavernCheckCountRandomLeft(CurrentPlayer) = WickedCavernCheckCountRandomLeft(CurrentPlayer) +1 End If ElseIf WickedCavernCheckCountRandomLeft(CurrentPlayer) = 2 Then If RandomL01(CurrentPlayer) = randomLeft Or RandomL02(CurrentPlayer) = randomLeft Then WickedCavernRandomLeftLight Else RandomL03(CurrentPlayer) = randomLeft WickedCavernCheckCountRandomLeft(CurrentPlayer) = WickedCavernCheckCountRandomLeft(CurrentPlayer) +1 End If Else End If End Sub Sub WickedCavernCheckRight_Timer() WickedCavernCheckRight.Enabled=False If WickedCavernCheckCountRandomRight(CurrentPlayer) = 0 Then RandomR01(CurrentPlayer) = randomRight WickedCavernCheckCountRandomRight(CurrentPlayer) = WickedCavernCheckCountRandomRight(CurrentPlayer) +1 CheckLamp.interval = 100 CheckLamp.Enabled = True ElseIf WickedCavernCheckCountRandomRight(CurrentPlayer) = 1 Then If RandomR01(CurrentPlayer) = randomRight Then WickedCavernRandomRightLight Else RandomR02(CurrentPlayer) = randomRight WickedCavernCheckCountRandomRight(CurrentPlayer) = WickedCavernCheckCountRandomRight(CurrentPlayer) +1 End If ElseIf WickedCavernCheckCountRandomRight(CurrentPlayer) = 2 Then If RandomR01(CurrentPlayer) = randomRight Or RandomR02(CurrentPlayer) = randomRight Then WickedCavernRandomRightLight Else RandomR03(CurrentPlayer) = randomRight WickedCavernCheckCountRandomRight(CurrentPlayer) = WickedCavernCheckCountRandomRight(CurrentPlayer) +1 End If Else End If End Sub Sub WickedCavernRandomLeftLight if WickedCavernShots(CurrentPlayer) = 0 Then randomLeft = "L85":' Else Select Case Int(Rnd*4)+1 Case 1 : randomLeft = "L66":' Case 2 : randomLeft = "L75":' Case 3 : randomLeft = "L79":' Case 4 : randomLeft = "L85":' End Select End If WickedCavernCheckLeft.Enabled=True End Sub Sub WickedCavernRandomRightLight if WickedCavernShots(CurrentPlayer) = 0 Then randomRight = "L85":' Else Select Case Int(Rnd*4)+1 Case 1 : randomRight = "L85":' Case 2 : randomRight = "L91":' Case 3 : randomRight = "L98":' Case 4 : randomRight = "L106":' End Select End If WickedCavernCheckRight.Enabled=True End Sub Sub CheckLamp_timer() If MudBog(CurrentPlayer) <> 2 And MoltenFire(CurrentPlayer) <> 2 And BurningSands(CurrentPlayer) <> 2 And WickedCavern(CurrentPlayer) <> 2 And DeepFreeze(CurrentPlayer) <> 2 And BlackCastle(CurrentPlayer) <> 2 And BlackCastle(CurrentPlayer) <> 4 And CurrentMissionFlag(CurrentPlayer) = 1 Then CurrentMissionFlag(CurrentPlayer) = 0 'When The Current mission is not return to zero > Check and if Bad force to Zero End If 'if pmDebug = True Then PuPlayer.LabelSet pFullDMD,"curplayer","checkLamp",1,"" If MysteryFlag = True Then L96.State = 2 Else L96.State = 0 End If '******** Ball Saver & ExtraBall *********** If bBallSaverActive = True Then 'L14.State = 0 'L14.BlinkPattern="10" 'L14.BlinkInterval=125 L14.State = 2 'if pmDebug = True Then PuPlayer.LabelSet pFullDMD,"curplayer","Should be ON",1,"" ElseIf ExtraBallsAwards(CurrentPlayer) > 0 Then L14.State = 1 Else L14.State = 0 End If '******** ExtraBall Is Lit *********** If ExtraBallsIsLit = True Then L95.State = 1 Else L95.State = 0 End If '******** Super Is Lit *********** If SuperIsLit = True Then L88.State = 1 Else L88.State = 0 End If '******** Lite PowerSword ******** if PowerSwordLevel(CurrentPlayer)>=100 Then L89.state = 1 Else L89.state = 0 End if If PowerSwordActivated = True Then L89.state = 2 '******************************** Color corresponding to Super Mode ***************************************** ' rewritten to match the mode per level 1 Green, 2 Yellow, 3 red, 4 Magenta now in RestoreOverlay '--------->'29,35,41,47,53,59 Light the wheel If L29State = 1 Then L29.State = 2 if SuperTargetsLevel = 1 Then LightObjectColor(2).color = RGB(0, 255, 0) : LightObjectColor(2).colorfull = RGB(0, 255, 0) : End If if SuperTargetsLevel = 2 Then LightObjectColor(2).color = RGB(255, 255, 0) : LightObjectColor(2).colorfull = RGB(255, 255, 0) : End If if SuperTargetsLevel = 3 Then LightObjectColor(2).color = RGB(255, 0, 0) : LightObjectColor(2).colorfull = RGB(255, 0, 0) : End If if SuperTargetsLevel = 4 Then LightObjectColor(2).color = RGB(255, 0, 255) : LightObjectColor(2).colorfull = RGB(255, 0, 255) : End If Else L29.State = 0 End If If L35State = 1 Then L35.State = 2 if SuperSpinnerLevel = 1 Then LightObjectColor(4).color = RGB(0, 255, 0) : LightObjectColor(4).colorfull = RGB(0, 255, 0) : End If if SuperSpinnerLevel = 2 Then LightObjectColor(4).color = RGB(255, 255, 0) : LightObjectColor(4).colorfull = RGB(255, 255, 0) : End If if SuperSpinnerLevel = 3 Then LightObjectColor(4).color = RGB(255, 0, 0) : LightObjectColor(4).colorfull = RGB(255, 0, 0) : End If if SuperSpinnerLevel = 4 Then LightObjectColor(4).color = RGB(255, 0, 255) : LightObjectColor(4).colorfull = RGB(255, 0, 255) : End If Else L35.State = 0 End If If L41State = 1 Then L41.State = 2 if SuperPopsLevel = 1 Then LightObjectColor(6).color = RGB(0, 255, 0) : LightObjectColor(6).colorfull = RGB(0, 255, 0) : End If if SuperPopsLevel = 2 Then LightObjectColor(6).color = RGB(255, 255, 0) : LightObjectColor(6).colorfull = RGB(255, 255, 0) : End If if SuperPopsLevel = 3 Then LightObjectColor(6).color = RGB(255, 0, 0) : LightObjectColor(6).colorfull = RGB(255, 0, 0) : End If if SuperPopsLevel = 4 Then LightObjectColor(6).color = RGB(255, 0, 255) : LightObjectColor(6).colorfull = RGB(255, 0, 255) : End If Else L41.State = 0 End If If L47State = 1 Then L47.State = 2 if SuperOrbitsLevel = 1 Then LightObjectColor(8).color = RGB(0, 255, 0) : LightObjectColor(8).colorfull = RGB(0, 255, 0) : End If if SuperOrbitsLevel = 2 Then LightObjectColor(8).color = RGB(255, 255, 0) : LightObjectColor(8).colorfull = RGB(255, 255, 0) : End If if SuperOrbitsLevel = 3 Then LightObjectColor(8).color = RGB(255, 0, 0) : LightObjectColor(8).colorfull = RGB(255, 0, 0) : End If if SuperOrbitsLevel = 4 Then LightObjectColor(8).color = RGB(255, 0, 255) : LightObjectColor(8).colorfull = RGB(255, 0, 255) : End If Else L47.State = 0 End If If L53State = 1 Then L53.State = 2 if SuperLanesLevel = 1 Then LightObjectColor(10).color = RGB(0, 255, 0) : LightObjectColor(10).colorfull = RGB(0, 255, 0) : End If if SuperLanesLevel = 2 Then LightObjectColor(10).color = RGB(255, 255, 0) : LightObjectColor(10).colorfull = RGB(255, 255, 0) : End If if SuperLanesLevel = 3 Then LightObjectColor(10).color = RGB(255, 0, 0) : LightObjectColor(10).colorfull = RGB(255, 0, 0) : End If if SuperLanesLevel = 4 Then LightObjectColor(10).color = RGB(255, 0, 255) : LightObjectColor(10).colorfull = RGB(255, 0, 255) : End If Else L53.State = 0 End If If L59State = 1 Then L59.State = 2 if SuperSlingsLevel = 1 Then LightObjectColor(12).color = RGB(0, 255, 0) : LightObjectColor(12).colorfull = RGB(0, 255, 0) : End If if SuperSlingsLevel = 2 Then LightObjectColor(12).color = RGB(255, 255, 0) : LightObjectColor(12).colorfull = RGB(255, 255, 0) : End If if SuperSlingsLevel = 3 Then LightObjectColor(12).color = RGB(255, 0, 0) : LightObjectColor(12).colorfull = RGB(255, 0, 0) : End If if SuperSlingsLevel = 4 Then LightObjectColor(12).color = RGB(255, 0, 255) : LightObjectColor(12).colorfull = RGB(255, 0, 255) : End If Else L59.State = 0 End If '************************************************************************************************************ '******************** Restore speed Lightning **************************************************************** If RedColorOnly = False Then LightObjectColor(1).color = RGB(0, 255, 0) : LightObjectColor(1).colorfull = RGB(0, 255, 0) : 'MudBog = 1 LightObjectColor(3).color = RGB(255, 50, 0) : LightObjectColor(3).colorfull = RGB(255, 50, 0) : 'MoltenFire = 1 LightObjectColor(5).color = RGB(255, 255, 0) : LightObjectColor(5).colorfull = RGB(255, 255, 0): 'BurningSands = 1 LightObjectColor(7).color = RGB(255, 0, 0) : LightObjectColor(7).colorfull = RGB(255, 0, 0) : 'WickedCavern = 1 LightObjectColor(9).color = RGB(0, 0, 255) : LightObjectColor(9).colorfull = RGB(0, 0, 255) : 'DeepFreeze = 1 LightObjectColor(11).color = RGB(255, 0, 255) : LightObjectColor(11).colorfull = RGB(255, 0, 255) : 'BlackCastle = 1 End If LightObjectColor(1).Intensity= 50 LightObjectColor(2).Intensity= 50 LightObjectColor(3).Intensity= 50 LightObjectColor(4).Intensity= 50 LightObjectColor(5).Intensity= 50 LightObjectColor(6).Intensity= 50 LightObjectColor(7).Intensity= 50 LightObjectColor(8).Intensity= 50 LightObjectColor(9).Intensity= 50 LightObjectColor(10).Intensity= 50 LightObjectColor(11).Intensity= 50 LightObjectColor(12).Intensity= 50 LightObjectColor(1).FadeSpeedDown = LightObjectColor(1).Intensity / 10 LightObjectColor(2).FadeSpeedDown = LightObjectColor(2).Intensity / 10 LightObjectColor(3).FadeSpeedDown = LightObjectColor(3).Intensity / 10 LightObjectColor(4).FadeSpeedDown = LightObjectColor(4).Intensity / 10 LightObjectColor(5).FadeSpeedDown = LightObjectColor(5).Intensity / 10 LightObjectColor(6).FadeSpeedDown = LightObjectColor(6).Intensity / 10 LightObjectColor(7).FadeSpeedDown = LightObjectColor(7).Intensity / 10 LightObjectColor(8).FadeSpeedDown = LightObjectColor(8).Intensity / 10 LightObjectColor(9).FadeSpeedDown = LightObjectColor(9).Intensity / 10 LightObjectColor(10).FadeSpeedDown = LightObjectColor(10).Intensity / 10 LightObjectColor(11).FadeSpeedDown = LightObjectColor(11).Intensity / 10 LightObjectColor(12).FadeSpeedDown = LightObjectColor(12).Intensity / 10 '******************** Knight lock lit *********************************************************************** If Knight_challenge(CurrentPlayer) = 0 Then L101.State=2:L94.State=0: End If If Knight_challenge(CurrentPlayer) = 1 Then L94.State = 2:L101.State=0:End If If Knight_challenge(CurrentPlayer) = 2 Then L101.State = 2:L94.State=0:End If If Knight_challenge(CurrentPlayer) = 3 Then L94.State = 2:L101.State=0:End If If Knight_challenge(CurrentPlayer) = 4 Then L101.State = 2:L94.State=0:End If If Knight_challenge(CurrentPlayer) = 5 Then L94.State = 2:L101.State=0:End If If Knight_challenge(CurrentPlayer) = 6 Then L101.State = 2:L94.State=0:End If '***************************************************************************************************** RemainingHit(CurrentPlayer) = HitsToActivateMission(CurrentPlayer) - NumberOfHitForStartMission(CurrentPlayer) RemainingHit(CurrentPlayer) = RemainingHit(CurrentPlayer) Mod 4 If RemainingHit(CurrentPlayer) = 0 Or RemainingHit(CurrentPlayer) = 4 Then ' RED L79.color = RGB(255, 0, 0) L79.colorfull = RGB(255, 0, 0) L85.color = RGB(255, 0, 0) L85.colorfull = RGB(255, 0, 0) L91.color = RGB(255, 0, 0) L91.colorfull = RGB(255, 0, 0) End If If RemainingHit(CurrentPlayer) = 1 Or RemainingHit(CurrentPlayer) = 5 Then ' ORANGE L79.color = RGB(255, 50, 0) L79.colorfull = RGB(255, 50, 0) L85.color = RGB(255, 50, 0) L85.colorfull = RGB(255, 50, 0) L91.color = RGB(255, 50, 0) L91.colorfull = RGB(255, 50, 0) End If If RemainingHit(CurrentPlayer) = 2 Or RemainingHit(CurrentPlayer) = 6 Then ' YELLOW L79.color = RGB(255, 255, 0) L79.colorfull = RGB(255, 255, 0) L85.color = RGB(255, 255, 0) L85.colorfull = RGB(255, 255, 0) L91.color = RGB(255, 255, 0) L91.colorfull = RGB(255, 255, 0) End If If RemainingHit(CurrentPlayer) = 3 Or RemainingHit(CurrentPlayer) = 7 Then ' GRREN L79.color = RGB(0, 255, 0) L79.colorfull = RGB(0, 255, 0) L85.color = RGB(0, 255, 0) L85.colorfull = RGB(0, 255, 0) L91.color = RGB(0, 255, 0) L91.colorfull = RGB(0, 255, 0) End If If LightsequenceAnimation.Enabled = False Then If RampChangeStatus(CurrentPlayer) <> RampLightsMove(CurrentPlayer) Then RampLightsBlinkInterval = 125 RampLightsState = 2 If RampLightsMove(CurrentPlayer) = "Blinking" Then Light055.BlinkPattern="10" Light059.BlinkPattern="10" Light054.BlinkPattern="10" Light060.BlinkPattern="10" Light056.BlinkPattern="10" Light061.BlinkPattern="10" Light057.BlinkPattern="10" Light058.BlinkPattern="10" Light062.BlinkPattern="10" Light063.BlinkPattern="10" RampLightsBlinkInterval = 125 RampLightsState = 2 L85.BlinkPattern="10" L91.BlinkPattern="10" L79.BlinkPattern="10" L85.State = 2 L91.State = 2 L79.State = 2 L83.State = 0 L82.State = 0 L66.State = 0 L75.State = 0 'L79.State = 0 'L85.State = 0 'L91.State = 0 L98.State = 0 L106.State = 0 L85.BlinkInterval=125 L91.BlinkInterval=125 L79.BlinkInterval=125 RampChangeStatus(CurrentPlayer) = "Blinking" End If If RampLightsMove(CurrentPlayer) = "UP" Then L79.color = RGB(255, 0, 0) L79.colorfull = RGB(255, 0, 0) L85.color = RGB(255, 0, 0) L85.colorfull = RGB(255, 0, 0) L91.color = RGB(255, 0, 0) L91.colorfull = RGB(255, 0, 0) Light055.BlinkPattern="00010000" Light059.BlinkPattern="00010000" Light054.BlinkPattern="00001000" Light060.BlinkPattern="00001000" Light056.BlinkPattern="00000100" Light061.BlinkPattern="00000100" Light057.BlinkPattern="00000010" Light058.BlinkPattern="00000010" Light062.BlinkPattern="00000001" Light063.BlinkPattern="00000001" L79.color = RGB(18, 0, 0) L79.colorfull = RGB(255, 0, 0) RampLightsBlinkInterval = 125 RampLightsState = 2 L83.BlinkPattern="10000000" L82.BlinkPattern="01000000" L79.BlinkPattern="00100000" L83.State = 2 L82.State = 2 L79.State = 2 L85.State = 0 L91.State = 0 L66.State = 0 L75.State = 0 L98.State = 0 L106.State = 0 L83.BlinkInterval=125 L82.BlinkInterval=125 L79.BlinkInterval=125 RampChangeStatus(CurrentPlayer) = "UP" End If If RampLightsMove(CurrentPlayer) = "DOWN" Then Light055.BlinkPattern="00001" Light059.BlinkPattern="00001" Light054.BlinkPattern="00010" Light060.BlinkPattern="00010" Light056.BlinkPattern="00100" Light061.BlinkPattern="00100" Light057.BlinkPattern="01000" Light058.BlinkPattern="01000" Light062.BlinkPattern="10000" Light063.BlinkPattern="10000" RampLightsBlinkInterval = 125 RampLightsState = 2 RampChangeStatus(CurrentPlayer) = "Down" End If If RampLightsMove(CurrentPlayer) = "OFF" Then RampLightsState = 0 RampChangeStatus(CurrentPlayer) = "OFF" End If If RampLightsMove(CurrentPlayer) = "ShieldReadyForMonster" Then Light055.BlinkPattern="10" Light059.BlinkPattern="10" Light054.BlinkPattern="10" Light060.BlinkPattern="10" Light056.BlinkPattern="10" Light061.BlinkPattern="10" Light057.BlinkPattern="10" Light058.BlinkPattern="10" Light062.BlinkPattern="10" Light063.BlinkPattern="10" RampLightsBlinkInterval = 125 RampLightsState = 2 L91.color = RGB(18, 0, 0) L91.colorfull = RGB(255, 0, 0) If MissionRandom = "MudBog" Then L91.color = RGB(0, 255, 0) L91.colorfull = RGB(0, 255, 0) End If If MissionRandom = "MoltenFire" Then L91.color = RGB(255, 128, 0) L91.colorfull = RGB(255, 128, 0) End If If MissionRandom = "BurningSands" Then L91.color = RGB(255, 255, 0) L91.colorfull = RGB(255, 255, 0) End If If MissionRandom = "WickedCavern" Then L91.color = RGB(255, 0, 0) L91.colorfull = RGB(255, 0, 0) End If If MissionRandom = "DeepFreeze" Then L91.color = RGB(0, 0, 255) L91.colorfull = RGB(0, 0, 255) End If If MissionRandom = "BlackCastle" Then L91.color = RGB(255, 0, 255) L91.colorfull = RGB(255, 0, 255) End If L83.State = 0 L82.State = 0 L79.State = 0 L85.State = 0 L91.State = 2 L66.State = 0 L75.State = 0 L98.State = 0 L106.State = 0 L91.BlinkInterval=125 RampChangeStatus(CurrentPlayer) = "ShieldReadyForMonster" End If On Error Resume Next Dim r For each r in RampLights r.State = RampLightsState r.BlinkInterval=RampLightsBlinkInterval Next End If If RedColorOnly = False Then 'dim LightObjectGreen(12) LightObjectColor(1).color = RGB(0, 255, 0) : LightObjectColor(1).colorfull = RGB(0, 255, 0) : 'MudBog = 1 LightObjectColor(3).color = RGB(255, 50, 0) : LightObjectColor(3).colorfull = RGB(255, 50, 0) : 'MoltenFire = 1 LightObjectColor(5).color = RGB(255, 255, 0) : LightObjectColor(5).colorfull = RGB(255, 255, 0): 'BurningSands = 1 LightObjectColor(7).color = RGB(255, 0, 0) : LightObjectColor(7).colorfull = RGB(255, 0, 0) : 'WickedCavern = 1 LightObjectColor(9).color = RGB(0, 0, 255) : LightObjectColor(9).colorfull = RGB(0, 0, 255) : 'DeepFreeze = 1 LightObjectColor(11).color = RGB(255, 0, 255) : LightObjectColor(11).colorfull = RGB(255, 0, 255) : 'BlackCastle = 1 End If If MudBog(CurrentPlayer) = 1 Then LightObjectColor(1).state=2:LightObjectColor(1).BlinkPattern=10:LightObjectColor(1).BlinkInterval=125 End If If MudBog(CurrentPlayer) = 2 Then LightObjectColor(1).state=2:LightObjectColor(1).BlinkPattern =10:LightObjectColor(1).BlinkInterval=50 End If If MudBog(CurrentPlayer) = 3 Then If LightObjectColor(1).state<>2 Then LightObjectColor(1).state=2:LightObjectColor(1).BlinkPattern =1111100:LightObjectColor(1).BlinkInterval=200 End If End If If MudBog(CurrentPlayer) = 4 Then LightObjectColor(1).state=1 End If If MoltenFire(CurrentPlayer) = 1 Then LightObjectColor(3).state=2:LightObjectColor(3).BlinkPattern=10:LightObjectColor(3).BlinkInterval=125 End If If MoltenFire(CurrentPlayer) = 2 Then LightObjectColor(3).state=2:LightObjectColor(3).BlinkPattern =10:LightObjectColor(3).BlinkInterval=50 End If If MoltenFire(CurrentPlayer) = 3 Then If LightObjectColor(3).state<>2 Then LightObjectColor(3).state=2:LightObjectColor(3).BlinkPattern =1111100:LightObjectColor(3).BlinkInterval=200 End If End If If MoltenFire(CurrentPlayer) = 4 Then LightObjectColor(3).state=1 End If If BurningSands(CurrentPlayer) = 1 Then LightObjectColor(5).state=2:LightObjectColor(5).BlinkPattern=10:LightObjectColor(5).BlinkInterval=125 End If If BurningSands(CurrentPlayer) = 2 Then LightObjectColor(5).state=2:LightObjectColor(5).BlinkPattern=10:LightObjectColor(5).BlinkInterval=50 End If If BurningSands(CurrentPlayer) = 3 Then If LightObjectColor(5).state<>2 Then LightObjectColor(5).state=2:LightObjectColor(5).BlinkPattern=1111100:LightObjectColor(5).BlinkInterval=200 End If End If If BurningSands(CurrentPlayer) = 4 Then LightObjectColor(5).state=1 End If If WickedCavern(CurrentPlayer) = 1 Then LightObjectColor(7).state=2:LightObjectColor(7).BlinkPattern=10:LightObjectColor(7).BlinkInterval=125 End If If WickedCavern(CurrentPlayer) = 2 Then LightObjectColor(7).state=2:LightObjectColor(7).BlinkPattern=10:LightObjectColor(7).BlinkInterval=50 End If If WickedCavern(CurrentPlayer) = 3 Then If LightObjectColor(7).state<>2 Then LightObjectColor(7).state=2:LightObjectColor(7).BlinkPattern=1111100:LightObjectColor(7).BlinkInterval=200 End If End If If WickedCavern(CurrentPlayer) = 4 Then LightObjectColor(7).state=1 End If If DeepFreeze(CurrentPlayer) = 1 Then LightObjectColor(9).state=2:LightObjectColor(9).BlinkPattern=10:LightObjectColor(9).BlinkInterval=125 End If If DeepFreeze(CurrentPlayer) = 2 Then LightObjectColor(9).state=2:LightObjectColor(9).BlinkPattern=10:LightObjectColor(9).BlinkInterval=50 End If If DeepFreeze(CurrentPlayer) = 3 Then If LightObjectColor(9).state<>2 Then LightObjectColor(9).state=2:LightObjectColor(9).BlinkPattern=1111100:LightObjectColor(9).BlinkInterval=200 End If End If If DeepFreeze(CurrentPlayer) = 4 Then LightObjectColor(9).state=1 End If If BlackCastle(CurrentPlayer) = 1 Then LightObjectColor(11).state=2:LightObjectColor(11).BlinkPattern=10:LightObjectColor(11).BlinkInterval=125 End If If BlackCastle(CurrentPlayer) = 2 Then LightObjectColor(11).state=2:LightObjectColor(11).BlinkPattern=10:LightObjectColor(11).BlinkInterval=50 End If If BlackCastle(CurrentPlayer) = 3 Then If LightObjectColor(11).state<>2 Then LightObjectColor(11).state=2:LightObjectColor(11).BlinkPattern=1111100:LightObjectColor(11).BlinkInterval=200 End If End If If BlackCastle(CurrentPlayer) = 4 Then LightObjectColor(11).state=1 End If End If If KnightLamp(CurrentPlayer) = 0 Then L18.state=0 : L19.state=0 : L20.state=0 : L21.state=0 : L22.state=0 : L23.state=0 : End If 'Nothing If KnightLamp(CurrentPlayer) = 2 Then L18.state=1 : L19.state=0 : L20.state=0 : L21.state=0 : L22.state=0 : L23.state=0: End If 'K If KnightLamp(CurrentPlayer) = 4 Then L18.state=1 : L19.state=1 : L20.state=0 : L21.state=0 : L22.state=0 : L23.state=0: End If 'N If KnightLamp(CurrentPlayer) = 6 Then L18.state=1 : L19.state=1 : L20.state=1 : L21.state=0 : L22.state=0 : L23.state=0: End If 'I If KnightLamp(CurrentPlayer) = 8 Then L18.state=1 : L19.state=1 : L20.state=1 : L21.state=1 : L22.state=0 : L23.state=0: End If 'G If KnightLamp(CurrentPlayer) = 10 Then L18.state=1 : L19.state=1 : L20.state=1 : L21.state=1 : L22.state=1 : L23.state=0: End If 'H If KnightLamp(CurrentPlayer) = 12 Then L18.state=1 : L19.state=1 : L20.state=1 : L21.state=1 : L22.state=1 : L23.state=1: End If 'T 'If KnightLamp = 7 Then L18.state=1 : L19.state=1 : L20.state=1 : L21.state=1 : L22.state=1 : L23.state=1: End If If catapult_lock_is_lit(CurrentPlayer) = True AND CatapultModeFlag = False Then If BallInCatapult(CurrentPlayer) = 0 Then L131.state = 2 L132.state = 0 L133.state = 0 End If If BallInCatapult(CurrentPlayer) = 1 Then L131.state = 1 L132.state = 2 L133.state = 0 End If If BallInCatapult(CurrentPlayer) = 2 Then L131.state = 1 L132.state = 1 L133.state = 2 End If If BallInCatapult(CurrentPlayer) = 3 Then L131.state = 1 L132.state = 1 L133.state = 1 End If Elseif CatapultModeFlag = False Then L131.state = 0 L132.state = 0 L133.state = 0 End If If MudBog(CurrentPlayer) = 2 Then '*********************** Set Light Color for MudBog ******************************************************* L66.color = RGB(0, 255, 0) L66.colorfull = RGB(0, 255, 0) L75.color = RGB(0, 255, 0) L75.colorfull = RGB(0, 255, 0) L79.color = RGB(0, 255, 0) L79.colorfull = RGB(0, 255, 0) L98.color = RGB(0, 255, 0) L98.colorfull = RGB(0, 255, 0) L106.color = RGB(0, 255, 0) L106.colorfull = RGB(0, 255, 0) L66color(CurrentPlayer) = "green" L75color(CurrentPlayer) = "green" L79color(CurrentPlayer) = "green" L85color(CurrentPlayer) = "green" L91color(CurrentPlayer) = "green" L98color(CurrentPlayer) = "green" L106color(CurrentPlayer)= "green" ' If MudBogHeadsCounter(CurrentPlayer) < 4 Then '*********************** Start Mission - Set Light for MudBog ******************************** ' L66State(CurrentPlayer) = 2 ' L75State(CurrentPlayer) = 2 ' L79State(CurrentPlayer) = 2 ' L85State(CurrentPlayer) = 0 ' L91State(CurrentPlayer) = 0 ' L98State(CurrentPlayer) = 2 ' L106State(CurrentPlayer) = 2 ' End If End If If MoltenFire(CurrentPlayer) = 2 Then '*********************** Set Light Color for MoltenFire ******************************************************* L66.color = RGB(255, 50, 0) L66.colorfull = RGB(255, 50, 0) L75.color = RGB(255, 50, 0) L75.colorfull = RGB(255, 50, 0) L79.color = RGB(255, 50, 0) L79.colorfull = RGB(255, 50, 0) L85.color = RGB(255, 50, 0) L85.colorfull = RGB(255, 50, 0) L91.color = RGB(255, 50, 0) L91.colorfull = RGB(255, 50, 0) L98.color = RGB(255, 50, 0) L98.colorfull = RGB(255, 50, 0) L106.color = RGB(255, 50, 0) L106.colorfull = RGB(255, 50, 0) L66color(CurrentPlayer) = "orange" L75color(CurrentPlayer) = "orange" L79color(CurrentPlayer) = "orange" L85color(CurrentPlayer) = "orange" L91color(CurrentPlayer) = "orange" L98color(CurrentPlayer) = "orange" L106color(CurrentPlayer)= "orange" 'L79.BlinkPattern="10" 'L79.BlinkInterval = 125 'L79.state = 2 ' If MoltenFireShots(CurrentPlayer) = 0 Then '*********************** Start Mission - Set Light for MoltenFire Set on start***************** ' check if all lights out if so light all up again if L66.State = 0 and L75.State = 0 and L79.State = 0 and L85.State = 0 and L91.State = 0 and L98.State = 0 and L106.State = 0 Then L66State(CurrentPlayer) = 2 L75State(CurrentPlayer) = 2 L79State(CurrentPlayer) = 2 L85State(CurrentPlayer) = 2 L91State(CurrentPlayer) = 2 L98State(CurrentPlayer) = 2 L106State(CurrentPlayer) = 2 End If End If If BurningSands(CurrentPlayer) = 2 Then '*********************** Set Light Color for BurningSands ******************************************************* if PowerSwordActivated = true then BurningSandsLightMovementNumber = 3 L66.color = RGB(255, 255, 0) L66.colorfull = RGB(255, 255, 0) L75.color = RGB(255, 255, 0) L75.colorfull = RGB(255, 255, 0) L79.color = RGB(255, 255, 0) L79.colorfull = RGB(255, 255, 0) L85.color = RGB(255, 255, 0) L85.colorfull = RGB(255, 255, 0) L91.color = RGB(255, 255, 0) L91.colorfull = RGB(255, 255, 0) L98.color = RGB(255, 255, 0) L98.colorfull = RGB(255, 255, 0) L106.color = RGB(255, 255, 0) L106.colorfull = RGB(255, 255, 0) L66color(CurrentPlayer) = "yellow" L75color(CurrentPlayer) = "yellow" L79color(CurrentPlayer) = "yellow" L85color(CurrentPlayer) = "yellow" L91color(CurrentPlayer) = "yellow" L98color(CurrentPlayer) = "yellow" L106color(CurrentPlayer)= "yellow" 'L79.BlinkPattern="10" 'L79.BlinkInterval = 125 'L79.state = 2 If BurningSandsLightMovementNumber = 1 And BurningSandsHit = 0 Then '*********************** Start Light Animation Mission - Set Light for BurningSands ******************************** L66State(CurrentPlayer) = 2 L75State(CurrentPlayer) = 2 L79State(CurrentPlayer) = 2 L85State(CurrentPlayer) = 0 L91State(CurrentPlayer) = 0 L98State(CurrentPlayer) = 0 L106State(CurrentPlayer) = 0 End If If BurningSandsLightMovementNumber = 2 And BurningSandsHit = 0 Then L66State(CurrentPlayer) = 0 L75State(CurrentPlayer) = 2 L79State(CurrentPlayer) = 2 L85State(CurrentPlayer) = 2 L91State(CurrentPlayer) = 0 L98State(CurrentPlayer) = 0 L106State(CurrentPlayer) = 0 End If If BurningSandsLightMovementNumber = 3 And BurningSandsHit = 0 Then L66State(CurrentPlayer) = 0 L75State(CurrentPlayer) = 0 L79State(CurrentPlayer) = 2 L85State(CurrentPlayer) = 2 L91State(CurrentPlayer) = 2 L98State(CurrentPlayer) = 0 L106State(CurrentPlayer) = 0 End If If BurningSandsLightMovementNumber = 4 And BurningSandsHit = 0 Then L66State(CurrentPlayer) = 0 L75State(CurrentPlayer) = 0 L79State(CurrentPlayer) = 0 L85State(CurrentPlayer) = 2 L91State(CurrentPlayer) = 2 L98State(CurrentPlayer) = 2 L106State(CurrentPlayer) = 0 End If If BurningSandsLightMovementNumber = 5 And BurningSandsHit = 0 Then L66State(CurrentPlayer) = 0 L75State(CurrentPlayer) = 0 L79State(CurrentPlayer) = 0 L85State(CurrentPlayer) = 0 L91State(CurrentPlayer) = 2 L98State(CurrentPlayer) = 2 L106State(CurrentPlayer) = 2 End If If BurningSandsLightMovementNumber = 6 And BurningSandsHit = 0 Then L66State(CurrentPlayer) = 0 L75State(CurrentPlayer) = 0 L79State(CurrentPlayer) = 0 L85State(CurrentPlayer) = 2 L91State(CurrentPlayer) = 2 L98State(CurrentPlayer) = 2 L106State(CurrentPlayer) = 0 End If If BurningSandsLightMovementNumber = 7 And BurningSandsHit = 0 Then L66State(CurrentPlayer) = 0 L75State(CurrentPlayer) = 0 L79State(CurrentPlayer) = 2 L85State(CurrentPlayer) = 2 L91State(CurrentPlayer) = 2 L98State(CurrentPlayer) = 0 L106State(CurrentPlayer) = 0 End If If BurningSandsLightMovementNumber = 8 And BurningSandsHit = 0 Then L66State(CurrentPlayer) = 0 L75State(CurrentPlayer) = 2 L79State(CurrentPlayer) = 2 L85State(CurrentPlayer) = 2 L91State(CurrentPlayer) = 0 L98State(CurrentPlayer) = 0 L106State(CurrentPlayer) = 0 End If End If If WickedCavern(CurrentPlayer) = 2 Then '*********************** Set Light Color for WickedCavern ******************************************************* L66.color = RGB(255, 0, 0) L66.colorfull = RGB(255, 0, 0) L75.color = RGB(255, 0, 0) L75.colorfull = RGB(255, 0, 0) L79.color = RGB(255, 0, 0) L79.colorfull = RGB(255, 0, 0) L85.color = RGB(255, 0, 0) L85.colorfull = RGB(255, 0, 0) L91.color = RGB(255, 0, 0) L91.colorfull = RGB(255, 0, 0) L98.color = RGB(255, 0, 0) L98.colorfull = RGB(255, 0, 0) L106.color = RGB(255, 0, 0) L106.colorfull = RGB(255, 0, 0) L66color(CurrentPlayer) = "red" L75color(CurrentPlayer) = "red" L79color(CurrentPlayer) = "red" L85color(CurrentPlayer) = "red" L91color(CurrentPlayer) = "red" L98color(CurrentPlayer) = "red" L106color(CurrentPlayer)= "red" 'L79.BlinkPattern="10" 'L79.BlinkInterval = 125 'L79.state = 2 '********************** WickedCavern ************************************ 'If WickedCavernShots(CurrentPlayer) = 0 And RandomL01(CurrentPlayer) = "" Then if RandomL01(CurrentPlayer) = "" Then If RandomR01(CurrentPlayer) = "" Then MissionHit 0 End If End If If WickedCavernLeftOrRightOld = "left" Then If RandomL01(CurrentPlayer) = "L66" Or RandomL02(CurrentPlayer) = "L66" Or RandomL03(CurrentPlayer) = "L66" Then L66State(CurrentPlayer)=2:L91State(CurrentPlayer) = 0:L98State(CurrentPlayer) = 0:L106State(CurrentPlayer) = 0:End If If RandomL01(CurrentPlayer) = "L75" Or RandomL02(CurrentPlayer) = "L75" Or RandomL03(CurrentPlayer) = "L75" Then L75State(CurrentPlayer)=2:L91State(CurrentPlayer) = 0:L98State(CurrentPlayer) = 0:L106State(CurrentPlayer) = 0:End If If RandomL01(CurrentPlayer) = "L79" Or RandomL02(CurrentPlayer) = "L79" Or RandomL03(CurrentPlayer) = "L79" Then L79State(CurrentPlayer)=2:L91State(CurrentPlayer) = 0:L98State(CurrentPlayer) = 0:L106State(CurrentPlayer) = 0:End If If RandomL01(CurrentPlayer) = "L85" Or RandomL02(CurrentPlayer) = "L85" Or RandomL03(CurrentPlayer) = "L85" Then L85State(CurrentPlayer)=2:L91State(CurrentPlayer) = 0:L98State(CurrentPlayer) = 0:L106State(CurrentPlayer) = 0:End If If WickedCavernCheckCountRandomLeft(CurrentPlayer) = 4 Then L66State(CurrentPlayer) = 2 L75State(CurrentPlayer) = 2 L79State(CurrentPlayer) = 2 L85State(CurrentPlayer) = 2 L91State(CurrentPlayer) = 0 L98State(CurrentPlayer) = 0 L106State(CurrentPlayer) = 0 End If Else If RandomR01(CurrentPlayer) = "L85" Or RandomR02(CurrentPlayer) = "L85" Or RandomR03(CurrentPlayer) = "L85" Then L85State(CurrentPlayer)=2:L66State(CurrentPlayer) = 0:L75State(CurrentPlayer) = 0:L79State(CurrentPlayer) = 0:End If If RandomR01(CurrentPlayer) = "L91" Or RandomR02(CurrentPlayer) = "L91" Or RandomR03(CurrentPlayer) = "L91" Then L91State(CurrentPlayer)=2:L66State(CurrentPlayer) = 0:L75State(CurrentPlayer) = 0:L79State(CurrentPlayer) = 0:End If If RandomR01(CurrentPlayer) = "L98" Or RandomR02(CurrentPlayer) = "L98" Or RandomR03(CurrentPlayer) = "L98" Then L98State(CurrentPlayer)=2:L66State(CurrentPlayer) = 0:L75State(CurrentPlayer) = 0:L79State(CurrentPlayer) = 0:End If If RandomR01(CurrentPlayer) = "L106"Or RandomR02(CurrentPlayer) = "L106"Or RandomR03(CurrentPlayer) = "L106" Then L106State(CurrentPlayer)=2:L66State(CurrentPlayer) = 0:L75State(CurrentPlayer) = 0:L79State(CurrentPlayer) = 0:End If If WickedCavernCheckCountRandomRight(CurrentPlayer) = 4 Then L66State(CurrentPlayer) = 0 L75State(CurrentPlayer) = 0 L79State(CurrentPlayer) = 0 L85State(CurrentPlayer) = 2 L91State(CurrentPlayer) = 2 L98State(CurrentPlayer) = 2 L106State(CurrentPlayer) = 2 End If End If End If If DeepFreeze(CurrentPlayer) = 2 Then '*********************** Set Light Color for DeepFreeze ******************************************************* '********************** DeepFreeze ************************************ 'L79.BlinkPattern="10" 'L79.BlinkInterval = 125 'L79.state = 2 'If DeepFreezeLordsCounter(CurrentPlayer) = 0 And DeepFreezeMissionHitStart(CurrentPlayer) = False Then if DeepFreezeMissionHitStart(CurrentPlayer) = False Then L66color(CurrentPlayer) = "blue" L75color(CurrentPlayer) = "blue" L79color(CurrentPlayer) = "blue" L85color(CurrentPlayer) = "blue" L91color(CurrentPlayer) = "blue" L98color(CurrentPlayer) = "blue" L106color(CurrentPlayer)= "blue" L66State(CurrentPlayer) = 2 L75State(CurrentPlayer) = 0 L79State(CurrentPlayer) = 2 L85State(CurrentPlayer) = 0 L91State(CurrentPlayer) = 0 L98State(CurrentPlayer) = 0 L106State(CurrentPlayer) = 2 End If End If If BlackCastle(CurrentPlayer) = 2 Then '*********************** Set Light Color for BlackCastle ******************************************************* 'L79.BlinkPattern="10" 'L79.BlinkInterval = 160 '********************** BlackCastle ************************************ If BlackCastleRoundCounter = 0 And BlackCastleMissionHitStart = False Then L66color(CurrentPlayer) = "magenta" L75color(CurrentPlayer) = "magenta" L79color(CurrentPlayer) = "magenta" L85color(CurrentPlayer) = "magenta" L91color(CurrentPlayer) = "magenta" L98color(CurrentPlayer) = "magenta" L106color(CurrentPlayer)= "magenta" L66State(CurrentPlayer) = 0 L75State(CurrentPlayer) = 0 L79State(CurrentPlayer) = 2 L85State(CurrentPlayer) = 2 L91State(CurrentPlayer) = 2 L98State(CurrentPlayer) = 0 L106State(CurrentPlayer) = 0 End If End If If Knight_challenge_flag = True Then '**************************************** Knight Challenge ******************************************* If Knight_challenge_phase = 0 Then L66color(CurrentPlayer) = "blue" L75color(CurrentPlayer) = "blue" L79color(CurrentPlayer) = "blue" L85color(CurrentPlayer) = "blue" L91color(CurrentPlayer) = "blue" L98color(CurrentPlayer) = "blue" L106color(CurrentPlayer)= "blue" L66State(CurrentPlayer) = 2 L75State(CurrentPlayer) = 0 L79State(CurrentPlayer) = 2 L85State(CurrentPlayer) = 0 L91State(CurrentPlayer) = 2 L98State(CurrentPlayer) = 0 L106State(CurrentPlayer) = 0 Knight_challenge_phase = 1 video_knight_challenge_background KnightRemaining End If End If If CatapultModeFlag = True Then '**************************************** Catapult Multiball ******************************************* L66color(CurrentPlayer) = "orange" L75color(CurrentPlayer) = "orange" L79color(CurrentPlayer) = "orange" L85color(CurrentPlayer) = "orange" L91color(CurrentPlayer) = "orange" L98color(CurrentPlayer) = "orange" L106color(CurrentPlayer)= "orange" L66State(CurrentPlayer) = 2 'L66 (SW41 + SW45) -> Left spinner lane L75State(CurrentPlayer) = 2 'L75 -> Left orbit L79State(CurrentPlayer) = 2 'L79 -> Left ramp L85State(CurrentPlayer) = 2 'L85 -> The Black Knight L91State(CurrentPlayer) = 2 'L91 (SW58 + SW60) -> Shield and rear of shield(Saucer) L98State(CurrentPlayer) = 2 'L98 -> Light Lock target L106State(CurrentPlayer) = 2 'L106 -> Right orbit End If If WarHurryFlag = True Then '**************************************** War Hurry UP ******************************************* 'L66color(CurrentPlayer) = "orange" 'L75color(CurrentPlayer) = "orange" L79color(CurrentPlayer) = "white" L85color(CurrentPlayer) = "white" L91color(CurrentPlayer) = "white" 'L98color(CurrentPlayer) = "orange" 'L106color(CurrentPlayer)= "orange" L79State(CurrentPlayer) = 2 'L79 -> Left ramp L85State(CurrentPlayer) = 2 'L85 -> The Black Knight L91State(CurrentPlayer) = 2 'L91 (SW58 + SW60) -> Shield and rear of shield(Saucer) End If If CurrentMissionFlag(CurrentPlayer) = 1 Or CatapultModeFlag = True Or Knight_challenge_flag = True or WarHurryFlag = True Then If L66State(CurrentPlayer) = 0 Then L66.State = 0 End If If L75State(CurrentPlayer) = 0 Then L75.State = 0 End If If L79State(CurrentPlayer) = 0 Then L79.State = 0 End If If L85State(CurrentPlayer) = 0 Then L85.State = 0 End If If L91State(CurrentPlayer) = 0 Then L91.State = 0 End If If L98State(CurrentPlayer) = 0 Then L98.State = 0 End If If L106State(CurrentPlayer) = 0 Then L106.State = 0 End If If L66State(CurrentPlayer) = 1 Then L66.State = 1 End If If L75State(CurrentPlayer) = 1 Then L75.State = 1 End If If L79State(CurrentPlayer) = 1 Then L79.State = 1 End If If L85State(CurrentPlayer) = 1 Then L85.State = 1 End If If L91State(CurrentPlayer) = 1 Then L91.State = 1 End If If L98State(CurrentPlayer) = 1 Then L98.State = 1 End If If L106State(CurrentPlayer) = 1 Then L106.State = 1 End If If L66State(CurrentPlayer) = 2 Then L66.State = 2 End If If L75State(CurrentPlayer) = 2 Then L75.State = 2 End If If L79State(CurrentPlayer) = 2 Then L79.State = 2 End If If L85State(CurrentPlayer) = 2 Then L85.State = 2 End If If L91State(CurrentPlayer) = 2 Then L91.State = 2 End If If L98State(CurrentPlayer) = 2 Then L98.State = 2 End If If L106State(CurrentPlayer) = 2 Then L106.State = 2 End If If L66color(CurrentPlayer) = "red" Then L66.color = RGB(255, 0, 0):L66.colorfull = RGB(255, 0, 0):End If If L75color(CurrentPlayer) = "red" Then L75.color = RGB(255, 0, 0):L75.colorfull = RGB(255, 0, 0):End If If L79color(CurrentPlayer) = "red" Then L79.color = RGB(255, 0, 0):L79.colorfull = RGB(255, 0, 0):End If If L85color(CurrentPlayer) = "red" Then L85.color = RGB(255, 0, 0):L85.colorfull = RGB(255, 0, 0):End If If L91color(CurrentPlayer) = "red" Then L91.color = RGB(255, 0, 0):L91.colorfull = RGB(255, 0, 0):End If If L98color(CurrentPlayer) = "red" Then L98.color = RGB(255, 0, 0):L98.colorfull = RGB(255, 0, 0):End If If L106color(CurrentPlayer)= "red" Then L106.color = RGB(255, 0, 0):L106.colorfull = RGB(255, 0, 0):End If If L66color(CurrentPlayer) = "green" Then L66.color = RGB(0, 255, 0):L66.colorfull = RGB(0, 255, 0):End If If L75color(CurrentPlayer) = "green" Then L75.color = RGB(0, 255, 0):L75.colorfull = RGB(0, 255, 0):End If If L79color(CurrentPlayer) = "green" Then L79.color = RGB(0, 255, 0):L79.colorfull = RGB(0, 255, 0):End If If L85color(CurrentPlayer) = "green" Then L85.color = RGB(0, 255, 0):L85.colorfull = RGB(0, 255, 0):End If If L91color(CurrentPlayer) = "green" Then L91.color = RGB(0, 255, 0):L91.colorfull = RGB(0, 255, 0):End If If L98color(CurrentPlayer) = "green" Then L98.color = RGB(0, 255, 0):L98.colorfull = RGB(0, 255, 0):End If If L106color(CurrentPlayer)= "green" Then L106.color = RGB(0, 255, 0):L106.colorfull = RGB(0, 255, 0):End If If L66color(CurrentPlayer) = "blue" Then L66.color = RGB(0, 0, 255):L66.colorfull = RGB(0, 0, 255):End If If L75color(CurrentPlayer) = "blue" Then L75.color = RGB(0, 0, 255):L75.colorfull = RGB(0, 0, 255):End If If L79color(CurrentPlayer) = "blue" Then L79.color = RGB(0, 0, 255):L79.colorfull = RGB(0, 0, 255):End If If L85color(CurrentPlayer) = "blue" Then L85.color = RGB(0, 0, 255):L85.colorfull = RGB(0, 0, 255):End If If L91color(CurrentPlayer) = "blue" Then L91.color = RGB(0, 0, 255):L91.colorfull = RGB(0, 0, 255):End If If L98color(CurrentPlayer) = "blue" Then L98.color = RGB(0, 0, 255):L98.colorfull = RGB(0, 0, 255):End If If L106color(CurrentPlayer)= "blue" Then L106.color = RGB(0, 0, 255):L106.colorfull = RGB(0, 0, 255):End If If L66color(CurrentPlayer) = "yellow" Then L66.color = RGB(255, 255, 0):L66.colorfull = RGB(255, 255, 0):End If If L75color(CurrentPlayer) = "yellow" Then L75.color = RGB(255, 255, 0):L75.colorfull = RGB(255, 255, 0):End If If L79color(CurrentPlayer) = "yellow" Then L79.color = RGB(255, 255, 0):L79.colorfull = RGB(255, 255, 0):End If If L85color(CurrentPlayer) = "yellow" Then L85.color = RGB(255, 255, 0):L85.colorfull = RGB(255, 255, 0):End If If L91color(CurrentPlayer) = "yellow" Then L91.color = RGB(255, 255, 0):L91.colorfull = RGB(255, 255, 0):End If If L98color(CurrentPlayer) = "yellow" Then L98.color = RGB(255, 255, 0):L98.colorfull = RGB(255, 255, 0):End If If L106color(CurrentPlayer)= "yellow" Then L106.color = RGB(255, 255, 0):L106.colorfull = RGB(255, 255, 0):End If If L66color(CurrentPlayer) = "orange" Then L66.color = RGB(255, 50, 0):L66.colorfull = RGB(255, 50, 0):End If If L75color(CurrentPlayer) = "orange" Then L75.color = RGB(255, 50, 0):L75.colorfull = RGB(255, 50, 0):End If If L79color(CurrentPlayer) = "orange" Then L79.color = RGB(255, 50, 0):L79.colorfull = RGB(255, 50, 0):End If If L85color(CurrentPlayer) = "orange" Then L85.color = RGB(255, 50, 0):L85.colorfull = RGB(255, 50, 0):End If If L91color(CurrentPlayer) = "orange" Then L91.color = RGB(255, 50, 0):L91.colorfull = RGB(255, 50, 0):End If If L98color(CurrentPlayer) = "orange" Then L98.color = RGB(255, 50, 0):L98.colorfull = RGB(255, 50, 0):End If If L106color(CurrentPlayer)= "orange" Then L106.color = RGB(255, 50, 0):L106.colorfull = RGB(255, 50, 0):End If If L66color(CurrentPlayer) = "white" Then L66.color = RGB(255, 255, 255):L66.colorfull = RGB(255, 255, 255):End If If L75color(CurrentPlayer) = "white" Then L75.color = RGB(255, 255, 255):L75.colorfull = RGB(255, 255, 255):End If If L79color(CurrentPlayer) = "white" Then L79.color = RGB(255, 255, 255):L79.colorfull = RGB(255, 255, 255):End If If L85color(CurrentPlayer) = "white" Then L85.color = RGB(255, 255, 255):L85.colorfull = RGB(255, 255, 255):End If If L91color(CurrentPlayer) = "white" Then L91.color = RGB(255, 255, 255):L91.colorfull = RGB(255, 255, 255):End If If L98color(CurrentPlayer) = "white" Then L98.color = RGB(255, 255, 255):L98.colorfull = RGB(255, 255, 255):End If If L106color(CurrentPlayer)= "white" Then L106.color = RGB(255, 255, 255):L106.colorfull = RGB(255, 255, 255):End If If L66color(CurrentPlayer) = "magenta" Then L66.color = RGB(255, 0, 255):L66.colorfull = RGB(255, 0, 255):End If If L75color(CurrentPlayer) = "magenta" Then L75.color = RGB(255, 0, 255):L75.colorfull = RGB(255, 0, 255):End If If L79color(CurrentPlayer) = "magenta" Then L79.color = RGB(255, 0, 255):L79.colorfull = RGB(255, 0, 255):End If If L85color(CurrentPlayer) = "magenta" Then L85.color = RGB(255, 0, 255):L85.colorfull = RGB(255, 0, 255):End If If L91color(CurrentPlayer) = "magenta" Then L91.color = RGB(255, 0, 255):L91.colorfull = RGB(255, 0, 255):End If If L98color(CurrentPlayer) = "magenta" Then L98.color = RGB(255, 0, 255):L98.colorfull = RGB(255, 0, 255):End If If L106color(CurrentPlayer)= "magenta" Then L106.color = RGB(255, 0, 255):L106.colorfull = RGB(255, 0, 255):End If End If End Sub 'CheckLamp ' *********************************************** Mission Hit ****************************************************************** ' *************************************** Used to update missions catapult, TKC, war etc based on switches hit ***************** Sub MissionHit(SWNumber) If RetroMode = 3 Then '**************************************** BK2000 MODE RETRO ****************************************** If SWNumber = 51 Then AddScore 2000000 ' play sound jackpot callout RndInt(373,374) End If End If If CatapultModeFlag = True Then '**************************************** Catapult Multiball ***************************************** '*** SWITCH AVAILABLE : SW41 + SW48 + SW51 + SW59 + SW64 If SWNumber = 82 Or SWNumber = 45 Then L66State(CurrentPlayer) = 2 End If 'L66 (SW41 + SW45) -> Left spinner lane If SWNumber = 48 Then L75State(CurrentPlayer) = 2 End If 'L75 -> Left orbit If SWNumber = 51 Then L79State(CurrentPlayer) = 2 End If 'L79 -> Left ramp If SWNumber = 56 Then L85State(CurrentPlayer) = 2 End If 'L85 -> The Black Knight If SWNumber = 58 Or SWNumber = 60 Then L91State(CurrentPlayer) = 2 End If 'L91 (SW58 + SW60) -> Shield and rear of shield(Saucer) If SWNumber = 59 Then L98State(CurrentPlayer) = 2 End If 'L98 -> Light Lock target If SWNumber = 64 Then L106State(CurrentPlayer) = 2 End If 'L106 -> Right orbit 'DOF 56, DOFPulse ' If LastChanceBallInCatapult.Enabled = False Then ' CommentDisplayed = "Catapult Jackpot!" ' LastChanceCatapultMulti = 1 ' Select Case Int(Rnd*3)+1 ' Case 1 : audioknight = "Sound-0x0293.mp3":SpeakTime = 1119 ' Case 2 : audioknight = "Sound-0x0293.mp3":SpeakTime = 1119 ' Case 3 : audioknight = "Sound-0x0343.mp3":SpeakTime = 1042 ' End Select ' Else ' CommentDisplayed = "2x Catapult Jackpot!" ' LastChanceCatapultMulti = 2 ' Select Case Int(Rnd*3)+1 ' Case 1 : audioknight = "Sound-0x018F.mp3":SpeakTime = 1666 ' Case 2 : audioknight = "Sound-0x01E7.mp3":SpeakTime = 1688 ' Case 3 : audioknight = "Sound-0x01E7.mp3":SpeakTime = 1688 ' End Select ' End If CommentDisplayed = "Catapult Jackpot!" AddscoreCatapultBonus = AddscoreCatapultBonus + 25000 AddscoreCatapultBonusAfterMulti = AddscoreCatapultBonus * LastChanceCatapultMulti Catapult_jackpot_collected = Catapult_jackpot_collected + AddscoreCatapultBonusAfterMulti Catapult_Mode_Total_score(CurrentPlayer) = Catapult_Mode_Total_score(CurrentPlayer) + AddscoreCatapultBonusAfterMulti AddscoreCatapultTotalEndGame(CurrentPlayer) = AddscoreCatapultTotalEndGame(CurrentPlayer) + AddscoreCatapultBonusAfterMulti Addscore AddscoreCatapultBonusAfterMulti 'LightEyesBK ' playmedia audioknight,"Audioknight",pAudio,"",0,"",1,1 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) Video_Catapult_Multball_1 DelayCallout 2, RndInt(373,374) End If If Knight_challenge_flag = True Then '**************************************** Knight Challenge ******************************************* If Knight_challenge_phase = 1 Then '*** SWITCH AVAILABLE : SW41 + SW48 + SW51 + SW59 + SW64 If SWNumber = 41 or SWNumber = 45 Then L66State(CurrentPlayer) = 0 KnightRemaining = KnightRemaining - 1 AddScoreTripleKnightChallenge = AddScoreTripleKnightChallengeKnightHited AddScoreTripleKnightChallengeTotal(CurrentPlayer) = AddScoreTripleKnightChallengeTotal(CurrentPlayer) + AddScoreTripleKnightChallenge AddScoreTripleKnightChallengeTotalEndGame(CurrentPlayer) = AddScoreTripleKnightChallengeTotalEndGame(CurrentPlayer) + AddScoreTripleKnightChallenge Video_knight_challenge_phase1_hited End If If SWNumber = 51 Then L79State(CurrentPlayer) = 0 KnightRemaining = KnightRemaining - 1 AddScoreTripleKnightChallenge = AddScoreTripleKnightChallengeKnightHited AddScoreTripleKnightChallengeTotal(CurrentPlayer) = AddScoreTripleKnightChallengeTotal(CurrentPlayer) + AddScoreTripleKnightChallenge AddScoreTripleKnightChallengeTotalEndGame(CurrentPlayer) = AddScoreTripleKnightChallengeTotalEndGame(CurrentPlayer) + AddScoreTripleKnightChallenge Video_knight_challenge_phase1_hited End If If SWNumber = 58 or SWNumber = 60 Then L91State(CurrentPlayer) = 0 KnightRemaining = KnightRemaining - 1 AddScoreTripleKnightChallenge = AddScoreTripleKnightChallengeKnightHited AddScoreTripleKnightChallengeTotal(CurrentPlayer) = AddScoreTripleKnightChallengeTotal(CurrentPlayer) + AddScoreTripleKnightChallenge AddScoreTripleKnightChallengeTotalEndGame(CurrentPlayer) = AddScoreTripleKnightChallengeTotalEndGame(CurrentPlayer) + AddScoreTripleKnightChallenge Video_knight_challenge_phase1_hited End If If KnightRemaining <= 0 Then L79color(CurrentPlayer) = "blue" L85color(CurrentPlayer) = "blue" L91color(CurrentPlayer) = "blue" Light055.BlinkPattern="00010000" Light059.BlinkPattern="00010000" Light054.BlinkPattern="00001000" Light060.BlinkPattern="00001000" Light056.BlinkPattern="00000100" Light061.BlinkPattern="00000100" Light057.BlinkPattern="00000010" Light058.BlinkPattern="00000010" Light062.BlinkPattern="00000001" Light063.BlinkPattern="00000001" RampLightsBlinkInterval = 125 RampLightsState = 2 L83.BlinkPattern="10000000" L82.BlinkPattern="01000000" L79.BlinkPattern="00100000" L83.State = 2 L82.State = 2 L79State(CurrentPlayer) = 2 L85State(CurrentPlayer) = 0 L91State(CurrentPlayer) = 0 L66State(CurrentPlayer) = 0 L75State(CurrentPlayer) = 0 L98State(CurrentPlayer) = 0 L106State(CurrentPlayer) = 0 L83.BlinkInterval=125 L82.BlinkInterval=125 L79.BlinkInterval=125 Knight_challenge_phase = 2 End If ElseIf Knight_challenge_phase = 2 Then If SWNumber = 51 Then L83.State = 0 L82.State = 0 L66State(CurrentPlayer) = 2 L75State(CurrentPlayer) = 2 L79State(CurrentPlayer) = 2 L85State(CurrentPlayer) = 2 L91State(CurrentPlayer) = 2 L98State(CurrentPlayer) = 2 L106State(CurrentPlayer) = 2 Knight_challenge_phase = 3 knight_challenge_jackpot = 1 video_knight_challenge_advance_to_gold_room AddScoreTripleKnightChallenge = AddScoreTripleKnightChallengeKnightHited AddScoreTripleKnightChallengeTotal(CurrentPlayer) = AddScoreTripleKnightChallengeTotal(CurrentPlayer) + AddScoreTripleKnightChallenge AddScoreTripleKnightChallengeTotalEndGame(CurrentPlayer) = AddScoreTripleKnightChallengeTotalEndGame(CurrentPlayer) + AddScoreTripleKnightChallenge End If ElseIf Knight_challenge_phase = 3 Then knight_challenge_jackpot = 2 If SWNumber = 41 Then L66State(CurrentPlayer) = 0 : video_knight_challenge_jackpot : AddScoreTripleKnightChallenge = AddScoreTripleKnightChallengeGoldRoom : AddScoreTripleKnightChallengeTotal(CurrentPlayer) = AddScoreTripleKnightChallengeTotal(CurrentPlayer) + AddScoreTripleKnightChallenge : End If 'L66 (SW41 + SW45) -> Left spinner lane If SWNumber = 48 Then L75State(CurrentPlayer) = 0 : video_knight_challenge_jackpot : AddScoreTripleKnightChallenge = AddScoreTripleKnightChallengeGoldRoom : AddScoreTripleKnightChallengeTotal(CurrentPlayer) = AddScoreTripleKnightChallengeTotal(CurrentPlayer) + AddScoreTripleKnightChallenge : End If 'L75 -> Left orbit If SWNumber = 51 Then L79State(CurrentPlayer) = 0 : video_knight_challenge_jackpot : AddScoreTripleKnightChallenge = AddScoreTripleKnightChallengeGoldRoom : AddScoreTripleKnightChallengeTotal(CurrentPlayer) = AddScoreTripleKnightChallengeTotal(CurrentPlayer) + AddScoreTripleKnightChallenge : End If 'L79 -> Left ramp If SWNumber = 56 Then L85State(CurrentPlayer) = 0 : video_knight_challenge_jackpot : AddScoreTripleKnightChallenge = AddScoreTripleKnightChallengeGoldRoom : AddScoreTripleKnightChallengeTotal(CurrentPlayer) = AddScoreTripleKnightChallengeTotal(CurrentPlayer) + AddScoreTripleKnightChallenge : End If 'L85 -> The Black Knight If SWNumber = 58 Then L91State(CurrentPlayer) = 0 : video_knight_challenge_jackpot : AddScoreTripleKnightChallenge = AddScoreTripleKnightChallengeGoldRoom : AddScoreTripleKnightChallengeTotal(CurrentPlayer) = AddScoreTripleKnightChallengeTotal(CurrentPlayer) + AddScoreTripleKnightChallenge : End If 'L91 (SW58 + SW60) -> Shield and rear of shield(Saucer) If SWNumber = 59 Then L98State(CurrentPlayer) = 0 : video_knight_challenge_jackpot : AddScoreTripleKnightChallenge = AddScoreTripleKnightChallengeGoldRoom : AddScoreTripleKnightChallengeTotal(CurrentPlayer) = AddScoreTripleKnightChallengeTotal(CurrentPlayer) + AddScoreTripleKnightChallenge : End If 'L98 -> Light Lock target If SWNumber = 64 Then L106State(CurrentPlayer) = 0 : video_knight_challenge_jackpot : AddScoreTripleKnightChallenge = AddScoreTripleKnightChallengeGoldRoom : AddScoreTripleKnightChallengeTotal(CurrentPlayer) = AddScoreTripleKnightChallengeTotal(CurrentPlayer) + AddScoreTripleKnightChallenge : End If 'L106 -> Right orbit If L66State(CurrentPlayer) = 0 And L75State(CurrentPlayer) = 0 And L79State(CurrentPlayer) = 0 And L85State(CurrentPlayer) = 0 And L91State(CurrentPlayer) = 0 And L98State(CurrentPlayer) = 0 And L106State(CurrentPlayer) = 0 Then Knight_challenge_phase = 1 KnightRemaining = 3 L66State(CurrentPlayer) = 2 L79State(CurrentPlayer) = 2 L91State(CurrentPlayer) = 2 video_knight_challenge_background KnightRemaining End If Else End If AddScore AddScoreTripleKnightChallenge End If If WarHurryFlag = True Then '**************************************** WAR HURRY UP *********************************************** If WarHurryPhase = 1 Then If SWNumber = 51 and Skel1Ded = False Then L79State(CurrentPlayer) = 0 WarHurryUp51Touch=1 AddScoreWarHurryUpTotal(CurrentPlayer) = AddScoreWarHurryUpTotal(CurrentPlayer) + Pop1Val AddScoreWarHurryUpTotalEndGame(CurrentPlayer) = AddScoreWarHurryUpTotalEndGame(CurrentPlayer) + Pop1Val AddScore Pop1Val 'Skel1Ded = True End If If SWNumber = 56 and Skel2Ded = False Then 'L85 -> The Black Knight L85State(CurrentPlayer) = 0 WarHurryUp56Touch=1 AddScoreWarHurryUpTotal(CurrentPlayer) = AddScoreWarHurryUpTotal(CurrentPlayer) + Pop2Val AddScoreWarHurryUpTotalEndGame(CurrentPlayer) = AddScoreWarHurryUpTotalEndGame(CurrentPlayer) + Pop2Val AddScore Pop2Val 'Skel2Ded = True End If If (SWNumber = 58 Or SWNumber = 60) and Skel3Ded = False Then 'L91 (SW58 + SW60) -> Shield and rear of shield(Saucer) L91State(CurrentPlayer) = 0 WarHurryUp58Touch=1 AddScoreWarHurryUpTotal(CurrentPlayer) = AddScoreWarHurryUpTotal(CurrentPlayer) + Pop3Val AddScoreWarHurryUpTotalEndGame(CurrentPlayer) = AddScoreWarHurryUpTotalEndGame(CurrentPlayer) + Pop3Val AddScore Pop3Val 'Skel3Ded = True End If If WarHurryUp51Touch = 1 And WarHurryUp56Touch = 1 And WarHurryUp58Touch = 1 Then WarHurryPhase = 2 L85State(CurrentPlayer) = 2 WarHurryUp51Touch = 0 WarHurryUp56Touch = 0 WarHurryUp58Touch = 0 End If Elseif WarHurryPhase = 2 Then If SWNumber = 56 Then L85State(CurrentPlayer) = 0 WarHurryPhase = 0 WarHurryFlag = False AddScoreWarHurryUpTotal(CurrentPlayer) = AddScoreWarHurryUpTotal(CurrentPlayer) + PopTotal AddScoreWarHurryUpTotalEndGame(CurrentPlayer) = AddScoreWarHurryUpTotalEndGame(CurrentPlayer) + PopTotal KnightLamp(CurrentPlayer) = KnightLamp(CurrentPlayer) + 1 If KnightLamp(CurrentPlayer) > 12 Then KnightLamp(CurrentPlayer) =12 End if Video_Knight pupevent 410 pupevent 413 MusicResetPM 'VideoSetBackgroundPM ModeTotalWarHurry.Interval = 3500 ModeTotalWarHurry.Enabled = True 'VideoSetBackgroundPM End If 'L85 -> The Black Knight L85State(CurrentPlayer) = 0 Else WarHurryFlag = False End If End If ' If SWNumber = 41 Or SWNumber = 45 Then L66State(CurrentPlayer) = 2 End If 'L66 (SW41 + SW45) -> Left spinner lane ' If SWNumber = 48 Then L75State(CurrentPlayer) = 2 End If 'L75 -> Left orbit ' If SWNumber = 51 Then L79State(CurrentPlayer) = 2 End If 'L79 -> Left ramp ' If SWNumber = 56 Then L85State(CurrentPlayer) = 2 End If 'L85 -> The Black Knight ' If SWNumber = 58 Or SWNumber = 60 Then L91State(CurrentPlayer) = 2 End If 'L91 (SW58 + SW60) -> Shield and rear of shield(Saucer) ' If SWNumber = 59 Then L98State(CurrentPlayer) = 2 End If 'L98 -> Light Lock target ' If SWNumber = 64 Then L106State(CurrentPlayer) = 2 End If 'L106 -> Right orbit ' If SWNumber = 82 Then -> upper playfield shield ' AddScoreMudBogSliced ' AddScoreMudBogSealed ' AddScoreMudBogTotal(4) If MudBog(CurrentPlayer) = 2 Then '**************************************** MUDBOG ***************************************************** 'If MudBogHeadsCounter(CurrentPlayer) = 1 Then '*** SWITCH AVAILABLE : SW41 + SW48 + SW51 + SW59 + SW64 ' horloge.Enabled=True 'End If If SWNumber = 41 Or SWNumber = 45 Then '*********** SW41 or SW45 Hited *********** If L66state(CurrentPlayer) = 2 Or Knight_challenge_flag = True Or CatapultModeFlag = True Then ' light active hit counts If SW41_Flag = 0 and PowerSwordActivated = False Then L66State(CurrentPlayer) = 2 L75State(CurrentPlayer) = 0 L79State(CurrentPlayer) = 0 L85State(CurrentPlayer) = 0 L91State(CurrentPlayer) = 0 L98State(CurrentPlayer) = 0 L106State(CurrentPlayer) = 0 SW41_Flag = 1 AddScoreMudBog = 50000 * (MudBogHeadsCounter(CurrentPlayer)+1) AddScoreMudBogTotal(CurrentPlayer) = AddScoreMudBogTotal(CurrentPlayer) + AddScoreMudBog AddScore AddScoreMudBog CommentDisplayed = "Hydra Sliced!" Else SW41_Flag = 2 If SW41_Flag = 2 Then L66State(CurrentPlayer) = 0 Else L66State(CurrentPlayer) = 2 end If If SW48_Flag = 2 Then L75State(CurrentPlayer) = 0 Else L75State(CurrentPlayer) = 2 end If If SW51_Flag = 2 Then L79State(CurrentPlayer) = 0 Else L79State(CurrentPlayer) = 2 end If L85State(CurrentPlayer) = 0 L91State(CurrentPlayer) = 0 If SW59_Flag = 2 Then L98State(CurrentPlayer) = 0 Else L98State(CurrentPlayer) = 2 End If If SW64_Flag = 2 Then L106State(CurrentPlayer) = 0 Else L106State(CurrentPlayer) = 2 End If AddScoreMudBog = (100000 * (MudBogHeadsCounter(CurrentPlayer)+1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler AddScoreMudBogTotal(CurrentPlayer) = AddScoreMudBogTotal(CurrentPlayer) + AddScoreMudBog AddScore AddScoreMudBog CommentDisplayed = "Hydra Sealed!" MudBogHeadsCounter(CurrentPlayer)= MudBogHeadsCounter(CurrentPlayer) + 1 End If End If End If If SWNumber = 48 Then '*********** SW48 Hited *********** if L75State(CurrentPlayer) = 2 Or Knight_challenge_flag = True Or CatapultModeFlag = True then ' light is lit hit counts If SW48_Flag = 0 and PowerSwordActivated = False Then L66State(CurrentPlayer) = 0 L75State(CurrentPlayer) = 2 L79State(CurrentPlayer) = 0 L85State(CurrentPlayer) = 0 L91State(CurrentPlayer) = 0 L98State(CurrentPlayer) = 0 L106State(CurrentPlayer) = 0 SW48_Flag = 1 AddScoreMudBog = 50000 * (MudBogHeadsCounter(CurrentPlayer)+1) AddScoreMudBogTotal(CurrentPlayer) = AddScoreMudBogTotal(CurrentPlayer) + AddScoreMudBog AddScore AddScoreMudBog CommentDisplayed = "Hydra Sliced!" Else SW48_Flag = 2 If SW41_Flag = 2 Then L66State(CurrentPlayer) = 0 Else L66State(CurrentPlayer) = 2 end If If SW48_Flag = 2 Then L75State(CurrentPlayer) = 0 Else L75State(CurrentPlayer) = 2 end If If SW51_Flag = 2 Then L79State(CurrentPlayer) = 0 Else L79State(CurrentPlayer) = 2 end If L85State(CurrentPlayer) = 0 L91State(CurrentPlayer) = 0 If SW59_Flag = 2 Then L98State(CurrentPlayer) = 0 Else L98State(CurrentPlayer) = 2 End If If SW64_Flag = 2 Then L106State(CurrentPlayer) = 0 Else L106State(CurrentPlayer) = 2 End If AddScoreMudBog = (100000 * (MudBogHeadsCounter(CurrentPlayer)+1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler AddScoreMudBogTotal(CurrentPlayer) = AddScoreMudBogTotal(CurrentPlayer) + AddScoreMudBog AddScore AddScoreMudBog CommentDisplayed = "Hydra Sealed!" MudBogHeadsCounter(CurrentPlayer)= MudBogHeadsCounter(CurrentPlayer) + 1 End If End If End If If SWNumber = 51 Then '*********** SW51 Hited *********** if L79State(CurrentPlayer) = 2 Or Knight_challenge_flag = True Or CatapultModeFlag = True Then If SW51_Flag = 0 And PowerSwordActivated = False Then L66State(CurrentPlayer) = 0 L75State(CurrentPlayer) = 0 L79State(CurrentPlayer) = 2 L85State(CurrentPlayer) = 0 L91State(CurrentPlayer) = 0 L98State(CurrentPlayer) = 0 L106State(CurrentPlayer) = 0 SW51_Flag = 1 AddScoreMudBog = 50000 * (MudBogHeadsCounter(CurrentPlayer)+1) AddScoreMudBogTotal(CurrentPlayer) = AddScoreMudBogTotal(CurrentPlayer) + AddScoreMudBog AddScore AddScoreMudBog CommentDisplayed = "Hydra Sliced!" Else SW51_Flag = 2 If SW41_Flag = 2 Then L66State(CurrentPlayer) = 0 Else L66State(CurrentPlayer) = 2 end If If SW48_Flag = 2 Then L75State(CurrentPlayer) = 0 Else L75State(CurrentPlayer) = 2 end If If SW51_Flag = 2 Then L79State(CurrentPlayer) = 0 Else L79State(CurrentPlayer) = 2 end If L85State(CurrentPlayer) = 0 L91State(CurrentPlayer) = 0 If SW59_Flag = 2 Then L98State(CurrentPlayer) = 0 Else L98State(CurrentPlayer) = 2 End If If SW64_Flag = 2 Then L106State(CurrentPlayer) = 0 Else L106State(CurrentPlayer) = 2 End If AddScoreMudBog = (100000 * (MudBogHeadsCounter(CurrentPlayer)+1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler AddScoreMudBogTotal(CurrentPlayer) = AddScoreMudBogTotal(CurrentPlayer) + AddScoreMudBog AddScore AddScoreMudBog CommentDisplayed = "Hydra Sealed!" MudBogHeadsCounter(CurrentPlayer)= MudBogHeadsCounter(CurrentPlayer) + 1 End If End If End If If SWNumber = 59 Then '*********** SW59 Hited *********** if L98State(CurrentPlayer) = 2 Or Knight_challenge_flag = True Or CatapultModeFlag = True then If SW59_Flag = 0 And PowerSwordActivated = False Then L66State(CurrentPlayer) = 0 L75State(CurrentPlayer) = 0 L79State(CurrentPlayer) = 0 L85State(CurrentPlayer) = 0 L91State(CurrentPlayer) = 0 L98State(CurrentPlayer) = 2 L106State(CurrentPlayer) = 0 SW59_Flag = 1 AddScoreMudBog = 50000 * (MudBogHeadsCounter(CurrentPlayer)+1) AddScoreMudBogTotal(CurrentPlayer) = AddScoreMudBogTotal(CurrentPlayer) + AddScoreMudBog AddScore AddScoreMudBog CommentDisplayed = "Hydra Sliced!" Else SW59_Flag = 2 If SW41_Flag = 2 Then L66State(CurrentPlayer) = 0 Else L66State(CurrentPlayer) = 2 end If If SW48_Flag = 2 Then L75State(CurrentPlayer) = 0 Else L75State(CurrentPlayer) = 2 end If If SW51_Flag = 2 Then L79State(CurrentPlayer) = 0 Else L79State(CurrentPlayer) = 2 end If L85State(CurrentPlayer) = 0 L91State(CurrentPlayer) = 0 If SW59_Flag = 2 Then L98State(CurrentPlayer) = 0 Else L98State(CurrentPlayer) = 2 End If If SW64_Flag = 2 Then L106State(CurrentPlayer) = 0 Else L106State(CurrentPlayer) = 2 End If AddScoreMudBog = (100000 * (MudBogHeadsCounter(CurrentPlayer)+1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler AddScoreMudBogTotal(CurrentPlayer) = AddScoreMudBogTotal(CurrentPlayer) + AddScoreMudBog AddScore AddScoreMudBog CommentDisplayed = "Hydra Sealed!" MudBogHeadsCounter(CurrentPlayer)= MudBogHeadsCounter(CurrentPlayer) + 1 End If End If End If If SWNumber = 64 Then '*********** SW64 Hited *********** if L106State(CurrentPlayer) = 2 Or Knight_challenge_flag = True Or CatapultModeFlag = True Then If SW64_Flag = 0 And PowerSwordActivated = False Then L66State(CurrentPlayer) = 0 L75State(CurrentPlayer) = 0 L79State(CurrentPlayer) = 0 L85State(CurrentPlayer) = 0 L91State(CurrentPlayer) = 0 L98State(CurrentPlayer) = 0 L106State(CurrentPlayer) = 2 SW64_Flag = 1 AddScoreMudBog = 50000 * (MudBogHeadsCounter(CurrentPlayer)+1) AddScoreMudBogTotal(CurrentPlayer) = AddScoreMudBogTotal(CurrentPlayer) + AddScoreMudBog AddScore AddScoreMudBog CommentDisplayed = "Hydra Sliced!" Else SW64_Flag = 2 If SW41_Flag = 2 Then L66State(CurrentPlayer) = 0 Else L66State(CurrentPlayer) = 2 end If If SW48_Flag = 2 Then L75State(CurrentPlayer) = 0 Else L75State(CurrentPlayer) = 2 end If If SW51_Flag = 2 Then L79State(CurrentPlayer) = 0 Else L79State(CurrentPlayer) = 2 end If L85State(CurrentPlayer) = 0 L91State(CurrentPlayer) = 0 If SW59_Flag = 2 Then L98State(CurrentPlayer) = 0 Else L98State(CurrentPlayer) = 2 End If If SW64_Flag = 2 Then L106State(CurrentPlayer) = 0 Else L106State(CurrentPlayer) = 2 End If AddScoreMudBog = (100000 * (MudBogHeadsCounter(CurrentPlayer)+1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler AddScoreMudBogTotal(CurrentPlayer) = AddScoreMudBogTotal(CurrentPlayer) + AddScoreMudBog AddScore AddScoreMudBog CommentDisplayed = "Hydra Sealed!" MudBogHeadsCounter(CurrentPlayer)= MudBogHeadsCounter(CurrentPlayer) + 1 End If End If End If If SWNumber = 82 Then' upper playfield auto sealed no powersword needed AddScoreMudBog = (100000 * (MudBogHeadsCounter(CurrentPlayer)+1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler AddScoreMudBogTotal(CurrentPlayer) = AddScoreMudBogTotal(CurrentPlayer) + AddScoreMudBog AddScore AddScoreMudBog CommentDisplayed = "Hydra Sealed!" MudBogHeadsCounter(CurrentPlayer)= MudBogHeadsCounter(CurrentPlayer) + 1 End If 'playclear pBackglass VideoHydraattack.Enabled = True SW60Timer=3000 ' check not all lights are out, if so relight all if SW41_Flag = 2 And SW48_Flag = 2 And SW51_Flag = 2 And SW59_Flag = 2 And SW64_Flag = 2 Then L66State(CurrentPlayer) = 2 L75State(CurrentPlayer) = 2 L79State(CurrentPlayer) = 2 L85State(CurrentPlayer) = 0 L91State(CurrentPlayer) = 0 L98State(CurrentPlayer) = 2 L106State(CurrentPlayer) = 2 SW41_Flag = 0 SW48_Flag = 0 SW51_Flag = 0 SW59_Flag = 0 SW64_Flag = 0 End if End If If MoltenFire(CurrentPlayer) = 2 Then '**************************************** MoltenFire ***************************************************** '*** SWITCH AVAILABLE : SW41 + SW48 + SW51 + SW56 + SW58 + SW59 + SW64 SW60Timer=3000 If SWNumber = 41 or SWNumber = 45 Then 'L66 (SW41 + SW45) -> Left spinner lane if PowerSwordActivated = False Then L66State(CurrentPlayer) = 0 AddScoreMoltenFire = (100000 * (MoltenFireShots(CurrentPlayer) + 1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6) ) * PowerSwordMultipler AddScoreMoltenFireTotal(CurrentPlayer) = AddScoreMoltenFireTotal(CurrentPlayer) + AddScoreMoltenFire CommentDisplayed = "Magma Beast Award!" MoltenFireShots(CurrentPlayer) = MoltenFireShots(CurrentPlayer) + 1 End If If SWNumber = 48 Then 'L75 -> Left orbit if PowerSwordActivated = False Then L75State(CurrentPlayer) = 0 AddScoreMoltenFire = (100000 * (MoltenFireShots(CurrentPlayer) + 1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6) ) * PowerSwordMultipler AddScoreMoltenFireTotal(CurrentPlayer) = AddScoreMoltenFireTotal(CurrentPlayer) + AddScoreMoltenFire CommentDisplayed = "Magma Beast Award!" MoltenFireShots(CurrentPlayer) = MoltenFireShots(CurrentPlayer) + 1 End If If SWNumber = 51 Then 'L79 -> Left ramp if PowerSwordActivated = False Then L79State(CurrentPlayer) = 0 AddScoreMoltenFire = (100000 * (MoltenFireShots(CurrentPlayer) + 1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6) ) * PowerSwordMultipler AddScoreMoltenFireTotal(CurrentPlayer) = AddScoreMoltenFireTotal(CurrentPlayer) + AddScoreMoltenFire CommentDisplayed = "Magma Beast Award!" MoltenFireShots(CurrentPlayer) = MoltenFireShots(CurrentPlayer) + 1 End If If SWNumber = 56 Then 'L85 -> The Black Knight if PowerSwordActivated = False Then L85State(CurrentPlayer) = 0 AddScoreMoltenFire = (100000 * (MoltenFireShots(CurrentPlayer) + 1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6) ) * PowerSwordMultipler AddScoreMoltenFireTotal(CurrentPlayer) = AddScoreMoltenFireTotal(CurrentPlayer) + AddScoreMoltenFire CommentDisplayed = "Magma Beast Award!" MoltenFireShots(CurrentPlayer) = MoltenFireShots(CurrentPlayer) + 1 End If If SWNumber = 58 Then 'L91 (SW58 + SW60) -> Shield and rear of shield(Saucer) if PowerSwordActivated = False Then L91State(CurrentPlayer) = 0 AddScoreMoltenFire = (100000 * (MoltenFireShots(CurrentPlayer) + 1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6) ) * PowerSwordMultipler AddScoreMoltenFireTotal(CurrentPlayer) = AddScoreMoltenFireTotal(CurrentPlayer) + AddScoreMoltenFire CommentDisplayed = "Magma Beast Award!" MoltenFireShots(CurrentPlayer) = MoltenFireShots(CurrentPlayer) + 1 End If If SWNumber = 59 Then 'L98 -> Light Lock target if PowerSwordActivated = False Then L98State(CurrentPlayer) = 0 AddScoreMoltenFire = (100000 * (MoltenFireShots(CurrentPlayer) + 1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6) ) * PowerSwordMultipler AddScoreMoltenFireTotal(CurrentPlayer) = AddScoreMoltenFireTotal(CurrentPlayer) + AddScoreMoltenFire CommentDisplayed = "Magma Beast Award!" MoltenFireShots(CurrentPlayer) = MoltenFireShots(CurrentPlayer) + 1 End If If SWNumber = 64 Then 'L106 -> Right orbit if PowerSwordActivated = False Then L106State(CurrentPlayer) = 0 AddScoreMoltenFire = (100000 * (MoltenFireShots(CurrentPlayer) + 1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6) ) * PowerSwordMultipler AddScoreMoltenFireTotal(CurrentPlayer) = AddScoreMoltenFireTotal(CurrentPlayer) + AddScoreMoltenFire CommentDisplayed = "Magma Beast Award!" MoltenFireShots(CurrentPlayer) = MoltenFireShots(CurrentPlayer) + 1 End If If SWNumber = 82 Then 'L106 -> Right orbit AddScoreMoltenFire = (100000 * (MoltenFireShots(CurrentPlayer) + 1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6) ) * PowerSwordMultipler AddScoreMoltenFireTotal(CurrentPlayer) = AddScoreMoltenFireTotal(CurrentPlayer) + AddScoreMoltenFire CommentDisplayed = "Magma Beast Award!" MoltenFireShots(CurrentPlayer) = MoltenFireShots(CurrentPlayer) + 1 End If Addscore AddScoreMoltenFire ' playclear pBackglass VideoFireElementattack.Enabled = True End If If BurningSands(CurrentPlayer) = 2 Then '**************************************** Burning Sands ************************************************** SW60Timer=3000 BurningSandsCount = 0 If BurningSandsHit = 0 Then If SWNumber = 41 or SWNumber = 45 Then L66State(CurrentPlayer) = 0:L75State(CurrentPlayer) = 2:L79State(CurrentPlayer) = 2:End If 'L66 (SW41 + SW45) -> Left spinner lane If SWNumber = 48 Then L66State(CurrentPlayer) = 2:L75State(CurrentPlayer) = 0:L79State(CurrentPlayer) = 2:End If 'L75 -> Left orbit If SWNumber = 51 Then L75State(CurrentPlayer) = 2:L79State(CurrentPlayer) = 0:L85State(CurrentPlayer) = 2:End If 'L79 -> Left ramp If SWNumber = 56 Then L79State(CurrentPlayer) = 2:L85State(CurrentPlayer) = 0:L91State(CurrentPlayer) = 2:End If 'L85 -> The Black Knight If SWNumber = 58 Then L85State(CurrentPlayer) = 2:L91State(CurrentPlayer) = 0:L98State(CurrentPlayer) = 2:End If 'L91 (SW58 + SW60) -> Shield and rear of shield(Saucer) If SWNumber = 59 Then L91State(CurrentPlayer) = 2:L98State(CurrentPlayer) = 0:L106State(CurrentPlayer) =2:End If 'L98 -> Light Lock target If SWNumber = 64 Then L91State(CurrentPlayer) = 2:L98State(CurrentPlayer) = 2:L106State(CurrentPlayer) =0:End If 'L106 -> Right orbit ElseIf BurningSandsHit = 1 Then If SWNumber = 41 or SWNumber = 45 Then L66State(CurrentPlayer) = 0 End If 'L66 (SW41 + SW45) -> Left spinner lane If SWNumber = 48 Then L75State(CurrentPlayer) = 0 End If 'L75 -> Left orbit If SWNumber = 51 Then L79State(CurrentPlayer) = 0 End If 'L79 -> Left ramp If SWNumber = 56 Then L85State(CurrentPlayer) = 0 End If 'L85 -> The Black Knight If SWNumber = 58 Then L91State(CurrentPlayer) = 0 End If 'L91 (SW58 + SW60) -> Shield and rear of shield(Saucer) If SWNumber = 59 Then L98State(CurrentPlayer) = 0 End If 'L98 -> Light Lock target If SWNumber = 64 Then L106State(CurrentPlayer) = 0 End If 'L106 -> Right orbit ElseIf BurningSandsHit = 2 Then If SWNumber = 41 or SWNumber = 45 Then L66State(CurrentPlayer) = 0 End If 'L66 (SW41 + SW45) -> Left spinner lane If SWNumber = 48 Then L75State(CurrentPlayer) = 0 End If 'L75 -> Left orbit If SWNumber = 51 Then L79State(CurrentPlayer) = 0 End If 'L79 -> Left ramp If SWNumber = 56 Then L85State(CurrentPlayer) = 0 End If 'L85 -> The Black Knight If SWNumber = 58 Then L91State(CurrentPlayer) = 0 End If 'L91 (SW58 + SW60) -> Shield and rear of shield(Saucer) If SWNumber = 59 Then L98State(CurrentPlayer) = 0 End If 'L98 -> Light Lock target If SWNumber = 64 Then L106State(CurrentPlayer) = 0 End If 'L106 -> Right orbit Else End If 'playclear pBackglass VideoSandwormattack.Enabled = True End If If WickedCavern(CurrentPlayer) = 2 Then '**************************************** WickedCavern ***************************************************** If SWNumber = 0 Then '*** SWITCH AVAILABLE : SW41 + SW48 + SW51 + SW56 + SW58 + SW59 + SW64 Select Case Int(Rnd*2)+1 Case 1 : WickedCavernLeftOrRight = "left": 'Left : SW41+SW48+SW51+SW56 Case 2 : WickedCavernLeftOrRight = "right":'Right: SW56+SW58+SW59+SW64 End Select if PowerSwordActivated = True Then WickedCavernCheckCountRandomLeft(CurrentPlayer) = 4 WickedCavernLeftOrRight = "left": 'Left : SW41+SW48+SW51+SW56 End If Else AddScoreWickedCavern = (100000 * (WickedCavernShots(CurrentPlayer) + 1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6) ) * PowerSwordMultipler AddScoreWickedCavernTotal(CurrentPlayer) = AddScoreWickedCavernTotal(CurrentPlayer) + AddScoreWickedCavern CommentDisplayed = "Hell Hand Award!" Addscore AddScoreWickedCavern WickedCavernShots(CurrentPlayer) = WickedCavernShots(CurrentPlayer) + 1 'playclear pBackglass VideoHandHolderattack.Enabled = True SW60Timer=3000 End If If WickedCavernShots(CurrentPlayer) = 0 Then WickedCavernCheckCountRandomLeft(CurrentPlayer) = 0 WickedCavernCheckCountRandomRight(CurrentPlayer) = 0 End If If WickedCavernLeftOrRight = "left" Then WickedCavernLeftOrRightOld = WickedCavernLeftOrRight WickedCavernLeftOrRight = "right" if PowerSwordActivated = True Then WickedCavernCheckCountRandomLeft(CurrentPlayer) = 4 Else If WickedCavernCheckCountRandomLeft(CurrentPlayer) <= 2 Then WickedCavernRandomLeftLight Else WickedCavernCheckCountRandomLeft(CurrentPlayer) = WickedCavernCheckCountRandomLeft(CurrentPlayer) +1 if WickedCavernCheckCountRandomLeft(CurrentPlayer)>4 then WickedCavernCheckCountRandomLeft(CurrentPlayer) = 4 End If End If Else WickedCavernLeftOrRightOld = WickedCavernLeftOrRight WickedCavernLeftOrRight = "left" If PowerSwordActivated = True Then WickedCavernCheckCountRandomRight(CurrentPlayer) = 4 Else If WickedCavernCheckCountRandomRight(CurrentPlayer) <= 2 Then WickedCavernRandomRightLight Else WickedCavernCheckCountRandomRight(CurrentPlayer) = WickedCavernCheckCountRandomRight(CurrentPlayer) +1 if WickedCavernCheckCountRandomRight(CurrentPlayer)>4 Then WickedCavernCheckCountRandomRight(CurrentPlayer) = 4 End If End If End If End If If DeepFreeze(CurrentPlayer) = 2 Then '**************************************** DeepFreeze ***************************************************** DeepFreezeMissionHitStart(CurrentPlayer) = True '*** SWITCH AVAILABLE : SW41 + SW48 + SW51 + SW56 + SW59 + SW64 If SWNumber = 41 And (L66color(CurrentPlayer) = "blue" Or Knight_challenge_flag = True Or CatapultModeFlag = True ) Then L66color(CurrentPlayer) = "red" DeepFreezeTargetRedHit = False AddScoreDeepFreeze = 50000 * (DeepFreezeLordsCounter(CurrentPlayer)+1) AddScoreDeepFreezeTotal(CurrentPlayer) = AddScoreDeepFreezeTotal(CurrentPlayer) + AddScoreDeepFreeze CommentDisplayed = "Lich Lord Frozen!" If PowerSwordActivated = True Or Knight_challenge_flag = True Or CatapultModeFlag = True Then DeepFreezeTargetRedHit = True AddScoreDeepFreeze = (100000 * (DeepFreezeLordsCounter(CurrentPlayer)+1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler AddScoreDeepFreezeTotal(CurrentPlayer) = AddScoreDeepFreezeTotal(CurrentPlayer) + AddScoreDeepFreeze CommentDisplayed = "Lich Lord Destroyed!" End If VideoLichattack.Enabled = True SW60Timer=3000 AddScore AddScoreDeepFreeze Elseif SWNumber = 41 And (L66color(CurrentPlayer) = "red" ) Then DeepFreezeTargetRedHit = True AddScoreDeepFreeze = (100000 * (DeepFreezeLordsCounter(CurrentPlayer)+1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler AddScoreDeepFreezeTotal(CurrentPlayer) = AddScoreDeepFreezeTotal(CurrentPlayer) + AddScoreDeepFreeze CommentDisplayed = "Lich Lord Destroyed!" VideoLichattack.Enabled = True SW60Timer=3000 AddScore AddScoreDeepFreeze Else End If If SWNumber = 45 And (L66color(CurrentPlayer) = "blue" Or Knight_challenge_flag = True Or CatapultModeFlag = True ) Then 'Same of SW41 L66color(CurrentPlayer) = "red" DeepFreezeTargetRedHit = False AddScoreDeepFreeze = 50000 * (DeepFreezeLordsCounter(CurrentPlayer)+1) AddScoreDeepFreezeTotal(CurrentPlayer) = AddScoreDeepFreezeTotal(CurrentPlayer) + AddScoreDeepFreeze CommentDisplayed = "Lich Lord Frozen!" If PowerSwordActivated = True Or Knight_challenge_flag = True Or CatapultModeFlag = True Then DeepFreezeTargetRedHit = True AddScoreDeepFreeze = (100000 * (DeepFreezeLordsCounter(CurrentPlayer)+1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler AddScoreDeepFreezeTotal(CurrentPlayer) = AddScoreDeepFreezeTotal(CurrentPlayer) + AddScoreDeepFreeze CommentDisplayed = "Lich Lord Destroyed!" End If VideoLichattack.Enabled = True SW60Timer=3000 AddScore AddScoreDeepFreeze Elseif SWNumber = 45 And (L66color(CurrentPlayer) = "red" ) Then DeepFreezeTargetRedHit = True AddScoreDeepFreeze = (100000 * (DeepFreezeLordsCounter(CurrentPlayer)+1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler AddScoreDeepFreezeTotal(CurrentPlayer) = AddScoreDeepFreezeTotal(CurrentPlayer) + AddScoreDeepFreeze CommentDisplayed = "Lich Lord Destroyed!" VideoLichattack.Enabled = True SW60Timer=3000 AddScore AddScoreDeepFreeze Else End If If SWNumber = 48 And (L75color(CurrentPlayer) = "blue" Or Knight_challenge_flag = True Or CatapultModeFlag = True ) Then L75color(CurrentPlayer) = "red" DeepFreezeTargetRedHit = False AddScoreDeepFreeze = 50000 * (DeepFreezeLordsCounter(CurrentPlayer)+1) AddScoreDeepFreezeTotal(CurrentPlayer) = AddScoreDeepFreezeTotal(CurrentPlayer) + AddScoreDeepFreeze CommentDisplayed = "Lich Lord Frozen!" If PowerSwordActivated = True Or Knight_challenge_flag = True Or CatapultModeFlag = True Then DeepFreezeTargetRedHit = True AddScoreDeepFreeze = (100000 * (DeepFreezeLordsCounter(CurrentPlayer)+1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler AddScoreDeepFreezeTotal(CurrentPlayer) = AddScoreDeepFreezeTotal(CurrentPlayer) + AddScoreDeepFreeze CommentDisplayed = "Lich Lord Destroyed!" End If VideoLichattack.Enabled = True SW60Timer=3000 AddScore AddScoreDeepFreeze Elseif SWNumber = 48 And (L75color(CurrentPlayer) = "red" ) Then DeepFreezeTargetRedHit = True AddScoreDeepFreeze = (100000 * (DeepFreezeLordsCounter(CurrentPlayer)+1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler AddScoreDeepFreezeTotal(CurrentPlayer) = AddScoreDeepFreezeTotal(CurrentPlayer) + AddScoreDeepFreeze CommentDisplayed = "Lich Lord Destroyed!" VideoLichattack.Enabled = True SW60Timer=3000 AddScore AddScoreDeepFreeze Else End If If SWNumber = 51 And (L79color(CurrentPlayer) = "blue" Or Knight_challenge_flag = True Or CatapultModeFlag = True ) Then L79color(CurrentPlayer) = "red" DeepFreezeTargetRedHit = False AddScoreDeepFreeze = 50000 * (DeepFreezeLordsCounter(CurrentPlayer)+1) AddScoreDeepFreezeTotal(CurrentPlayer) = AddScoreDeepFreezeTotal(CurrentPlayer) + AddScoreDeepFreeze CommentDisplayed = "Lich Lord Frozen!" If PowerSwordActivated = True Or Knight_challenge_flag = True Or CatapultModeFlag = True Then DeepFreezeTargetRedHit = True AddScoreDeepFreeze = (100000 * (DeepFreezeLordsCounter(CurrentPlayer)+1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler AddScoreDeepFreezeTotal(CurrentPlayer) = AddScoreDeepFreezeTotal(CurrentPlayer) + AddScoreDeepFreeze CommentDisplayed = "Lich Lord Destroyed!" End If VideoLichattack.Enabled = True SW60Timer=3000 AddScore AddScoreDeepFreeze Elseif SWNumber = 51 And (L79color(CurrentPlayer) = "red" ) Then DeepFreezeTargetRedHit = True AddScoreDeepFreeze = (100000 * (DeepFreezeLordsCounter(CurrentPlayer)+1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler AddScoreDeepFreezeTotal(CurrentPlayer) = AddScoreDeepFreezeTotal(CurrentPlayer) + AddScoreDeepFreeze CommentDisplayed = "Lich Lord Destroyed!" VideoLichattack.Enabled = True SW60Timer=3000 AddScore AddScoreDeepFreeze Else End If If SWNumber = 56 And (L85color(CurrentPlayer) = "blue" Or Knight_challenge_flag = True Or CatapultModeFlag = True ) Then L85color(CurrentPlayer) = "red" DeepFreezeTargetRedHit = False AddScoreDeepFreeze = 50000 * (DeepFreezeLordsCounter(CurrentPlayer)+1) AddScoreDeepFreezeTotal(CurrentPlayer) = AddScoreDeepFreezeTotal(CurrentPlayer) + AddScoreDeepFreeze CommentDisplayed = "Lich Lord Frozen!" If PowerSwordActivated = True Or Knight_challenge_flag = True Or CatapultModeFlag = True Then DeepFreezeTargetRedHit = True AddScoreDeepFreeze = (100000 * (DeepFreezeLordsCounter(CurrentPlayer)+1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler AddScoreDeepFreezeTotal(CurrentPlayer) = AddScoreDeepFreezeTotal(CurrentPlayer) + AddScoreDeepFreeze CommentDisplayed = "Lich Lord Destroyed!" End If VideoLichattack.Enabled = True SW60Timer=3000 AddScore AddScoreDeepFreeze Elseif SWNumber = 56 And (L85color(CurrentPlayer) = "red" ) Then DeepFreezeTargetRedHit = True AddScoreDeepFreeze = (100000 * (DeepFreezeLordsCounter(CurrentPlayer)+1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler AddScoreDeepFreezeTotal(CurrentPlayer) = AddScoreDeepFreezeTotal(CurrentPlayer) + AddScoreDeepFreeze CommentDisplayed = "Lich Lord Destroyed!" VideoLichattack.Enabled = True SW60Timer=3000 AddScore AddScoreDeepFreeze Else End If If SWNumber = 59 And (L98color(CurrentPlayer) = "blue" Or Knight_challenge_flag = True Or CatapultModeFlag = True ) Then L98color(CurrentPlayer) = "red" DeepFreezeTargetRedHit = False AddScoreDeepFreeze = 50000 * (DeepFreezeLordsCounter(CurrentPlayer)+1) AddScoreDeepFreezeTotal(CurrentPlayer) = AddScoreDeepFreezeTotal(CurrentPlayer) + AddScoreDeepFreeze CommentDisplayed = "Lich Lord Frozen!" If PowerSwordActivated = True Or Knight_challenge_flag = True Or CatapultModeFlag = True Then DeepFreezeTargetRedHit = True AddScoreDeepFreeze = (100000 * (DeepFreezeLordsCounter(CurrentPlayer)+1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler AddScoreDeepFreezeTotal(CurrentPlayer) = AddScoreDeepFreezeTotal(CurrentPlayer) + AddScoreDeepFreeze CommentDisplayed = "Lich Lord Destroyed!" End If VideoLichattack.Enabled = True SW60Timer=3000 AddScore AddScoreDeepFreeze Elseif SWNumber = 59 And (L98color(CurrentPlayer) = "red" ) Then DeepFreezeTargetRedHit = True AddScoreDeepFreeze = (100000 * (DeepFreezeLordsCounter(CurrentPlayer)+1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler AddScoreDeepFreezeTotal(CurrentPlayer) = AddScoreDeepFreezeTotal(CurrentPlayer) + AddScoreDeepFreeze CommentDisplayed = "Lich Lord Destroyed!" VideoLichattack.Enabled = True SW60Timer=3000 AddScore AddScoreDeepFreeze Else End If If SWNumber = 64 And (L106color(CurrentPlayer) = "blue" Or Knight_challenge_flag = True Or CatapultModeFlag = True ) Then L106color(CurrentPlayer) = "red" DeepFreezeTargetRedHit = False AddScoreDeepFreeze = 50000 * (DeepFreezeLordsCounter(CurrentPlayer)+1) AddScoreDeepFreezeTotal(CurrentPlayer) = AddScoreDeepFreezeTotal(CurrentPlayer) + AddScoreDeepFreeze CommentDisplayed = "Lich Lord Frozen!" If PowerSwordActivated = True Or Knight_challenge_flag = True Or CatapultModeFlag = True Then DeepFreezeTargetRedHit = True AddScoreDeepFreeze = (100000 * (DeepFreezeLordsCounter(CurrentPlayer)+1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler AddScoreDeepFreezeTotal(CurrentPlayer) = AddScoreDeepFreezeTotal(CurrentPlayer) + AddScoreDeepFreeze CommentDisplayed = "Lich Lord Destroyed!" End If VideoLichattack.Enabled = True SW60Timer=3000 AddScore AddScoreDeepFreeze Elseif SWNumber = 64 And (L106color(CurrentPlayer) = "red" ) Then DeepFreezeTargetRedHit = True AddScoreDeepFreeze = (100000 * (DeepFreezeLordsCounter(CurrentPlayer)+1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler AddScoreDeepFreezeTotal(CurrentPlayer) = AddScoreDeepFreezeTotal(CurrentPlayer) + AddScoreDeepFreeze CommentDisplayed = "Lich Lord Destroyed!" VideoLichattack.Enabled = True SW60Timer=3000 AddScore AddScoreDeepFreeze Else End If If SWNumber = 82 Then DeepFreezeTargetRedHit = True AddScoreDeepFreeze = (100000 * (DeepFreezeLordsCounter(CurrentPlayer)+1) + 200000 * NumberOfMissioncomplete(CurrentPlayer) + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler AddScoreDeepFreezeTotal(CurrentPlayer) = AddScoreDeepFreezeTotal(CurrentPlayer) + AddScoreDeepFreeze CommentDisplayed = "Lich Lord Destroyed!" VideoLichattack.Enabled = True SW60Timer=3000 AddScore AddScoreDeepFreeze End If If DeepFreezeTargetRedHit = True Then If L66State(CurrentPlayer) = 2 And L66color(CurrentPlayer) = "red" Then L66State(CurrentPlayer) = 0:L66color(CurrentPlayer) = "blue":L75State(CurrentPlayer)=2:L75color(CurrentPlayer) = "blue":DeepFreezeLordsCounter(CurrentPlayer) = DeepFreezeLordsCounter(CurrentPlayer) + 1:End If If L75State(CurrentPlayer) = 2 And L75color(CurrentPlayer) = "red" Then L75State(CurrentPlayer) = 0:L75color(CurrentPlayer) = "blue":L66State(CurrentPlayer)=2:L66color(CurrentPlayer) = "blue":DeepFreezeLordsCounter(CurrentPlayer) = DeepFreezeLordsCounter(CurrentPlayer) + 1:End If If L79State(CurrentPlayer) = 2 And L79color(CurrentPlayer) = "red" Then L79State(CurrentPlayer) = 0:L79color(CurrentPlayer) = "blue":L85State(CurrentPlayer)=2:L85color(CurrentPlayer) = "blue":DeepFreezeLordsCounter(CurrentPlayer) = DeepFreezeLordsCounter(CurrentPlayer) + 1:End If If L85State(CurrentPlayer) = 2 And L85color(CurrentPlayer) = "red" Then L85State(CurrentPlayer) = 0:L85color(CurrentPlayer) = "blue":L79State(CurrentPlayer)=2:L79color(CurrentPlayer) = "blue":DeepFreezeLordsCounter(CurrentPlayer) = DeepFreezeLordsCounter(CurrentPlayer) + 1:End If If L98State(CurrentPlayer) = 2 And L98color(CurrentPlayer) = "red" Then L98State(CurrentPlayer) = 0:L98color(CurrentPlayer) = "blue":L106State(CurrentPlayer)=2:L106color(CurrentPlayer) = "blue":DeepFreezeLordsCounter(CurrentPlayer) = DeepFreezeLordsCounter(CurrentPlayer) + 1:End If If L106State(CurrentPlayer)= 2 And L106color(CurrentPlayer) = "red" Then L106State(CurrentPlayer)= 0:L106color(CurrentPlayer) = "blue":L98State(CurrentPlayer)=2:L98color(CurrentPlayer) = "blue":DeepFreezeLordsCounter(CurrentPlayer) = DeepFreezeLordsCounter(CurrentPlayer) + 1:End If DeepFreezeTargetRedHit = False End If 'playclear pBackglass End If If BlackCastle(CurrentPlayer) = 2 Then '**************************************** BlackCastle ***************************************************** ' playclear pBackglass '*** SWITCH AVAILABLE : SW41 + SW48 + SW51 + SW56 + SW58 + SW59 + SW64 ' Babble SW60Timer=3000 BlackCastleMissionHitStart = True ' If SWNumber = 41 or SWNumber = 45 Then L66State(CurrentPlayer) = 0 End If 'L66 (SW41 + SW45) -> Left spinner lane ' If SWNumber = 48 Then L75State(CurrentPlayer) = 0 End If 'L75 -> Left orbit ' If SWNumber = 51 Then L79State(CurrentPlayer) = 0 End If 'L79 -> Left ramp ' If SWNumber = 56 Then L85State(CurrentPlayer) = 0 End If 'L85 -> The Black Knight ' If SWNumber = 58 Then L91State(CurrentPlayer) = 0 End If 'L91 (SW58 + SW60) -> Shield and rear of shield(Saucer) ' If SWNumber = 59 Then L98State(CurrentPlayer) = 0 End If 'L98 -> Light Lock target ' If SWNumber = 64 Then L106State(CurrentPlayer) = 0 End If 'L106 -> Right orbit ' ' If L79State(CurrentPlayer) = 0 And L85State(CurrentPlayer) = 0 And L85State(CurrentPlayer) = 0 Then ' hitting 3 centre targets Powersword keeps light lit for repeated shots 3 hits lights the Orbits see above If SWNumber = 51 Then BlackCastleHitCounter = BlackCastleHitCounter + 1 If PowerSwordActivated = False Then L79State(CurrentPlayer) = 0 AddScoreBlackCastle = (100000 * BlackCastleHitCounter + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler End If If SWNumber = 56 Then BlackCastleHitCounter = BlackCastleHitCounter + 1 If PowerSwordActivated = False Then L85State(CurrentPlayer) = 0 AddScoreBlackCastle = (100000 * BlackCastleHitCounter + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler End If If SWNumber = 58 Then BlackCastleHitCounter = BlackCastleHitCounter + 1 If PowerSwordActivated = False Then L91State(CurrentPlayer) = 0 AddScoreBlackCastle = (100000 * BlackCastleHitCounter + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler End If ' hitting outer loops powersword allows light to remain on otherwise it goes out If SWNumber = 41 Or SWNumber = 45 Then BlackCastleHitCounter = 0 BlackCastleRoundCounter = BlackCastleRoundCounter + 1 ' Its been hit so elminate from next round unless powersword activated If PowerSwordActivated = False Then BC41Hit = 1 AddScoreBlackCastle = (500000 * BlackCastleRoundCounter + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler ' Check if ballsaver should be activated If BlackCastleBallSave = True Then EnableBallSaver BallSaverTime End If If SWNumber = 48 Then BlackCastleHitCounter = 0 BlackCastleRoundCounter = BlackCastleRoundCounter + 1 ' Its been hit so elminate from next round unless powersword activated If PowerSwordActivated = False Then BC48Hit = 1 AddScoreBlackCastle = (500000 * BlackCastleRoundCounter + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler ' Check if ballsaver should be activated If BlackCastleBallSave = True Then EnableBallSaver BallSaverTime End If If SWNumber = 59 Then BlackCastleHitCounter = 0 BlackCastleRoundCounter = BlackCastleRoundCounter + 1 ' Its been hit so elminate from next round unless powersword activated If PowerSwordActivated = False Then BC59Hit = 1 AddScoreBlackCastle = (500000 * BlackCastleRoundCounter + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler ' Check if ballsaver should be activated If BlackCastleBallSave = True Then EnableBallSaver BallSaverTime End If If SWNumber = 64 Then BlackCastleHitCounter = 0 BlackCastleRoundCounter = BlackCastleRoundCounter + 1 ' Its been hit so elminate from next round unless powersword activated If PowerSwordActivated = False Then BC64Hit = 1 AddScoreBlackCastle = (500000 * BlackCastleRoundCounter + 900000 * Int(NumberOfMissioncomplete(CurrentPlayer)/6)) * PowerSwordMultipler ' Check if ballsaver should be activated If BlackCastleBallSave = True Then EnableBallSaver BallSaverTime End If ' check if back to three centre targets if hit count = 0 then we are If BlackCastleHitCounter = 0 Then L66State(CurrentPlayer) = 0 L75State(CurrentPlayer) = 0 L79State(CurrentPlayer) = 2 L85State(CurrentPlayer) = 2 L91State(CurrentPlayer) = 2 L98State(CurrentPlayer) = 0 L106State(CurrentPlayer) = 0 End If ' Light outer Lopps if three hits to centre targets If BlackCastleHitCounter >= 3 Then ' check if all 4 have been hit (later missions) If BC41Hit = 1 And BC48Hit = 1 And BC59Hit = 1 And BC64Hit = 1 Then ' reset the Lights BC41Hit = 0 BC48Hit = 0 BC59Hit = 0 BC64Hit = 0 End If If BC41Hit = 0 Then L66State(CurrentPlayer) = 2 If BC48Hit = 0 Then L75State(CurrentPlayer) = 2 If BC59Hit = 0 Then L98State(CurrentPlayer) = 2 If BC64Hit = 0 Then L106State(CurrentPlayer) = 2 L79State(CurrentPlayer) = 0 L85State(CurrentPlayer) = 0 L91State(CurrentPlayer) = 0 End If If PMdebug = True Then PuPlayer.LabelSet pFullDMD,"curplayer",BlackCastleHitCounter & " " & CurrentMissionFlag(CurrentPlayer),1,"{'mt':2}" AddScore AddScoreBlackCastle AddScoreBlackCastleTotal(CurrentPlayer) = AddScoreBlackCastleTotal(CurrentPlayer) + AddScoreBlackCastle VideoBlackCastleattack.Enabled = True End If CheckLamp.interval = 100 CheckLamp.Enabled = True End Sub Sub CheckLampAction_Timer() ' ****************** Ball save light left hand lane ************************************************************* If BallSaveAvailable(CurrentPlayer) Then L13.state = 1 Else L13.state = 0 End If ' ***************** Add A ball light ***************************************************************************** If CountSW45used(CurrentPlayer) = 1 Then L70.State=1 End If If CountSW45used(CurrentPlayer) = 0 or CountSW45used(CurrentPlayer) = 2 Then L70.State=0 End If '***************** Magna Save ************************************************************************************ If MagnaSaveFlag(CurrentPlayer) = 1 Then L24.State = 1 End If ' *************** Right hand targets for magna save ************************************************************** If L110.State = 1 And L111.State = 1 And L112.State = 1 Then MagnaSaveFlag(CurrentPlayer) = 1 if PowerSwordActivated = False Then PowerSwordLevel(CurrentPlayer) = PowerSwordLevel(CurrentPlayer) + 20 If PowerSwordLevel(CurrentPlayer)>100 then PowerSwordLevel(CurrentPlayer) = 100 updatePowersword() End If L24.State = 1 L110.State = 2 L111.State = 2 L112.State = 2 End If '***************** Left side Ball saver ************************************************************************ If L63.State = 1 And L64.State = 1 Then BallSaveAvailable(CurrentPlayer) = True L13.state = 1 L63.state = 0 L64.state = 0 End If ' *************** Rage Lanes ********************************************************************************** IF L11.state=1 Then If L12.state=1 Then If L15.state=1 Then If L16.state=1 Then 'PlaySound "Sound-0x0211" If RetroMode = 1 or RetroMode = 3 Or RageMultiball = True Or Retromode = -1 Then playmedia "Sound-0x0047.mp3","Audionoise",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) ' play jackpot Sound Callout RndInt(373,374) addscore 2000000 Else Callout 437 RageCount = RageCount + 1 If RageCount => DifficultyRageCountMystery Then '!!!!!!!!!! modify after RageCount MysteryFlag = True L96.State = 2 End If End If L11.state=0 L12.state=0 L15.state=0 L16.state=0 SaveStateLightturnlight End If End If End If End If ' ************* War start up ********************************************************************************** IF L115.state=1 Then IF L116.state=1 Then IF L117.state=1 Then 'PlaySound "Sound-0x01FF" If RetroMode = 1 or RetroMode = 3 Or RageMultiball = True Or RetroMode = -1 Then '' playmedia "Sound-0x0047.mp3","Audionoise",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) If retromode = 3 Or RageMultiball = True Then ' play jackpot Sound Callout RndInt(373,374) addscore 2000000 End If Else BonusMultiplier(CurrentPlayer) = BonusMultiplier(CurrentPlayer) + 1 If CurrentMissionFlag(CurrentPlayer) = 0 And WarHurryFlag = False And Gamerover_flag = False Then WarHurryUpStart Callout RndInt(345,352) Else Callout 353 ' mission is on so call out just war and increase multiplier only End If End If L115.state=0 L116.state=0 L117.state=0 SaveStateLightturnlight End If End If End If End Sub ' new start mission checks uses Sw56 SW56 , SW58+SW60, boule_hit+Kicker002, SW51_Hit() ' top of ramp (lock Mission) Sub ActionWhenHitOneOfThreeWay() If NumberOfHitForStartMission(CurrentPlayer) >= HitsToActivateMission(CurrentPlayer) and CurrentMissionFlag(CurrentPlayer) = 0 Then ImWaiting.Enabled = True ' start the Imwaiting callouts as ready for mission if RampActivForValidateMission(CurrentPlayer) = False Then RampActivForValidateMission(CurrentPlayer) = True StopBouleAngle = 0 StopRotating.Enabled=True RampLightsMove(CurrentPlayer) = "Blinking" Elseif ShieldIsReadyToActivateMission(CurrentPlayer) = True Then RampLightsMove(CurrentPlayer) = "ShieldReadyForMonster" If BouleHited = 1 Then StopBouleAngle = 0 StopRotating.interval=100 StopRotating.Enabled=True Shield_New_Status = "Unlock" ShieldTimer.Enabled=True End If If BouleHited = 2 Then StopBouleFlag = False StopRotating.Enabled=False timer2.interval=8 timer2.Enabled=True FlailReset.Enabled = True ' Set safeguard in place to reset flail every 15 seconds End If Else BouleHited = 0 StopBouleAngle = 90 StopBouleFlag = True StopRotating.interval=100 StopRotating.Enabled=True RampLightsMove(CurrentPlayer) = "UP" End If End If End Sub Sub SelectMission() if MudBog(CurrentPlayer) = 3 Then tempNum = 1 ElseIf MoltenFire(CurrentPlayer) = 3 Then tempNum = 2 ElseIf BurningSands(CurrentPlayer) = 3 Then tempNum = 3 Elseif WickedCavern(CurrentPlayer) = 3 Then tempNum = 4 ElseIf DeepFreeze(CurrentPlayer) = 3 Then tempnum = 5 Else tempNum = Int(Rnd*5)+1 End If ' force mission here for testing commented out is random 'if BurningSands(CurrentPlayer) <> 4 Then tempnum = 3 Select Case tempNum Case 1 : MissionRandom = "MudBog": : LightObjectColor(1).color = RGB(0, 255, 0) : LightObjectColor(1).colorfull = RGB(0, 255, 0) : LightObjectColor(1).state=2 : 'MudBog = 1 Case 2 : MissionRandom = "MoltenFire": LightObjectColor(3).color = RGB(255, 50, 0) : LightObjectColor(3).colorfull = RGB(255, 50, 0) : LightObjectColor(3).state=2 : 'MoltenFire = 1 Case 3 : MissionRandom = "BurningSands": LightObjectColor(5).color = RGB(255, 255, 0) : LightObjectColor(5).colorfull = RGB(255, 255, 0) : LightObjectColor(5).state=2 : 'BurningSands = 1 Case 4 : MissionRandom = "WickedCavern": LightObjectColor(7).color = RGB(255, 0, 0) : LightObjectColor(7).colorfull = RGB(255, 0, 0) : LightObjectColor(7).state=2 : 'WickedCavern = 1 Case 5 : MissionRandom = "DeepFreeze": LightObjectColor(9).color = RGB(0, 0, 255) : LightObjectColor(9).colorfull = RGB(0, 0, 255) : LightObjectColor(9).state=2 : 'DeepFreeze = 1 End Select MissionCompleteCheck End Sub Sub MissionCompleteCheck() If CurrentMissionFlag(CurrentPlayer) = 1 Then 'Nothing The mission is not finish ElseIf MudBog(CurrentPlayer) = 4 And MoltenFire(CurrentPlayer) = 4 And BurningSands(CurrentPlayer) = 4 And WickedCavern(CurrentPlayer) = 4 And DeepFreeze(CurrentPlayer) = 4 Then MissionRandom = "BlackCastle" LightObjectColor(11).color = RGB(255, 0, 255) LightObjectColor(11).colorfull = RGB(255, 0, 255) LightObjectColor(11).state=2 BlackCastle(CurrentPlayer) = 1 if BallsOnPlayfield>0 Then Callout 215 ElseIf MissionRandom = "MudBog" Then If MudBog(CurrentPlayer) = 4 Then SelectMission Else MudBog(CurrentPlayer) = 1 if BallsOnPlayfield>0 Then Callout 213 End If ' End If ElseIf MissionRandom = "MoltenFire" Then If MoltenFire(CurrentPlayer) = 4 Then SelectMission Else MoltenFire(CurrentPlayer) = 1 if BallsOnPlayfield>0 Then Callout 212 End If ' End If ElseIf MissionRandom = "BurningSands" Then If BurningSands(CurrentPlayer) = 4 Then SelectMission Else BurningSands(CurrentPlayer) = 1 if BallsOnPlayfield>0 Then Callout 210 End If ' End If ElseIf MissionRandom = "WickedCavern" Then If WickedCavern(CurrentPlayer) = 4 Then SelectMission Else WickedCavern(CurrentPlayer) = 1 if BallsOnPlayfield>0 Then Callout 214 End If ' End If ElseIf MissionRandom = "DeepFreeze" Then If DeepFreeze(CurrentPlayer) = 4 Then SelectMission Else DeepFreeze(CurrentPlayer) = 1 if BallsOnPlayfield>0 Then Callout 211 End If Else 'This Case is not possible (MissionRandom = 5 possibility and 6 when the 5 basic mission is completed) in case of select again mission SelectMission End If End Sub Sub MissionRandomTimer_Timer() MissionRandomTimer.Interval=30000 MissionRandomTimer.Enabled = False 'TurnOffRoundLights If MudBog(CurrentPlayer) = 1 Then If MudBogHeadsCounter(CurrentPlayer) = 0 Then MudBog(CurrentPlayer) = 0 Else MudBog(CurrentPlayer) = 3 End If End If If MoltenFire(CurrentPlayer) = 1 Then If MoltenFireShots(CurrentPlayer) = 0 Then MoltenFire(CurrentPlayer) = 0 Else MoltenFire(CurrentPlayer) = 3 End If End If If BurningSands(CurrentPlayer) = 1 Then If BurningSandsSetsCounter(CurrentPlayer) = 0 Then BurningSands(CurrentPlayer) = 0 Else BurningSands(CurrentPlayer) = 3 End If End If If WickedCavern(CurrentPlayer) = 1 Then If WickedCavernShots(CurrentPlayer) = 0 Then WickedCavern(CurrentPlayer) = 0 Else WickedCavern(CurrentPlayer) = 3 End If End If If DeepFreeze(CurrentPlayer) = 1 Then If DeepFreezeLordsCounter(CurrentPlayer) = 0 Then DeepFreeze(CurrentPlayer) = 0 Else DeepFreeze(CurrentPlayer) = 3 End If End If If BlackCastle(CurrentPlayer) = 1 Then If BlackCastleRoundCounter = 0 Then BlackCastle(CurrentPlayer) = 0 Else BlackCastle(CurrentPlayer) = 3 End If End If SelectMission End Sub 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' PER PLAYER LIGHTS '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X ' setlightvalues sub setlightvalues 'Start Playing for all players RampChangeStatus(CurrentPlayer) = "OFF" dim i For i = 1 to 4 OldState_L101(i) = 0 OldState_L106(i) = 0 OldState_L103(i) = 0 OldState_L11(i) = 0 OldState_L110(i) = 2 OldState_L111(i) = 2 OldState_L112(i) = 2 OldState_L115(i) = 0 OldState_L116(i) = 0 OldState_L117(i) = 0 OldState_L12(i) = 0 OldState_L13(i) = 0 OldState_L131(i) = 0 OldState_L132(i) = 0 OldState_L133(i) = 0 OldState_L14(i) = 0 OldState_L15(i) = 0 OldState_L16(i) = 0 OldState_L163(i) = 0 OldState_L165(i) = 0 OldState_L166(i) = 0 OldState_L170(i) = 0 OldState_L171(i) = 0 OldState_L172(i) = 0 OldState_L18(i) = 0 OldState_L19(i) = 0 OldState_L20(i) = 0 OldState_L21(i) = 0 OldState_L22(i) = 0 OldState_L23(i) = 0 OldState_L24(i) = 0 ' OldState_L26(i) = 0 ' OldState_L29(i) = 0 ' OldState_L32(i) = 0 ' OldState_L35(i) = 0 ' OldState_L38(i) = 0 ' OldState_L41(i) = 0 ' OldState_L44(i) = 0 ' OldState_L47(i) = 0 ' OldState_L50(i) = 0 ' OldState_L53(i) = 0 ' OldState_L56(i) = 0 ' OldState_L59(i) = 0 OldState_L63(i) = 0 OldState_L64(i) = 0 OldState_L66(i) = 0 OldState_L69(i) = 0 OldState_L70(i) = 0 OldState_L75(i) = 0 OldState_L72(i) = 0 OldState_L79(i) = 2 OldState_L82(i) = 0 OldState_L83(i) = 0 OldState_L85(i) = 2 OldState_L88(i) = 0 OldState_L89(i) = 0 OldState_L91(i) = 2 OldState_L94(i) = 0 OldState_L95(i) = 0 OldState_L96(i) = 0 OldState_L98(i) = 0 OldState_Light026(i) = 0 OldState_Light054(i) = 0 OldState_Light055(i) = 0 OldState_Light056(i) = 0 OldState_Light057(i) = 0 OldState_Light058(i) = 0 OldState_Light059(i) = 0 OldState_Light060(i) = 0 OldState_Light061(i) = 0 OldState_Light062(i) = 0 OldState_Light063(i) = 0 Next end Sub sub rememberlights If BallsOnPlayfield > 0 Then SaveStateLightturnlight End If SaveStateLight end Sub sub resetcolors end Sub sub relighttable L270.State=1 L271.State=1 L272.State=1 If OldState_L101(CurrentPlayer) = 1 Then L101.state = 1 If OldState_L106(CurrentPlayer) = 1 Then L106.state = 1 If OldState_L103(CurrentPlayer) = 1 Then L103.state = 1 If OldState_L11(CurrentPlayer) = 1 Then L11.state = 1 If OldState_L110(CurrentPlayer) = 1 Then L110.state = 1 If OldState_L111(CurrentPlayer) = 1 Then L111.state = 1 If OldState_L112(CurrentPlayer) = 1 Then L112.state = 1 If OldState_L115(CurrentPlayer) = 1 Then L115.state = 1 If OldState_L116(CurrentPlayer) = 1 Then L116.state = 1 If OldState_L117(CurrentPlayer) = 1 Then L117.state = 1 If OldState_L12(CurrentPlayer) = 1 Then L12.state = 1 If OldState_L13(CurrentPlayer) = 1 Then L13.state = 1 If OldState_L131(CurrentPlayer) = 1 Then L131.state = 1 If OldState_L132(CurrentPlayer) = 1 Then L132.state = 1 If OldState_L133(CurrentPlayer) = 1 Then L133.state = 1 If OldState_L14(CurrentPlayer) = 1 Then L14.state = 1 If OldState_L15(CurrentPlayer) = 1 Then L15.state = 1 If OldState_L16(CurrentPlayer) = 1 Then L16.state = 1 If OldState_L163(CurrentPlayer) = 1 Then L163.state = 1 If OldState_L165(CurrentPlayer) = 1 Then L165.state = 1 If OldState_L166(CurrentPlayer) = 1 Then L166.state = 1 If OldState_L170(CurrentPlayer) = 1 Then L170.state = 1 If OldState_L171(CurrentPlayer) = 1 Then L171.state = 1 If OldState_L172(CurrentPlayer) = 1 Then L172.state = 1 If OldState_L18(CurrentPlayer) = 1 Then L18.state = 1 If OldState_L19(CurrentPlayer) = 1 Then L19.state = 1 If OldState_L20(CurrentPlayer) = 1 Then L20.state = 1 If OldState_L21(CurrentPlayer) = 1 Then L21.state = 1 If OldState_L22(CurrentPlayer) = 1 Then L22.state = 1 If OldState_L23(CurrentPlayer) = 1 Then L23.state = 1 If OldState_L24(CurrentPlayer) = 1 Then L24.state = 1 ' If OldState_L26(CurrentPlayer) = 1 Then L26.state = 1 ' If OldState_L29(CurrentPlayer) = 1 Then L29.state = 1 ' If OldState_L32(CurrentPlayer) = 1 Then L32.state = 1 ' If OldState_L35(CurrentPlayer) = 1 Then L35.state = 1 ' If OldState_L38(CurrentPlayer) = 1 Then L38.state = 1 ' If OldState_L41(CurrentPlayer) = 1 Then L41.state = 1 ' If OldState_L44(CurrentPlayer) = 1 Then L44.state = 1 ' If OldState_L47(CurrentPlayer) = 1 Then L47.state = 1 ' If OldState_L50(CurrentPlayer) = 1 Then L50.state = 1 ' If OldState_L53(CurrentPlayer) = 1 Then L53.state = 1 ' If OldState_L56(CurrentPlayer) = 1 Then L56.state = 1 ' If OldState_L59(CurrentPlayer) = 1 Then L59.state = 1 If OldState_L63(CurrentPlayer) = 1 Then L63.state = 1 If OldState_L64(CurrentPlayer) = 1 Then L64.state = 1 If OldState_L66(CurrentPlayer) = 1 Then L66.state = 1 If OldState_L69(CurrentPlayer) = 1 Then L69.state = 1 If OldState_L70(CurrentPlayer) = 1 Then L70.state = 1 If OldState_L75(CurrentPlayer) = 1 Then L75.state = 1 If OldState_L72(CurrentPlayer) = 1 Then L72.state = 1 If OldState_L79(CurrentPlayer) = 1 Then L79.state = 1 If OldState_L82(CurrentPlayer) = 1 Then L82.state = 1 If OldState_L83(CurrentPlayer) = 1 Then L83.state = 1 If OldState_L85(CurrentPlayer) = 1 Then L85.state = 1 If OldState_L88(CurrentPlayer) = 1 Then L88.state = 1 If OldState_L89(CurrentPlayer) = 1 Then L89.state = 1 If OldState_L91(CurrentPlayer) = 1 Then L91.state = 1 If OldState_L94(CurrentPlayer) = 1 Then L94.state = 1 If OldState_L95(CurrentPlayer) = 1 Then L95.state = 1 ExtraBallsIsLit = True End If If OldState_L96(CurrentPlayer) = 1 Then L96.state = 1 If OldState_L98(CurrentPlayer) = 1 Then L98.state = 1 If OldState_Light026(CurrentPlayer) = 1 Then Light026.state = 1 If OldState_Light054(CurrentPlayer) = 1 Then Light054.state = 1 If OldState_Light055(CurrentPlayer) = 1 Then Light055.state = 1 If OldState_Light056(CurrentPlayer) = 1 Then Light056.state = 1 If OldState_Light057(CurrentPlayer) = 1 Then Light057.state = 1 If OldState_Light058(CurrentPlayer) = 1 Then Light058.state = 1 If OldState_Light059(CurrentPlayer) = 1 Then Light059.state = 1 If OldState_Light060(CurrentPlayer) = 1 Then Light060.state = 1 If OldState_Light061(CurrentPlayer) = 1 Then Light061.state = 1 If OldState_Light062(CurrentPlayer) = 1 Then Light062.state = 1 If OldState_Light063(CurrentPlayer) = 1 Then Light063.state = 1 If OldState_L101(CurrentPlayer) = 2 Then L101.state = 2 If OldState_L106(CurrentPlayer) = 2 Then L106.state = 2 If OldState_L103(CurrentPlayer) = 2 Then L103.state = 2 If OldState_L11(CurrentPlayer) = 2 Then L11.state = 2 If OldState_L110(CurrentPlayer) = 2 Then L110.state = 2 If OldState_L111(CurrentPlayer) = 2 Then L111.state = 2 If OldState_L112(CurrentPlayer) = 2 Then L112.state = 2 If OldState_L115(CurrentPlayer) = 2 Then L115.state = 2 If OldState_L116(CurrentPlayer) = 2 Then L116.state = 2 If OldState_L117(CurrentPlayer) = 2 Then L117.state = 2 If OldState_L12(CurrentPlayer) = 2 Then L12.state = 2 If OldState_L13(CurrentPlayer) = 2 Then L13.state = 2 If OldState_L131(CurrentPlayer) = 2 Then L131.state = 2 If OldState_L132(CurrentPlayer) = 2 Then L132.state = 2 If OldState_L133(CurrentPlayer) = 2 Then L133.state = 2 If OldState_L14(CurrentPlayer) = 2 Then L14.state = 2 If OldState_L15(CurrentPlayer) = 2 Then L15.state = 2 If OldState_L16(CurrentPlayer) = 2 Then L16.state = 2 If OldState_L163(CurrentPlayer) = 2 Then L163.state = 2 If OldState_L165(CurrentPlayer) = 2 Then L165.state = 2 If OldState_L166(CurrentPlayer) = 2 Then L166.state = 2 If OldState_L170(CurrentPlayer) = 2 Then L170.state = 2 If OldState_L171(CurrentPlayer) = 2 Then L171.state = 2 If OldState_L172(CurrentPlayer) = 2 Then L172.state = 2 If OldState_L18(CurrentPlayer) = 2 Then L18.state = 2 If OldState_L19(CurrentPlayer) = 2 Then L19.state = 2 If OldState_L20(CurrentPlayer) = 2 Then L20.state = 2 If OldState_L21(CurrentPlayer) = 2 Then L21.state = 2 If OldState_L22(CurrentPlayer) = 2 Then L22.state = 2 If OldState_L23(CurrentPlayer) = 2 Then L23.state = 2 If OldState_L24(CurrentPlayer) = 2 Then L24.state = 2 ' If OldState_L26(CurrentPlayer) = 2 Then L26.state = 2 ' If OldState_L29(CurrentPlayer) = 2 Then L29.state = 2 ' If OldState_L32(CurrentPlayer) = 2 Then L32.state = 2 ' If OldState_L35(CurrentPlayer) = 2 Then L35.state = 2 ' If OldState_L38(CurrentPlayer) = 2 Then L38.state = 2 ' If OldState_L41(CurrentPlayer) = 2 Then L41.state = 2 ' If OldState_L44(CurrentPlayer) = 2 Then L44.state = 2 ' If OldState_L47(CurrentPlayer) = 2 Then L47.state = 2 ' If OldState_L50(CurrentPlayer) = 2 Then L50.state = 2 ' If OldState_L53(CurrentPlayer) = 2 Then L53.state = 2 ' If OldState_L56(CurrentPlayer) = 2 Then L56.state = 2 ' If OldState_L59(CurrentPlayer) = 2 Then L59.state = 2 If OldState_L63(CurrentPlayer) = 2 Then L63.state = 2 If OldState_L64(CurrentPlayer) = 2 Then L64.state = 2 If OldState_L66(CurrentPlayer) = 2 Then L66.state = 2 If OldState_L69(CurrentPlayer) = 2 Then L69.state = 2 If OldState_L70(CurrentPlayer) = 2 Then L70.state = 2 If OldState_L75(CurrentPlayer) = 2 Then L75.state = 2 If OldState_L72(CurrentPlayer) = 2 Then L72.state = 2 If OldState_L79(CurrentPlayer) = 2 Then L79.state = 2 If OldState_L82(CurrentPlayer) = 2 Then L82.state = 2 If OldState_L83(CurrentPlayer) = 2 Then L83.state = 2 If OldState_L85(CurrentPlayer) = 2 Then L85.state = 2 If OldState_L88(CurrentPlayer) = 2 Then L88.state = 2 If OldState_L89(CurrentPlayer) = 2 Then L89.state = 2 If OldState_L91(CurrentPlayer) = 2 Then L91.state = 2 If OldState_L94(CurrentPlayer) = 2 Then L94.state = 2 If OldState_L95(CurrentPlayer) = 2 Then L95.state = 2 If OldState_L96(CurrentPlayer) = 2 Then L96.state = 2 MysteryFlag = True End If If OldState_L98(CurrentPlayer) = 2 Then L98.state = 2 If OldState_Light026(CurrentPlayer) = 2 Then Light026.state = 2 If OldState_Light054(CurrentPlayer) = 2 Then Light054.state = 2 If OldState_Light055(CurrentPlayer) = 2 Then Light055.state = 2 If OldState_Light056(CurrentPlayer) = 2 Then Light056.state = 2 If OldState_Light057(CurrentPlayer) = 2 Then Light057.state = 2 If OldState_Light058(CurrentPlayer) = 2 Then Light058.state = 2 If OldState_Light059(CurrentPlayer) = 2 Then Light059.state = 2 If OldState_Light060(CurrentPlayer) = 2 Then Light060.state = 2 If OldState_Light061(CurrentPlayer) = 2 Then Light061.state = 2 If OldState_Light062(CurrentPlayer) = 2 Then Light062.state = 2 If OldState_Light063(CurrentPlayer) = 2 Then Light063.state = 2 End Sub 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' SKILLSHOT & BALL SAVE '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X ' ' Retro multiballs Sub StartBlackKnightRetroMulti_timer StartBlackKnightRetroMulti.Enabled=False Knightlamp(CurrentPlayer) = 0 bMultiBallMode = True CurrentMissionFlag(CurrentPlayer) = 2 if RetroMode = 3 Then MultiballAmount = 3 MultiballKicker.enabled = True 'EndBLackKnightRetroMode.interval = Bk2000Time * 1000 'EndBLackKnightRetroMode.enabled = True ExtraBallsIsLit = True CheckLamp.Enabled = True else kickball doublekick.Enabled=True End If pupevent 408 end sub ' Meakin end the Retro mode timers this is called as the mode is finished sub EndBLackKnightRetroMode_timer EndBLackKnightRetroMode.Enabled = False ' mode 1 is 3 ball onto last ball 10 secon timer complete called on ball drain when down to 1 ball ' Mode 2 is 6 ball 60 second timer complete called at start of MB ie it is 60 seconds MultiballKicker.enabled = False ' both shut down the flippers LeftFlipper.RotateToStart UPRightFlipper.RotateToStart RightFlipper.RotateToStart RetroMode = -1 'stop flippers and prepare drain ' doing the bonuses If BlackKnightRetro(CurrentPlayer) = 1 Then BlackKnightRetro(CurrentPlayer) = 2 'End Of Mode BK AddTimeForMission(CurrentPlayer) = 0 horloge.Enabled = False 'CurrentMissionFlag(CurrentPlayer) = 0 Elseif BlackKnightRetro(CurrentPlayer) = 3 Then BlackKnightRetro(CurrentPlayer) = 0 'ExtraBallsAwards(CurrentPlayer) = ExtraBallsAwards(CurrentPlayer) + 1 AddTimeForMission(CurrentPlayer) = 0 horloge.Enabled = False 'CurrentMissionFlag(CurrentPlayer) = 0 End If ' show total bonus here ' back to normal VideoSetBackgroundPM MusicResetPM end Sub Sub EnableBallSaver(seconds) bBallSaverActive = True bBallSaverReady = False BallSaverTimerExpired.Interval = 1000 * seconds BallSaverTimerExpired.Enabled = True checklamp.enabled = True End Sub ' The ball saver timer has expired. Turn it off AND reset the game flag ' Sub BallSaverTimerExpired_Timer() BallSaverTimerExpired.Enabled = False bBallSaverActive = False ' changed to put on extr balls or Not If ExtraBallsAwards(CurrentPlayer) > 0 Then L14.State = 1 Else L14.State = 0 End If checkLamp.Enabled = True ' at end of ball saver the kicker routine is also stopped for multiball If RageMultiball = True Or Retromode = 3 Then MultiballKicker.enabled = False ' spin the flail to 90 to free any trapped balls StopBouleAngle = 90 StopBouleFlag = True StopRotating.Interval = 3000 StopRotating.Enabled=True timer2.interval=5 timer2.Enabled=False FlailReset.Enabled = False ' Set safeguard Off ' end of multiball and ballsinplay needs reseting to the amount actually on the table BallsOnPlayfield = (UBound(GetBalls()) + 1) - BallInLocker If PMdebug = true Then PuPlayer.LabelSet pFullDMD,"curplayer","EndRage: " & BallsOnPlayfield ,1,"{'mt':2}" End If End Sub 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' TARGET HIT EVENTS '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X ' Sub Ramp001_hit() ' playsound "fx_metalrolling" End Sub Sub Gate002Touch If PMdebug = True Then PuPlayer.LabelSet pFullDMD,"curplayer","Gate_02Touch",1,"{'mt':2}" BallControlTimer.Enabled = True If LastChanceStart = True and LastChanceChronoStart(CurrentPlayer) = False Then CurrentMissionFlag(CurrentPlayer) = 3 horloge.Enabled = True End If ' playsound "gate" CheckCurrentMissionPlayer LastChanceButtonPush(CurrentPlayer) = False CheckLamp.Interval = 100 CheckLamp.Enabled = True 'If skillshotlive = 1 Then ' stopskill ' dlcall = 0 ' potioncall = 0 'end if 'skillshotlive = 0 'If(bBallSaverReady = True) AND(15 <> 0) And(bBallSaverActive = False) Then ' EnableBallSaver 15:bBallSaverActive = True 'End If 'Hitting the gate is the trigger to start the skill shot timer shotskill.Enabled=True shotskillflag = True 'SWNumber = 86 End Sub Sub Gate02_hit() Gate002Touch End Sub Sub Gate003_hit() AddScore 250000 BallInLocker = BallInLocker + 1 BallInCatapult(CurrentPlayer) = BallInCatapult(CurrentPlayer) + 1 'BallsOnPlayfield = BallsOnPlayfield - 1 ' If catapult_lock_is_lit(CurrentPlayer) = False or BlackKnightRetro(CurrentPlayer) = 1 or BlackKnightRetro(CurrentPlayer) = 3 or CatapultModeFlag = True Then If catapult_lock_is_lit(CurrentPlayer) = False or retroMode = 1 or Retromode = 3 Or RageMultiball = True Or Retromode = -1 or CatapultModeFlag = True Then If LastChanceCatapultMode = False Then UPLock.collidable=False UPLock.TransY=-20 Else UPLock.collidable=True UPLock.TransY=0 LastChanceBallInCatapult.interval = 35000 LastChanceBallInCatapult.Enabled = True End If Else 'AddscoreCatapult = AddscoreCatapult + 500000 UPLock.collidable=True UPLock.TransY=0 If shotskillflag = true And LastChanceStart = False Then AddScore 2000000 videoshotskill ShootToSkillTimer.Interval=5000 ShootToSkillTimer.enabled=True Else ShootToSkillTimer.Interval=100 ShootToSkillTimer.enabled=True End If End If If CatapultModeFlag = True Then Catapult_jackpot_collected = Catapult_jackpot_collected * Catapult_Super_Jackpot_Multi Catapult_Mode_Total_score(CurrentPlayer) = Catapult_Mode_Total_score(CurrentPlayer) + Catapult_jackpot_collected AddScore Catapult_jackpot_collected If Catapult_Super_Jackpot_Multi = 1 Then CommentDisplayed = "Catapult Super Jackpot!" callout 377 ElseIf Catapult_Super_Jackpot_Multi = 2 Then CommentDisplayed = "2x Catapult Super Jackpot!" Callout 372 ELseIf Catapult_Super_Jackpot_Multi = 3 Then CommentDisplayed = "3x Catapult Super Jackpot!" Callout 378 Else CommentDisplayed = "4x Catapult Super Jackpot!" Callout 375 End If Video_Catapult_Multball_jacpot 'LightEyesBK ' playmedia audioknight,"Audioknight",pAudio,"",0,"",1,1 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) End If End Sub Sub LastChanceBallInCatapult_timer() LastChanceBallInCatapult.Enabled = False BallKeptInLocker = 0 ' BallInCatapult(CurrentPlayer) = 0 LockerTimer.Enabled=True Catapult_Super_Jackpot_Multi = 1 End Sub Sub CatapultManagement_Timer() If BallInLocker = 1 Then ''**************** BALL IN LOCKER 1 ****************** If BallInCatapult(CurrentPlayer) = 1 Then BallKeptInLocker = 1 RequestANewBall = True Callout 355 video_catapult.enabled= True L131.state=1 L132.state=2 L133.state=0 End If If BallInCatapult(CurrentPlayer) = 2 Then RequestANewBall = True BallKeptInLocker = 1 'PlaySound "Sound-0x08F6" video_catapult.enabled= True L131.state=1 L132.state=1 L133.state=2 End If If BallInCatapult(CurrentPlayer) = 3 Then RequestANewBall = False LockerTimer.Enabled=True video_catapult.enabled= True L131.state=1 L132.state=1 L133.state=1 BallKeptInLocker = 0 BallInCatapult(CurrentPlayer) = 0 ' TEST kickball 'Ball in Locker 1 bMultiBallMode = True 'Ball in Locker 1 doublekick.Enabled=True 'Ball in Locker 1 CatapultModeFlag = True BouleAfterHit.Enabled = True Catapult_Super_Jackpot_Multi = 1 ' EnableBallSaver 40:bBallSaverActive = True If CurrentMissionFlag(CurrentPlayer) = 0 Then video_catapult_mode_loop End If End If End If If BallInLocker = 2 Then ''**************** BALL IN LOCKER 2 ****************** AddScore 250000 If BallInCatapult(CurrentPlayer) = 1 Then RequestANewBall = False Callout 355 video_catapult.enabled= True L131.state=1 L132.state=2 L133.state=0 BallKeptInLocker = 1 LockerTimer.Enabled=True End If If BallInCatapult(CurrentPlayer) = 2 Then RequestANewBall = true BallKeptInLocker = 2 'BallKeptInLocker = 2 Callout 356 video_catapult.enabled= True L131.state=1 L132.state=1 L133.state=2 End If If BallInCatapult(CurrentPlayer) = 3 Then RequestANewBall = False LockerTimer.Enabled=True video_catapult.enabled= True L131.state=1 L132.state=1 L133.state=1 BallKeptInLocker = 0 ' BallInCatapult(CurrentPlayer) = 0 ' TEST Callout 358 kickball 'Ball in Locker 2 bMultiBallMode = True 'Ball in Locker 2 CatapultModeFlag = True BouleAfterHit.Enabled = True Catapult_Super_Jackpot_Multi = 1 ' EnableBallSaver 40:bBallSaverActive = True ' If CurrentMissionFlag(CurrentPlayer) = 0 Then ' video_catapult_mode_loop ' End If End If End If If BallInLocker = 3 Then '**************** BALL IN LOCKER 3 ****************** AddScore 100000 If BallInCatapult(CurrentPlayer) = 1 Then BallKeptInLocker = 1 RequestANewBall = False Callout 355 video_catapult.enabled= True L131.state=1 L132.state=2 L133.state=0 BallKeptInLocker = 2 LockerTimer.Enabled=True End If If BallInCatapult(CurrentPlayer) = 2 Then RequestANewBall = False BallKeptInLocker = 2 Callout 356 ' video_catapult.enabled= True L131.state=1 L132.state=1 L133.state=2 BallKeptInLocker = 2 LockerTimer.Enabled=True End If If BallInCatapult(CurrentPlayer) = 3 Then RequestANewBall = False LockerTimer.Enabled=True video_catapult.enabled= True L131.state=1 L132.state=1 L133.state=1 BallKeptInLocker = 0 BallInCatapult(CurrentPlayer) = 0 ' TEST CatapultModeFlag = True BouleAfterHit.Enabled = True Catapult_Super_Jackpot_Multi = 1 Callout 358 ' EnableBallSaver 40:bBallSaverActive = True ' If CurrentMissionFlag(CurrentPlayer) = 0 Then ' video_catapult_mode_loop ' End If End If End If If RequestANewBall = True Then If BallsOnPlayfield = 0 Then Kicker1.CreateBall 'Kicker1.Kick 90,10 Kicker1.Kick 300, 30, 1.56 RandomSoundBallRelease kicker1 'playsound "ballrelease" Else AutoPlunger.createball RandomSoundBallRelease kicker1 AutoPlunger.kick 360,45 'playsound "ballrelease" SoundPlungerReleaseBall End If End If CatapultManagement.Enabled = False End Sub Sub ShootToSkillTimer_Timer() ShootToSkillTimer.enabled=False If BallInCatapult(CurrentPlayer) = 1 Then ' playmedia "Sound-0x0910.mp3","Audiocomment",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) If LastChanceStart = False Then VideocatapultBall1lock CatapultManagement.interval = 2000 CatapultManagement.Enabled = True Else VideoSupercatapultBall1lock End If ElseIf BallInCatapult(CurrentPlayer) = 2 Then ' playmedia "Sound-0x08F6.mp3","Audiocomment",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) If LastChanceStart = False Then VideocatapultBall2lock CatapultManagement.interval = 2000 CatapultManagement.Enabled = True Else VideoSupercatapultBall2lock End If ElseIf BallInCatapult(CurrentPlayer) = 3 Then CatapultModeFlag = True BouleAfterHit.Enabled = True ' playmedia "Sound-0x0858.mp3","Audiocomment",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) If LastChanceStart = False Then VideocatapultBall3lock Else horloge.Interval=100 LastChanceSuccess = True DisableTable True 'In test VideoSupercatapultBall3lock End If Else ' This Case is not previous, because not possible End If End Sub Sub video_catapult_Timer() ' video_catapult.Interval= 4000 ' ' video_catapult.enabled= False End Sub Sub Gate004_hit() If PMdebug = true Then PuPlayer.LabelSet pFullDMD,"curplayer","Gate_004",1,"{'mt':2}" UPLock.collidable=True UPLock.TransY=0 End Sub Sub Gate005_hit() If PMdebug = true Then PuPlayer.LabelSet pFullDMD,"curplayer","Gate_005",1,"{'mt':2}" BallInLocker = BallInLocker - 1 BallsOnPlayfield = BallsOnPlayfield + 1 If BlackKnightRetro(CurrentPlayer) = 1 or BlackKnightRetro(CurrentPlayer) = 3 Then BallInCatapult(CurrentPlayer) = BallInCatapult(CurrentPlayer) - 1 End If If BallInLocker = BallKeptInLocker Then UPLock.collidable=True UPLock.TransY=0 LockerTimer.Enabled=False If BallKeptInLocker = 0 Then catapult_lock_is_lit(CurrentPlayer) = False BallInCatapult(CurrentPlayer) = 0 End If L131.state=0 L132.state=0 L133.state=0 Else LockerTimer.Enabled=True 'UPLock.collidable=False 'UPLock.TransY=-20 End If End Sub Sub LockerTimer_Timer() UPLock.collidable=False UPLock.TransY=-20 LockerTimer.Enabled=False BallInCatapult(CurrentPlayer) = BallInCatapult(CurrentPlayer) - 1 If RequestANewBall = False And BallKeptInLocker <> 0 Then 'BallInCatapult(CurrentPlayer) = BallKeptInLocker BallInCatapult(CurrentPlayer) = BallInCatapult(CurrentPlayer) + 1 End If End Sub Sub Plunger_Timer() Plunger.TimerEnabled=false 'Turns off the timer ' SkillShotTimerLight.State=0 'Diagnostic light to show skill shot timer is inactive End Sub Sub shotskill_Timer() shotskillflag = False shotskill.Enabled=false End Sub ' *************************************** Autofire a ball Sub AutoFireTimer_Timer() 'Creates & fires a new ball automatically If BallsOnPlayfield < 7 Then 'bBallSaverActive = False AutoFireTime=AutoFireTime+1 'Allows script to run the timer several times with different events for each cycle Select Case AutoFireTime Case 1 'First count pulls back the plunger Plunger.PullSpeed=500 Plunger.PullBack Case 2 'Plunger.CreateBall 'Second count creates a ball & fires it AutoPlunger.createball RandomSoundBallRelease kicker1 AutoPlunger.kick 360,45 'playsound "ballrelease" Plunger.Fire SoundPlungerReleaseBall 'playsound "popper_ball" Case 5 'Fifth count turns off timer & resets variables AutoFireTimer.Enabled=false AutoFireTime=0 'Resets count for this timer so that the next time it runs it starts from the begining again Plunger.PullSpeed=5 'Resets the plunger pull back speed for player use ' AutoFireTimerLight.State=0 'Diagnostic light to show auto fire timer is inactive End Select End If End Sub 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' SECONDARY HIT EVENTS '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X ' 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' MODES '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X ' Sub ShieldTimer_Timer() If Shield_New_Status = "Unlock" Then Shield_lock = True ShieldTimer.Enabled=False End If If Shield_New_Status = "lock" Then Shield_lock = False ShieldTimer.Enabled=False End If If Shield_lock = False Then Shield_lock=True SW58.TransZ=0 SW58.TransY=0 SW58.ObjRotX=0 SW58.Collidable=True ishield = ishield + 1 If ShieldNumberOfMove < ishield Then ShieldTimer.Enabled=False 'ShieldNumberOfMove = 1 End If 'Target009.DropSol_On=0 Else Shield_lock=False SW58.TransZ=-100 SW58.TransY=50 SW58.ObjRotX=20 SW58.Collidable=False 'PlaySound "fx_bumper4" 'Target009.DropSol_On=1 End If End Sub 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' BUMPERS '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X sub SW1_hit() If SuperLanesLevel > 0 Then AddScoreChestJackpot = AddScoreChestJackpot + AddScoreSuperLanes 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True End If addscore 1030 * (SuperLanesLevel + 1) BaseBonus = BaseBonus + 1800 If RetroMode = 1 or RetroMode = 3 Or RageMultiball = True Or RetroMode = -1 Then if RetroMode = 1 or RetroMode = 3 Then playmedia "Sound-0x0113.mp3","Audionoise",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) End If Else 'normal mode If BallSaveAvailable(CurrentPlayer) = True then 'Check to see if ball saver is active 'video_SavedBall L13.state = 1 bBallSaverActiveL13 = True Callout 425 Else Callout RndInt(116,160) End If ' addscore 1000 End If L11.state=1 CheckLampAction.Enabled=True end Sub sub SW2_hit() If SuperLanesLevel > 0 Then AddScoreChestJackpot = AddScoreChestJackpot + AddScoreSuperLanes 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True End If addscore 1030 * (SuperLanesLevel + 1) BaseBonus = BaseBonus + 1800 If RetroMode = 1 or RetroMode = 3 Or RageMultiball = True Or RetroMode = -1 Then if RetroMode = 1 or RetroMode = 3 Then playmedia "Sound-0x0113.mp3","Audionoise",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) End If Else 'normal mode ' addscore 1000 End If L12.state=1 CheckLampAction.Enabled=True end Sub ' right inlane hit scores AddScoreChestJackpot when Magnasave hit for 5 seconds sub SW5_hit() If SuperLanesLevel > 0 Then AddScoreChestJackpot = AddScoreChestJackpot + AddScoreSuperLanes 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True End If if AddScoreChestJackpot>0 and SuperCollect = True Then ' playsound super mode jackpot or similar callout 376 addscore AddScoreChestJackpot StopSuperMode End if If RetroMode = 1 or RetroMode = 3 Or RageMultiball = True Or RetroMode = -1 Then if RetroMode = 1 or RetroMode = 3 Then playmedia "Sound-0x0113.mp3","Audionoise",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) End If Else 'normal mode ' addscore 1000 End If If LastChanceStart = False Then addscore 1030 * (SuperLanesLevel + 1) BaseBonus = BaseBonus + 1800 L15.state=1 End If CheckLampAction.Enabled=True end Sub sub SW6_hit() If SuperLanesLevel > 0 Then AddScoreChestJackpot = AddScoreChestJackpot + AddScoreSuperLanes 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True End If addscore 1030 * (SuperLanesLevel + 1) BaseBonus = BaseBonus + 1800 If RetroMode = 1 or RetroMode = 3 Or RageMultiball = True Or RetroMode = -1 Then if RetroMode = 1 or RetroMode = 3 Then playmedia "Sound-0x0113.mp3","Audionoise",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) End If Else 'normal mode ' addscore 1000 End If Callout RndInt(116,160) L16.state=1 CheckLampAction.Enabled=True end Sub sub SW66_hit() 'sub SW66_hit(f) If SuperLanesLevel > 0 Then AddScoreChestJackpot = AddScoreChestJackpot + AddScoreSuperLanes 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True End If addscore 1030 * (SuperLanesLevel + 1) BaseBonus = BaseBonus + 1800 If RetroMode = 1 or RetroMode = 3 Or RageMultiball = True Or RetroMode = -1 Then if RetroMode = 1 or RetroMode = 3 Then playmedia "Sound-0x0113.mp3","Audionoise",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) End If Else 'normal mode 'addscore 1000 End If 'f=f+1 L115.state=1 'checktrigger CheckLampAction.Enabled=True end Sub sub SW67_hit() 'sub SW67_hit(g) If SuperLanesLevel > 0 Then AddScoreChestJackpot = AddScoreChestJackpot + AddScoreSuperLanes 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True End If addscore 1030 * (SuperLanesLevel + 1) BaseBonus = BaseBonus + 1800 If RetroMode = 1 or RetroMode = 3 Or RageMultiball = True Or RetroMode = -1 Then if RetroMode = 1 or RetroMode = 3 Then playmedia "Sound-0x0113.mp3","Audionoise",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) End If Else 'normal mode ' addscore 1000 End If L116.state=1 'checktrigger CheckLampAction.Enabled=True end Sub sub SW68_hit() 'sub SW68_hit(h) If SuperLanesLevel > 0 Then AddScoreChestJackpot = AddScoreChestJackpot + AddScoreSuperLanes 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True End If addscore 1030 * (SuperLanesLevel + 1) BaseBonus = BaseBonus + 1800 If RetroMode = 1 or RetroMode = 3 Or RageMultiball = True Or RetroMode = -1 Then if RetroMode = 1 or RetroMode = 3 Then playmedia "Sound-0x0113.mp3","Audionoise",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) End If Else 'normal mode 'addscore 1000 End If L117.state=1 CheckLampAction.Enabled=True 'checktrigger end Sub sub SW81_hit() AddScore 30 BaseBonus = BaseBonus + 1800 Loops = Loops + 250000 If TopBallLoop = 1 Then AddScoreLoopBonus = AddScoreLoopBonus + 250000 AddScore AddScoreLoopBonus Flash_lamp.Enabled=True L142.State=2 L143.State=2 L270.State=0 L271.State=0 L272.State=0 videoshotput End If End Sub Sub SW80_Hit() AddScore 30 BaseBonus = BaseBonus + 1800 TopBallLoop = 1 sw80Timer.Enabled=True End Sub Sub sw80Timer_timer() sw80Timer.Enabled=False TopBallLoop = 0 End Sub '**********Sling Shot Animations ' Rstep and Lstep are the variables that increment the animation '**************** Sub RightSlingShot_Slingshot RS.VelocityCorrect(ActiveBall) If SuperSlingsLevel > 0 Then AddScoreChestJackpot = AddScoreChestJackpot + AddScoreSuperSlings 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True End If AddScore 10170 * (SuperSlingsLevel + 1) BaseBonus = BaseBonus + 1800 RandomSoundSlingshotRight Sling1 PlaySound "right_slingshot" RSling.Visible = 0 RSling1.Visible = 1 sling1.rotx = 20 RStep = 0 RightSlingShot.TimerEnabled = 1 ' gi001.State = 0:Gi002.State = 0 End Sub Sub RightSlingShot_Timer Select Case RStep Case 3:RSLing1.Visible = 0:RSLing2.Visible = 1:sling1.rotx = 10 Case 4:RSLing2.Visible = 0:RSLing.Visible = 1:sling1.rotx = 0:RightSlingShot.TimerEnabled = 0':gi001.State = 1:Gi002.State = 1 End Select RStep = RStep + 1 End Sub Sub LeftSlingShot_Slingshot LS.VelocityCorrect(ActiveBall) If SuperSlingsLevel > 0 Then AddScoreChestJackpot = AddScoreChestJackpot + AddScoreSuperSlings 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True End If AddScore 10170 * (SuperSlingsLevel + 1) BaseBonus = BaseBonus + 1800 RandomSoundSlingshotLeft Sling2 'PlaySound "left_slingshot" LSling.Visible = 0 LSling1.Visible = 1 sling2.rotx = 20 LStep = 0 LeftSlingShot.TimerEnabled = 1 ' gi003.State = 0:Gi004.State = 0 'Use to restore light gi003 & gi004 original don't use this End Sub Sub LeftSlingShot_Timer Select Case LStep Case 3:LSLing1.Visible = 0:LSLing2.Visible = 1:sling2.rotx = 10 Case 4:LSLing2.Visible = 0:LSLing.Visible = 1:sling2.rotx = 0:LeftSlingShot.TimerEnabled = 0':gi003.State = 1:Gi004.State = 1 End Select LStep = LStep + 1 End Sub '******************************************** '************** TARGETS********************** '******************************************** sub SW56_hit() ' Black Knight bash switch OrbitFlag = False OrbitStatus.Enabled = True If CurrentMissionFlag(CurrentPlayer) = 0 and SuperIsLit = False Then If CatapultModeFlag = False Then ' play taunt ' if backpeddle is set then it will pick random number which are more pleading if missions have been achieved if backpeddle > 0 Then if NumberOfMissioncomplete(CurrentPlayer) >= backPeddle Then Callout RndInt(62,83) Else Callout RndInt(1,61) End If Elseif backpeddle = 0 Then Callout RndInt(1,83) Else Callout RndInt(1,61) End If End If End If if SuperTargetsLevel > 0 Then AddScoreChestJackpot = AddScoreChestJackpot + AddScoreSuperTargets 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True End If b=b+1 '' playsound "target" addscore 1030 * (SuperTargetsLevel+1) ' changed scoring so it reflects super targetlevel ' L89 Light 89 is Power so used for missions if L89.state = 1 and CurrentMissionFlag(CurrentPlayer) = 1 Then ' we have powersword used during battle If BlackCastle(CurrentPlayer) = 2 and BlackCastleAllowPowerSword = False Then ' play sound "no way" or similar callout RndInt(421,430) ' these are all no way but different inflection Else ' Activate PowerSword for Battle PowerSwordActivated = True PowerSwordMultipler = 2 L89.BlinkInterval = 125 L89.state = 2 Callout RndInt(381,385) End If End If if PowerSwordActivated = False Then PowerSwordLevel(CurrentPlayer) = PowerSwordLevel(CurrentPlayer) + 10 If PowerSwordLevel(CurrentPlayer)>100 then PowerSwordLevel(CurrentPlayer) = 100 updatePowersword() End If BaseBonus = BaseBonus + 1800 if b=2 then L88.state=1 end If If CurrentMissionFlag(CurrentPlayer) = 0 And BlackKnightRetro(CurrentPlayer) <> 3 And RageMultiball = False And CatapultModeFlag = False Then NumberOfHitForStartMission(CurrentPlayer) = NumberOfHitForStartMission(CurrentPlayer) + 1 ActionWhenHitOneOfThreeWay End If ' ActionWhenHitOneOfThreeWay If CurrentMissionFlag(CurrentPlayer) = 1 Or Knight_challenge_flag = True Or CatapultModeFlag = True or WarHurryFlag = True Then If L85State(CurrentPlayer) = 2 Then MissionHit 56 End If End If CheckLamp.interval = 100 CheckLamp.Enabled = True If SuperIsLit = True Then SuperModeRandom SuperFeatures = SuperFeatures + 75000 L88.State = 0 End If ' Rage Multiball Score If RageMultiball = True Then ' play sound jackpot Callout RndInt(373,374) AddScore RageMultiballJackPot RageMultiballJackPot = RageMultiballJackPot + 25000 End If end sub sub SW59_hit() ' playsound "target" OrbitFlag = False OrbitStatus.Enabled = True if SuperTargetsLevel > 0 Then AddScoreChestJackpot = AddScoreChestJackpot + AddScoreSuperTargets 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True End If addscore 1030 * (SuperTargetsLevel+1) ' changed scoring so it reflects super targetlevel BaseBonus = BaseBonus + 1800 L101.state=1 If Knight_challenge_flag = False Then If Knight_challenge(CurrentPlayer) = 0 Then Video_lock1IsLit Knight_challenge(CurrentPlayer) = 1 ElseIf Knight_challenge(CurrentPlayer) = 2 Then Video_lock2IsLit Knight_challenge(CurrentPlayer) = 3 ElseIf Knight_challenge(CurrentPlayer) = 4 Then Video_lock3IsLit Knight_challenge(CurrentPlayer) = 5 Else End If End If If CurrentMissionFlag(CurrentPlayer) = 1 Or Knight_challenge_flag = True Or CatapultModeFlag = True or WarHurryFlag = True Then If L98State(CurrentPlayer) = 2 Then MissionHit 59 End If End If if PowerSwordActivated = False Then PowerSwordLevel(CurrentPlayer) = PowerSwordLevel(CurrentPlayer) + 5 If PowerSwordLevel(CurrentPlayer)>100 then PowerSwordLevel(CurrentPlayer) = 100 updatePowersword() End If CheckLamp.Enabled=True end sub sub SW26_hit() if SuperTargetsLevel > 0 Then AddScoreChestJackpot = AddScoreChestJackpot + AddScoreSuperTargets 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True End If If RetroMode = 1 or RetroMode = 3 Or RageMultiball = True Or RetroMode = -1 Then if RetroMode = 1 or RetroMode = 3 Then playmedia "Sound-0x0160.mp3","Audionoise",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) End If Else ' normal mode ' addscore 1000 End If addscore 1030 * (SuperTargetsLevel+1) ' changed scoring so it reflects super targetlevel BaseBonus = BaseBonus + 1800 ' playsound "target" L63.state=1 If CurrentMissionFlag(CurrentPlayer) = 1 Then AddTimeForMission(CurrentPlayer) = AddTimeForMission(CurrentPlayer) + 4 End If if PowerSwordActivated = False Then PowerSwordLevel(CurrentPlayer) = PowerSwordLevel(CurrentPlayer) + 1 If PowerSwordLevel(CurrentPlayer)>100 then PowerSwordLevel(CurrentPlayer) = 100 updatePowersword() End If end sub sub SW27_hit() if SuperTargetsLevel > 0 Then AddScoreChestJackpot = AddScoreChestJackpot + AddScoreSuperTargets 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True End If If RetroMode = 1 or RetroMode = 3 Or RageMultiball = True Or RetroMode = -1 Then if RetroMode = 1 or RetroMode = 3 Then playmedia "Sound-0x0160.mp3","Audionoise",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) End If Else 'normal mode ' addscore 1000 End If addscore 1030 * (SuperTargetsLevel+1) ' changed scoring so it reflects super targetlevel BaseBonus = BaseBonus + 1800 ' playsound "target" L64.state=1 If CurrentMissionFlag(CurrentPlayer) = 1 Then AddTimeForMission(CurrentPlayer) = AddTimeForMission(CurrentPlayer) + 4 End If if PowerSwordActivated = False Then PowerSwordLevel(CurrentPlayer) = PowerSwordLevel(CurrentPlayer) + 1 If PowerSwordLevel(CurrentPlayer)>100 then PowerSwordLevel(CurrentPlayer) = 100 updatePowersword() End If end sub sub SW33_hit() if SuperTargetsLevel > 0 Then AddScoreChestJackpot = AddScoreChestJackpot + AddScoreSuperTargets 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True End If If RetroMode = 1 or RetroMode = 3 Or RageMultiball = True Or RetroMode = -1 Then if RetroMode = 1 or RetroMode = 3 Then playmedia "Sound-0x0160.mp3","Audionoise",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) End If Else 'normal mode ' addscore 1000 End If addscore 1030 * (SuperTargetsLevel+1) ' changed scoring so it reflects super targetlevel BaseBonus = BaseBonus + 1800 ' ' playsound "target" L110.state=1 L110Timer.Enabled=True if PowerSwordActivated = False Then PowerSwordLevel(CurrentPlayer) = PowerSwordLevel(CurrentPlayer) + 5 If PowerSwordLevel(CurrentPlayer)>100 then PowerSwordLevel(CurrentPlayer) = 100 updatePowersword() End If end sub sub SW34_hit() if SuperTargetsLevel > 0 Then AddScoreChestJackpot = AddScoreChestJackpot + AddScoreSuperTargets 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True End If If RetroMode = 1 or RetroMode = 3 Or RageMultiball = True Or RetroMode = -1 Then if RetroMode = 1 or RetroMode = 3 Then playmedia "Sound-0x0160.mp3","Audionoise",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) End If Else 'normal mode ' addscore 1000 End If addscore 1030 * (SuperTargetsLevel+1) ' changed scoring so it reflects super targetlevel BaseBonus = BaseBonus + 1800 ' ' playsound "target" L111.state=1 L111Timer.Enabled=True if PowerSwordActivated = False Then PowerSwordLevel(CurrentPlayer) = PowerSwordLevel(CurrentPlayer) + 5 If PowerSwordLevel(CurrentPlayer)>100 then PowerSwordLevel(CurrentPlayer) = 100 updatePowersword() End If end sub sub SW35_hit() if SuperTargetsLevel > 0 Then AddScoreChestJackpot = AddScoreChestJackpot + AddScoreSuperTargets 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True End If If RetroMode = 1 or RetroMode = 3 Or RageMultiball = True Or RetroMode = -1 Then if RetroMode = 1 or RetroMode = 3 Then playmedia "Sound-0x0160.mp3","Audionoise",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) End If Else 'normal mode ' addscore 1000 End If addscore 1030 * (SuperTargetsLevel+1) ' changed scoring so it reflects super targetlevel BaseBonus = BaseBonus + 1800 ' ' playsound "target" L112.state=1 L112Timer.Enabled=True if PowerSwordActivated = False Then PowerSwordLevel(CurrentPlayer) = PowerSwordLevel(CurrentPlayer) + 5 If PowerSwordLevel(CurrentPlayer)>100 then PowerSwordLevel(CurrentPlayer) = 100 updatePowersword() End If end sub Sub L110Timer_timer() L110.state=2 L110Timer.Enabled = False End Sub Sub L111Timer_timer() L111.state=2 L111Timer.Enabled = False End Sub Sub L112Timer_timer() L112.state=2 L112Timer.Enabled = False End Sub '******************************************** '***********MAGNET*************************** '******************************************** Set mMagnetSave = New cvpmMagnet : With mMagnetSave .InitMagnet Magnet, 15 End With Sub Magnet_Hit():mMagnetSave.AddBall ActiveBall: End Sub Sub Magnet_UnHit(): mMagnetSave.RemoveBall ActiveBall: End Sub sub SW100_hit() ' mMagnetSave.MagnetOn = 1 ' magnettimer.enabled=1 ' L24.State=1 end sub sub magnettimer_timer() magnettimer.enabled = False mMagnetSave.MagnetOn = 0 L24.State = 0 MagnaSaveFlag(CurrentPlayer) = 0 end Sub '******************************************** '***********DROP TARGETS********************* '******************************************** ' shield Hit Sub SW58_hit() If CurrentMissionFlag(CurrentPlayer) = 0 Then callout RndInt(505,520) End If OrbitFlag = False OrbitStatus.Enabled = True ' playSound "fx_shieldhit" If ShieldRemainsLock = True Then Shield_New_Status = "unlock" ' ShieldTimer.Enabled=True ShieldNumberOfMove = 2 ShieldTimer.interval=100 ShieldTimer.Enabled=True Else Shield_New_Status = "Unlock" ShieldTimer.Enabled=True End If If CurrentMissionFlag(CurrentPlayer) = 0 And BlackKnightRetro(CurrentPlayer) <> 3 And CatapultModeFlag = False Then NumberOfHitForStartMission(CurrentPlayer) = NumberOfHitForStartMission(CurrentPlayer) + 1 ActionWhenHitOneOfThreeWay End If addscore 1000 BaseBonus = BaseBonus + 1800 SW58.rotx=90 ' Videos_Ball_Saved If RetroMode = 1 or RetroMode = 3 Or RageMultiball = True Or RetroMode = -1 Then if RetroMode = 1 or RetroMode = 3 Then playmedia "Sound-0x0160.mp3","Audionoise",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) End If Else 'normal mode ' addscore 1000 End If addscore 1000 BaseBonus = BaseBonus + 1800 If CurrentMissionFlag(CurrentPlayer) = 1 Or Knight_challenge_flag = True Or CatapultModeFlag = True or WarHurryFlag = True Then If L91State(CurrentPlayer) = 2 Then MissionHit 58 End If End If CheckLamp.Enabled = True if PowerSwordActivated = False Then PowerSwordLevel(CurrentPlayer) = PowerSwordLevel(CurrentPlayer) + 5 If PowerSwordLevel(CurrentPlayer)>100 then PowerSwordLevel(CurrentPlayer) = 100 updatePowersword() End If ' Rage Multiball Score If RageMultiball = True Then ' play sound "jackpot" callout RndNum(373,374) AddScore 1000000 RageMultiballJackPot = RageMultiballJackPot + 50000 End If end Sub ' catapult upperfield start lock and complete mission switch Sub SW82_hit() if SuperTargetsLevel > 0 Then AddScoreChestJackpot = AddScoreChestJackpot + AddScoreSuperTargets 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True End If If RetroMode = 1 or RetroMode = 3 Or RageMultiball = True Or RetroMode = -1 Then if RetroMode = 1 or RetroMode = 3 Then playmedia "Sound-0x0047.mp3","Audionoise",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) End If Elseif CatapultModeFlag = True Then If L131.state=0 Then L131.State = 2 Catapult_Super_Jackpot_Multi = 2 Elseif L132.state=0 Then L132.State = 2 Catapult_Super_Jackpot_Multi = 3 Else L133.state=2 Catapult_Super_Jackpot_Multi = 4 End If Else SaveStateLightturnlight SaveStateLight animation_start_and_finish_flag = 1 TurnOffAllRegularLights seq_animation_array = Array (2,3,18) SeqAnimation = 0 LightsequenceAnimation.Enabled = True If catapult_lock_is_lit(CurrentPlayer) = True Then If CurrentMissionFlag(CurrentPlayer) = 1 Or Knight_challenge_flag = True Or CatapultModeFlag = True or WarHurryFlag = True Then MissionHit 82 End If End If If catapult_lock_is_lit(CurrentPlayer) = False And CatapultModeFlag = False Then video_catapult_lock_is_lit 'PlaySound "Sound-0x08E1" ' playmedia "Sound-0x08E1.mp3","Audiocomment",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) If BallInCatapult(CurrentPlayer) = 0 Then L131.state=2 L132.state=0 L133.state=0 End If Elseif catapult_lock_is_lit(CurrentPlayer) = True And CatapultModeFlag = False Then ' playmedia "Sound-0x0845.mp3","Audiocomment",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) End If If CatapultModeFlag = False Then catapult_lock_is_lit(CurrentPlayer) = True End If End If addscore 1030 * (SuperTargetsLevel+1) ' changed scoring so it reflects super targetlevel BaseBonus = BaseBonus + 1800 ' ' playsound "target" if PowerSwordActivated = False Then PowerSwordLevel(CurrentPlayer) = PowerSwordLevel(CurrentPlayer) + 1 If PowerSwordLevel(CurrentPlayer)>100 then PowerSwordLevel(CurrentPlayer) = 100 updatePowersword() End If ' Rage Multiball Score If RageMultiball = True Then ' play sound "jackpot" AddScore 1000000 RageMultiballJackPot = RageMultiballJackPot + 50000 End If ' MEAKIN possible creating a playfield multiplyer here End Sub '******************************************** '**********KICKER**************************** '******************************************** sub SW22_hit GiOn BallControlTimer.Enabled = False BIPL = 1 End Sub sub sw22_Unhit BIPL = 0 End sub sub SW23_hit ' SW23 is plunger lane detect ball going up start the ball save if its anew ball 'If PMdebug = true Then PuPlayer.LabelSet pFullDMD,"curplayer","SV23Hit",1,"{'mt':2}" if RageMultiball = False Then VideoSetBackgroundPM ' off we go check background If NewBall Then ' if new ball then start ballsaver EnableBallSaver BallSaverTime NewBall = False ' only one ball saver per new ball if lastplayer <> currentplayer Then MusicResetPM ' Reset background music lastplayer = CurrentPlayer End If bBallSaverActive = True if KeepBonusMultiplier = False Then BonusMultiplier(CurrentPlayer) = 1 ' reset bonus multiplier at this point Callout RndInt(85,114) BallChecker.enabled = True shotskill.Enabled=True shotskillflag = true End If 'PlaySoundAt "fx_launchball", Plunger SoundPlungerReleaseBall DisplayingEOBBonus = False checklamp.Enabled = True End Sub ' meakin new version of sv60 hit sub SW60_hit PuPlayer.LabelSet pFullDMD,"curplayer","SW60_hit",1,"{'mt':2}" SoundSaucerLock OrbitFlag = False OrbitStatus.Enabled = True ' SW60videoDelay = 100 SaveStateLight If CurrentMissionFlag(CurrentPlayer) = 1 Or Knight_challenge_flag = True Or CatapultModeFlag = True or WarHurryFlag = True Then If L91State(CurrentPlayer) = 2 Then MissionHit 58 ' SW60videoDelay = SW60videoDelay + 4100 End If End If ' play the videos in order PMShieldSaucerHit ' SW60video.Interval = SW60videoDelay ' SW60video.Enabled = True ' SW60Mystery.Interval = SW60videoDelay ' SW60Mystery.Enabled = True end sub Sub SW60Mystery_timer() SW60Mystery.Enabled = False SW60videoDelay = 100 If MysteryFlag = True Then Video_Mistery SW60videoDelay = 6000 SequenceAnimation = 1 TableAnimation end If SW60video.Interval = SW60videoDelay SW60video.Enabled = True End Sub Sub SW60video_Timer() ' checking after shield saucer for kickouts Puplayer.setVolumeCurrent pMusic, 100 ' put music back up if vModeIntroTime > 0 Then ' carried over if intro then we need to reset the background music MusicResetPM vModeIntroTime = 0' resets back Else Callout RndInt(171,180) ' getout type callouts end If SW60video.Enabled = False If Shield_lock = False Then '****************** Put down shield Shield_New_Status = "lock" ' ShieldTimer.Enabled=True ShieldNumberOfMove = 1 ShieldTimer.interval=250 ShieldTimer.Enabled=True End If if Knight_challenge(CurrentPlayer) = 6 Then ' knight challengestart multiball KnightChallengeTimer.Interval=100 KnightChallengeTimer.Enabled = True else ' kickout timer004.Interval=100 timer004.Enabled = True KnightChallengeTimer.Enabled = False VideoSetBackgroundPM 'StartMission = 0 end if if WarHurryFlag = True Then WarShowHurryup ' if SW60videoDelay = 1000 Then Callout RndInt(171,180) ' getout type callouts End Sub '************************************************************************************************************* '******************************* Animated sequence + video ************************************************** '************************************************************************************************************* 'seq_animation_array = Array (8,1,10,1,13,1,13,1,13)'hydra 'seq_animation_array = Array (6,0,11,0,13,3,13)'MoltenFire 'seq_animation_array = Array (6,3,10,3,13,3,13)'burning sand 'seq_animation_array = Array (12,5,13,4,13,5,12,0,14,0,13,4,13)'WickedCavern 'seq_animation_array = Array (6,5,15,5,13,2,13) 'Deep Freeze 'seq_animation_array = Array (10,5,16,4,13,3,16,0,17,0,9) 'Black Castle '************************************************************************************************************* '************************************************************************************************************* '************************************************************************************************************* Sub KnightChallengeTimer_timer() SW60Timer=500 SeqAnimation = 0 SaveStateLightturnlight animation_start_and_finish_flag = 1 If Knight_challenge(CurrentPlayer) = 6 Then 'AddTimeForMission = MissionTime 'horloge.Enabled=True 'CurrentMissionFlag(CurrentPlayer) = 1 'BeginCurrentMissionFlag = 1 Knight_challenge(CurrentPlayer) = 0 kickball bMultiBallMode = True doublekick.Enabled=True KnightRemaining = 3 Knight_challenge_flag = True Knight_challenge_phase = 0 'EnableBallSaver 30 If CurrentMissionFlag(CurrentPlayer) = 0 Then ' video_knight_challenge_background 3 'VideoSetBackgroundPM Else Knight_challenge_flag = True End If End If ' kick the main ball timer004.Interval=100 timer004.Enabled = True KnightChallengeTimer.Enabled = False 'StartMission = 0 End Sub sub timer004_Timer() ' kick the ball out of the shield saucer timer004.Enabled = False SoundSaucerKick 1, SW60 SW60.kick 300, 30, 1.56 AddScore 10000 BaseBonus = BaseBonus + 1800 CheckLamp.Interval = 250 CheckLamp.Enabled=True CheckCurrentMissionPlayer ' start timer end Sub Sub CheckCurrentMissionPlayer If CurrentMissionFlag(CurrentPlayer) = 1 Then If MudBog(CurrentPlayer) = 2 Then horloge.Enabled = True Callout RndInt(241,245) End If If MoltenFire(CurrentPlayer) = 2 Then horloge.Enabled = True Callout RndInt(231,239) End If If BurningSands(CurrentPlayer) = 2 Then horloge.Enabled = True BurningSandsLightMovementNumber = 3 if PowerSwordActivated = False then BurningSandsLightMove.Enabled=True Callout RndInt(217,222) End If If WickedCavern(CurrentPlayer) = 2 Then horloge.Enabled = True Callout RndInt(247,256) End If If DeepFreeze(CurrentPlayer) = 2 Then horloge.Enabled = True Callout RndInt(224,229) End If If BlackCastle(CurrentPlayer) = 2 Then horloge.Enabled = True Callout RndInt(258,260) End If Else 'none (when no mission is Start) End If CheckLamp.Interval = 100 CheckLamp.Enabled=True End Sub ' don't know why its call horloge but replacement here this is a timer to count down missions Sub horloge_Timer() If CurrentMissionFlag(CurrentPlayer) = 1 Then AddTimeForMission(CurrentPlayer) = AddTimeForMission(CurrentPlayer) - 1 ' countdown and hurry up callouts during mission if AddTimeForMission(CurrentPlayer) <= 10 and AddTimeForMission(CurrentPlayer) >= 1 Then Callout (287 + AddTimeForMission(CurrentPlayer)) Elseif AddTimeForMission(CurrentPlayer) = int(MissionTime/2) Then Callout RndInt(299,313) End if ' Out of time If AddTimeForMission(CurrentPlayer) <= 0 Then CurrentMissionFlag(CurrentPlayer) = 0 BurningSandsLightMove.Enabled=False ' call end of routine horloge.Enabled = False ' monster not defated check Callout RndInt(280,286) 'CurrentMissionFlag(CurrentPlayer) = 0 NumberOfHitForStartMission(CurrentPlayer) = 0 ' reset number of hits so it can be restarted If MudBog(CurrentPlayer) = 2 Then MudBog(CurrentPlayer) = 3 LightObjectColor(1).State=0 End If If MoltenFire(CurrentPlayer) = 2 Then MoltenFire(CurrentPlayer) = 3 LightObjectColor(3).State=0 End If If BurningSands(CurrentPlayer) = 2 Then BurningSands(CurrentPlayer) = 3 LightObjectColor(5).State=0 End If If WickedCavern(CurrentPlayer) = 2 Then WickedCavern(CurrentPlayer) = 3 LightObjectColor(7).State=0 End If If DeepFreeze(CurrentPlayer) = 2 Then DeepFreeze(CurrentPlayer) = 3 LightObjectColor(9).State=0 End If If BlackCastle(CurrentPlayer) = 2 Then ' black castle is not reset to 3 it is completed BlackCastle(CurrentPlayer) = 0 MudBog(CurrentPlayer) = 0 MoltenFire(CurrentPlayer) = 0 BurningSands(CurrentPlayer) = 0 WickedCavern(CurrentPlayer) = 0 DeepFreeze(CurrentPlayer) = 0 LightObjectColor(11).State=0 TurnOffRoundLights ' force select Mission SelectMission End If If PowerSwordActivated = True then PowerSwordActivated = False PowerSwordMultipler = 1 PowerSwordAnimated.enabled = False PowerSwordLevel(CurrentPlayer) = 0 updatePowersword() End If VideoSetBackgroundPM MusicResetPM 'RampChangeStatus(CurrentPlayer) = "Blinking" RampLightsMove(CurrentPlayer) = "Blinking" CheckLamp.interval = 100 checklamp.Enabled = True ' If Knight_challenge_flag = True Then ' video_knight_challenge_background KnightRemaining ' End If End If End If ' stop RetroMode If retromode = 1 or retromode = 3 Then AddTimeForMission(CurrentPlayer) = AddTimeForMission(CurrentPlayer) - 1 ' countdown callouts during multiball ilol flippers off if AddTimeForMission(CurrentPlayer) <= 10 and AddTimeForMission(CurrentPlayer) >= 1 Then Callout (287 + AddTimeForMission(CurrentPlayer)) End If If AddTimeForMission(CurrentPlayer) < 0 Then horloge.enabled = False ' both shut down the flippers LeftFlipper.RotateToStart UPRightFlipper.RotateToStart RightFlipper.RotateToStart RetroMode = -1 'stop flippers and prepare drain MultiballKicker.enabled = False ' back to normal VideoSetBackgroundPM MusicResetPM 'EndBLackKnightRetroMode.Interval = 100 'EndBLackKnightRetroMode.Enabled = True End If end If ' stop rage Multiball if setas Timed If RageMultiball = True And RageMultiballTimed = True Then AddTimeForMission(CurrentPlayer) = AddTimeForMission(CurrentPlayer) - 1 ' countdown callouts during multiball ilol flippers off if AddTimeForMission(CurrentPlayer) <= 10 and AddTimeForMission(CurrentPlayer) >= 1 Then Callout (287 + AddTimeForMission(CurrentPlayer)) End If If PMdebug = true Then PuPlayer.LabelSet pFullDMD,"curplayer","horloge " & BallsOnPlayfield ,1,"{'mt':2}" If AddTimeForMission(CurrentPlayer) < 0 Then horloge.enabled = False ' both shut down the flippers LeftFlipper.RotateToStart UPRightFlipper.RotateToStart RightFlipper.RotateToStart RetroMode = -1 'stop flippers and prepare drain 'RageMultiball = False ' 'EndBLackKnightRetroMode.Interval = 100 ' 'EndBLackKnightRetroMode.Enabled = True End If ' end If End Sub sub kicker006_hit() timer002.Enabled = True end sub ' meakin RetroSwitch here this will be worked on to sub SW45_hit() OrbitFlag = False OrbitStatus.Enabled = True ' supermode boosted if BallsOnPlayfield = 1 and RetroMode = 0 Then supermodeBoosted end if SW60Timer=500 AddScore 5000 BaseBonus = BaseBonus + 1800 ' TurnOffAllRegularLights ' seq_animation_array = Array (2,3,18) ' SeqAnimation = 0 ' LightsequenceAnimation.Enabled = True If CurrentMissionFlag(CurrentPlayer) = 1 Or Knight_challenge_flag = True Or CatapultModeFlag = True or WarHurryFlag = True Then If L66State(CurrentPlayer) = 2 Then MissionHit 45 SW60Timer=3000 End If End If If CurrentMissionFlag(CurrentPlayer) = 0 And Knightlamp(CurrentPlayer) = 12 And BallsOnPlayfield = 1 And CatapultModeFlag = False And Knight_challenge_flag = False Then if WarHurryFlag = True then WarStop CurrentMissionFlag(CurrentPlayer) = 2 BlackKnightRetro(CurrentPlayer) = BlackKnightRetro(CurrentPlayer) + 1 Video_Black_Knight_Retro If BlackKnightRetro(CurrentPlayer) = 1 Then ' Black knight retro multiball SW60Timer=5000 End If If BlackKnightRetro(CurrentPlayer) = 3 Then SW60Timer=5000 'EndBLackKnightRetroMode.Interval = Bk2000Time * 1000 ' kings ransom Multiball 'EndBLackKnightRetroMode.Enabled = True 'EnableBallSaver(Bk2000Time) End If End If timer003.interval=SW60Timer timer003.Enabled = True if PowerSwordActivated = False Then PowerSwordLevel(CurrentPlayer) = PowerSwordLevel(CurrentPlayer) + 1 If PowerSwordLevel(CurrentPlayer)>100 then PowerSwordLevel(CurrentPlayer) = 100 updatePowersword() End If end sub '******MULTIBALL********* sub timer002_Timer() timer002.Enabled = False kicker006.destroyball Kicker007.createball kicker007.kick 90,2 end Sub sub timer003_Timer() timer003.Enabled = False SW45.destroyball CastleVUK2.createball 'CastleVUK2.kick 90,10 ' CountSW45used(CurrentPlayer) = CountSW45used(CurrentPlayer) + 1 ' If CountSW45used(CurrentPlayer) > 3 Then ' SW41.IsDropped=False ' CountSW45used(CurrentPlayer) = 0 ' End If If CurrentMissionFlag(CurrentPlayer) = 0 And Knight_challenge_flag = False And CatapultModeFlag = False Then SW41.IsDropped=False SW41Dropped = False End If Flash_lamp.Enabled=True If Knight_challenge_flag = True Or CatapultModeFlag = True Then CountSW45used(CurrentPlayer) = CountSW45used(CurrentPlayer) + 1 If CountSW45used(CurrentPlayer) = 1 Then L70.State=1 Video_Add_Ball_Ready End If If CountSW45used(CurrentPlayer) > 1 Then L70.State=0 Video_Add_Ball kickball CountSW45used(CurrentPlayer) = 0 End If Else Callout RndInt(171,180) End If 'timer004.Enabled = False SoundSaucerKick 1, CastleVUK2 ' playsound "ballrelease" CastleVUK2.kick 295, 200, 1.56 AddScore 10000 BaseBonus = BaseBonus + 1800 end Sub '******************************************** '*********SPINNERS**************************** '******************************************** Sub SW47_hit() c=c+1 addscore 1000:L70.state=1 BaseBonus = BaseBonus + 1800 if c=2 then L69.state=1 end If if c=3 then light026.state=2 end If soundspinner SW47 if PowerSwordActivated = False Then PowerSwordLevel(CurrentPlayer) = PowerSwordLevel(CurrentPlayer) + 1 If PowerSwordLevel(CurrentPlayer)>100 then PowerSwordLevel(CurrentPlayer) = 100 updatePowersword() End If end Sub Sub SW47() c=c+1 addscore 1000:L70.state=1 BaseBonus = BaseBonus + 1800 if c=2 then L69.state=1 end If if c=3 then light026.state=2 end If soundspinner SW47 if PowerSwordActivated = False Then PowerSwordLevel(CurrentPlayer) = PowerSwordLevel(CurrentPlayer) + 1 If PowerSwordLevel(CurrentPlayer)>100 then PowerSwordLevel(CurrentPlayer) = 100 updatePowersword() End If end Sub sub timer3_Timer() Timer2.Enabled=False ' FlailReset.Enabled = False ' Set safeguard Off end Sub Sub BouleAfterHit_Timer() If CatapultModeFlag = True Then BouleAfterHit.Enabled = False StopBouleFlag = False timer2.interval = 5 timer2.Enabled = True Else 'StopBouleFlag = True ' The previous condition replace this! End If End Sub ' boule hit Flail has been hit Sub boule_hit() OrbitFlag = False OrbitStatus.Enabled = True If CurrentMissionFlag(CurrentPlayer) = 0 And RageMultiball = False Then callout RndInt(506,520) End If 'PlaySoundAt "fx_metalhit", ActiveBall If CurrentMissionFlag(CurrentPlayer) = 0 And CatapultModeFlag = False Then NumberOfHitForStartMission(CurrentPlayer) = NumberOfHitForStartMission(CurrentPlayer) + 1 End If If ShieldIsReadyToActivateMission(CurrentPlayer) = True Then BouleHited = BouleHited +1 End If ' StopBouleFlag = True ' StopBouleAngle = 90 ' StopRotating.interval=100 ' StopRotating.Enabled=True If CatapultModeFlag = True or BlackKnightRetro(CurrentPlayer) = 3 Then StopBouleAngle = 90 StopRotating.interval = 100 StopRotating.Enabled=True MissionHit 51 BouleAfterHit.interval = 4000 BouleAfterHit.Enabled = True ElseIf CatapultModeFlag = False Then ActionWhenHitOneOfThreeWay ' StopBouleAngle = 0 ' StopRotating.Enabled=True ' MissionHit 51 End If If CurrentMissionFlag(CurrentPlayer) = 1 Or Knight_challenge_flag = True or WarHurryFlag = True Then If L79State(CurrentPlayer) = 2 Then StopBouleAngle = 90 StopRotating.Enabled=True MissionHit 51 End If End If if PowerSwordActivated = False Then PowerSwordLevel(CurrentPlayer) = PowerSwordLevel(CurrentPlayer) + 1 If PowerSwordLevel(CurrentPlayer)>100 then PowerSwordLevel(CurrentPlayer) = 100 updatePowersword() End If ' Rage Multiball Score If RageMultiball = True Then ' play sound "jackpot" Callout rndint(373,374) AddScore 1000000 RageMultiballJackPot = RageMultiballJackPot + 50000 End If End Sub sub timer2_Timer() BouleAngle = BouleAngle + 5 If BouleAngle = 180 Then boule.collidable=True End If If BouleAngle = 85 Then boule.collidable=False End If If BouleAngle = 265 Then boule.collidable=False End If If BouleAngle = 360 Then BouleAngle = 0 boule.collidable=True End If boule.rotx=BouleAngle If BouleAngle = StopBouleAngle Then If StopBouleFlag = True Then timer2.Enabled=False 'FlailReset.Enabled = False ' Set safeguard Off ' StopSound "Sound-0x0111" ' StopSound "Sound-0x0111" End If End If end Sub Sub StopRotating_timer() timer2.interval=15 timer2.Enabled=True StopRotating.Enabled=False StopBouleFlag = True ' StopSound "Sound-0x0111" End Sub Sub SW48_Hit() SaveStateLightturnlight SaveStateLight animation_start_and_finish_flag = 1 TurnOffAllRegularLights 'seq_animation_array = Array (2,3,18) seq_animation_array = Array (2,3,7) SeqAnimation = 0 LightsequenceAnimation.Enabled = True If CurrentMissionFlag(CurrentPlayer) = 1 Or Knight_challenge_flag = True Or CatapultModeFlag = True or WarHurryFlag = True Then If L75State(CurrentPlayer) = 2 And SWNoHit = False Then MissionHit 48 SWNoHit = True SW48_SW64_NoHit.Enabled=True End If End If End Sub Sub SW47_Spin() If SuperSpinnerLevel >0 Then AddScoreChestJackpot = AddScoreChestJackpot + AddScoreSuperSpinner 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True End If AddScore 12030 * (SuperSpinnerLevel + 1) 'soundspinner SW47 ' BaseBonus = BaseBonus + 12030 if PowerSwordActivated = False Then PowerSwordLevel(CurrentPlayer) = PowerSwordLevel(CurrentPlayer) + 1 If PowerSwordLevel(CurrentPlayer)>100 then PowerSwordLevel(CurrentPlayer) = 100 updatePowersword() End If End Sub Sub SW47bis_Hit() If RampLightsMove(CurrentPlayer) = "ShieldReadyForMonster" Or CurrentMissionFlag(CurrentPlayer) = 1 Then 'No action... Else MissionRandomTimer.Interval=100 MissionRandomTimer.Enabled=True End If End Sub Sub SW55_Hit() AddScore 10030 BaseBonus = BaseBonus + 1800 if PowerSwordActivated = False Then PowerSwordLevel(CurrentPlayer) = PowerSwordLevel(CurrentPlayer) + 1 If PowerSwordLevel(CurrentPlayer)>100 then PowerSwordLevel(CurrentPlayer) = 100 updatePowersword() End If End Sub ' Left Sub SW41_Hit() OrbitFlag = False OrbitStatus.Enabled = True if BallsOnPlayfield = 1 and RetroMode = 0 Then superModeBoosted end If if SuperTargetsLevel > 0 Then AddScoreChestJackpot = AddScoreChestJackpot + AddScoreSuperTargets 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True End If addscore 1030 * (SuperTargetsLevel+1) ' changed scoring so it reflects super targetlevel BaseBonus = BaseBonus + 1800 SoundDropTargetDrop SW41 'PlaySoundAt "fx_droptarget", ActiveBall SW41.IsDropped=True SW41Dropped = True If CurrentMissionFlag(CurrentPlayer) = 1 Or Knight_challenge_flag = True Or CatapultModeFlag = True or WarHurryFlag = True Then If L66State(CurrentPlayer) = 2 Then MissionHit 41 End If End If if PowerSwordActivated = False Then PowerSwordLevel(CurrentPlayer) = PowerSwordLevel(CurrentPlayer) + 1 If PowerSwordLevel(CurrentPlayer)>100 then PowerSwordLevel(CurrentPlayer) = 100 updatePowersword() End If End Sub '******************************************** '*********BUMPERS**************************** '******************************************** sub SW70_hit() If SuperPopsLevel > 0 Then AddScoreChestJackpot = AddScoreChestJackpot + AddScoreSuperPops 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True End If RandomSoundBumperTop SW70 addscore 10470 * (SuperPopsLevel + 1) BaseBonus = BaseBonus + 1800 If CurrentMissionFlag(CurrentPlayer) = 0 Then video_fire_animation End If d=d+1 if d=50 then addscore 20000 end if if d=100 then addscore 50000 end if ' war bumper increase here Pop1Hits(CurrentPlayer) = Pop1Hits(CurrentPlayer) + 1 end Sub sub SW71_hit() If SuperPopsLevel > 0 Then AddScoreChestJackpot = AddScoreChestJackpot + AddScoreSuperPops 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True End If RandomSoundBumperMiddle SW71 addscore 10470 * (SuperPopsLevel + 1) BaseBonus = BaseBonus + 1800 If CurrentMissionFlag(CurrentPlayer) = 0 Then video_fire_animation End If d=d+1 if d=50 then addscore 20000 end if if d=100 then addscore 50000 end if ' war bumper increase here Pop2Hits(CurrentPlayer) = Pop2Hits(CurrentPlayer) + 1 end Sub sub SW72_hit() If SuperPopsLevel > 0 Then AddScoreChestJackpot = AddScoreChestJackpot + AddScoreSuperPops 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True End If RandomSoundBumperBottom SW72 addscore 10470 * (SuperPopsLevel + 1) BaseBonus = BaseBonus + 1800 If CurrentMissionFlag(CurrentPlayer) = 0 Then video_fire_animation End If d=d+1 if d=50 then addscore 20000 end if if d=100 then addscore 50000 end if ' war bumper increase here Pop3Hits(CurrentPlayer) = Pop3Hits(CurrentPlayer) + 1 end Sub 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' FLIPPER LANES '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X ' Sub giflash dim a For each a in GI FlashForMs a, 1000, 150, 1 Next End Sub sub kickball 'GiOn 'flasherspop red,"leftkick" 'vpmtimer.addtimer 1000, "actualkick '" actualkick.enabled=True end Sub sub actualkick_timer actualkick.enabled=False 'kicker1.CreateBall 'PlaySoundAt SoundFXDOF("mbpc-popper",116,DOFPulse,DOFContactors), kicker1 'DOF 115, DOFPulse 'Strobe 'kicker1.kick 82, 32, 0 AutoPlunger.createball AutoPlunger.kick 360,45 RandomSoundBallRelease Kicker1 BallsOnPlayfield = BallsOnPlayfield + 1 end Sub '**************** ' MULTIBALL '**************** sub doublekick_timer doublekick.enabled=False 'kicker1.CreateBall 'PlaySoundAt SoundFXDOF("mbpc-popper",116,DOFPulse,DOFContactors), kicker1 'DOF 115, DOFPulse 'Strobe AutoPlunger.createball AutoPlunger.kick 360,45 RandomSoundBallRelease Kicker1 BallsOnPlayfield = BallsOnPlayfield + 1 end Sub ' Multiball kick out Balls ifg not enough on Balls in Play Kicks every 2 seconds sub MultiballKicker_timer if BallsOnPlayfield < MultiballAmount Then AutoPlunger.createball AutoPlunger.kick 360,45 RandomSoundBallRelease Kicker1 BallsOnPlayfield = BallsOnPlayfield + 1 If PMdebug = true Then PuPlayer.LabelSet pFullDMD,"curplayer","Kick:" & BallsOnPlayfield ,1,"{'mt':2}" End If end Sub ' Flail Reset Timer Used to free balls Every 15 seconds when Flail is set to On sub FlailReset_Timer() if FlailResetFlipFlop = 0 Then ' spin the flail to 90 to free any trapped balls StopBouleAngle = 90 StopBouleFlag = True StopRotating.Interval = 3000 StopRotating.Enabled=True timer2.interval=5 timer2.Enabled=False FlailResetFlipFlop = 1 FlailReset.Interval = 5000 ' give it 5 seconds to free any balls 'FlailReset.enabled = True If PMdebug = true Then PuPlayer.LabelSet pFullDMD,"curplayer","stopFlail",1,"{'mt':2}" Else ' spin the flail StopBouleFlag = False StopRotating.Enabled=False timer2.interval=5 timer2.Enabled=True FlailResetFlipFlop = 0 FlailReset.Interval = 15000 ' give it 15 seconds before stopping again If PMdebug = true Then PuPlayer.LabelSet pFullDMD,"curplayer","startFlail",1,"{'mt':2}" 'FlailReset.enabled = True End If End Sub Sub Flash_lamp_Timer() Flash_lamp.Enabled=False L142.State=0 L143.State=0 L270.State=1 L271.State=1 L272.State=1 End Sub Sub RightGateTW_Hit() If SuperIsLit = False Then SuperIsLit = True L88.State = 1 ' ' playmedia "Sound-0x08FE.mp3","Audiocomment",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) callout 493 End If If BlackKnightRetro(CurrentPlayer) = 3 And CounOrbitsFlag = True Then MissionHit 19 ElseIf CounOrbitsFlag = True Then '------------------------------------------------------------- AddScoreLoopBonus = AddScoreLoopBonus If SuperOrbitsLevel > 0 Then AddScoreChestJackpot = AddScoreChestJackpot + AddScoreSuperOrbits 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True End If addscore 1030 * (SuperOrbitsLevel + 1) End If ' playsound "gate" CounOrbitsFlag = True OrbitFlag = True OrbitStatus.Enabled = True if PowerSwordActivated = False Then PowerSwordLevel(CurrentPlayer) = PowerSwordLevel(CurrentPlayer) + 1 If PowerSwordLevel(CurrentPlayer)>100 then PowerSwordLevel(CurrentPlayer) = 100 updatePowersword() End If End Sub Sub RightGate_hit() ' playsound "gate" Uturn = Uturn + 1 If Uturn = UturnExtraBall Then VideoExtraBallIsLit End If End Sub Sub LeftGate_hit() ' playsound "gate" Uturn = Uturn + 1 If Uturn = UturnExtraBall Then VideoExtraBallIsLit End If End Sub Sub LeftGateTW_Hit() If BlackKnightRetro(CurrentPlayer) = 3 And CounOrbitsFlag = True Then MissionHit 19 ElseIf CounOrbitsFlag = True Then '------------------------------------------------------------- AddScoreLoopBonus = AddScoreLoopBonus If SuperOrbitsLevel > 0 Then AddScoreChestJackpot = AddScoreChestJackpot + AddScoreSuperOrbits 'restoreOverlay.Interval=100 'restoreOverlay.Enabled=True End If addscore 1030 * (SuperOrbitsLevel + 1) End If playsound "gate4" LeftGateTWcount = LeftGateTWcount + 1 If SuperIsLit = False Then SuperIsLit = True L88.State = 1 ' ' playmedia "Sound-0x08FE.mp3","Audiocomment",pAudio,"",0,"",1,3 '(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) Callout 493 End If If LeftGateTWcount = 3 Then KnightLamp(CurrentPlayer) = KnightLamp(CurrentPlayer) + 1 If KnightLamp(CurrentPlayer) > 12 Then KnightLamp(CurrentPlayer) = 12 End if Video_Knight End If If CurrentMissionFlag(CurrentPlayer) = 0 Then 'video_fire_animation If Knight_challenge_flag = False And CatapultModeFlag = False And WarHurryFlag = False Then Video_FireAnimation2 End If End If CounOrbitsFlag = True OrbitFlag = True OrbitStatus.Enabled = True if PowerSwordActivated = False Then PowerSwordLevel(CurrentPlayer) = PowerSwordLevel(CurrentPlayer) + 1 If PowerSwordLevel(CurrentPlayer)>100 then PowerSwordLevel(CurrentPlayer) = 100 updatePowersword() End If End Sub Sub OrbitStatus_Timer() If BlackKnightRetro(CurrentPlayer) <> 3 Then CounOrbitsFlag = False End If OrbitStatus.Enabled = False If OrbitFlag = True Then RightGate.collidable=False LeftGate.collidable=False L72.State = 1 L103.State = 1 Else RightGate.collidable=True LeftGate.collidable=True L72.State = 0 L103.State = 0 End If End Sub Sub SW64_Hit() If CurrentMissionFlag(CurrentPlayer) = 1 Or Knight_challenge_flag = True Or CatapultModeFlag = True or WarHurryFlag = True Then If L106State(CurrentPlayer) = 2 And SWNoHit = False Then MissionHit 64 SWNoHit = True SW48_SW64_NoHit.Enabled=True End If End If if PowerSwordActivated = False Then PowerSwordLevel(CurrentPlayer) = PowerSwordLevel(CurrentPlayer) + 1 If PowerSwordLevel(CurrentPlayer)>100 then PowerSwordLevel(CurrentPlayer) = 100 updatePowersword() End If End Sub Sub SW48_SW64_NoHit_Timer() SWNoHit = False SW48_SW64_NoHit.Enabled=False End Sub Sub BurningSandsLightMove_Timer() If BurningSandsHit = 1 or BurningSandsHit = 2 Then BurningSandsCount = BurningSandsCount + 1 If BurningSandsCount = 13 Then BurningSandsHit = 0 End If Else BurningSandsCount = 0 if PowerSwordActivated = True Then BurningSandsLightMovementNumber = 3 Else BurningSandsLightMovementNumber = BurningSandsLightMovementNumber + 1 If BurningSandsLightMovementNumber = 9 Then BurningSandsLightMovementNumber = 1 End If End If End If CheckLamp.Enabled=True End Sub Sub UnblockDrainHited_Timer() UnblockDrainHited.Enabled = False If Tilted = True Then ShieldNumberOfMove = 2 ShieldTimer.interval=250 ShieldTimer.Enabled=True UPLock.collidable=True UPLock.TransY=0 boule.rotx=0 ' PlaySound "Sound-0x0111",-1 ' PlaySound "Sound-0x0111", 0, SongVolume Timer2.Enabled=True ' Playsound "unblock" End If If BallsOnPlayfield <= 0 Then ShieldNumberOfMove = 2 ShieldTimer.interval=250 ShieldTimer.Enabled=True UPLock.collidable=True UPLock.TransY=0 boule.rotx=0 ' PlaySound "Sound-0x0111",-1 ' PlaySound "Sound-0x0111", 0, SongVolume Timer2.Enabled=True ' Playsound "unblock" End If End Sub Sub BallControlTimer_Timer() UnblockDrainHited.Enabled = True End Sub ' ********************* Ramp Triggers ' left hand metal ramp played as plastic Sub RampTrigger01_Hit() WireRampOn True 'Play Plastic Ramp Sound End sub Sub RampTrigger02_Hit() WireRampOff 'Exiting Ramp Stop Playing Sound End Sub Sub WireRamp01_Hit() WireRampOn False 'Play Wire Ramp Sound End Sub Sub WireRamp02_Hit() WireRampOff 'Stop Wire Ramp Sound End Sub Sub CastleVUK2_Hit() CastleVUK2.kick 295, 200, 1.56 SoundSaucerKick 1, CastleVUK2 End Sub Sub SW51_Hit() ' top of ramp (lock Mission) OrbitFlag = False OrbitStatus.Enabled = True If RampActivForValidateMission(CurrentPlayer) = True Then ShieldIsReadyToActivateMission(CurrentPlayer) = True ActionWhenHitOneOfThreeWay End If If CurrentMissionFlag(CurrentPlayer) = 0 And BlackKnightRetro(CurrentPlayer) <> 3 And RageMultiball = False And CatapultModeFlag = False Then NumberOfHitForStartMission(CurrentPlayer) = NumberOfHitForStartMission(CurrentPlayer) + 1 ActionWhenHitOneOfThreeWay End If SaveStateLightturnlight SaveStateLight animation_start_and_finish_flag = 1 TurnOffAllRegularLights seq_animation_array = Array (2,3,18) SeqAnimation = 0 LightsequenceAnimation.Enabled = True If CurrentMissionFlag(CurrentPlayer) = 1 Or Knight_challenge_flag = True Or CatapultModeFlag = True or WarHurryFlag = True Then If L79State(CurrentPlayer) = 2 Then MissionHit 51 End If End If 'kicker002.destroyball 'Kicker003.createball 'kicker003.kick 90,10 addscore 1000 End Sub Sub LightEyesBK 'SpeakTime = xxx Must be defined before calling the function LightEyesBK to stop the light in good time StopLightEyesBK.interval = SpeakTime StopLightEyesBK.Enabled = True LBKYL.State = 1 LBKYR.State = 1 BL001.State = 2 BL002.State = 2 BL003.State = 2 BL004.State = 2 BL005.State = 2 End Sub Sub StopLightEyesBK_Timer() StopLightEyesBK.Enabled = False LBKYL.State = 0 LBKYR.State = 0 BL001.State = 0 BL002.State = 0 BL003.State = 0 BL004.State = 0 BL005.State = 0 End Sub 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' UTILITY - Video Manager & skipper '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X Sub playclear(chan) ' debug.print "play clear'd " & chan if chan = pAudio Then 'PuPlayer.playlistplayex pAudio,"audioclear","clear.mp3",100,20 PuPlayer.playstop pAudio End If if chan = pMusic Then 'PuPlayer.playlistplayex pMusic,"audioclear","clear.mp3",100,20 'puplayer.setVolume pMusic,0 PuPlayer.SendMSG "{ ""mt"":301, ""SN"": 4, ""FN"":11, ""VL"":0 }" End If if chan = pBackglass Then 'PuPlayer.playlistplayex pFullDMD,"backglass","clear.mp4",0,20 PuPlayer.playstop pBackglass end if End Sub 'example ' playmedia "hs.mp3","audiomultiballs",pAudio,"cineon",10000,"",1,1 // (name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) Sub playmedia(name,playlist,channel,cinematic,length,nextitem,audiolevel,priority) if audiolevel = 1 Then if channel = pBackglass Then audiolevel = vsvol currentqueue = " " Elseif channel = pCallouts Then audiolevel = vovol Elseif channel = pMusic Then audiolevel = sndtrkvol Elseif channel = pAudio Then audiolevel = sndknightvol Elseif channel = pOvervid Then audiolevel = vsvol end If end If if channel = pCallouts Then if name = "jackpot.mp3" or name ="" or name = "jackpot.mp3" Then else if lastvocall = name then exit sub end if end if if nextitem = "" Then If cinematic = "cineon" Then noskipper=1 'vpmtimer.addtimer length, "nextitems '" nextitems end If 'VideoSetBackground Else 'vpmtimer.addtimer length, "nextitems '" nextitems currentqueue = nextitem end If If cinematic = "cineon" Then skipped=0 'PuPlayer.playpause 4 ' stop then resume the music PuPlayer.SendMSG "{ ""mt"":301, ""SN"": 4, ""FN"":11, ""VL"":20 }" 'vpmtimer.addtimer length, "turnitbackupcine '" turnitbackupcine 'GiOff cineon = 1 end If PuPlayer.playlistplayex channel,playlist,name,audiolevel,priority If channel = pCallouts Then PuPlayer.SendMSG "{ ""mt"":301, ""SN"": 2, ""FN"":11, ""VL"":60 }" PuPlayer.SendMSG "{ ""mt"":301, ""SN"": 4, ""FN"":11, ""VL"":60 }" PuPlayer.SendMSG "{ ""mt"":301, ""SN"": 7, ""FN"":11, ""VL"":60 }" 'vpmtimer.addtimer length, "turnitbackup'" turnitbackup end If If channel = pOvervid Then PuPlayer.SendMSG "{ ""mt"":301, ""SN"": 2, ""FN"":11, ""VL"":50 }" 'vpmtimer.addtimer length, "turnitbackupvid'" turnitbackupvid end If if channel = pCallouts Then lastvocall=name end if end sub Sub turnitbackup PuPlayer.SendMSG "{ ""mt"":301, ""SN"": 2, ""FN"":11, ""VL"":"&vsvol&" }" PuPlayer.SendMSG "{ ""mt"":301, ""SN"": 4, ""FN"":11, ""VL"":"&sndtrkvol&" }" PuPlayer.SendMSG "{ ""mt"":301, ""SN"": 7, ""FN"":11, ""VL"":"&vovol&" }" ' debug.print "turnitbackup " 'puplayer.setvolume pMusic sndtrkvol End Sub Sub turnitbackupvid PuPlayer.SendMSG "{ ""mt"":301, ""SN"": 2, ""FN"":11, ""VL"":"&vsvol&" }" ' debug.print "turnitbackupvid " End Sub Sub turnitbackupcine PuPlayer.SendMSG "{ ""mt"":301, ""SN"": 4, ""FN"":11, ""VL"":"&sndtrkvol&" }" ' debug.print "turnitbackupcine " End Sub sub holder end sub sub nextitems if skipped = 0 Then noskipper=0 'PuPlayer.playresume 4 PuPlayer.SendMSG "{ ""mt"":301, ""SN"": 4, ""FN"":11, ""VL"":"&sndtrkvol&" }" gion cineon = 0 'execute currentqueue Elseif skipped = 1 Then 'PuPlayer.playresume 4 PuPlayer.SendMSG "{ ""mt"":301, ""SN"": 4, ""FN"":11, ""VL"":"&sndtrkvol&" }" gion cineon = 0 skipped = 3 execute currentqueue currentqueue = " " end If end Sub sub vidskipper_timer if cineon = 1 and noskipper = 0 Then if ldown = 1 and rdown = 1 Then nextitems skipped = 1 end If end If end Sub 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' UTILITY - CINEMATIC SKIPPING '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X Sub checkdown If ldown + rdown = 2 Then skipscene End If End Sub Sub skipscene End Sub 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' UTILITY - Light Runs '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '***** LIGHT RUNS ***** '(CHAOS)randoms '(DIRECTIONS)uup|udown|uleft|uright|diagdl|diagdr|diagul|diagur '(SWIPES)middleih|middleiv|middleoh|middleov|stripe1h|hatch1h|hatch1v|hatch2h|hatch2v|stripe1v|stripe2h|stripe2v '(SPINS)circlein|circleout|clockleft|clockright|screwl|screwr '(CURVES)arcbld|arcblu|arcbrd|arcbru|arctld|arctlu|arctrd|arctru|fanld|fanlu|fanrd|fanru|radarl|radarr|wiperl|wiperr '(EXAMPLE)lightrun red,arcbld,1 (SYNTAX)lightrun color,direction,times to run Sub lightrun(colorduring,direction,timenum) On Error Resume Next dim timefornext ' color setting dim a for each a in aLights SetLightColor a, colorduring, -1 next if gistatus = 1 Then GiOff end if select case direction Case arcbld lrseq.UpdateInterval = 5 timefornext = timenum*1000 lrseq.Play SeqArcBottomLeftDownOn, 90,timenum,0 lrseq.Play SeqArcBottomLeftDownOff, 90,timenum,0 Case arcblu lrseq.UpdateInterval = 5 timefornext = timenum*1000 lrseq.Play SeqArcBottomLeftUpOn, 90,timenum,0 lrseq.Play SeqArcBottomLeftUpOff, 90,timenum,0 Case arcbrd lrseq.UpdateInterval = 5 timefornext = timenum*1000 lrseq.Play SeqArcBottomRightDownOn, 90,timenum,0 lrseq.Play SeqArcBottomRightDownOff, 90,timenum,0 Case arcbru lrseq.UpdateInterval = 5 timefornext = timenum*1000 lrseq.Play SeqArcBottomRightUpOn, 90,timenum,0 lrseq.Play SeqArcBottomRightUpOff, 90,timenum,0 Case arctld lrseq.UpdateInterval = 5 timefornext = timenum*1000 lrseq.Play SeqArcTopLeftDownOn, 90,timenum,0 lrseq.Play SeqArcTopLeftDownOff, 90,timenum,0 Case arctlu lrseq.UpdateInterval = 5 timefornext = timenum*1000 lrseq.Play SeqArcTopLeftUpOn, 90,timenum,0 lrseq.Play SeqArcTopLeftUpOff, 90,timenum,0 Case arctrd lrseq.UpdateInterval = 5 timefornext = timenum*1000 lrseq.Play SeqArcTopRightDownOn, 90,timenum,0 lrseq.Play SeqArcTopRightDownOff, 90,timenum,0 Case arctru lrseq.UpdateInterval = 5 timefornext = timenum*1000 lrseq.Play SeqArcTopRightUpOn, 90,timenum,0 lrseq.Play SeqArcTopRightUpOff, 90,timenum,0 Case circlein lrseq.UpdateInterval = 5 timefornext = timenum*800 lrseq.Play SeqCircleInOn,50,timenum,0 lrseq.Play SeqCircleInOff,50,timenum,0 Case circleout lrseq.UpdateInterval = 5 timefornext = timenum*800 lrseq.Play SeqCircleOutOn,50,timenum,0 lrseq.Play SeqCircleOutOff,50,timenum,0 Case clockleft lrseq.UpdateInterval = 2 timefornext = timenum*800 lrseq.Play SeqClockLeftOn, 45,timenum,0 lrseq.Play SeqClockLeftOff, 45,timenum,0 Case clockright lrseq.UpdateInterval = 2 timefornext = timenum*800 lrseq.Play SeqClockRightOn,45,timenum,0 lrseq.Play SeqClockRightOff,45,timenum,0 Case diagdl lrseq.UpdateInterval = 3 timefornext = timenum*800 lrseq.Play SeqDiagDownLeftOn, 25,timenum,0 lrseq.Play SeqDiagDownLeftOff, 25,timenum,0 Case diagdr lrseq.UpdateInterval = 3 timefornext = timenum*800 lrseq.Play SeqDiagDownRightOn, 25,timenum,0 lrseq.Play SeqDiagDownRightOff, 25,timenum,0 Case diagul lrseq.UpdateInterval = 3 timefornext = timenum*800 lrseq.Play SeqDiagUpLeftOn, 25,timenum,0 lrseq.Play SeqDiagUpLeftOff, 25,timenum,0 Case diagur lrseq.UpdateInterval = 3 timefornext = timenum*800 lrseq.Play SeqDiagUpRightOn, 25,timenum,0 lrseq.Play SeqDiagUpRightOff, 25,timenum,0 Case udown lrseq.UpdateInterval = 5 timefornext = timenum*800 lrseq.Play SeqDownOn, 15,timenum,0 lrseq.Play SeqDownOff, 15,timenum,0 Case fanld lrseq.UpdateInterval = 3 timefornext = timenum*800 lrseq.Play SeqFanLeftDownOn, 30,timenum,0 lrseq.Play SeqFanLeftDownOff, 30,timenum,0 Case fanlu lrseq.UpdateInterval = 3 timefornext = timenum*800 lrseq.Play SeqFanLeftUpOn, 30,timenum,0 lrseq.Play SeqFanLeftUpOff, 30,timenum,0 Case fanrd lrseq.UpdateInterval = 3 timefornext = timenum*800 lrseq.Play SeqFanRightDownOn, 30,timenum,0 lrseq.Play SeqFanRightDownOff, 30,timenum,0 Case fanru lrseq.UpdateInterval = 3 timefornext = timenum*800 lrseq.Play SeqFanRightUpOn, 30,timenum,0 lrseq.Play SeqFanRightUpOff, 30,timenum,0 Case hatch1h lrseq.UpdateInterval = 9 timefornext = timenum*800 lrseq.Play SeqHatch1HorizOn, 25,timenum,0 lrseq.Play SeqHatch1HorizOff, 25,timenum,0 Case hatch1v lrseq.UpdateInterval = 9 timefornext = timenum*800 lrseq.Play SeqHatch1VertOn, 75,timenum,0 lrseq.Play SeqHatch1VertOff, 75,timenum,0 Case hatch2h lrseq.UpdateInterval = 9 timefornext = timenum*800 lrseq.Play SeqHatch2HorizOn, 25,timenum,0 lrseq.Play SeqHatch2HorizOff, 25,timenum,0 Case hatch2v lrseq.UpdateInterval = 9 timefornext = timenum*800 lrseq.Play SeqHatch2VertOn, 75,timenum,0 lrseq.Play SeqHatch2VertOff, 75,timenum,0 Case uleft lrseq.UpdateInterval = 5 timefornext = timenum*800 lrseq.Play SeqLeftOn, 50,timenum,0 lrseq.Play SeqLeftOff, 50,timenum,0 Case middleih lrseq.UpdateInterval = 12 timefornext = timenum*700 lrseq.Play SeqMiddleInHorizOn, 50,timenum,0 lrseq.Play SeqMiddleInHorizOff, 50,timenum,0 Case middleiv lrseq.UpdateInterval = 12 timefornext = timenum*700 lrseq.Play SeqMiddleInVertOn, 50,timenum,0 lrseq.Play SeqMiddleInVertOff, 50,timenum,0 Case middleoh lrseq.UpdateInterval = 12 timefornext = timenum*700 lrseq.Play SeqMiddleOutHorizOn, 50,timenum,0 lrseq.Play SeqMiddleOutHorizOff, 50,timenum,0 Case middleov lrseq.UpdateInterval = 12 timefornext = timenum*700 lrseq.Play SeqMiddleOutVertOn, 50,timenum,0 lrseq.Play SeqMiddleOutVertOff, 50,timenum,0 Case radarl lrseq.UpdateInterval = 4 timefornext = timenum*700 lrseq.Play SeqRadarLeftOn, 45,timenum,0 lrseq.Play SeqRadarLeftOff, 45,timenum,0 Case radarr lrseq.UpdateInterval = 4 timefornext = timenum*700 lrseq.Play SeqRadarRightOn, 45,timenum,0 lrseq.Play SeqRadarRightOff, 45,timenum,0 Case randoms lrseq.UpdateInterval = 5 timefornext = timenum*1000 lrseq.Play SeqRandom,40,,timefornext Case uright lrseq.UpdateInterval = 5 timefornext = timenum*800 lrseq.Play SeqRightOn, 50,timenum,0 lrseq.Play SeqRightOff, 50,timenum,0 Case screwl lrseq.UpdateInterval = 2 timefornext = timenum*500 lrseq.Play SeqScrewLeftOn, 25,timenum,0 lrseq.Play SeqScrewLeftOff, 25,timenum,0 Case screwr lrseq.UpdateInterval = 2 timefornext = timenum*500 lrseq.Play SeqScrewRightOn, 25,timenum,0 lrseq.Play SeqScrewRightOff, 25,timenum,0 Case stripe1h lrseq.UpdateInterval = 5 timefornext = timenum*900 lrseq.Play SeqStripe1HorizOn, 25,timenum,0 lrseq.Play SeqStripe1HorizOff, 25,timenum,0 Case stripe1v lrseq.UpdateInterval = 5 timefornext = timenum*900 lrseq.Play SeqStripe1VertOn, 50,timenum,0 lrseq.Play SeqStripe1VertOff, 50,timenum,0 Case stripe2h lrseq.UpdateInterval = 5 timefornext = timenum*900 lrseq.Play SeqStripe2HorizOn, 25,timenum,0 lrseq.Play SeqStripe2HorizOff, 25,timenum,0 Case stripe2v lrseq.UpdateInterval = 5 timefornext = timenum*900 lrseq.Play SeqStripe2VertOn, 25,timenum,0 lrseq.Play SeqStripe2VertOff, 25,timenum,0 Case uup lrseq.UpdateInterval = 5 timefornext = timenum*800 lrseq.Play SeqUpOn, 15,timenum,0 lrseq.Play SeqUpOff, 15,timenum,0 Case wiperl lrseq.UpdateInterval = 5 timefornext = timenum*900 lrseq.Play SeqWiperLeftOn, 45,timenum,0 lrseq.Play SeqWiperLeftOff, 45,timenum,0 Case wiperr lrseq.UpdateInterval = 5 timefornext = timenum*900 lrseq.Play SeqWiperRightOn, 45,timenum,0 lrseq.Play SeqWiperRightOff, 45,timenum,0 end Select runninglights = 1 'vpmtimer.addtimer timefornext, "nolongerrun '" nolongerrun end Sub Sub nolongerrun if gistatus = 0 Then GiOn end if runninglights = 0 lrseq.StopPlay if bMultiBallMode = 0 Then relighttable end if end Sub '************************************************************************************************************* '************************************************************************************************************* ' ' END ' '************************************************************************************************************* '************************************************************************************************************* ' ************************* Below are Pupplayer, Ball and Fleep Sound, and NFozzy Physics routines shouldn't need modifying *************** 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX '********************* START OF PUPDMD FRAMEWORK v1.0 *************************XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX '******************** DO NOT MODIFY STUFF BELOW THIS LINE!!!! ***************XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX '******************************************************************************XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX '***** Create a PUPPack within PUPPackEditor for layout config!!! **********XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX '******************************************************************************XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' ' ' Quick Steps: ' 1> create a folder in PUPVideos with Starter_PuPPack.zip and call the folder "yourgame" ' 2> above set global variable pGameName="yourgame" ' 3> copy paste the settings section above to top of table script for user changes. ' 4> on Table you need to create ONE timer only called pupDMDUpdate and set it to 250 ms enabled on startup. ' 5> go to your table1_init or table first startup function and call PUPINIT function ' 6> Go to bottom on framework here and setup game to call the appropriate events like pStartGame (call that in your game code where needed)...etc ' 7> attractmodenext at bottom is setup for you already, just go to each case and add/remove as many as you want and setup the messages to show. ' 8> Have fun and use pDMDDisplay(xxxx) sub all over where needed. remember its best to make a bunch of mp4 with text animations... looks the best for sure! ' ' 'Note: for *Future Pinball* "pupDMDupdate_Timer()" timer needs to be renamed to "pupDMDupdate_expired()" and then all is good. ' and for future pinball you need to add the follow lines near top 'Need to use BAM and have com idll enabled. ' Dim icom : Set icom = xBAM.Get("icom") ' "icom" is name of "icom.dll" in BAM\Plugins dir ' if icom is Nothing then MSGBOX "Error cannot run without icom.dll plugin" ' Function CreateObject(className) ' Set CreateObject = icom.CreateObject(className) ' End Function '************* starts PUP system, must be called AFTER b2s/controller running so put in last line of table1_init Sub PuPInit 'Set PuPlayer = CreateObject("PinUpPlayer.PinDisplay") 'PuPlayer.B2SInit "", pGameName if (PuPDMDDriverType=pDMDTypeReal) and (useRealDMDScale=1) Then PuPlayer.setScreenEx pDMD,0,0,128,32,0 'if hardware set the dmd to 128,32 End if PuPlayer.LabelInit pDMD if PuPDMDDriverType=pDMDTypeReal then Set PUPDMDObject = CreateObject("PUPDMDControl.DMD") PUPDMDObject.DMDOpen PUPDMDObject.DMDPuPMirror PUPDMDObject.DMDPuPTextMirror PuPlayer.SendMSG "{ ""mt"":301, ""SN"": 1, ""FN"":33 }" 'set pupdmd for mirror and hide behind other pups PuPlayer.SendMSG "{ ""mt"":301, ""SN"": 1, ""FN"":32, ""FQ"":3 }" 'set no antialias on font render if real END IF pSetPageLayouts pDMDSetPage(pDMDBlank) 'set blank text overlay page. pDMDStartUP ' firsttime running for like an startup video... End Sub 'end PUPINIT 'PinUP Player DMD Helper Functions Sub pDMDLabelHide(labName) PuPlayer.LabelSet pDMD,labName,"",0,"" end sub Sub pDMDScrollBig(msgText,timeSec,mColor) PuPlayer.LabelShowPage pDMD,2,timeSec,"" PuPlayer.LabelSet pDMD,"Splash",msgText,0,"{'mt':1,'at':2,'xps':1,'xpe':-1,'len':" & (timeSec*1000000) & ",'mlen':" & (timeSec*1000) & ",'tt':0,'fc':" & mColor & "}" end sub Sub pDMDScrollBigV(msgText,timeSec,mColor) PuPlayer.LabelShowPage pDMD,2,timeSec,"" PuPlayer.LabelSet pDMD,"Splash",msgText,0,"{'mt':1,'at':2,'yps':1,'ype':-1,'len':" & (timeSec*1000000) & ",'mlen':" & (timeSec*1000) & ",'tt':0,'fc':" & mColor & "}" end sub Sub pSplashAddScoreDisplayed(msgText,timeSec,mColor) ' PuPlayer.LabelSet pFullDMD,"CommentDisplayed2",msgText,0,"{'mt':1,'at':1,'fq':250,'len':"& (timeSec*1000) &",'fc':" & mColor & "}" PuPlayer.LabelSet pFullDMD,"AddScoreDisplayed",msgText,0,"{'mt':1, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 35, 'yalign': 1, 'at':3,'hstart':22,'hend':22,'len':" & (timeSec*1000) & ",'mlen':" & (timeSec*500) & ",'tt':5,'fc':" & mColor & "}" end Sub Sub pSplashAddScoreDisplayed2(msgText,timeSec,mColor) ' PuPlayer.LabelSet pFullDMD,"CommentDisplayed2",msgText,0,"{'mt':1,'at':1,'fq':250,'len':"& (timeSec*1000) &",'fc':" & mColor & "}" PuPlayer.LabelSet pFullDMD,"AddScoreDisplayed2",msgText,0,"{'mt':1, 'size': 10, 'xpos': 50, 'xalign': 1, 'ypos': 35, 'yalign': 1, 'at':3,'hstart':22,'hend':22,'len':" & (timeSec*1000) & ",'mlen':" & (timeSec*500) & ",'tt':5,'fc':" & mColor & "}" end Sub Sub pSplashCommentDisplayed(msgText,timeSec,mColor) ' PuPlayer.LabelSet pFullDMD,"CommentDisplayed2",msgText,0,"{'mt':1,'at':1,'fq':250,'len':"& (timeSec*1000) &",'fc':" & mColor & "}" PuPlayer.LabelSet pFullDMD,"CommentDisplayed",msgText,0,"{'mt':1, 'size': 9, 'xpos': 50, 'xalign': 1, 'ypos': 35, 'yalign': 1, 'at':3,'hstart':22,'hend':22,'len':" & (timeSec*1000) & ",'mlen':" & (timeSec*500) & ",'tt':5,'fc':" & mColor & "}" end Sub Sub pSplashCommentDisplayed2(msgText,timeSec,mColor) ' PuPlayer.LabelSet pFullDMD,"CommentDisplayed2",msgText,0,"{'mt':1,'at':1,'fq':250,'len':"& (timeSec*1000) &",'fc':" & mColor & "}" PuPlayer.LabelSet pFullDMD,"CommentDisplayed2",msgText,0,"{'mt':1, 'size': 9, 'xpos': 50, 'xalign': 1, 'ypos': 35, 'yalign': 1, 'at':3,'hstart':22,'hend':22,'len':" & (timeSec*1000) & ",'mlen':" & (timeSec*500) & ",'tt':5,'fc':" & mColor & "}" end Sub Sub pSplashMystery(msgText,timeSec,mColor) PuPlayer.LabelSet pFullDMD,"Mystery",msgText,0,"{'mt':1, 'size': 14, 'xpos': 52, 'xalign': 1, 'ypos': 61, 'yalign': 1, 'at':3,'hstart':21,'hend':20,'len':" & (timeSec*1000) & ",'mlen':" & (timeSec*500) & ",'tt':5,'fc':" & mColor & "}" End Sub Sub pSplashRandomMystery(msgText,timeSec,mColor) PuPlayer.LabelSet pFullDMD,"RandomMystery",msgText,0,"{'mt':1, 'size': 10, 'xpos': 52, 'xalign': 1, 'ypos': 42, 'yalign': 1, 'at':3,'hstart':19,'hend':18,'len':" & (timeSec*1000) & ",'mlen':" & (timeSec*500) & ",'tt':5,'fc':" & mColor & "}" End Sub ' Sub pSplashScoreScroll(msgText,timeSec,mColor) ' PuPlayer.LabelSet pFullDMD,"CommentDisplayed2",msgText,0,"{'mt':1,'at':2,'xps':1,'xpe':-1,'len':"& (timeSec*1000) &", 'mlen':"& (timeSec*500) &",'tt':0, 'fc':" & mColor & "}" ' ' end Sub Sub pDMDSplashScore(msgText,timeSec,mColor) PuPlayer.LabelSet pDMD,"MsgScore",msgText,0,"{'mt':1,'at':1,'fq':250,'len':"& (timeSec*1000) &",'fc':" & mColor & "}" end Sub Sub pDMDSplashScoreScroll(msgText,timeSec,mColor) PuPlayer.LabelSet pDMD,"MsgScore",msgText,0,"{'mt':1,'at':2,'xps':1,'xpe':-1,'len':"& (timeSec*1000) &", 'mlen':"& (timeSec*1000) &",'tt':0, 'fc':" & mColor & "}" end Sub Sub pDMDZoomBig(msgText,timeSec,mColor) 'new Zoom PuPlayer.LabelShowPage pDMD,2,timeSec,"" PuPlayer.LabelSet pDMD,"Splash",msgText,0,"{'mt':1,'at':3,'hstart':5,'hend':80,'len':" & (timeSec*1000) & ",'mlen':" & (timeSec*500) & ",'tt':5,'fc':" & mColor & "}" end sub Sub pDMDTargetLettersInfo(msgText,msgInfo, timeSec) 'msgInfo = '0211' 0= layer 1, 1=layer 2, 2=top layer3. 'this function is when you want to hilite spelled words. Like B O N U S but have O S hilited as already hit markers... see example. PuPlayer.LabelShowPage pDMD,5,timeSec,"" 'show page 5 Dim backText Dim middleText Dim flashText Dim curChar Dim i Dim offchars:offchars=0 Dim spaces:spaces=" " 'set this to 1 or more depends on font space width. only works with certain fonts 'if using a fixed font width then set spaces to just one space. For i=1 To Len(msgInfo) curChar="" & Mid(msgInfo,i,1) if curChar="0" Then backText=backText & Mid(msgText,i,1) middleText=middleText & spaces flashText=flashText & spaces offchars=offchars+1 End If if curChar="1" Then backText=backText & spaces middleText=middleText & Mid(msgText,i,1) flashText=flashText & spaces End If if curChar="2" Then backText=backText & spaces middleText=middleText & spaces flashText=flashText & Mid(msgText,i,1) End If Next if offchars=0 Then 'all litup!... flash entire string backText="" middleText="" FlashText=msgText end if PuPlayer.LabelSet pDMD,"Back5" ,backText ,1,"" PuPlayer.LabelSet pDMD,"Middle5",middleText,1,"" PuPlayer.LabelSet pDMD,"Flash5" ,flashText ,0,"{'mt':1,'at':1,'fq':150,'len':" & (timeSec*1000) & "}" end Sub Sub pDMDSetPage(pagenum) PuPlayer.LabelShowPage pDMD,pagenum,0,"" 'set page to blank 0 page if want off PDMDCurPage=pagenum end Sub Sub pHideOverlayText(pDisp) PuPlayer.SendMSG "{ ""mt"":301, ""SN"": "& pDisp &", ""FN"": 34 }" 'hideoverlay text during next videoplay on DMD auto return end Sub Sub pDMDShowLines3(msgText,msgText2,msgText3,timeSec) Dim vis:vis=1 if pLine1Ani<>"" Then vis=0 PuPlayer.LabelShowPage pDMD,3,timeSec,"" PuPlayer.LabelSet pDMD,"Splash3a",msgText,vis,pLine1Ani PuPlayer.LabelSet pDMD,"Splash3b",msgText2,vis,pLine2Ani PuPlayer.LabelSet pDMD,"Splash3c",msgText3,vis,pLine3Ani end Sub Sub pDMDShowLines2(msgText,msgText2,timeSec) Dim vis:vis=1 if pLine1Ani<>"" Then vis=0 PuPlayer.LabelShowPage pDMD,4,timeSec,"" PuPlayer.LabelSet pDMD,"Splash4a",msgText,vis,pLine1Ani PuPlayer.LabelSet pDMD,"Splash4b",msgText2,vis,pLine2Ani end Sub Sub pDMDShowCounter(msgText,msgText2,msgText3,timeSec) Dim vis:vis=1 if pLine1Ani<>"" Then vis=0 PuPlayer.LabelShowPage pDMD,6,timeSec,"" PuPlayer.LabelSet pDMD,"Splash6a",msgText,vis, pLine1Ani PuPlayer.LabelSet pDMD,"Splash6b",msgText2,vis,pLine2Ani PuPlayer.LabelSet pDMD,"Splash6c",msgText3,vis,pLine3Ani end Sub Sub pDMDShowBig(msgText,timeSec, mColor) Dim vis:vis=1 if pLine1Ani<>"" Then vis=0 PuPlayer.LabelShowPage pDMD,2,timeSec,"" PuPlayer.LabelSet pDMD,"Splash",msgText,vis,pLine1Ani end sub Sub pDMDShowHS(msgText,msgText2,msgText3,timeSec) 'High Score Dim vis:vis=1 if pLine1Ani<>"" Then vis=0 PuPlayer.LabelShowPage pDMD,7,timeSec,"" PuPlayer.LabelSet pDMD,"Splash7a",msgText,vis,pLine1Ani PuPlayer.LabelSet pDMD,"Splash7b",msgText2,vis,pLine2Ani PuPlayer.LabelSet pDMD,"Splash7c",msgText3,vis,pLine3Ani end Sub Sub pDMDSetBackFrame(fname) PuPlayer.playlistplayex pDMD,"PUPFrames",fname,0,1 end Sub Sub pDMDStartBackLoop(fPlayList,fname) PuPlayer.playlistplayex pDMD,fPlayList,fname,0,1 PuPlayer.SetBackGround pDMD,1 end Sub Sub pDMDStopBackLoop PuPlayer.SetBackGround pDMD,0 PuPlayer.playstop pDMD end Sub '************************ where all the MAGIC goes, pretty much call this everywhere **************************************** '************************* see docs for examples ************************************************ '**************************************** DONT TOUCH THIS CODE ************************************************************ Sub pupDMDDisplay(pEventID, pText, VideoName,TimeSec, pAni,pPriority) if dmdnote = notenow Then VideoName = dmdver &"-shortnote2.mp4" end if notenow = VideoName DIM curPos if pDMDCurPriority>=pPriority then Exit Sub 'if something is being displayed that we don't want interrupted. same level will interrupt. pDMDCurPriority=pPriority if timeSec=0 then timeSec=1 'don't allow page default page by accident pLine1="" pLine2="" pLine3="" pLine1Ani="" pLine2Ani="" pLine3Ani="" if pAni=1 Then 'we flashy now aren't we pLine1Ani="{'mt':1,'at':1,'fq':150,'len':" & (timeSec*1000) & "}" pLine2Ani="{'mt':1,'at':1,'fq':150,'len':" & (timeSec*1000) & "}" pLine3Ani="{'mt':1,'at':1,'fq':150,'len':" & (timeSec*1000) & "}" end If curPos=InStr(pText,"^") 'Lets break apart the string if needed if curPos>0 Then pLine1=Left(pText,curPos-1) pText=Right(pText,Len(pText) - curPos) curPos=InStr(pText,"^") 'Lets break apart the string if curPOS>0 Then pLine2=Left(pText,curPos-1) pText=Right(pText,Len(pText) - curPos) curPos=InStr("^",pText) 'Lets break apart the string if curPos>0 Then pline3=Left(pText,curPos-1) Else if pText<>"" Then pline3=pText End if Else if pText<>"" Then pLine2=pText End if Else pLine1=pText 'just one line with no break End if 'lets see how many lines to Show pNumLines=0 if pLine1<>"" then pNumLines=pNumlines+1 if pLine2<>"" then pNumLines=pNumlines+1 if pLine3<>"" then pNumLines=pNumlines+1 if pDMDVideoPlaying and (VideoName="") Then PuPlayer.playstop pDMD pDMDVideoPlaying=False End if if (VideoName<>"") and (useDMDVideos) Then 'we are showing a splash video instead of the text. PuPlayer.playlistplayex pDMD,"DMDSplash",VideoName,pDMDDefVolume,pPriority 'should be an attract background (no text is displayed) pDMDVideoPlaying=true end if 'if showing a splash video with no text if StrComp(pEventID,"shownum",1)=0 Then 'check eventIDs pDMDShowCounter pLine1,pLine2,pLine3,timeSec Elseif StrComp(pEventID,"target",1)=0 Then 'check eventIDs pDMDTargetLettersInfo pLine1,pLine2,timeSec Elseif StrComp(pEventID,"highscore",1)=0 Then 'check eventIDs pDMDShowHS pLine1,pLine2,pline3,timeSec Elseif (pNumLines=3) Then 'depends on # of lines which one to use. pAni=1 will flash. pDMDShowLines3 pLine1,pLine2,pLine3,TimeSec Elseif (pNumLines=2) Then pDMDShowLines2 pLine1,pLine2,TimeSec Elseif (pNumLines=1) Then pDMDShowBig pLine1,timeSec, curLine1Color Else pDMDShowBig pLine1,timeSec, curLine1Color End if PriorityReset=TimeSec*1000 End Sub 'pupDMDDisplay message Sub pupDMDupdate_Timer() pDMDUpdateScores if PriorityReset>0 Then 'for splashes we need to reset current prioirty on timer PriorityReset=PriorityReset-pupDMDUpdate.interval if PriorityReset<=0 Then pDMDCurPriority=-1 if pInAttract then pAttractReset=pAttractBetween ' pAttractNext call attract next after 1 second HP no attractmode pDMDVideoPlaying=false End if End if if pAttractReset>0 Then 'for splashes we need to reset current prioirty on timer pAttractReset=pAttractReset-pupDMDUpdate.interval if pAttractReset<=0 Then pAttractReset=-1 if pInAttract then pAttractNextBackglass pAttractNext End if end If end if End Sub '********************* END OF PUPDMD FRAMEWORK v1.0 ************************* '******************** DO NOT MODIFY STUFF ABOVE THIS LINE!!!! *************** '**************************************************************************** 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ ' SOUND FUNCTIONS '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X '/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ '\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ ' X X X X X X X X X X X X X X X X X X X X X X X ' now replaced with Fleep ' timer for ball rolling Sub RollingTimer_Timer() RollingUpdate ' FxTxP - VPXS: RollingTimer is enabled in the table and never toggled by script, so it is ' the reliable place to service a queued start. ~10ms interval. If bStartPending Then StartPendingTicks = StartPendingTicks + 1 If TableReadyForNewGame() Then BeginNewGame ElseIf StartPendingTicks > 3000 Then ' ~30s safety valve. If a ball is genuinely stuck the player must never be ' locked out, so start anyway and resync the count to what is really there ' rather than leaving ResetForNewGame's hardcoded 0. BeginNewGame BallsOnPlayfield = (UBound(GetBalls()) + 1) - BallInLocker If BallsOnPlayfield < 0 Then BallsOnPlayfield = 0 End If End If End Sub '****************************************************** ' ZBRL: BALL ROLLING AND DROP SOUNDS '****************************************************** ' Be sure to call RollingUpdate in a timer with a 10ms interval see the GameTimer_Timer() sub ReDim rolling(tnob) InitRolling Dim DropCount ReDim DropCount(tnob) Sub InitRolling Dim i For i = 0 To tnob rolling(i) = False Next End Sub Sub RollingUpdate() Dim b Dim gBOT gBOT = GetBalls ' stop the sound of deleted balls For b = UBound(gBOT) + 1 To tnob - 1 rolling(b) = False StopSound("BallRoll_" & b) Next ' exit the sub if no balls on the table If UBound(gBOT) = - 1 Then Exit Sub ' play the rolling sound for each ball For b = 0 To UBound(gBOT) If BallVel(gBOT(b)) > 1 And gBOT(b).z < 30 Then rolling(b) = True PlaySound ("BallRoll_" & b), - 1, VolPlayfieldRoll(gBOT(b)) * BallRollVolume * VolumeDial, AudioPan(gBOT(b)), 0, PitchPlayfieldRoll(gBOT(b)), 1, 0, AudioFade(gBOT(b)) Else If rolling(b) = True Then StopSound("BallRoll_" & b) rolling(b) = False End If End If ' Ball Drop Sounds If gBOT(b).VelZ < - 1 And gBOT(b).z < 55 And gBOT(b).z > 27 Then 'height adjust for ball drop sounds If DropCount(b) >= 5 Then DropCount(b) = 0 If gBOT(b).velz > - 7 Then RandomSoundBallBouncePlayfieldSoft gBOT(b) Else RandomSoundBallBouncePlayfieldHard gBOT(b) End If End If End If If DropCount(b) < 5 Then DropCount(b) = DropCount(b) + 1 End If Next End Sub '****************************************************** '**** END BALL ROLLING AND DROP SOUNDS '****************************************************** '****************************************************** ' ZRRL: RAMP ROLLING SFX '****************************************************** 'Ball tracking ramp SFX 1.0 ' Reqirements: ' * Import A Sound File for each ball on the table for plastic ramps. Call It RampLoop ex: RampLoop1, RampLoop2, ... ' * Import a Sound File for each ball on the table for wire ramps. Call it WireLoop ex: WireLoop1, WireLoop2, ... ' * Create a Timer called RampRoll, that is enabled, with a interval of 100 ' * Set RampBAlls and RampType variable to Total Number of Balls ' Usage: ' * Setup hit events and call WireRampOn True or WireRampOn False (True = Plastic ramp, False = Wire Ramp) ' * To stop tracking ball ' * call WireRampOff ' * Otherwise, the ball will auto remove if it's below 30 vp units ' Dim RampMinLoops RampMinLoops = 4 ' RampBalls ' Setup: Set the array length of x in RampBalls(x,2) Total Number of Balls on table + 1: if tnob = 5, then RampBalls(6,2) Dim RampBalls(11,2) 'x,0 = ball x,1 = ID, 2 = Protection against ending early (minimum amount of updates) '0,0 is boolean on/off, 0,1 unused for now RampBalls(0,0) = False ' RampType ' Setup: Set this array to the number Total number of balls that can be tracked at one time + 1. 5 ball multiball then set value to 6 ' Description: Array type indexed on BallId and a values used to deterimine what type of ramp the ball is on: False = Wire Ramp, True = Plastic Ramp Dim RampType(11) Sub WireRampOn(input) Waddball ActiveBall, input RampRollUpdate End Sub Sub WireRampOff() WRemoveBall ActiveBall.ID End Sub ' WaddBall (Active Ball, Boolean) Sub Waddball(input, RampInput) 'This subroutine is called from WireRampOn to Add Balls to the RampBalls Array ' This will loop through the RampBalls array checking each element of the array x, position 1 ' To see if the the ball was already added to the array. ' If the ball is found then exit the subroutine Dim x For x = 1 To UBound(RampBalls) 'Check, don't add balls twice If RampBalls(x, 1) = input.id Then If Not IsEmpty(RampBalls(x,1) ) Then Exit Sub 'Frustating issue with BallId 0. Empty variable = 0 End If Next ' This will itterate through the RampBalls Array. ' The first time it comes to a element in the array where the Ball Id (Slot 1) is empty. It will add the current ball to the array ' The RampBalls assigns the ActiveBall to element x,0 and ball id of ActiveBall to 0,1 ' The RampType(BallId) is set to RampInput ' RampBalls in 0,0 is set to True, this will enable the timer and the timer is also turned on For x = 1 To UBound(RampBalls) If IsEmpty(RampBalls(x, 1)) Then Set RampBalls(x, 0) = input RampBalls(x, 1) = input.ID RampType(x) = RampInput RampBalls(x, 2) = 0 'exit For RampBalls(0,0) = True RampRoll.Enabled = 1 'Turn on timer 'RampRoll.Interval = RampRoll.Interval 'reset timer Exit Sub End If If x = UBound(RampBalls) Then 'debug Debug.print "WireRampOn error, ball queue Is full: " & vbNewLine & _ RampBalls(0, 0) & vbNewLine & _ TypeName(RampBalls(1, 0)) & " ID:" & RampBalls(1, 1) & "type:" & RampType(1) & vbNewLine & _ TypeName(RampBalls(2, 0)) & " ID:" & RampBalls(2, 1) & "type:" & RampType(2) & vbNewLine & _ TypeName(RampBalls(3, 0)) & " ID:" & RampBalls(3, 1) & "type:" & RampType(3) & vbNewLine & _ TypeName(RampBalls(4, 0)) & " ID:" & RampBalls(4, 1) & "type:" & RampType(4) & vbNewLine & _ TypeName(RampBalls(5, 0)) & " ID:" & RampBalls(5, 1) & "type:" & RampType(5) & vbNewLine & _ " " End If Next End Sub ' FxTxP - VPXS: drops any RampBalls entry whose ball ID is no longer present in GetBalls(). ' Comparing IDs rather than touching the stored object means a destroyed ball is ' never dereferenced. GetBalls() returns UBound -1 when the table is empty, which ' correctly purges every entry. Sub RampPurgeDeadBalls() Dim x, b, gBOT, bAlive gBOT = GetBalls For x = 1 To UBound(RampBalls) If Not IsEmpty(RampBalls(x, 1)) Then bAlive = False For b = 0 To UBound(gBOT) If gBOT(b).ID = RampBalls(x, 1) Then bAlive = True Exit For End If Next If Not bAlive Then WRemoveBall RampBalls(x, 1) End If Next End Sub ' WRemoveBall (BallId) Sub WRemoveBall(ID) 'This subroutine is called from the RampRollUpdate subroutine and is used to remove and stop the ball rolling sounds ' Debug.Print "In WRemoveBall() + Remove ball from loop array" Dim ballcount ballcount = 0 Dim x For x = 1 To UBound(RampBalls) If ID = RampBalls(x, 1) Then 'remove ball Set RampBalls(x, 0) = Nothing RampBalls(x, 1) = Empty RampType(x) = Empty StopSound("RampLoop" & x) StopSound("wireloop" & x) End If 'if RampBalls(x,1) = Not IsEmpty(Rampballs(x,1) then ballcount = ballcount + 1 If Not IsEmpty(Rampballs(x,1)) Then ballcount = ballcount + 1 Next If BallCount = 0 Then RampBalls(0,0) = False 'if no balls in queue, disable timer update End Sub Sub RampRoll_Timer() RampRollUpdate End Sub Sub RampRollUpdate() 'Timer update Dim x ' FxTxP - VPXS: WireRampOff only fires when a ball leaves the ramp trigger. If the ball ' drains or is destroyed while still on the ramp, its RampBalls entry is never ' removed, and every timer tick then calls BallVel() on a destroyed BallEx. That ' returns E_POINTER (0x80004003) and floods vpinball.log with identical ' BallEx::Invoke dispId=3 rows for the rest of the session. Purge first. RampPurgeDeadBalls For x = 1 To UBound(RampBalls) If Not IsEmpty(RampBalls(x,1) ) Then If BallVel(RampBalls(x,0) ) > 1 Then ' if ball is moving, play rolling sound If RampType(x) Then PlaySound("RampLoop" & x), - 1, VolPlayfieldRoll(RampBalls(x,0)) * RampRollVolume * VolumeDial, AudioPan(RampBalls(x,0)), 0, BallPitchV(RampBalls(x,0)), 1, 0, AudioFade(RampBalls(x,0)) StopSound("wireloop" & x) Else StopSound("RampLoop" & x) PlaySound("wireloop" & x), - 1, VolPlayfieldRoll(RampBalls(x,0)) * RampRollVolume * VolumeDial, AudioPan(RampBalls(x,0)), 0, BallPitch(RampBalls(x,0)), 1, 0, AudioFade(RampBalls(x,0)) End If RampBalls(x, 2) = RampBalls(x, 2) + 1 Else StopSound("RampLoop" & x) StopSound("wireloop" & x) End If ' Meakin possible fix here this had the crash from the catapult multiball ramp 'if Not IsEmpty(RampBalls(x,0)) Then ' If RampBalls(x,0).Z < 30 And RampBalls(x, 2) > RampMinLoops Then 'if ball is on the PF, remove it ' StopSound("RampLoop" & x) ' StopSound("wireloop" & x) ' Wremoveball RampBalls(x,1) ' End If 'End If Else StopSound("RampLoop" & x) StopSound("wireloop" & x) End If Next If Not RampBalls(0,0) Then RampRoll.enabled = 0 End Sub ' This can be used to debug the Ramp Roll time. You need to enable the tbWR timer on the TextBox Sub tbWR_Timer() 'debug textbox Me.text = "on? " & RampBalls(0, 0) & " timer: " & RampRoll.Enabled & vbNewLine & _ "1 " & TypeName(RampBalls(1, 0)) & " ID:" & RampBalls(1, 1) & " type:" & RampType(1) & " Loops:" & RampBalls(1, 2) & vbNewLine & _ "2 " & TypeName(RampBalls(2, 0)) & " ID:" & RampBalls(2, 1) & " type:" & RampType(2) & " Loops:" & RampBalls(2, 2) & vbNewLine & _ "3 " & TypeName(RampBalls(3, 0)) & " ID:" & RampBalls(3, 1) & " type:" & RampType(3) & " Loops:" & RampBalls(3, 2) & vbNewLine & _ "4 " & TypeName(RampBalls(4, 0)) & " ID:" & RampBalls(4, 1) & " type:" & RampType(4) & " Loops:" & RampBalls(4, 2) & vbNewLine & _ "5 " & TypeName(RampBalls(5, 0)) & " ID:" & RampBalls(5, 1) & " type:" & RampType(5) & " Loops:" & RampBalls(5, 2) & vbNewLine & _ "6 " & TypeName(RampBalls(6, 0)) & " ID:" & RampBalls(6, 1) & " type:" & RampType(6) & " Loops:" & RampBalls(6, 2) & vbNewLine & _ " " End Sub Function BallPitch(ball) ' Calculates the pitch of the sound based on the ball speed BallPitch = pSlope(BallVel(ball), 1, - 1000, 60, 10000) End Function Function BallPitchV(ball) ' Calculates the pitch of the sound based on the ball speed Variation BallPitchV = pSlope(BallVel(ball), 1, - 4000, 60, 7000) End Function Sub RandomSoundRampStop(obj) Select Case Int(rnd*3) Case 0: PlaySoundAtVol "wireramp_stop1", obj, 0.2*VolumeDial:PlaySoundAtLevelActiveBall ("Rubber_Strong_1"), Vol(ActiveBall) * RubberStrongSoundFactor * 0.6 Case 1: PlaySoundAtVol "wireramp_stop2", obj, 0.2*VolumeDial:PlaySoundAtLevelActiveBall ("Rubber_Strong_2"), Vol(ActiveBall) * RubberStrongSoundFactor * 0.6 Case 2: PlaySoundAtVol "wireramp_stop3", obj, 0.2*VolumeDial:PlaySoundAtLevelActiveBall ("Rubber_1_Hard"), Vol(ActiveBall) * RubberStrongSoundFactor * 0.6 End Select End Sub '****************************************************** '**** END RAMP ROLLING SFX '****************************************************** '****************************************************** ' ZFLE: FLEEP MECHANICAL SOUNDS '****************************************************** ' This part in the script is an entire block that is dedicated to the physics sound system. ' Various scripts and sounds that may be pretty generic and could suit other WPC systems, but the most are tailored specifically for the TOM table ' Many of the sounds in this package can be added by creating collections and adding the appropriate objects to those collections. ' Create the following new collections: ' Metals (all metal objects, metal walls, metal posts, metal wire guides) ' Apron (the apron walls and plunger wall) ' Walls (all wood or plastic walls) ' Rollovers (wire rollover triggers, star triggers, or button triggers) ' Targets (standup or drop targets, these are hit sounds only ... you will want to add separate dropping sounds for drop targets) ' Gates (plate gates) ' GatesWire (wire gates) ' Rubbers (all rubbers including posts, sleeves, pegs, and bands) ' When creating the collections, make sure "Fire events for this collection" is checked. ' You'll also need to make sure "Has Hit Event" is checked for each object placed in these collections (not necessary for gates and triggers). ' Once the collections and objects are added, the save, close, and restart VPX. ' ' Many places in the script need to be modified to include the correct sound effect subroutine calls. The tutorial videos linked below demonstrate ' how to make these updates. But in summary the following needs to be updated: ' - Nudging, plunger, coin-in, start button sounds will be added to the keydown and keyup subs. ' - Flipper sounds in the flipper solenoid subs. Flipper collision sounds in the flipper collide subs. ' - Bumpers, slingshots, drain, ball release, knocker, spinner, and saucers in their respective subs ' - Ball rolling sounds sub ' ' Tutorial videos by Apophis ' Audio : Adding Fleep Part 1 https://youtu.be/rG35JVHxtx4?si=zdN9W4cZWEyXbOz_ ' Audio : Adding Fleep Part 2 https://youtu.be/dk110pWMxGo?si=2iGMImXXZ0SFKVCh ' Audio : Adding Fleep Part 3 https://youtu.be/ESXWGJZY_EI?si=6D20E2nUM-xAw7xy '/////////////////////////////// SOUNDS PARAMETERS ////////////////////////////// Dim GlobalSoundLevel, CoinSoundLevel, PlungerReleaseSoundLevel, PlungerPullSoundLevel, NudgeLeftSoundLevel Dim NudgeRightSoundLevel, NudgeCenterSoundLevel, StartButtonSoundLevel, RollingSoundFactor CoinSoundLevel = 1 'volume level; range [0, 1] NudgeLeftSoundLevel = 1 'volume level; range [0, 1] NudgeRightSoundLevel = 1 'volume level; range [0, 1] NudgeCenterSoundLevel = 1 'volume level; range [0, 1] StartButtonSoundLevel = 0.1 'volume level; range [0, 1] PlungerReleaseSoundLevel = 0.8 '1 wjr 'volume level; range [0, 1] PlungerPullSoundLevel = 1 'volume level; range [0, 1] RollingSoundFactor = 1.1 / 5 '///////////////////////-----Solenoids, Kickers and Flash Relays-----/////////////////////// Dim FlipperUpAttackMinimumSoundLevel, FlipperUpAttackMaximumSoundLevel, FlipperUpAttackLeftSoundLevel, FlipperUpAttackRightSoundLevel Dim FlipperUpSoundLevel, FlipperDownSoundLevel, FlipperLeftHitParm, FlipperRightHitParm Dim SlingshotSoundLevel, BumperSoundFactor, KnockerSoundLevel FlipperUpAttackMinimumSoundLevel = 0.010 'volume level; range [0, 1] FlipperUpAttackMaximumSoundLevel = 0.635 'volume level; range [0, 1] FlipperUpSoundLevel = 1.0 'volume level; range [0, 1] FlipperDownSoundLevel = 0.45 'volume level; range [0, 1] FlipperLeftHitParm = FlipperUpSoundLevel 'sound helper; not configurable FlipperRightHitParm = FlipperUpSoundLevel 'sound helper; not configurable SlingshotSoundLevel = 0.95 'volume level; range [0, 1] BumperSoundFactor = 4.25 'volume multiplier; must not be zero KnockerSoundLevel = 1 'volume level; range [0, 1] '///////////////////////-----Ball Drops, Bumps and Collisions-----/////////////////////// Dim RubberStrongSoundFactor, RubberWeakSoundFactor, RubberFlipperSoundFactor,BallWithBallCollisionSoundFactor Dim BallBouncePlayfieldSoftFactor, BallBouncePlayfieldHardFactor, PlasticRampDropToPlayfieldSoundLevel, WireRampDropToPlayfieldSoundLevel, DelayedBallDropOnPlayfieldSoundLevel Dim WallImpactSoundFactor, MetalImpactSoundFactor, SubwaySoundLevel, SubwayEntrySoundLevel, ScoopEntrySoundLevel Dim SaucerLockSoundLevel, SaucerKickSoundLevel BallWithBallCollisionSoundFactor = 3.2 'volume multiplier; must not be zero RubberStrongSoundFactor = 0.055 / 5 'volume multiplier; must not be zero RubberWeakSoundFactor = 0.075 / 5 'volume multiplier; must not be zero RubberFlipperSoundFactor = 0.075 / 5 'volume multiplier; must not be zero BallBouncePlayfieldSoftFactor = 0.025 'volume multiplier; must not be zero BallBouncePlayfieldHardFactor = 0.025 'volume multiplier; must not be zero DelayedBallDropOnPlayfieldSoundLevel = 0.8 'volume level; range [0, 1] WallImpactSoundFactor = 0.075 'volume multiplier; must not be zero MetalImpactSoundFactor = 0.075 / 3 SaucerLockSoundLevel = 0.8 SaucerKickSoundLevel = 0.8 '///////////////////////-----Gates, Spinners, Rollovers and Targets-----/////////////////////// Dim GateSoundLevel, TargetSoundFactor, SpinnerSoundLevel, RolloverSoundLevel, DTSoundLevel GateSoundLevel = 0.5 / 5 'volume level; range [0, 1] TargetSoundFactor = 0.0025 * 10 'volume multiplier; must not be zero DTSoundLevel = 0.25 'volume multiplier; must not be zero RolloverSoundLevel = 0.25 'volume level; range [0, 1] SpinnerSoundLevel = 0.5 'volume level; range [0, 1] '///////////////////////-----Ball Release, Guides and Drain-----/////////////////////// Dim DrainSoundLevel, BallReleaseSoundLevel, BottomArchBallGuideSoundFactor, FlipperBallGuideSoundFactor DrainSoundLevel = 0.8 'volume level; range [0, 1] BallReleaseSoundLevel = 1 'volume level; range [0, 1] BottomArchBallGuideSoundFactor = 0.2 'volume multiplier; must not be zero FlipperBallGuideSoundFactor = 0.015 'volume multiplier; must not be zero '///////////////////////-----Loops and Lanes-----/////////////////////// Dim ArchSoundFactor ArchSoundFactor = 0.025 / 5 'volume multiplier; must not be zero '///////////////////////////// SOUND PLAYBACK FUNCTIONS //////////////////////////// '///////////////////////////// POSITIONAL SOUND PLAYBACK METHODS //////////////////////////// ' Positional sound playback methods will play a sound, depending on the X,Y position of the table element or depending on ActiveBall object position ' These are similar subroutines that are less complicated to use (e.g. simply use standard parameters for the PlaySound call) ' For surround setup - positional sound playback functions will fade between front and rear surround channels and pan between left and right channels ' For stereo setup - positional sound playback functions will only pan between left and right channels ' For mono setup - positional sound playback functions will not pan between left and right channels and will not fade between front and rear channels ' PlaySound full syntax - PlaySound(string, int loopcount, float volume, float pan, float randompitch, int pitch, bool useexisting, bool restart, float front_rear_fade) ' Note - These functions will not work (currently) for walls/slingshots as these do not feature a simple, single X,Y position Sub PlaySoundAtLevelStatic(playsoundparams, aVol, tableobj) PlaySound playsoundparams, 0, min(aVol,1) * VolumeDial, AudioPan(tableobj), 0, 0, 0, 0, AudioFade(tableobj) End Sub Sub PlaySoundAtLevelExistingStatic(playsoundparams, aVol, tableobj) PlaySound playsoundparams, 0, min(aVol,1) * VolumeDial, AudioPan(tableobj), 0, 0, 1, 0, AudioFade(tableobj) End Sub Sub PlaySoundAtLevelStaticLoop(playsoundparams, aVol, tableobj) PlaySound playsoundparams, - 1, min(aVol,1) * VolumeDial, AudioPan(tableobj), 0, 0, 0, 0, AudioFade(tableobj) End Sub Sub PlaySoundAtLevelStaticRandomPitch(playsoundparams, aVol, randomPitch, tableobj) PlaySound playsoundparams, 0, min(aVol,1) * VolumeDial, AudioPan(tableobj), randomPitch, 0, 0, 0, AudioFade(tableobj) End Sub Sub PlaySoundAtLevelActiveBall(playsoundparams, aVol) PlaySound playsoundparams, 0, min(aVol,1) * VolumeDial, AudioPan(ActiveBall), 0, 0, 0, 0, AudioFade(ActiveBall) End Sub Sub PlaySoundAtLevelExistingActiveBall(playsoundparams, aVol) PlaySound playsoundparams, 0, min(aVol,1) * VolumeDial, AudioPan(ActiveBall), 0, 0, 1, 0, AudioFade(ActiveBall) End Sub Sub PlaySoundAtLeveTimerActiveBall(playsoundparams, aVol, ballvariable) PlaySound playsoundparams, 0, min(aVol,1) * VolumeDial, AudioPan(ballvariable), 0, 0, 0, 0, AudioFade(ballvariable) End Sub Sub PlaySoundAtLevelTimerExistingActiveBall(playsoundparams, aVol, ballvariable) PlaySound playsoundparams, 0, min(aVol,1) * VolumeDial, AudioPan(ballvariable), 0, 0, 1, 0, AudioFade(ballvariable) End Sub Sub PlaySoundAtLevelRoll(playsoundparams, aVol, pitch) PlaySound playsoundparams, - 1, min(aVol,1) * VolumeDial, AudioPan(tableobj), randomPitch, 0, 0, 0, AudioFade(tableobj) End Sub ' Previous Positional Sound Subs Sub PlaySoundAt(soundname, tableobj) PlaySound soundname, 1, 1 * VolumeDial, AudioPan(tableobj), 0,0,0, 1, AudioFade(tableobj) End Sub Sub PlaySoundAtVol(soundname, tableobj, aVol) PlaySound soundname, 1, min(aVol,1) * VolumeDial, AudioPan(tableobj), 0,0,0, 1, AudioFade(tableobj) End Sub Sub PlaySoundAtBall(soundname) PlaySoundAt soundname, ActiveBall End Sub Sub PlaySoundAtBallVol (Soundname, aVol) PlaySound soundname, 1,min(aVol,1) * VolumeDial, AudioPan(ActiveBall), 0,0,0, 1, AudioFade(ActiveBall) End Sub Sub PlaySoundAtBallVolM (Soundname, aVol) PlaySound soundname, 1,min(aVol,1) * VolumeDial, AudioPan(ActiveBall), 0,0,0, 0, AudioFade(ActiveBall) End Sub Sub PlaySoundAtVolLoops(sound, tableobj, Vol, Loops) PlaySound sound, Loops, Vol * VolumeDial, AudioPan(tableobj), 0,0,0, 1, AudioFade(tableobj) End Sub '****************************************************** ' Fleep Supporting Ball & Sound Functions '****************************************************** Function AudioFade(tableobj) ' Fades between front and back of the table (for surround systems or 2x2 speakers, etc), depending on the Y position on the table. "table1" is the name of the table Dim tmp tmp = tableobj.y * 2 / tableheight - 1 If tmp > 7000 Then tmp = 7000 ElseIf tmp < - 7000 Then tmp = - 7000 End If If tmp > 0 Then AudioFade = CSng(tmp ^ 10) Else AudioFade = CSng( - (( - tmp) ^ 10) ) End If End Function Function AudioPan(tableobj) ' Calculates the pan for a tableobj based on the X position on the table. "table1" is the name of the table Dim tmp tmp = tableobj.x * 2 / tablewidth - 1 If tmp > 7000 Then tmp = 7000 ElseIf tmp < - 7000 Then tmp = - 7000 End If If tmp > 0 Then AudioPan = CSng(tmp ^ 10) Else AudioPan = CSng( - (( - tmp) ^ 10) ) End If End Function Function Vol(ball) ' Calculates the volume of the sound based on the ball speed Vol = CSng(BallVel(ball) ^ 2) End Function Function Volz(ball) ' Calculates the volume of the sound based on the ball speed Volz = CSng((ball.velz) ^ 2) End Function Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed Pitch = BallVel(ball) * 20 End Function Function BallVel(ball) 'Calculates the ball speed on Error Resume Next BallVel = Int(Sqr((ball.VelX ^ 2) + (ball.VelY ^ 2) ) ) End Function Function VolPlayfieldRoll(ball) ' Calculates the roll volume of the sound based on the ball speed VolPlayfieldRoll = RollingSoundFactor * 0.0005 * CSng(BallVel(ball) ^ 3) End Function Function PitchPlayfieldRoll(ball) ' Calculates the roll pitch of the sound based on the ball speed PitchPlayfieldRoll = BallVel(ball) ^ 2 * 15 End Function Function RndInt(min, max) ' Sets a random number integer between min and max RndInt = Int(Rnd() * (max - min + 1) + min) End Function Function RndNum(min, max) ' Sets a random number between min and max RndNum = Rnd() * (max - min) + min End Function '///////////////////////////// GENERAL SOUND SUBROUTINES //////////////////////////// Sub SoundStartButton() PlaySound ("Start_Button"), 0, StartButtonSoundLevel, 0, 0.25 End Sub Sub SoundNudgeLeft() PlaySound ("Nudge_" & Int(Rnd * 2) + 1), 0, NudgeLeftSoundLevel * VolumeDial, - 0.1, 0.25 End Sub Sub SoundNudgeRight() PlaySound ("Nudge_" & Int(Rnd * 2) + 1), 0, NudgeRightSoundLevel * VolumeDial, 0.1, 0.25 End Sub Sub SoundNudgeCenter() PlaySound ("Nudge_" & Int(Rnd * 2) + 1), 0, NudgeCenterSoundLevel * VolumeDial, 0, 0.25 End Sub Sub SoundPlungerPull() PlaySoundAtLevelStatic ("Plunger_Pull_1"), PlungerPullSoundLevel, Plunger End Sub Sub SoundPlungerReleaseBall() PlaySoundAtLevelStatic ("Plunger_Release_Ball"), PlungerReleaseSoundLevel, Plunger End Sub Sub SoundPlungerReleaseNoBall() PlaySoundAtLevelStatic ("Plunger_Release_No_Ball"), PlungerReleaseSoundLevel, Plunger End Sub '///////////////////////////// KNOCKER SOLENOID //////////////////////////// Sub KnockerSolenoid() PlaySoundAtLevelStatic SoundFX("Knocker_1",DOFKnocker), KnockerSoundLevel, KnockerPosition End Sub '///////////////////////////// DRAIN SOUNDS //////////////////////////// Sub RandomSoundDrain(drainswitch) PlaySoundAtLevelStatic ("Drain_" & Int(Rnd * 11) + 1), DrainSoundLevel, drainswitch End Sub '///////////////////////////// TROUGH BALL RELEASE SOLENOID SOUNDS //////////////////////////// Sub RandomSoundBallRelease(drainswitch) PlaySoundAtLevelStatic SoundFX("BallRelease" & Int(Rnd * 7) + 1,DOFContactors), BallReleaseSoundLevel, drainswitch End Sub '///////////////////////////// SLINGSHOT SOLENOID SOUNDS //////////////////////////// Sub RandomSoundSlingshotLeft(sling) PlaySoundAtLevelStatic SoundFX("Sling_L" & Int(Rnd * 10) + 1,DOFContactors), SlingshotSoundLevel, Sling End Sub Sub RandomSoundSlingshotRight(sling) PlaySoundAtLevelStatic SoundFX("Sling_R" & Int(Rnd * 8) + 1,DOFContactors), SlingshotSoundLevel, Sling End Sub '///////////////////////////// BUMPER SOLENOID SOUNDS //////////////////////////// Sub RandomSoundBumperTop(Bump) PlaySoundAtLevelStatic SoundFX("Bumpers_Top_" & Int(Rnd * 5) + 1,DOFContactors), Vol(ActiveBall) * BumperSoundFactor, Bump End Sub Sub RandomSoundBumperMiddle(Bump) PlaySoundAtLevelStatic SoundFX("Bumpers_Middle_" & Int(Rnd * 5) + 1,DOFContactors), Vol(ActiveBall) * BumperSoundFactor, Bump End Sub Sub RandomSoundBumperBottom(Bump) PlaySoundAtLevelStatic SoundFX("Bumpers_Bottom_" & Int(Rnd * 5) + 1,DOFContactors), Vol(ActiveBall) * BumperSoundFactor, Bump End Sub '///////////////////////////// SPINNER SOUNDS //////////////////////////// Sub SoundSpinner(spinnerswitch) PlaySoundAtLevelStatic ("Spinner"), SpinnerSoundLevel, spinnerswitch End Sub '///////////////////////////// FLIPPER BATS SOUND SUBROUTINES //////////////////////////// '///////////////////////////// FLIPPER BATS SOLENOID ATTACK SOUND //////////////////////////// Sub SoundFlipperUpAttackLeft(flipper) FlipperUpAttackLeftSoundLevel = RndNum(FlipperUpAttackMinimumSoundLevel, FlipperUpAttackMaximumSoundLevel) PlaySoundAtLevelStatic SoundFX("Flipper_Attack-L01",DOFFlippers), FlipperUpAttackLeftSoundLevel, flipper End Sub Sub SoundFlipperUpAttackRight(flipper) FlipperUpAttackRightSoundLevel = RndNum(FlipperUpAttackMinimumSoundLevel, FlipperUpAttackMaximumSoundLevel) PlaySoundAtLevelStatic SoundFX("Flipper_Attack-R01",DOFFlippers), FlipperUpAttackLeftSoundLevel, flipper End Sub '///////////////////////////// FLIPPER BATS SOLENOID CORE SOUND //////////////////////////// Sub RandomSoundFlipperUpLeft(flipper) PlaySoundAtLevelStatic SoundFX("Flipper_L0" & Int(Rnd * 9) + 1,DOFFlippers), FlipperLeftHitParm, Flipper End Sub Sub RandomSoundFlipperUpRight(flipper) PlaySoundAtLevelStatic SoundFX("Flipper_R0" & Int(Rnd * 9) + 1,DOFFlippers), FlipperRightHitParm, Flipper End Sub Sub RandomSoundReflipUpLeft(flipper) PlaySoundAtLevelStatic SoundFX("Flipper_ReFlip_L0" & Int(Rnd * 3) + 1,DOFFlippers), (RndNum(0.8, 1)) * FlipperUpSoundLevel, Flipper End Sub Sub RandomSoundReflipUpRight(flipper) PlaySoundAtLevelStatic SoundFX("Flipper_ReFlip_R0" & Int(Rnd * 3) + 1,DOFFlippers), (RndNum(0.8, 1)) * FlipperUpSoundLevel, Flipper End Sub Sub RandomSoundFlipperDownLeft(flipper) PlaySoundAtLevelStatic SoundFX("Flipper_Left_Down_" & Int(Rnd * 7) + 1,DOFFlippers), FlipperDownSoundLevel, Flipper End Sub Sub RandomSoundFlipperDownRight(flipper) PlaySoundAtLevelStatic SoundFX("Flipper_Right_Down_" & Int(Rnd * 8) + 1,DOFFlippers), FlipperDownSoundLevel, Flipper End Sub '///////////////////////////// FLIPPER BATS BALL COLLIDE SOUND //////////////////////////// Sub LeftFlipperCollide(parm) FlipperLeftHitParm = parm / 10 If FlipperLeftHitParm > 1 Then FlipperLeftHitParm = 1 End If FlipperLeftHitParm = FlipperUpSoundLevel * FlipperLeftHitParm RandomSoundRubberFlipper(parm) End Sub Sub RightFlipperCollide(parm) FlipperRightHitParm = parm / 10 If FlipperRightHitParm > 1 Then FlipperRightHitParm = 1 End If FlipperRightHitParm = FlipperUpSoundLevel * FlipperRightHitParm RandomSoundRubberFlipper(parm) End Sub Sub RandomSoundRubberFlipper(parm) PlaySoundAtLevelActiveBall ("Flipper_Rubber_" & Int(Rnd * 7) + 1), parm * RubberFlipperSoundFactor End Sub '///////////////////////////// ROLLOVER SOUNDS //////////////////////////// Sub RandomSoundRollover() PlaySoundAtLevelActiveBall ("Rollover_" & Int(Rnd * 4) + 1), RolloverSoundLevel End Sub Sub Rollovers_Hit(idx) RandomSoundRollover End Sub '///////////////////////////// VARIOUS PLAYFIELD SOUND SUBROUTINES //////////////////////////// '///////////////////////////// RUBBERS AND POSTS //////////////////////////// '///////////////////////////// RUBBERS - EVENTS //////////////////////////// Sub Rubbers_Hit(idx) Dim finalspeed finalspeed = Sqr(ActiveBall.velx * ActiveBall.velx + ActiveBall.vely * ActiveBall.vely) If finalspeed > 5 Then RandomSoundRubberStrong 1 End If If finalspeed <= 5 Then RandomSoundRubberWeak() End If End Sub '///////////////////////////// RUBBERS AND POSTS - STRONG IMPACTS //////////////////////////// Sub RandomSoundRubberStrong(voladj) Select Case Int(Rnd * 10) + 1 Case 1 PlaySoundAtLevelActiveBall ("Rubber_Strong_1"), Vol(ActiveBall) * RubberStrongSoundFactor * voladj Case 2 PlaySoundAtLevelActiveBall ("Rubber_Strong_2"), Vol(ActiveBall) * RubberStrongSoundFactor * voladj Case 3 PlaySoundAtLevelActiveBall ("Rubber_Strong_3"), Vol(ActiveBall) * RubberStrongSoundFactor * voladj Case 4 PlaySoundAtLevelActiveBall ("Rubber_Strong_4"), Vol(ActiveBall) * RubberStrongSoundFactor * voladj Case 5 PlaySoundAtLevelActiveBall ("Rubber_Strong_5"), Vol(ActiveBall) * RubberStrongSoundFactor * voladj Case 6 PlaySoundAtLevelActiveBall ("Rubber_Strong_6"), Vol(ActiveBall) * RubberStrongSoundFactor * voladj Case 7 PlaySoundAtLevelActiveBall ("Rubber_Strong_7"), Vol(ActiveBall) * RubberStrongSoundFactor * voladj Case 8 PlaySoundAtLevelActiveBall ("Rubber_Strong_8"), Vol(ActiveBall) * RubberStrongSoundFactor * voladj Case 9 PlaySoundAtLevelActiveBall ("Rubber_Strong_9"), Vol(ActiveBall) * RubberStrongSoundFactor * voladj Case 10 PlaySoundAtLevelActiveBall ("Rubber_1_Hard"), Vol(ActiveBall) * RubberStrongSoundFactor * 0.6 * voladj End Select End Sub '///////////////////////////// RUBBERS AND POSTS - WEAK IMPACTS //////////////////////////// Sub RandomSoundRubberWeak() PlaySoundAtLevelActiveBall ("Rubber_" & Int(Rnd * 9) + 1), Vol(ActiveBall) * RubberWeakSoundFactor End Sub '///////////////////////////// WALL IMPACTS //////////////////////////// Sub Walls_Hit(idx) RandomSoundWall() End Sub Sub RandomSoundWall() Dim finalspeed finalspeed = Sqr(ActiveBall.velx * ActiveBall.velx + ActiveBall.vely * ActiveBall.vely) If finalspeed > 16 Then Select Case Int(Rnd * 5) + 1 Case 1 PlaySoundAtLevelExistingActiveBall ("Wall_Hit_1"), Vol(ActiveBall) * WallImpactSoundFactor Case 2 PlaySoundAtLevelExistingActiveBall ("Wall_Hit_2"), Vol(ActiveBall) * WallImpactSoundFactor Case 3 PlaySoundAtLevelExistingActiveBall ("Wall_Hit_5"), Vol(ActiveBall) * WallImpactSoundFactor Case 4 PlaySoundAtLevelExistingActiveBall ("Wall_Hit_7"), Vol(ActiveBall) * WallImpactSoundFactor Case 5 PlaySoundAtLevelExistingActiveBall ("Wall_Hit_9"), Vol(ActiveBall) * WallImpactSoundFactor End Select End If If finalspeed >= 6 And finalspeed <= 16 Then Select Case Int(Rnd * 4) + 1 Case 1 PlaySoundAtLevelExistingActiveBall ("Wall_Hit_3"), Vol(ActiveBall) * WallImpactSoundFactor Case 2 PlaySoundAtLevelExistingActiveBall ("Wall_Hit_4"), Vol(ActiveBall) * WallImpactSoundFactor Case 3 PlaySoundAtLevelExistingActiveBall ("Wall_Hit_6"), Vol(ActiveBall) * WallImpactSoundFactor Case 4 PlaySoundAtLevelExistingActiveBall ("Wall_Hit_8"), Vol(ActiveBall) * WallImpactSoundFactor End Select End If If finalspeed < 6 Then Select Case Int(Rnd * 3) + 1 Case 1 PlaySoundAtLevelExistingActiveBall ("Wall_Hit_4"), Vol(ActiveBall) * WallImpactSoundFactor Case 2 PlaySoundAtLevelExistingActiveBall ("Wall_Hit_6"), Vol(ActiveBall) * WallImpactSoundFactor Case 3 PlaySoundAtLevelExistingActiveBall ("Wall_Hit_8"), Vol(ActiveBall) * WallImpactSoundFactor End Select End If End Sub '///////////////////////////// METAL TOUCH SOUNDS //////////////////////////// Sub RandomSoundMetal() PlaySoundAtLevelActiveBall ("Metal_Touch_" & Int(Rnd * 13) + 1), Vol(ActiveBall) * MetalImpactSoundFactor End Sub '///////////////////////////// METAL - EVENTS //////////////////////////// Sub Metals_Hit (idx) RandomSoundMetal End Sub Sub ShooterDiverter_collide(idx) RandomSoundMetal End Sub '///////////////////////////// BOTTOM ARCH BALL GUIDE //////////////////////////// '///////////////////////////// BOTTOM ARCH BALL GUIDE - SOFT BOUNCES //////////////////////////// Sub RandomSoundBottomArchBallGuide() Dim finalspeed finalspeed = Sqr(ActiveBall.velx * ActiveBall.velx + ActiveBall.vely * ActiveBall.vely) If finalspeed > 16 Then PlaySoundAtLevelActiveBall ("Apron_Bounce_" & Int(Rnd * 2) + 1), Vol(ActiveBall) * BottomArchBallGuideSoundFactor End If If finalspeed >= 6 And finalspeed <= 16 Then Select Case Int(Rnd * 2) + 1 Case 1 PlaySoundAtLevelActiveBall ("Apron_Bounce_1"), Vol(ActiveBall) * BottomArchBallGuideSoundFactor Case 2 PlaySoundAtLevelActiveBall ("Apron_Bounce_Soft_1"), Vol(ActiveBall) * BottomArchBallGuideSoundFactor End Select End If If finalspeed < 6 Then Select Case Int(Rnd * 2) + 1 Case 1 PlaySoundAtLevelActiveBall ("Apron_Bounce_Soft_1"), Vol(ActiveBall) * BottomArchBallGuideSoundFactor Case 2 PlaySoundAtLevelActiveBall ("Apron_Medium_3"), Vol(ActiveBall) * BottomArchBallGuideSoundFactor End Select End If End Sub '///////////////////////////// BOTTOM ARCH BALL GUIDE - HARD HITS //////////////////////////// Sub RandomSoundBottomArchBallGuideHardHit() PlaySoundAtLevelActiveBall ("Apron_Hard_Hit_" & Int(Rnd * 3) + 1), BottomArchBallGuideSoundFactor * 0.25 End Sub Sub Apron_Hit (idx) If Abs(cor.ballvelx(ActiveBall.id) < 4) And cor.ballvely(ActiveBall.id) > 7 Then RandomSoundBottomArchBallGuideHardHit() Else RandomSoundBottomArchBallGuide End If End Sub '///////////////////////////// FLIPPER BALL GUIDE //////////////////////////// Sub RandomSoundFlipperBallGuide() Dim finalspeed finalspeed = Sqr(ActiveBall.velx * ActiveBall.velx + ActiveBall.vely * ActiveBall.vely) If finalspeed > 16 Then Select Case Int(Rnd * 2) + 1 Case 1 PlaySoundAtLevelActiveBall ("Apron_Hard_1"), Vol(ActiveBall) * FlipperBallGuideSoundFactor Case 2 PlaySoundAtLevelActiveBall ("Apron_Hard_2"), Vol(ActiveBall) * 0.8 * FlipperBallGuideSoundFactor End Select End If If finalspeed >= 6 And finalspeed <= 16 Then PlaySoundAtLevelActiveBall ("Apron_Medium_" & Int(Rnd * 3) + 1), Vol(ActiveBall) * FlipperBallGuideSoundFactor End If If finalspeed < 6 Then PlaySoundAtLevelActiveBall ("Apron_Soft_" & Int(Rnd * 7) + 1), Vol(ActiveBall) * FlipperBallGuideSoundFactor End If End Sub '///////////////////////////// TARGET HIT SOUNDS //////////////////////////// Sub RandomSoundTargetHitStrong() PlaySoundAtLevelActiveBall SoundFX("Target_Hit_" & Int(Rnd * 4) + 5,DOFTargets), Vol(ActiveBall) * 0.45 * TargetSoundFactor End Sub Sub RandomSoundTargetHitWeak() PlaySoundAtLevelActiveBall SoundFX("Target_Hit_" & Int(Rnd * 4) + 1,DOFTargets), Vol(ActiveBall) * TargetSoundFactor End Sub Sub PlayTargetSound() Dim finalspeed finalspeed = Sqr(ActiveBall.velx * ActiveBall.velx + ActiveBall.vely * ActiveBall.vely) If finalspeed > 10 Then RandomSoundTargetHitStrong() RandomSoundBallBouncePlayfieldSoft ActiveBall Else RandomSoundTargetHitWeak() End If End Sub Sub Targets_Hit (idx) PlayTargetSound End Sub '///////////////////////////// BALL BOUNCE SOUNDS //////////////////////////// Sub RandomSoundBallBouncePlayfieldSoft(aBall) Select Case Int(Rnd * 9) + 1 Case 1 PlaySoundAtLevelStatic ("Ball_Bounce_Playfield_Soft_1"), volz(aBall) * BallBouncePlayfieldSoftFactor, aBall Case 2 PlaySoundAtLevelStatic ("Ball_Bounce_Playfield_Soft_2"), volz(aBall) * BallBouncePlayfieldSoftFactor * 0.5, aBall Case 3 PlaySoundAtLevelStatic ("Ball_Bounce_Playfield_Soft_3"), volz(aBall) * BallBouncePlayfieldSoftFactor * 0.8, aBall Case 4 PlaySoundAtLevelStatic ("Ball_Bounce_Playfield_Soft_4"), volz(aBall) * BallBouncePlayfieldSoftFactor * 0.5, aBall Case 5 PlaySoundAtLevelStatic ("Ball_Bounce_Playfield_Soft_5"), volz(aBall) * BallBouncePlayfieldSoftFactor, aBall Case 6 PlaySoundAtLevelStatic ("Ball_Bounce_Playfield_Hard_1"), volz(aBall) * BallBouncePlayfieldSoftFactor * 0.2, aBall Case 7 PlaySoundAtLevelStatic ("Ball_Bounce_Playfield_Hard_2"), volz(aBall) * BallBouncePlayfieldSoftFactor * 0.2, aBall Case 8 PlaySoundAtLevelStatic ("Ball_Bounce_Playfield_Hard_5"), volz(aBall) * BallBouncePlayfieldSoftFactor * 0.2, aBall Case 9 PlaySoundAtLevelStatic ("Ball_Bounce_Playfield_Hard_7"), volz(aBall) * BallBouncePlayfieldSoftFactor * 0.3, aBall End Select End Sub Sub RandomSoundBallBouncePlayfieldHard(aBall) PlaySoundAtLevelStatic ("Ball_Bounce_Playfield_Hard_" & Int(Rnd * 7) + 1), volz(aBall) * BallBouncePlayfieldHardFactor, aBall End Sub '///////////////////////////// DELAYED DROP - TO PLAYFIELD - SOUND //////////////////////////// Sub RandomSoundDelayedBallDropOnPlayfield(aBall) Select Case Int(Rnd * 5) + 1 Case 1 PlaySoundAtLevelStatic ("Ball_Drop_Playfield_1_Delayed"), DelayedBallDropOnPlayfieldSoundLevel, aBall Case 2 PlaySoundAtLevelStatic ("Ball_Drop_Playfield_2_Delayed"), DelayedBallDropOnPlayfieldSoundLevel, aBall Case 3 PlaySoundAtLevelStatic ("Ball_Drop_Playfield_3_Delayed"), DelayedBallDropOnPlayfieldSoundLevel, aBall Case 4 PlaySoundAtLevelStatic ("Ball_Drop_Playfield_4_Delayed"), DelayedBallDropOnPlayfieldSoundLevel, aBall Case 5 PlaySoundAtLevelStatic ("Ball_Drop_Playfield_5_Delayed"), DelayedBallDropOnPlayfieldSoundLevel, aBall End Select End Sub '///////////////////////////// BALL GATES AND BRACKET GATES SOUNDS //////////////////////////// Sub SoundPlayfieldGate() PlaySoundAtLevelStatic ("Gate_FastTrigger_" & Int(Rnd * 2) + 1), GateSoundLevel, ActiveBall End Sub Sub SoundHeavyGate() PlaySoundAtLevelStatic ("Gate_2"), GateSoundLevel, ActiveBall End Sub Sub Gates_hit(idx) SoundHeavyGate End Sub Sub GatesWire_hit(idx) SoundPlayfieldGate End Sub '///////////////////////////// LEFT LANE ENTRANCE - SOUNDS //////////////////////////// Sub RandomSoundLeftArch() PlaySoundAtLevelActiveBall ("Arch_L" & Int(Rnd * 4) + 1), Vol(ActiveBall) * ArchSoundFactor End Sub Sub RandomSoundRightArch() PlaySoundAtLevelActiveBall ("Arch_R" & Int(Rnd * 4) + 1), Vol(ActiveBall) * ArchSoundFactor End Sub Sub Arch1_hit() If ActiveBall.velx > 1 Then SoundPlayfieldGate StopSound "Arch_L1" StopSound "Arch_L2" StopSound "Arch_L3" StopSound "Arch_L4" End Sub Sub Arch1_unhit() If ActiveBall.velx < - 8 Then RandomSoundRightArch End If End Sub Sub Arch2_hit() If ActiveBall.velx < 1 Then SoundPlayfieldGate StopSound "Arch_R1" StopSound "Arch_R2" StopSound "Arch_R3" StopSound "Arch_R4" End Sub Sub Arch2_unhit() If ActiveBall.velx > 10 Then RandomSoundLeftArch End If End Sub '///////////////////////////// SAUCERS (KICKER HOLES) //////////////////////////// Sub SoundSaucerLock() PlaySoundAtLevelStatic ("Saucer_Enter_" & Int(Rnd * 2) + 1), SaucerLockSoundLevel, ActiveBall End Sub Sub SoundSaucerKick(scenario, saucer) Select Case scenario Case 0 PlaySoundAtLevelStatic SoundFX("Saucer_Empty", DOFContactors), SaucerKickSoundLevel, saucer Case 1 PlaySoundAtLevelStatic SoundFX("Saucer_Kick", DOFContactors), SaucerKickSoundLevel, saucer End Select End Sub '///////////////////////////// BALL COLLISION SOUND //////////////////////////// Sub OnBallBallCollision(ball1, ball2, velocity) FlipperCradleCollision ball1, ball2, velocity Dim snd Select Case Int(Rnd * 7) + 1 Case 1 snd = "Ball_Collide_1" Case 2 snd = "Ball_Collide_2" Case 3 snd = "Ball_Collide_3" Case 4 snd = "Ball_Collide_4" Case 5 snd = "Ball_Collide_5" Case 6 snd = "Ball_Collide_6" Case 7 snd = "Ball_Collide_7" End Select PlaySound (snd), 0, CSng(velocity) ^ 2 / 200 * BallWithBallCollisionSoundFactor * VolumeDial, AudioPan(ball1), 0, Pitch(ball1), 0, 0, AudioFade(ball1) End Sub '/////////////////////////// DROP TARGET HIT SOUNDS /////////////////////////// Sub RandomSoundDropTargetReset(obj) PlaySoundAtLevelStatic SoundFX("Drop_Target_Reset_" & Int(Rnd * 6) + 1,DOFContactors), 1, obj End Sub Sub SoundDropTargetDrop(obj) PlaySoundAtLevelStatic ("Drop_Target_Down_" & Int(Rnd * 6) + 1), 200, obj End Sub '///////////////////////////// GI AND FLASHER RELAYS //////////////////////////// Const RelayFlashSoundLevel = 0.315 'volume level; range [0, 1]; Const RelayGISoundLevel = 1.05 'volume level; range [0, 1]; Sub Sound_GI_Relay(toggle, obj) Select Case toggle Case 1 PlaySoundAtLevelStatic ("Relay_GI_On"), 0.025 * RelayGISoundLevel, obj Case 0 PlaySoundAtLevelStatic ("Relay_GI_Off"), 0.025 * RelayGISoundLevel, obj End Select End Sub Sub Sound_Flash_Relay(toggle, obj) Select Case toggle Case 1 PlaySoundAtLevelStatic ("Relay_Flash_On"), 0.025 * RelayFlashSoundLevel, obj Case 0 PlaySoundAtLevelStatic ("Relay_Flash_Off"), 0.025 * RelayFlashSoundLevel, obj End Select End Sub '///////////////////////////////////////////////////////////////// ' End Mechanical Sounds '///////////////////////////////////////////////////////////////// '****************************************************** '**** FLEEP MECHANICAL SOUNDS '****************************************************** ' *********************************** Physics Routines for NFozzy ************************* '********************************** ' ZMAT: General Math Functions '********************************** ' These get used throughout the script. Dim PI PI = 4 * Atn(1) Function dSin(degrees) dsin = Sin(degrees * Pi / 180) End Function Function dCos(degrees) dcos = Cos(degrees * Pi / 180) End Function Function Atn2(dy, dx) If dx > 0 Then Atn2 = Atn(dy / dx) ElseIf dx < 0 Then If dy = 0 Then Atn2 = pi Else Atn2 = Sgn(dy) * (pi - Atn(Abs(dy / dx))) End If ElseIf dx = 0 Then If dy = 0 Then Atn2 = 0 Else Atn2 = Sgn(dy) * pi / 2 End If End If End Function Function ArcCos(x) If x = 1 Then ArcCos = 0/180*PI ElseIf x = -1 Then ArcCos = 180/180*PI Else ArcCos = Atn(-x/Sqr(-x * x + 1)) + 2 * Atn(1) End If End Function Function max(a,b) If a > b Then max = a Else max = b End If End Function Function min(a,b) If a > b Then min = b Else min = a End If End Function ' Used for drop targets Function InRect(px,py,ax,ay,bx,by,cx,cy,dx,dy) 'Determines if a Points (px,py) is inside a 4 point polygon A-D in Clockwise/CCW order Dim AB, BC, CD, DA AB = (bx * py) - (by * px) - (ax * py) + (ay * px) + (ax * by) - (ay * bx) BC = (cx * py) - (cy * px) - (bx * py) + (by * px) + (bx * cy) - (by * cx) CD = (dx * py) - (dy * px) - (cx * py) + (cy * px) + (cx * dy) - (cy * dx) DA = (ax * py) - (ay * px) - (dx * py) + (dy * px) + (dx * ay) - (dy * ax) If (AB <= 0 And BC <= 0 And CD <= 0 And DA <= 0) Or (AB >= 0 And BC >= 0 And CD >= 0 And DA >= 0) Then InRect = True Else InRect = False End If End Function Function InRotRect(ballx,bally,px,py,angle,ax,ay,bx,by,cx,cy,dx,dy) Dim rax,ray,rbx,rby,rcx,rcy,rdx,rdy Dim rotxy rotxy = RotPoint(ax,ay,angle) rax = rotxy(0) + px ray = rotxy(1) + py rotxy = RotPoint(bx,by,angle) rbx = rotxy(0) + px rby = rotxy(1) + py rotxy = RotPoint(cx,cy,angle) rcx = rotxy(0) + px rcy = rotxy(1) + py rotxy = RotPoint(dx,dy,angle) rdx = rotxy(0) + px rdy = rotxy(1) + py InRotRect = InRect(ballx,bally,rax,ray,rbx,rby,rcx,rcy,rdx,rdy) End Function Function RotPoint(x,y,angle) Dim rx, ry rx = x * dCos(angle) - y * dSin(angle) ry = x * dSin(angle) + y * dCos(angle) RotPoint = Array(rx,ry) End Function '****************************************************** ' ZNFF: FLIPPER CORRECTIONS by nFozzy '****************************************************** ' ' There are several steps for taking advantage of nFozzy's flipper solution. At a high level we'll need the following: ' 1. flippers with specific physics settings ' 2. custom triggers for each flipper (TriggerLF, TriggerRF) ' 3. and, special scripting ' ' TriggerLF and RF should now be 27 vp units from the flippers. In addition, 3 degrees should be added to the end angle ' when creating these triggers. ' ' RF.ReProcessBalls Activeball and LF.ReProcessBalls Activeball must be added the flipper_collide subs. ' ' A common mistake is incorrect flipper length. A 3-inch flipper with rubbers will be about 3.125 inches long. ' This translates to about 147 vp units. Therefore, the flipper start radius + the flipper length + the flipper end ' radius should equal approximately 147 vp units. Another common mistake is is that sometimes the right flipper ' angle was set with a large postive value (like 238 or something). It should be using negative value (like -122). ' ' The following settings are a solid starting point for various eras of pinballs. ' | | EM's | late 70's to mid 80's | mid 80's to early 90's | mid 90's and later | ' | ------------------ | -------------- | --------------------- | ---------------------- | ------------------ | ' | Mass | 1 | 1 | 1 | 1 | ' | Strength | 500-1000 (750) | 1400-1600 (1500) | 2000-2600 | 3200-3300 (3250) | ' | Elasticity | 0.88 | 0.88 | 0.88 | 0.88 | ' | Elasticity Falloff | 0.15 | 0.15 | 0.15 | 0.15 | ' | Fricition | 0.8-0.9 | 0.9 | 0.9 | 0.9 | ' | Return Strength | 0.11 | 0.09 | 0.07 | 0.055 | ' | Coil Ramp Up | 2.5 | 2.5 | 2.5 | 2.5 | ' | Scatter Angle | 0 | 0 | 0 | 0 | ' | EOS Torque | 0.4 | 0.4 | 0.375 | 0.375 | ' | EOS Torque Angle | 4 | 4 | 6 | 6 | ' '****************************************************** ' Flippers Polarity (Select appropriate sub based on era) '****************************************************** Dim LF : Set LF = New FlipperPolarity Dim RF : Set RF = New FlipperPolarity InitPolarity ' Early 90's and after Sub InitPolarity() Dim x, a a = Array(LF, RF) For Each x In a x.AddPt "Ycoef", 0, RightFlipper.Y-65, 1 'disabled x.AddPt "Ycoef", 1, RightFlipper.Y-11, 1 x.enabled = True x.TimeDelay = 60 x.DebugOn=False ' prints some info in debugger x.AddPt "Polarity", 0, 0, 0 x.AddPt "Polarity", 1, 0.05, - 5.5 x.AddPt "Polarity", 2, 0.16, - 5.5 x.AddPt "Polarity", 3, 0.20, - 0.75 x.AddPt "Polarity", 4, 0.25, - 1.25 x.AddPt "Polarity", 5, 0.3, - 1.75 x.AddPt "Polarity", 6, 0.4, - 3.5 x.AddPt "Polarity", 7, 0.5, - 5.25 x.AddPt "Polarity", 8, 0.7, - 4.0 x.AddPt "Polarity", 9, 0.75, - 3.5 x.AddPt "Polarity", 10, 0.8, - 3.0 x.AddPt "Polarity", 11, 0.85, - 2.5 x.AddPt "Polarity", 12, 0.9, - 2.0 x.AddPt "Polarity", 13, 0.95, - 1.5 x.AddPt "Polarity", 14, 1, - 1.0 x.AddPt "Polarity", 15, 1.05, -0.5 x.AddPt "Polarity", 16, 1.1, 0 x.AddPt "Polarity", 17, 1.3, 0 x.AddPt "Velocity", 0, 0, 0.85 x.AddPt "Velocity", 1, 0.23, 0.85 x.AddPt "Velocity", 2, 0.27, 1 x.AddPt "Velocity", 3, 0.3, 1 x.AddPt "Velocity", 4, 0.35, 1 x.AddPt "Velocity", 5, 0.6, 1 '0.982 x.AddPt "Velocity", 6, 0.62, 1.0 x.AddPt "Velocity", 7, 0.702, 0.968 x.AddPt "Velocity", 8, 0.95, 0.968 x.AddPt "Velocity", 9, 1.03, 0.945 x.AddPt "Velocity", 10, 1.5, 0.945 Next ' SetObjects arguments: 1: name of object 2: flipper object: 3: Trigger object around flipper LF.SetObjects "LF", LeftFlipper, TriggerLF RF.SetObjects "RF", RightFlipper, TriggerRF End Sub '****************************************************** ' FLIPPER CORRECTION FUNCTIONS '****************************************************** ' modified 2023 by nFozzy ' Removed need for 'endpoint' objects ' Added 'createvents' type thing for TriggerLF / TriggerRF triggers. ' Removed AddPt function which complicated setup imo ' made DebugOn do something (prints some stuff in debugger) ' Otherwise it should function exactly the same as before\ ' modified 2024 by rothbauerw ' Added Reprocessballs for flipper collisions (LF.Reprocessballs Activeball and RF.Reprocessballs Activeball must be added to the flipper collide subs ' Improved handling to remove correction for backhand shots when the flipper is raised Class FlipperPolarity Public DebugOn, Enabled Private FlipAt 'Timer variable (IE 'flip at 723,530ms...) Public TimeDelay 'delay before trigger turns off and polarity is disabled Private Flipper, FlipperStart, FlipperEnd, FlipperEndY, LR, PartialFlipCoef, FlipStartAngle Private Balls(20), balldata(20) Private Name Dim PolarityIn, PolarityOut Dim VelocityIn, VelocityOut Dim YcoefIn, YcoefOut Public Sub Class_Initialize ReDim PolarityIn(0) ReDim PolarityOut(0) ReDim VelocityIn(0) ReDim VelocityOut(0) ReDim YcoefIn(0) ReDim YcoefOut(0) Enabled = True TimeDelay = 50 LR = 1 Dim x For x = 0 To UBound(balls) balls(x) = Empty Set Balldata(x) = new SpoofBall Next End Sub Public Sub SetObjects(aName, aFlipper, aTrigger) If TypeName(aName) <> "String" Then MsgBox "FlipperPolarity: .SetObjects error: first argument must be a String (And name of Object). Found:" & TypeName(aName) End If If TypeName(aFlipper) <> "Flipper" Then MsgBox "FlipperPolarity: .SetObjects error: Second argument must be a flipper. Found:" & TypeName(aFlipper) End If If TypeName(aTrigger) <> "Trigger" Then MsgBox "FlipperPolarity: .SetObjects error: third argument must be a trigger. Found:" & TypeName(aTrigger) End If If aFlipper.EndAngle > aFlipper.StartAngle Then LR = -1 Else LR = 1 End If Name = aName Set Flipper = aFlipper FlipperStart = aFlipper.x FlipperEnd = Flipper.Length * Sin((Flipper.StartAngle / 57.295779513082320876798154814105)) + Flipper.X ' big floats for degree to rad conversion FlipperEndY = Flipper.Length * Cos(Flipper.StartAngle / 57.295779513082320876798154814105)*-1 + Flipper.Y Dim str str = "Sub " & aTrigger.name & "_Hit() : " & aName & ".AddBall ActiveBall : End Sub'" ExecuteGlobal(str) str = "Sub " & aTrigger.name & "_UnHit() : " & aName & ".PolarityCorrect ActiveBall : End Sub'" ExecuteGlobal(str) End Sub ' Legacy: just no op Public Property Let EndPoint(aInput) End Property Public Sub AddPt(aChooseArray, aIDX, aX, aY) 'Index #, X position, (in) y Position (out) Select Case aChooseArray Case "Polarity" ShuffleArrays PolarityIn, PolarityOut, 1 PolarityIn(aIDX) = aX PolarityOut(aIDX) = aY ShuffleArrays PolarityIn, PolarityOut, 0 Case "Velocity" ShuffleArrays VelocityIn, VelocityOut, 1 VelocityIn(aIDX) = aX VelocityOut(aIDX) = aY ShuffleArrays VelocityIn, VelocityOut, 0 Case "Ycoef" ShuffleArrays YcoefIn, YcoefOut, 1 YcoefIn(aIDX) = aX YcoefOut(aIDX) = aY ShuffleArrays YcoefIn, YcoefOut, 0 End Select End Sub Public Sub AddBall(aBall) Dim x For x = 0 To UBound(balls) If IsEmpty(balls(x)) Then Set balls(x) = aBall Exit Sub End If Next End Sub Private Sub RemoveBall(aBall) Dim x For x = 0 To UBound(balls) If TypeName(balls(x) ) = "IBall" Then If aBall.ID = Balls(x).ID Then balls(x) = Empty Balldata(x).Reset End If End If Next End Sub Public Sub Fire() Flipper.RotateToEnd processballs End Sub Public Property Get Pos 'returns % position a ball. For debug stuff. Dim x For x = 0 To UBound(balls) If Not IsEmpty(balls(x)) Then pos = pSlope(Balls(x).x, FlipperStart, 0, FlipperEnd, 1) End If Next End Property Public Sub ProcessBalls() 'save data of balls in flipper range FlipAt = GameTime Dim x For x = 0 To UBound(balls) If Not IsEmpty(balls(x)) Then balldata(x).Data = balls(x) End If Next FlipStartAngle = Flipper.currentangle PartialFlipCoef = ((Flipper.StartAngle - Flipper.CurrentAngle) / (Flipper.StartAngle - Flipper.EndAngle)) PartialFlipCoef = abs(PartialFlipCoef-1) End Sub Public Sub ReProcessBalls(aBall) 'save data of balls in flipper range If FlipperOn() Then Dim x For x = 0 To UBound(balls) If Not IsEmpty(balls(x)) Then if balls(x).ID = aBall.ID Then If isempty(balldata(x).ID) Then balldata(x).Data = balls(x) End If End If End If Next End If End Sub 'Timer shutoff for polaritycorrect Private Function FlipperOn() If GameTime < FlipAt+TimeDelay Then FlipperOn = True End If End Function Public Sub PolarityCorrect(aBall) If FlipperOn() Then Dim tmp, BallPos, x, IDX, Ycoef, BalltoFlip, BalltoBase, NoCorrection, checkHit Ycoef = 1 'y safety Exit If aBall.VelY > -8 Then 'ball going down RemoveBall aBall Exit Sub End If 'Find balldata. BallPos = % on Flipper For x = 0 To UBound(Balls) If aBall.id = BallData(x).id And Not IsEmpty(BallData(x).id) Then idx = x BallPos = PSlope(BallData(x).x, FlipperStart, 0, FlipperEnd, 1) BalltoFlip = DistanceFromFlipperAngle(BallData(x).x, BallData(x).y, Flipper, FlipStartAngle) If ballpos > 0.65 Then Ycoef = LinearEnvelope(BallData(x).Y, YcoefIn, YcoefOut) 'find safety coefficient 'ycoef' data End If Next If BallPos = 0 Then 'no ball data meaning the ball is entering and exiting pretty close to the same position, use current values. BallPos = PSlope(aBall.x, FlipperStart, 0, FlipperEnd, 1) If ballpos > 0.65 Then Ycoef = LinearEnvelope(aBall.Y, YcoefIn, YcoefOut) 'find safety coefficient 'ycoef' data NoCorrection = 1 Else checkHit = 50 + (20 * BallPos) If BalltoFlip > checkHit or (PartialFlipCoef < 0.5 and BallPos > 0.22) Then NoCorrection = 1 Else NoCorrection = 0 End If End If 'Velocity correction If Not IsEmpty(VelocityIn(0) ) Then Dim VelCoef VelCoef = LinearEnvelope(BallPos, VelocityIn, VelocityOut) 'If partialflipcoef < 1 Then VelCoef = PSlope(partialflipcoef, 0, 1, 1, VelCoef) If Enabled Then aBall.Velx = aBall.Velx*VelCoef If Enabled Then aBall.Vely = aBall.Vely*VelCoef End If 'Polarity Correction (optional now) If Not IsEmpty(PolarityIn(0) ) Then Dim AddX AddX = LinearEnvelope(BallPos, PolarityIn, PolarityOut) * LR If Enabled and NoCorrection = 0 Then aBall.VelX = aBall.VelX + 1 * (AddX*ycoef*PartialFlipcoef*VelCoef) End If If DebugOn Then debug.print "PolarityCorrect" & " " & Name & " @ " & GameTime & " " & Round(BallPos*100) & "%" & " AddX:" & Round(AddX,2) & " Vel%:" & Round(VelCoef*100) End If RemoveBall aBall End Sub End Class '****************************************************** ' FLIPPER POLARITY AND RUBBER DAMPENER SUPPORTING FUNCTIONS '****************************************************** ' Used for flipper correction and rubber dampeners Sub ShuffleArray(ByRef aArray, byVal offset) 'shuffle 1d array Dim x, aCount aCount = 0 ReDim a(UBound(aArray) ) For x = 0 To UBound(aArray) 'Shuffle objects in a temp array If Not IsEmpty(aArray(x) ) Then If IsObject(aArray(x)) Then Set a(aCount) = aArray(x) Else a(aCount) = aArray(x) End If aCount = aCount + 1 End If Next If offset < 0 Then offset = 0 ReDim aArray(aCount-1+offset) 'Resize original array For x = 0 To aCount-1 'set objects back into original array If IsObject(a(x)) Then Set aArray(x) = a(x) Else aArray(x) = a(x) End If Next End Sub ' Used for flipper correction and rubber dampeners Sub ShuffleArrays(aArray1, aArray2, offset) ShuffleArray aArray1, offset ShuffleArray aArray2, offset End Sub ' Used for flipper correction, rubber dampeners, and drop targets Function BallSpeed(ball) 'Calculates the ball speed BallSpeed = Sqr(ball.VelX^2 + ball.VelY^2 + ball.VelZ^2) End Function ' Used for flipper correction and rubber dampeners Function PSlope(Input, X1, Y1, X2, Y2) 'Set up line via two points, no clamping. Input X, output Y Dim x, y, b, m x = input m = (Y2 - Y1) / (X2 - X1) b = Y2 - m*X2 Y = M*x+b PSlope = Y End Function ' Used for flipper correction Class spoofball Public X, Y, Z, VelX, VelY, VelZ, ID, Mass, Radius Public Property Let Data(aBall) With aBall x = .x y = .y z = .z velx = .velx vely = .vely velz = .velz id = .ID mass = .mass radius = .radius End With End Property Public Sub Reset() x = Empty y = Empty z = Empty velx = Empty vely = Empty velz = Empty id = Empty mass = Empty radius = Empty End Sub End Class ' Used for flipper correction and rubber dampeners Function LinearEnvelope(xInput, xKeyFrame, yLvl) Dim y 'Y output Dim L 'Line 'find active line Dim ii For ii = 1 To UBound(xKeyFrame) If xInput <= xKeyFrame(ii) Then L = ii Exit For End If Next If xInput > xKeyFrame(UBound(xKeyFrame) ) Then L = UBound(xKeyFrame) 'catch line overrun Y = pSlope(xInput, xKeyFrame(L-1), yLvl(L-1), xKeyFrame(L), yLvl(L) ) If xInput <= xKeyFrame(LBound(xKeyFrame) ) Then Y = yLvl(LBound(xKeyFrame) ) 'Clamp lower If xInput >= xKeyFrame(UBound(xKeyFrame) ) Then Y = yLvl(UBound(xKeyFrame) ) 'Clamp upper LinearEnvelope = Y End Function '****************************************************** ' FLIPPER TRICKS '****************************************************** ' To add the flipper tricks you must ' - Include a call to FlipperCradleCollision from within OnBallBallCollision subroutine ' - Include a call the CheckLiveCatch from the LeftFlipper_Collide and RightFlipper_Collide subroutines ' - Include FlipperActivate and FlipperDeactivate in the Flipper solenoid subs RightFlipper.timerinterval = 1 Rightflipper.timerenabled = True Sub RightFlipper_timer() FlipperTricks LeftFlipper, LFPress, LFCount, LFEndAngle, LFState FlipperTricks RightFlipper, RFPress, RFCount, RFEndAngle, RFState FlipperTricks UPRightFlipper, UPRFPress, UPRFCount, UPRFEndAngle, UPRFState FlipperNudge RightFlipper, RFEndAngle, RFEOSNudge, LeftFlipper, LFEndAngle FlipperNudge LeftFlipper, LFEndAngle, LFEOSNudge, RightFlipper, RFEndAngle End Sub Dim LFEOSNudge, RFEOSNudge Sub FlipperNudge(Flipper1, Endangle1, EOSNudge1, Flipper2, EndAngle2) Dim b Dim gBOT gBOT = GetBalls If Flipper1.currentangle = Endangle1 And EOSNudge1 <> 1 Then EOSNudge1 = 1 ' debug.print Flipper1.currentangle &" = "& Endangle1 &"--"& Flipper2.currentangle &" = "& EndAngle2 If Flipper2.currentangle = EndAngle2 Then For b = 0 To UBound(gBOT) If FlipperTrigger(gBOT(b).x, gBOT(b).y, Flipper1) Then 'Debug.Print "ball in flip1. exit" Exit Sub End If Next For b = 0 To UBound(gBOT) If FlipperTrigger(gBOT(b).x, gBOT(b).y, Flipper2) Then gBOT(b).velx = gBOT(b).velx / 1.3 gBOT(b).vely = gBOT(b).vely - 0.5 End If Next End If Else If Abs(Flipper1.currentangle) > Abs(EndAngle1) + 30 Then EOSNudge1 = 0 End If End Sub Dim FCCDamping: FCCDamping = 0.4 Sub FlipperCradleCollision(ball1, ball2, velocity) if velocity < 0.7 then exit sub 'filter out gentle collisions Dim DoDamping, coef DoDamping = false 'Check left flipper If LeftFlipper.currentangle = LFEndAngle Then If FlipperTrigger(ball1.x, ball1.y, LeftFlipper) OR FlipperTrigger(ball2.x, ball2.y, LeftFlipper) Then DoDamping = true End If 'Check right flipper If RightFlipper.currentangle = RFEndAngle Then If FlipperTrigger(ball1.x, ball1.y, RightFlipper) OR FlipperTrigger(ball2.x, ball2.y, RightFlipper) Then DoDamping = true End If If DoDamping Then coef = FCCDamping ball1.velx = ball1.velx * coef: ball1.vely = ball1.vely * coef: ball1.velz = ball1.velz * coef ball2.velx = ball2.velx * coef: ball2.vely = ball2.vely * coef: ball2.velz = ball2.velz * coef End If End Sub '************************************************* ' Check ball distance from Flipper for Rem '************************************************* Function Distance(ax,ay,bx,by) Distance = Sqr((ax - bx) ^ 2 + (ay - by) ^ 2) End Function Function DistancePL(px,py,ax,ay,bx,by) 'Distance between a point and a line where point Is px,py DistancePL = Abs((by - ay) * px - (bx - ax) * py + bx * ay - by * ax) / Distance(ax,ay,bx,by) End Function Function Radians(Degrees) Radians = Degrees * PI / 180 End Function Function AnglePP(ax,ay,bx,by) AnglePP = Atn2((by - ay),(bx - ax)) * 180 / PI End Function Function DistanceFromFlipper(ballx, bally, Flipper) DistanceFromFlipper = DistancePL(ballx, bally, Flipper.x, Flipper.y, Cos(Radians(Flipper.currentangle + 90)) + Flipper.x, Sin(Radians(Flipper.currentangle + 90)) + Flipper.y) End Function Function DistanceFromFlipperAngle(ballx, bally, Flipper, Angle) DistanceFromFlipperAngle = DistancePL(ballx, bally, Flipper.x, Flipper.y, Cos(Radians(Angle + 90)) + Flipper.x, Sin(Radians(angle + 90)) + Flipper.y) End Function Function FlipperTrigger(ballx, bally, Flipper) Dim DiffAngle DiffAngle = Abs(Flipper.currentangle - AnglePP(Flipper.x, Flipper.y, ballx, bally) - 90) If DiffAngle > 180 Then DiffAngle = DiffAngle - 360 If DistanceFromFlipper(ballx,bally,Flipper) < 48 And DiffAngle <= 90 And Distance(ballx,bally,Flipper.x,Flipper.y) < Flipper.Length Then FlipperTrigger = True Else FlipperTrigger = False End If End Function '************************************************* ' End - Check ball distance from Flipper for Rem '************************************************* Dim LFPress, RFPress, LFCount, RFCount Dim LFState, RFState Dim EOST, EOSA,Frampup, FElasticity,FReturn Dim RFEndAngle, LFEndAngle Dim UPRFPress, UPRFCount, UPRFEndAngle, UPRFState Const FlipperCoilRampupMode = 0 '0 = fast, 1 = medium, 2 = slow (tap passes should work) LFState = 1 RFState = 1 UPRFState = 1 EOST = leftflipper.eostorque EOSA = leftflipper.eostorqueangle Frampup = LeftFlipper.rampup FElasticity = LeftFlipper.elasticity FReturn = LeftFlipper.return 'Const EOSTnew = 1.5 'EM's to late 80's - new recommendation by rothbauerw (previously 1) Const EOSTnew = 1.2 '90's and later - new recommendation by rothbauerw (previously 0.8) Const EOSAnew = 1 Const EOSRampup = 0 Dim SOSRampup Select Case FlipperCoilRampupMode Case 0 SOSRampup = 2.5 Case 1 SOSRampup = 6 Case 2 SOSRampup = 8.5 End Select Const LiveCatch = 16 Const LiveElasticity = 0.45 Const SOSEM = 0.815 'Const EOSReturn = 0.055 'EM's 'Const EOSReturn = 0.045 'late 70's to mid 80's 'Const EOSReturn = 0.035 'mid 80's to early 90's Const EOSReturn = 0.025 'mid 90's and later LFEndAngle = Leftflipper.endangle RFEndAngle = RightFlipper.endangle UPRFEndAngle = UPRightFlipper.endangle Sub FlipperActivate(Flipper, FlipperPress) FlipperPress = 1 Flipper.Elasticity = FElasticity Flipper.eostorque = EOST Flipper.eostorqueangle = EOSA End Sub Sub FlipperDeactivate(Flipper, FlipperPress) FlipperPress = 0 Flipper.eostorqueangle = EOSA Flipper.eostorque = EOST * EOSReturn / FReturn If Abs(Flipper.currentangle) <= Abs(Flipper.endangle) + 0.1 Then Dim b, gBOT gBOT = GetBalls For b = 0 To UBound(gBOT) If Distance(gBOT(b).x, gBOT(b).y, Flipper.x, Flipper.y) < 55 Then 'check for cradle If gBOT(b).vely >= - 0.4 Then gBOT(b).vely = - 0.4 End If Next End If End Sub Sub FlipperTricks (Flipper, FlipperPress, FCount, FEndAngle, FState) Dim Dir Dir = Flipper.startangle / Abs(Flipper.startangle) '-1 for Right Flipper If Abs(Flipper.currentangle) > Abs(Flipper.startangle) - 0.05 Then If FState <> 1 Then Flipper.rampup = SOSRampup Flipper.endangle = FEndAngle - 3 * Dir Flipper.Elasticity = FElasticity * SOSEM FCount = 0 FState = 1 End If ElseIf Abs(Flipper.currentangle) <= Abs(Flipper.endangle) And FlipperPress = 1 Then If FCount = 0 Then FCount = GameTime If FState <> 2 Then Flipper.eostorqueangle = EOSAnew Flipper.eostorque = EOSTnew Flipper.rampup = EOSRampup Flipper.endangle = FEndAngle FState = 2 End If ElseIf Abs(Flipper.currentangle) > Abs(Flipper.endangle) + 0.01 And FlipperPress = 1 Then If FState <> 3 Then Flipper.eostorque = EOST Flipper.eostorqueangle = EOSA Flipper.rampup = Frampup Flipper.Elasticity = FElasticity FState = 3 End If End If End Sub Const LiveDistanceMin = 5 'minimum distance In vp units from flipper base live catch dampening will occur Const LiveDistanceMax = 114 'maximum distance in vp units from flipper base live catch dampening will occur (tip protection) Const BaseDampen = 0.55 Sub CheckLiveCatch(ball, Flipper, FCount, parm) 'Experimental new live catch Dim Dir, LiveDist Dir = Flipper.startangle / Abs(Flipper.startangle) '-1 for Right Flipper Dim LiveCatchBounce 'If live catch is not perfect, it won't freeze ball totally Dim CatchTime CatchTime = GameTime - FCount LiveDist = Abs(Flipper.x - ball.x) If CatchTime <= LiveCatch And parm > 3 And LiveDist > LiveDistanceMin And LiveDist < LiveDistanceMax Then If CatchTime <= LiveCatch * 0.5 Then 'Perfect catch only when catch time happens in the beginning of the window LiveCatchBounce = 0 Else LiveCatchBounce = Abs((LiveCatch / 2) - CatchTime) 'Partial catch when catch happens a bit late End If If LiveCatchBounce = 0 And ball.velx * Dir > 0 And LiveDist > 30 Then ball.velx = 0 If ball.velx * Dir > 0 And LiveDist < 30 Then ball.velx = BaseDampen * ball.velx ball.vely = BaseDampen * ball.vely ball.angmomx = BaseDampen * ball.angmomx ball.angmomy = BaseDampen * ball.angmomy ball.angmomz = BaseDampen * ball.angmomz Elseif LiveDist > 30 Then ball.vely = LiveCatchBounce * (32 / LiveCatch) ' Multiplier for inaccuracy bounce ball.angmomx = 0 ball.angmomy = 0 ball.angmomz = 0 End If Else If Abs(Flipper.currentangle) <= Abs(Flipper.endangle) + 1 Then FlippersD.Dampenf ActiveBall, parm End If End Sub '****************************************************** '**** END FLIPPER CORRECTIONS '****************************************************** '****************************************************** ' ZDMP: RUBBER DAMPENERS '****************************************************** ' These are data mined bounce curves, ' dialed in with the in-game elasticity as much as possible to prevent angle / spin issues. ' Requires tracking ballspeed to calculate COR Sub dPosts_Hit(idx) RubbersD.dampen ActiveBall TargetBouncer ActiveBall, 1 End Sub Sub dSleeves_Hit(idx) SleevesD.Dampen ActiveBall TargetBouncer ActiveBall, 0.7 End Sub Dim RubbersD 'frubber Set RubbersD = New Dampener RubbersD.name = "Rubbers" RubbersD.debugOn = False 'shows info in textbox "TBPout" RubbersD.Print = False 'debug, reports In debugger (In vel, out cor); cor bounce curve (linear) 'for best results, try to match in-game velocity as closely as possible to the desired curve ' RubbersD.addpoint 0, 0, 0.935 'point# (keep sequential), ballspeed, CoR (elasticity) RubbersD.addpoint 0, 0, 1.1 'point# (keep sequential), ballspeed, CoR (elasticity) RubbersD.addpoint 1, 3.77, 0.97 RubbersD.addpoint 2, 5.76, 0.967 'dont take this as gospel. if you can data mine rubber elasticitiy, please help! RubbersD.addpoint 3, 15.84, 0.874 RubbersD.addpoint 4, 56, 0.64 'there's clamping so interpolate up to 56 at least Dim SleevesD 'this is just rubber but cut down to 85%... Set SleevesD = New Dampener SleevesD.name = "Sleeves" SleevesD.debugOn = False 'shows info in textbox "TBPout" SleevesD.Print = False 'debug, reports In debugger (In vel, out cor) SleevesD.CopyCoef RubbersD, 0.85 '######################### Add new FlippersD Profile '######################### Adjust these values to increase or lessen the elasticity Dim FlippersD Set FlippersD = New Dampener FlippersD.name = "Flippers" FlippersD.debugOn = False FlippersD.Print = False FlippersD.addpoint 0, 0, 1.1 FlippersD.addpoint 1, 3.77, 0.99 FlippersD.addpoint 2, 6, 0.99 Class Dampener Public Print, debugOn 'tbpOut.text Public name, Threshold 'Minimum threshold. Useful for Flippers, which don't have a hit threshold. Public ModIn, ModOut Private Sub Class_Initialize ReDim ModIn(0) ReDim Modout(0) End Sub Public Sub AddPoint(aIdx, aX, aY) ShuffleArrays ModIn, ModOut, 1 ModIn(aIDX) = aX ModOut(aIDX) = aY ShuffleArrays ModIn, ModOut, 0 If GameTime > 100 Then Report End Sub Public Sub Dampen(aBall) If threshold Then If BallSpeed(aBall) < threshold Then Exit Sub End If Dim RealCOR, DesiredCOR, str, coef DesiredCor = LinearEnvelope(cor.ballvel(aBall.id), ModIn, ModOut ) RealCOR = BallSpeed(aBall) / (cor.ballvel(aBall.id) + 0.0001) coef = desiredcor / realcor If debugOn Then str = name & " In vel:" & Round(cor.ballvel(aBall.id),2 ) & vbNewLine & "desired cor: " & Round(desiredcor,4) & vbNewLine & _ "actual cor: " & Round(realCOR,4) & vbNewLine & "ballspeed coef: " & Round(coef, 3) & vbNewLine If Print Then Debug.print Round(cor.ballvel(aBall.id),2) & ", " & Round(desiredcor,3) aBall.velx = aBall.velx * coef aBall.vely = aBall.vely * coef aBall.velz = aBall.velz * coef If debugOn Then TBPout.text = str End Sub Public Sub Dampenf(aBall, parm) 'Rubberizer is handle here Dim RealCOR, DesiredCOR, str, coef DesiredCor = LinearEnvelope(cor.ballvel(aBall.id), ModIn, ModOut ) RealCOR = BallSpeed(aBall) / (cor.ballvel(aBall.id) + 0.0001) coef = desiredcor / realcor If Abs(aball.velx) < 2 And aball.vely < 0 And aball.vely > - 3.75 Then aBall.velx = aBall.velx * coef aBall.vely = aBall.vely * coef End If End Sub Public Sub CopyCoef(aObj, aCoef) 'alternative addpoints, copy with coef Dim x For x = 0 To UBound(aObj.ModIn) addpoint x, aObj.ModIn(x), aObj.ModOut(x) * aCoef Next End Sub Public Sub Report() 'debug, reports all coords in tbPL.text If Not debugOn Then Exit Sub Dim a1, a2 a1 = ModIn a2 = ModOut Dim str, x For x = 0 To UBound(a1) str = str & x & ": " & Round(a1(x),4) & ", " & Round(a2(x),4) & vbNewLine Next TBPout.text = str End Sub End Class '****************************************************** ' TRACK ALL BALL VELOCITIES ' FOR RUBBER DAMPENER AND DROP TARGETS '****************************************************** Dim cor Set cor = New CoRTracker Class CoRTracker Public ballvel, ballvelx, ballvely Private Sub Class_Initialize ReDim ballvel(0) ReDim ballvelx(0) ReDim ballvely(0) End Sub Public Sub Update() 'tracks in-ball-velocity Dim str, b, AllBalls, highestID allBalls = GetBalls For Each b In allballs If b.id >= HighestID Then highestID = b.id Next If UBound(ballvel) < highestID Then ReDim ballvel(highestID) 'set bounds If UBound(ballvelx) < highestID Then ReDim ballvelx(highestID) 'set bounds If UBound(ballvely) < highestID Then ReDim ballvely(highestID) 'set bounds For Each b In allballs ballvel(b.id) = BallSpeed(b) ballvelx(b.id) = b.velx ballvely(b.id) = b.vely Next End Sub End Class ' Note, cor.update must be called in a 10 ms timer. The example table uses the GameTimer for this purpose, but sometimes a dedicated timer call RDampen is used. ' Sub RDampen_Timer Cor.Update End Sub '****************************************************** '**** END PHYSICS DAMPENERS '****************************************************** '****************************************************** ' ZBOU: VPW TargetBouncer for targets and posts by Iaakki, Wrd1972, Apophis '****************************************************** Const TargetBouncerEnabled = 1 '0 = normal standup targets, 1 = bouncy targets Const TargetBouncerFactor = 0.9 'Level of bounces. Recommmended value of 0.7-1 Sub TargetBouncer(aBall,defvalue) Dim zMultiplier, vel, vratio If TargetBouncerEnabled = 1 And aball.z < 30 Then ' debug.print "velx: " & aball.velx & " vely: " & aball.vely & " velz: " & aball.velz vel = BallSpeed(aBall) If aBall.velx = 0 Then vratio = 1 Else vratio = aBall.vely / aBall.velx Select Case Int(Rnd * 6) + 1 Case 1 zMultiplier = 0.2 * defvalue Case 2 zMultiplier = 0.25 * defvalue Case 3 zMultiplier = 0.3 * defvalue Case 4 zMultiplier = 0.4 * defvalue Case 5 zMultiplier = 0.45 * defvalue Case 6 zMultiplier = 0.5 * defvalue End Select aBall.velz = Abs(vel * zMultiplier * TargetBouncerFactor) aBall.velx = Sgn(aBall.velx) * Sqr(Abs((vel ^ 2 - aBall.velz ^ 2) / (1 + vratio ^ 2))) aBall.vely = aBall.velx * vratio ' debug.print "---> velx: " & aball.velx & " vely: " & aball.vely & " velz: " & aball.velz ' debug.print "conservation check: " & BallSpeed(aBall)/vel End If End Sub 'Add targets or posts to the TargetBounce collection if you want to activate the targetbouncer code from them Sub TargetBounce_Hit(idx) TargetBouncer ActiveBall, 1 End Sub '****************************************************** ' ZSSC: SLINGSHOT CORRECTION FUNCTIONS by apophis '****************************************************** ' To add these slingshot corrections: ' - On the table, add the endpoint primitives that define the two ends of the Slingshot ' - Initialize the SlingshotCorrection objects in InitSlingCorrection ' - Call the .VelocityCorrect methods from the respective _Slingshot event sub Dim LS Set LS = New SlingshotCorrection Dim RS Set RS = New SlingshotCorrection InitSlingCorrection Sub InitSlingCorrection LS.Object = LeftSlingshot LS.EndPoint1 = EndPoint1LS LS.EndPoint2 = EndPoint2LS RS.Object = RightSlingshot RS.EndPoint1 = EndPoint1RS RS.EndPoint2 = EndPoint2RS 'Slingshot angle corrections (pt, BallPos in %, Angle in deg) ' These values are best guesses. Retune them if needed based on specific table research. AddSlingsPt 0, 0.00, - 3 AddSlingsPt 1, 0.30, - 5 AddSlingsPt 2, 0.40, -30 AddSlingsPt 3, 0.60, 30 AddSlingsPt 4, 0.70, 5 AddSlingsPt 5, 1.00, 3 End Sub Sub AddSlingsPt(idx, aX, aY) 'debugger wrapper for adjusting flipper script In-game Dim a a = Array(LS, RS) Dim x For Each x In a x.addpoint idx, aX, aY Next End Sub '' The following sub are needed, however they may exist somewhere else in the script. Uncomment below if needed 'Dim PI: PI = 4*Atn(1) 'Function dSin(degrees) ' dsin = sin(degrees * Pi/180) 'End Function 'Function dCos(degrees) ' dcos = cos(degrees * Pi/180) 'End Function ' 'Function RotPoint(x,y,angle) ' dim rx, ry ' rx = x*dCos(angle) - y*dSin(angle) ' ry = x*dSin(angle) + y*dCos(angle) ' RotPoint = Array(rx,ry) 'End Function Class SlingshotCorrection Public DebugOn, Enabled Private Slingshot, SlingX1, SlingX2, SlingY1, SlingY2 Public ModIn, ModOut Private Sub Class_Initialize ReDim ModIn(0) ReDim Modout(0) Enabled = True End Sub Public Property Let Object(aInput) Set Slingshot = aInput End Property Public Property Let EndPoint1(aInput) SlingX1 = aInput.x SlingY1 = aInput.y End Property Public Property Let EndPoint2(aInput) SlingX2 = aInput.x SlingY2 = aInput.y End Property Public Sub AddPoint(aIdx, aX, aY) ShuffleArrays ModIn, ModOut, 1 ModIn(aIDX) = aX ModOut(aIDX) = aY ShuffleArrays ModIn, ModOut, 0 If GameTime > 100 Then Report End Sub Public Sub Report() 'debug, reports all coords in tbPL.text If Not debugOn Then Exit Sub Dim a1, a2 a1 = ModIn a2 = ModOut Dim str, x For x = 0 To UBound(a1) str = str & x & ": " & Round(a1(x),4) & ", " & Round(a2(x),4) & vbNewLine Next TBPout.text = str End Sub Public Sub VelocityCorrect(aBall) Dim BallPos, XL, XR, YL, YR 'Assign right and left end points If SlingX1 < SlingX2 Then XL = SlingX1 YL = SlingY1 XR = SlingX2 YR = SlingY2 Else XL = SlingX2 YL = SlingY2 XR = SlingX1 YR = SlingY1 End If 'Find BallPos = % on Slingshot If Not IsEmpty(aBall.id) Then If Abs(XR - XL) > Abs(YR - YL) Then BallPos = PSlope(aBall.x, XL, 0, XR, 1) Else BallPos = PSlope(aBall.y, YL, 0, YR, 1) End If If BallPos < 0 Then BallPos = 0 If BallPos > 1 Then BallPos = 1 End If 'Velocity angle correction If Not IsEmpty(ModIn(0) ) Then Dim Angle, RotVxVy Angle = LinearEnvelope(BallPos, ModIn, ModOut) ' debug.print " BallPos=" & BallPos &" Angle=" & Angle ' debug.print " BEFORE: aBall.Velx=" & aBall.Velx &" aBall.Vely" & aBall.Vely RotVxVy = RotPoint(aBall.Velx,aBall.Vely,Angle) If Enabled Then aBall.Velx = RotVxVy(0) If Enabled Then aBall.Vely = RotVxVy(1) ' debug.print " AFTER: aBall.Velx=" & aBall.Velx &" aBall.Vely" & aBall.Vely ' debug.print " " End If End Sub End Class