Thread: [317 - Delta] Basic Music System

Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1 [317 - Delta] Basic Music System 
    I'm secretly a carrot named 3arl.

    Mainframe's Avatar
    Join Date
    Jun 2012
    Age
    26
    Posts
    1,422
    Thanks given
    542
    Thanks received
    214
    Rep Power
    147
    Difficulty: 3/10

    List for all songs (643): http://forums.ffshrine.org/f72/runes...3-songs-36052/

    Step 1.
    Make a new file called Music.java and place this in it.
    Code:
    public class Music {
    
    	public static enum CITY_MUSIC {
    		VARROCK(169),
    		WATERFALL(125),
    		FALLADOR(23);
    
    		int music;
    
    		CITY_MUSIC(int music) {
    			this.music = music;
    		}
    
    		public int getMusic() {
    			return music;
    		}
    	}
    }
    This holds the song ID's and where you want them to play.
    VARROCK(169),
    varrock where you want it to play and the (169) is the song id.

    Step 2.
    Add these anywhere in client.java
    Code:
    public void frame174(int i1, int i2, int i3) {
    outStream.createFrame(174);
    outStream.writeWord(i1);
    outStream.writeByte(i2);
    outStream.writeWord(i3);
    updateRequired = true;
    appearanceUpdateRequired = true;
    }
    public void musicManager(String action, int songID) {
    		if (action == "PLAY") {
    			outStream.createFrame(74);
    			outStream.writeWordBigEndian(songID);
    		}
    		if (action == "STOP") {
    			outStream.createFrame(74);
    			outStream.writeWordBigEndian(-1);
    		}
    	}
    So basicly these allow the music to be played.


    Step 3.
    Search for case 121: and add this under it.
    Code:
    if(isInvarrock()) {
    			musicManager("PLAY", Music.CITY_MUSIC.VARROCK.getMusic());
    			}
    This packet is sent when a player is finished loading a new map region.
    So bassicly this changes the music between towns.

    Step 4.
    Search.
    Code:
    public boolean multiCombat()
    and under this method add..
    Code:
    public boolean isInvarrock()
    	{
    		if (isInArea(3158,3469, 3258, 3258)) return true;
    		return false;
    	}
    public boolean isInArea(int x, int y, int x2, int y2){
    	if ((absX >= x && absX <= x2) && (absY <= y && absY >= y2)) return true;
    	return false;
    }
    This is where you want the music to be played.
    Finished!

    Ive only added music playing in Varrock so you can add the others your self.

    Also i'll give you a command to test some of the songs
    Code:
    if (command.startsWith("music") && playerRights >= 2) {
                    try 
         {
                        int music = Integer.parseInt(command.substring(6));
     
                        if (music >= 0)
          {
          outStream.createFrame(74);
      outStream.writeWordBigEndian(music);
                               sM("You play the music.");
         } else {
          sM("No such music id..");
         }
        } catch(Exception e) {
         sM("Wrong Syntax! Use as ::music 1");
        }}
    Any problems please let me know!

    Credits:
    Me - 40%
    A friend of mine (from another site) - 60%

    Thank you, Exel
    Reply With Quote  
     

  2. Thankful users:


  3. #2  
    Registered Member Cruel Hand's Avatar
    Join Date
    May 2012
    Posts
    90
    Thanks given
    5
    Thanks received
    16
    Rep Power
    54
    this was copy and pasted literally 100% from mopar... why are you giving yourself credit?
    Reply With Quote  
     

  4. Thankful user:


  5. #3  
    I'm secretly a carrot named 3arl.

    Mainframe's Avatar
    Join Date
    Jun 2012
    Age
    26
    Posts
    1,422
    Thanks given
    542
    Thanks received
    214
    Rep Power
    147
    Quote Originally Posted by Cruel Hand View Post
    this was copy and pasted literally 100% from mopar... why are you giving yourself credit?


    The guy who wrote it originally is my friend. He allowed me to use it; Which is why I gave him credit

    Besides I rewrote some of it...
    Reply With Quote  
     

  6. #4  
    Registered Member Cruel Hand's Avatar
    Join Date
    May 2012
    Posts
    90
    Thanks given
    5
    Thanks received
    16
    Rep Power
    54
    haha alrighty. It works, anyhow, so thanks.
    Reply With Quote  
     

  7. #5  
    Registered Member
    Join Date
    May 2012
    Posts
    111
    Thanks given
    10
    Thanks received
    3
    Rep Power
    9
    some of my songs dont work how do i go about fixing this and thanx for the music set up ill be useing it in my lan remake if i could rep i would and varrock is 135 and its not working far as playing music so thats what i was wondering about
    Reply With Quote  
     

  8. #6  
    CorruptionPVP CODER
    Kronos's Avatar
    Join Date
    Aug 2011
    Posts
    850
    Thanks given
    148
    Thanks received
    32
    Rep Power
    128
    Noble this is copied and pasted from mopar.......Also you deserve 0.001% credit for posting it.
    This might be your friends.. but its not yours.. 100% copy and pasted...
    Reply With Quote  
     

  9. #7  
    Registered Member
    Join Date
    May 2012
    Posts
    111
    Thanks given
    10
    Thanks received
    3
    Rep Power
    9
    Quote Originally Posted by Kronos View Post
    Noble this is copied and pasted from mopar.......Also you deserve 0.001% credit for posting it.
    The guy who wrote it originally is my friend. He allowed me to use it; Which is why I gave him credit

    Besides I rewrote some of it...
    people need to read better
    Reply With Quote  
     

  10. Thankful user:


  11. #8  
    Endeavor

    Mikey`'s Avatar
    Join Date
    Dec 2007
    Posts
    4,434
    Thanks given
    715
    Thanks received
    1,435
    Rep Power
    1202
    Thanks for this: Runescape Music (643 Songs!)

    So useful.
    Reply With Quote  
     

  12. #9  
    Donator
    Mr Extremez's Avatar
    Join Date
    Jun 2012
    Posts
    2,243
    Thanks given
    97
    Thanks received
    298
    Rep Power
    61
    I've seen this in other sources before. *cough* runelegacy *cough*
    Add my new Skype: live:extremezgp

    Discord: Mr Extremez#3049

    Reply With Quote  
     

  13. #10  
    « Pokémon Master »
    Ash Ketchum's Avatar
    Join Date
    Jun 2011
    Age
    29
    Posts
    1,423
    Thanks given
    275
    Thanks received
    153
    Rep Power
    39
    couldn't this technically be used for other servers as well? i don't use delta, but it seems like the only thing that would need converting would be the command, but that's almost nothing :3
    Attached image
    Spoiler for Galkon:

    Spoiler for Great Quotes:
    Quote Originally Posted by i am prod View Post
    **** YOU this just erased everyones passwords and no one can log in!!!
    Quote Originally Posted by blade2 View Post
    did i ****ing say it was a ****ing virus u dip shit i said virus scan dont scan java files i didn't say its a virus... l2****ingreadkid
    Spoiler for (╯°□°)╯︵┻━┻:
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. 317 Music system
    By mige5 in forum Show-off
    Replies: 5
    Last Post: 02-27-2012, 04:12 PM
  2. [$80 - $150][317] Full Music System
    By Genesis in forum Buying
    Replies: 6
    Last Post: 02-07-2012, 09:17 AM
  3. Basic Pest Control System! [Delta]
    By lare96 in forum Tutorials
    Replies: 21
    Last Post: 03-15-2011, 03:52 AM
  4. Replies: 3
    Last Post: 01-31-2011, 12:12 AM
  5. Having fun with 317 music system
    By Dust R I P in forum Show-off
    Replies: 27
    Last Post: 10-06-2010, 12:56 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •