'*************************** PuP Background Music for this table ******************************** ' by NailBuster v0.1 ' The idea is to allow your own custom background music/control during gameplay. ' You just have to add your own mp3s into a subfolder/playlist of PuPVideos\myMusic. ' You can have as many playlists inside of myMusic to share amongst different vpx tables ' ' PuPVideos\myMusic\Top40 ' PuPVideos\myMusic\BritneySpears ' PuPVideos\myMusic\NickleBack ' PuPVideos\myMusic\TopRAP ' ' do not add this table script to tables that are already using PuPlayer or PuPPacks. ' ' ' step 1> if Not already there manually create a subfolder in PupVideos called "MyMusic" without quotes. ' ' step 2> create a subfolder inside myMusic and add as many mp3 as you like, this folder name is the Playlist Name. ' ' step 3> copy/paste this PuP Background Music script to end of vpx table script ' ' step 4> find in table script Table1_KeyDown and ADD first line of sub like below ' ' Sub Table1_KeyDown(ByVal keycode) ' PuPOnKeyDown(keycode) ' ' step 5> find in table script Table1_KeyUP and ADD first line of sub like below ' ' Sub Table1_KeyUP(ByVal keycode) ' PuPOnKeyUp(keycode) ' ' step 6> set that subfolder (aka Playlist) below for cPuPPlayList ' ' Thats It! Now using Magna buttons will go next/prior in playlist. ' if you HOLD left flipper down, then using left/right magna will lower/increase volume. ' ' note: below is a pupRandomize value. 1=enable 0=alpha sort for how to initially load the mps ' '************************************************************************************************* Dim usePUP: Dim PuPlayer: Dim PUPStatus: PUPStatus=false : Dim pLeftFlipperDown: pLeftFlipperDown = 0 ' dont edit this line!!! dim cPuPPlayList : cPuPPlayList = "Top40" ' name of subfolder/playlist in your myMusic PupPack folder (located in PuPVideos). dim cPuPPack : cPuPPack = "myMusic" ' name of the PuP-Pack / PuPVideos folder for this table dim pupCurVolume : pupCurVolume = 50 ' default pupvolume. 1-100 dim pAudio : pAudio=12 ' leave 12 for virtual pup display dim pupVolumeStep: pupVolumeStep = 5 ' volume change steps dim pupRandomize : pupRandomize = 1 ' 0=alpha sort 1= randomize '*********** NO NEED TO MODIFY ANYTHING BELOW ********************** usePUP = true ' enable Pinup Player functions for this table Sub PUPDisplayAsJukebox(pupid) PuPlayer.SendMSG("{'mt':301, 'SN': " & pupid & ", 'FN':30, 'PM':1 }") End Sub Sub PuPlayListPrior(pupid) PuPlayer.SendMSG("{'mt':301, 'SN': " & pupid & ", 'FN':31, 'PM':1 }") End Sub Sub PuPlayListNext(pupid) PuPlayer.SendMSG("{'mt':301, 'SN': " & pupid & ", 'FN':31, 'PM':2 }") End Sub Sub PuPOnKeyDown(keycode) If PUPStatus=false then Exit Sub if keycode=LeftFlipperKey Then pLeftFlipperDown = 1 end Sub Sub PuPOnKeyUp(keycode) If PUPStatus=false then Exit Sub if keycode=LeftMagnaSave AND pLeftFlipperDown = 0 Then PuPlayListPrior pAudio if keycode=RightMagnaSave AND pLeftFlipperDown = 0 Then PuPlayListNext pAudio if keycode=RightMagnaSave AND pLeftFlipperDown = 1 Then pupCurVolume = pupCurVolume + pupVolumeStep if pupCurVolume>100 then pupCurVolume = 100 PuPlayer.setVolumeCurrent pAudio, pupCurVolume PuPlayer.setVolume pAudio, pupCurVolume end If if keycode=LeftMagnaSave AND pLeftFlipperDown = 1 Then pupCurVolume = pupCurVolume - pupVolumeStep if pupCurVolume<1 then pupCurVolume = 1 PuPlayer.setVolumeCurrent pAudio, pupCurVolume PuPlayer.setVolume pAudio, pupCurVolume end If if keycode=LeftFlipperKey Then pLeftFlipperDown = 0 end Sub 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 PuPlayer.Init pAudio, cPuPPack PuPlayer.SetScreenex pAudio,0,0,0,0,2 PuPlayer.hide pAudio PuPlayer.playlistadd pAudio, cPuPPlayList, pupRandomize, 0 PUPDisplayAsJukebox pAudio PuPlayer.setvolume pAudio, pupCurVolume PuPlayer.PlayListPlay pAudio,cPuPPlayList PUPStatus=true End If End If End Sub PuPStart(cPuPPack) 'Check for PuP - If found, then start Pinup Player / PuP-Pack '********************** END OF PUP BACKGROUND MUSIC SCRIPT **************************************