Personal Jukebox Script

*Created by Taz.*

```
Using "RC_Core.rcm"
; Scripted Realm Online V2
; Date/Time: 3:57:18 PM on 12/20/2010
; By Naddaz on TAZCO
;Music avalibale is based on quest points player has. will need a few more quests that give points.

;NOTE QP = Attribute Quest points
;Note Executed from stat trainer script
Function Main()
Player = Actor()
QP% = Attribute(Player, "Quest Points") ;total quest points player has
MaxQP% = 22 ;Change to number of quest points needed for the last song in the list.

chatbox = OpenDialog(Player, Target, "Personal Jukebox")
DialogOutPut(Player, ChatBox, "Pick a song to play, use stop music to stop current song.", 230, 145, 23)

Playerchoice% = DialogInput(Player, Chatbox, "Change the music, Stop the music, What is the Personal Jukebox, Exit")

If (Playerchoice = 1) ; change the music
    CloseDialog(Player, chatbox)
    chatbox = OpenDialog(Player, Target, "Personal Jukebox")
        If (QP >= MaxQP)
            MusicChoice% = DialogInput(Player, Chatbox, "Above the blue sky,Alone in the rain,Awaken,Ethereal Dream,Gold Peices,Jays Ocean,More")
        Else
             MusicChoice% = DialogInput(Player, Chatbox, "Above the blue sky ----- 0 Points,Alone in the rain ----- 0 Points,Awaken ----- 0 Points,Ethereal Dream ----- 0 Points,Gold Peices ----- 1 Points,Jays Ocean ----- 2 Points,More")
        Endif

     If (MusicChoice = 1) ; Above the blue sky 0 QP
        PlayMusic(Player, 0, 0)
        CloseDialog(Player, Chatbox)
    Elseif (MusicChoice = 2) ; Alone in the rain 0 QP
        PlayMusic(Player, 2, 0)
        CloseDialog(Player, Chatbox)
    ElseIf (MusicChoice = 3) ; Awaken 0 QP
        PlayMusic(Player, 3, 0)
        CloseDialog(Player, Chatbox)
    ElseIf (MusicChoice = 4) ; Ethereal Dream 0 QP
        PlayMusic(Player, 4, 0)
        CloseDialog(Player, Chatbox)

     ElseIf (MusicChoice = 5) ; Gold Peices 1 QP

  ;songs that require quest points to play.
       If (QP >= 1)
           PlayMusic(Player, 6, 0)
           CloseDialog(Player, Chatbox)
       Else
             CloseDialog(Player, chatbox)
            chatbox = OpenDialog(Player, Target, "Personal Jukebox")
            DialogOutPut(Player, ChatBox, "You do not have enough quest points to play this song.", 255, 200, 20)
            DialogInput(Player, ChatBox, "Close")
            CloseDialog(Player, ChatBox)
       Endif

     ElseIf (MusicChoice = 6) ; Jays Ocean 2 QP
      If (QP >= 2)
        PlayMusic(Player, 9, 0)
        CloseDialog(Player, Chatbox)
       Else
         CloseDialog(Player, chatbox)
        chatbox = OpenDialog(Player, Target, "Personal Jukebox")
        DialogOutPut(Player, ChatBox, "You do not have enough quest points to play this song.", 255, 200, 20)
        DialogInput(Player, ChatBox, "Close")
        CloseDialog(Player, ChatBox)
       Endif

     ElseIf (MusicChoice = 7) ; More
        CloseDialog(Player, ChatBox)
        chatbox = OpenDialog(Player, Target, "Personal Jukebox")
            If (QP >= MaxQP)
                MusicChoice1% = DialogInput(Player, Chatbox, "Allusion World,Gold Peices (No Drums),Inner Peace,Inner Stampede,Joyful Life,Joyful Life (Remix),No Worry,No Worry (Remix),More")
            Else
                MusicChoice1% = DialogInput(Player, Chatbox, "Allusion World ----- 4 Points,Gold Peices (No Drums) ----- 5 Points,Inner Peace ----- 6 Points,Inner Stampede ----- 7 Points,Joyful Life ----- 8 Points,Joyful Life (Remix) ----- 10 Points,No Worry ----- 11 Points,No Worry (Remix) ----- 12 Points,More")
            Endif

         If (MusicChoice1 = 1) ;Allusion World 4 QP
            If (QP >= 4)
             PlayMusic(Player, 1, 0)
             CloseDialog(Player, Chatbox)
            Else
              CloseDialog(Player, chatbox)
              chatbox = OpenDialog(Player, Target, "Personal Jukebox")
              DialogOutPut(Player, ChatBox,"You do not have enough quest points to play this song.", 255, 200, 20)
              DialogInput(Player, ChatBox, "Close")
              CloseDialog(Player, ChatBox)
           Endif
        ElseIf (MusicChoice1 = 2) ;Gold Peices (No Drums) 5 QP
            If (Qp >= 5)
             PlayMusic(Player, 5, 0)
             CloseDialog(Player, Chatbox)
            Else
                CloseDialog(Player, chatbox)
                chatbox = OpenDialog(Player, Target, "Personal Jukebox")
                DialogOutPut(Player, ChatBox, "You do not have enough quest points to play this song.", 255, 200, 20)
                DialogInput(Player, ChatBox, "Close")
                CloseDialog(Player, ChatBox)
            Endif
        ElseIf (MusicChoice1 = 3) ;Inner Peace 6 QP
            If (QP >= 6)
             PlayMusic(Player, 7, 0)
             CloseDialog(Player, Chatbox)
            Else
                CloseDialog(Player, chatbox)
                chatbox = OpenDialog(Player, Target, "Personal Jukebox")
                DialogOutPut(Player, ChatBox, "You do not have enough quest points to play this song.", 255, 200, 20)
                DialogInput(Player, ChatBox, "Close")
                CloseDialog(Player, ChatBox)
            Endif

         ElseIf (MusicChoice1 = 4) ;Inner Stampede 7 QP
            If (QP = 7)
             PlayMusic(Player, 8, 0)
             CloseDialog(Player, Chatbox)
            Else
              CloseDialog(Player, chatbox)
              chatbox = OpenDialog(Player, Target, "Personal Jukebox")
              DialogOutPut(Player, ChatBox, "You do not have enough quest points to play this song.", 255, 200, 20)
              DialogInput(Player, ChatBox, "Close")
              CloseDialog(Player, ChatBox)
            Endif

         ElseIf (MusicChoice1 = 5) ; Joyful Life 8 QP
            If (QP >= 8)
             PlayMusic(Player, 11, 0)
             CloseDialog(Player, Chatbox)
            Else
                CloseDialog(Player, chatbox)
                chatbox = OpenDialog(Player, Target, "Personal Jukebox")
                DialogOutPut(Player, ChatBox, "You do not have enough quest points to play this song.", 255, 200, 20)
                DialogInput(Player, ChatBox, "Close")
                CloseDialog(Player, ChatBox)
            Endif

         Elseif (MusicChoice1 = 6) ;Joyful Life (Remix) 10 QP
            If (QP >= 9)
             PlayMusic(Player, 10, 0)
             CloseDialog(Player, Chatbox)
            Else
                CloseDialog(Player, chatbox)
                chatbox = OpenDialog(Player, Target, "Personal Jukebox")
                DialogOutPut(Player, ChatBox, "You do not have enough quest points to play this song.", 255, 200, 20)
                DialogInput(Player, ChatBox, "Close")
                CloseDialog(Player, ChatBox)
            Endif
        ElseIf (MusicChoice1 = 7) ;No Worry 11 QP
            If (QP >= 11)
             PlayMusic(Player, 24, 0)
             CloseDialog(Player, Chatbox)
            Else
                CloseDialog(Player, chatbox)
                chatbox = OpenDialog(Player, Target, "Personal Jukebox")
                DialogOutPut(Player, ChatBox, "You do not have enough quest points to play this song.", 255, 200, 20)
                DialogInput(Player, ChatBox, "Close")
                CloseDialog(Player, ChatBox)
            Endif

         ElseIf (MusicChoice1 = 8) ;No Worry (Remix) 12 QP
           If (QP >= 12)
             PlayMusic(Player, 12, 0)
             CloseDialog(Player, Chatbox)
           Else
                 CloseDialog(Player, chatbox)
                chatbox = OpenDialog(Player, Target, "Personal Jukebox")
                DialogOutPut(Player, ChatBox, "You do not have enough quest points to play this song.", 255, 200, 20)
                DialogInput(Player, ChatBox, "Close")
                CloseDialog(Player, ChatBox)
           Endif

         ElseIf (MusicChoice1 = 9) ;More
        CloseDialog(Player, ChatBox)
        chatbox = OpenDialog(Player, Target, "Personal Jukebox")
                If (QP >= MaxQP)
                   MusicChoice2% = DialogInput(Player, Chatbox, "Now I,Remember Me,Rock on,Spirit Within,Start the wars,Still here,Through a starry night,Warm Dmajor,More")
                Else
                    MusicChoice2% = DialogInput(Player, Chatbox, "Now I ----- 13 Points,Remember Me ----- 14 Points,Rock on ----- 15,Spirit Within ----- 16 Points,Start the wars ----- 17 Points,Still here ----- 18 Points,Through a starry night ----- 19 Points,Warm Dmajor ----- 20 Points,More")
                Endif
            If (MusicChoice2 = 1) ;Now I 13 QP
                If (QP >= 13)
                    PlayMusic(Player, 13, 0)
                    CloseDialog(Player, Chatbox)
                Else
                    CloseDialog(Player, chatbox)
                    chatbox = OpenDialog(Player, Target, "Personal Jukebox")
                    DialogOutPut(Player, ChatBox, "You do not have enough quest points to play this song.", 255, 200, 20)
                    DialogInput(Player, ChatBox, "Close")
                    CloseDialog(Player, ChatBox)
                Endif
            ElseIf (MusicChoice2 = 2) ;Remember Me 14 QP
              If (QP >= 14)
                PlayMusic(Player, 14, 0)
                CloseDialog(Player, Chatbox)
              Else
                  CloseDialog(Player, chatbox)
                  chatbox = OpenDialog(Player, Target, "Personal Jukebox")
                  DialogOutPut(Player, ChatBox, "You do not have enough quest points to play this song.", 255, 200, 20)
                  DialogInput(Player, ChatBox, "Close")
                  CloseDialog(Player, ChatBox)
              Endif
            ElseIf (MusicChoice2 = 3) ;Rock on 15 QP
                If (QP >= 15)
                    PlayMusic(Player, 15, 0)
                    CloseDialog(Player, Chatbox)
                Else
                    CloseDialog(Player, chatbox)
                    chatbox = OpenDialog(Player, Target, "Personal Jukebox")
                    DialogOutPut(Player, ChatBox, "You do not have enough quest points to play this song.", 255, 200, 20)
                    DialogInput(Player, ChatBox, "Close")
                    CloseDialog(Player, ChatBox)
                Endif
            ElseIf (MusicChoice2 = 4) ;Spirit Within 16 QP
                If (QP >= 16)
                    PlayMusic(Player, 16, 0)
                    CloseDialog(Player, Chatbox)
                Else
                    CloseDialog(Player, chatbox)
                    chatbox = OpenDialog(Player, Target, "Personal Jukebox")
                    DialogOutPut(Player, ChatBox, "You do not have enough quest points to play this song.", 255, 200, 20)
                    DialogInput(Player, ChatBox, "Close")
                    CloseDialog(Player, ChatBox)
                Endif

            ElseIf (MusicChoice2 = 5) ;Start the wars 17 QP
              If (QP >= 17)
                PlayMusic(Player, 17, 0)
                CloseDialog(Player, Chatbox)
              Else
                 CloseDialog(Player, chatbox)
                 chatbox = OpenDialog(Player, Target, "Personal Jukebox")
                 DialogOutPut(Player, ChatBox, "You do not have enough quest points to play this song.", 255, 200, 20)
                 DialogInput(Player, ChatBox, "Close")
                 CloseDialog(Player, ChatBox)
             Endif
            Elseif (MusicChoice2 = 6) ;Still here 18 QP
              If (QP >= 18)
                PlayMusic(Player, 18, 0)
                CloseDialog(Player, Chatbox)
              Else
                    CloseDialog(Player, chatbox)
                    chatbox = OpenDialog(Player, Target, "Personal Jukebox")
                    DialogOutPut(Player, ChatBox, "You do not have enough quest points to play this song.", 255, 200, 20)
                    DialogInput(Player, ChatBox, "Close")
                    CloseDialog(Player, ChatBox)
              Endif
            ElseIf (MusicChoice2 = 7) ;Through a starry night 19 QP
               If (QP >= 19)
                PlayMusic(Player, 20, 0)
                CloseDialog(Player, Chatbox)
               Else
                    CloseDialog(Player, chatbox)
                    chatbox = OpenDialog(Player, Target, "Personal Jukebox")
                    DialogOutPut(Player, ChatBox, "You do not have enough quest points to play this song.", 255, 200, 20)
                    DialogInput(Player, ChatBox, "Close")
                    CloseDialog(Player, ChatBox)
               Endif
            Elseif (MusicChoice2 = 8) ;Warm Dmajor 20 QP
              If (QP >= 20)
                PlayMusic(Player, 21, 0)
                CloseDialog(Player, Chatbox)
              Else
                  CloseDialog(Player, chatbox)
                  chatbox = OpenDialog(Player, Target, "Personal Jukebox")
                  DialogOutPut(Player, ChatBox, "You do not have enough quest points to play this song.", 255, 200, 20)
                  DialogInput(Player, ChatBox, "Close")
                  CloseDialog(Player, ChatBox)
              Endif
            ElseIf (MusicChoice2 = 9) ; More
            CloseDialog(Player, ChatBox)
            chatbox = OpenDialog(Player, Target, "Personal Jukebox")
                    If (QP >= MaxQP)
                        MusicChoice3% = DialogInput(Player, Chatbox, "When it starts to rain,Within my dream,Close")
                    Else
                        MusicChoice3% = DialogInput(Player, Chatbox, "When it starts to rain ----- 21 Points,Within my dream ----- 22 Points,Close")
                    Endif
                If (MusicChoice3 = 1) ;When it starts to rain 21 QP
                    If (QP >= 21)
                        PlayMusic(Player, 22, 0)
                        CloseDialog(Player, Chatbox)
                    Else
                        CloseDialog(Player, chatbox)
                        chatbox = OpenDialog(Player, Target, "Personal Jukebox")
                        DialogOutPut(Player, ChatBox, "You do not have enough quest points to play this song.", 255, 200, 20)
                        DialogInput(Player, ChatBox, "Close")
                        CloseDialog(Player, ChatBox)
                    Endif
                Elseif (MusicChoice3 = 2) ;Within my dream 22 QP
                    If (QP >= 22)
                        PlayMusic(Player, 23, 0)
                        CloseDialog(Player, Chatbox)
                    Else
                        CloseDialog(Player, chatbox)
                        chatbox = OpenDialog(Player, Target, "Personal Jukebox")
                        DialogOutPut(Player, ChatBox, "You do not have enough quest points to play this song.", 255, 200, 20)
                        DialogInput(Player, ChatBox, "Close")
                        CloseDialog(Player, ChatBox)
                    Endif
                Elseif (MusicChoice3 = 3) ;Close

                     CloseDialog(Player, ChatBox)
                Endif

             EndIf

         EndIf

     Endif

 ElseIf (Playerchoice = 2) ; Stop the music
     PlayMusic(Player, 19, 0)
    CloseDialog(Player, ChatBox)
ElseIf (Playerchoice = 3) ; info about PJ
    Closedialog(Player, ChatBox)
    chatbox = OpenDialog(Player, Target, "Personal Jukebox")
    DialogOutput(Player, Chatbox, "Welcome to your Personal Jukebox, gaining quest points from finishing quests, will allow you to access more music.", 230, 145 , 23)
   PC1% = DialogInput(Player, ChatBox, "Music Credits,Close")

     If (PC1 = 1)
        CloseDialog(Player, chatbox)
        chatbox = OpenDialog(Player, Target, "Personal Jukebox")
        DialogOutPut(Player, ChatBox, "Music credits go to J.P. Baker (RC user redone) and Greendragon25@yahoo.com there is 2 text files in the music folder of the client that has all there info.", 230, 145, 23)
        DialogInput(Player, Chatbox, "Close")
        CloseDialog(Player, ChatBox)
    Else
     Exitjuke = 0
    CloseDialog(Player, ChatBox)
    Endif
 ElseIf (Playerchoice = 4) ; Exit

   CloseDialog(Player, ChatBox)
Endif

DoEvents(300)

Return
End Function

```