Jump to content

Recommended Posts

Posted

Hello my dear friends i had an idea so i want to share with you, ofc the code is not working and misses lots of code, its the idea i want to share with you and ofc request the support of the pro coders to help finish it here on this topic, i thinks its a very usefull mod for the servers, and maybe with your help is possible to finish it, i made that code based on B1gB0ss Aio item cause its fun the player have one item as Music Player where he can farm and listen music on the game.

 

Please if any mod think this is not a "share" and its only a "request" move it

 

Tell what you think about the idea.

Thank you all who gonna help me do this or finish it ^^

 

 

Index: java/config/l2jmods.properties
===================================================================
--- java/config/l2jmods.properties	(revision 3695)
+++ java/config/l2jmods.properties	(working copy)
@@ -256,4 +256,44 @@
+# ---------------------------------------------------------------------------
+# Music Player
+# ---------------------------------------------------------------------------
+#
+#+EnableMusicPlayer = True
+#
+# Music Commands
+# Here you should configure the music commands example: seanpaul
+# it will be the bypass the npc will use to play the music
+# it should be the sanem name as the .ogg files in MUSIC folder.
+Music1 = seanpaul
+Muisc2 = fingers
+Music3 = labouche
+Music4 = maxamilion
+Music5 = rednex
+Music6 = hedboys
+Music7 = mpeople
+Music8 = mcscar
+Music9 = hardtobeat
+Music10 = blink182
+
+# Music Names
+# here you will put the name of the music used in Music Commads
+# it will show the name on: Now Playing - in the chat
+# example: Now Playing - Blink 182 - All The Small Things 
+Musicname1 = Sean Paul - Got 2 Luv U Ft. Alexis Jordan
+Musicname2 = 20 Fingers feat. Roula - Lick It
+Musicname3 = La Bouche - Be My Love
+Musicname4 = Max-A-Million - Hey Fat Boy
+Musicname5 = Rednex - Cotton Eye Joe
+Musicname6 = Hed Boys - Girls & Boys
+Musicname7 = M People - Open Your Heart
+Musicname8 = M.C. Sar & The Real McCoy - Run Away
+Musicname9 = Hard To Beat (Axwell Remix)-Hard-Fi
+Musicname10 = Blink-182 - All The Small Things 
\ No newline at end of file
Index: java/com/l2jserver/Config.java
===================================================================
--- java/com/l2jserver/Config.java	(revision 3695)
+++ java/com/l2jserver/Config.java	(working copy)
@@ -616,6 +616,20 @@
	public static boolean OFFLINE_SET_NAME_COLOR;
	public static int OFFLINE_NAME_COLOR;
	public static boolean L2JMOD_ENABLE_MANA_POTIONS_SUPPORT;
+	/*MUSIC PLAYER SETTINGS */
+	public static boolean ENABLE_MUSICPLAYER;
+
+	public static int MUSIC1;
+	public static int MUSIC2;
+	public static int MUSIC3;
+	public static int MUSIC4;
+	public static int MUSIC5;
+	public static int MUSIC6;
+	public static int MUSIC7;
+	public static int MUSIC8;
+	public static int MUSIC9;
+	public static int MUSIC10;

+	public static int MUSICNAME1 ;
+	public static int MUSICNAME2 ;
+	public static int MUSICNAME3 ;
+	public static int MUSICNAME4 ;
+	public static int MUSICNAME5 ;
+	public static int MUSICNAME6 ;
+	public static int MUSICNAME7 ;
+	public static int MUSICNAME8 ;
+	public static int MUSICNAME9 ;
+	public static int MUSICNAME10 ;



	//--------------------------------------------------
@@ -2014,6 +2028,19 @@
					OFFLINE_NAME_COLOR = Integer.decode("0x" + L2JModSettings.getProperty("OfflineNameColor", "808080"));

					L2JMOD_ENABLE_MANA_POTIONS_SUPPORT = Boolean.parseBoolean(L2JModSettings.getProperty("EnableManaPotionSupport", "false"));
+					ENABLE_MUSICPLAYER = Boolean.parseBoolean(L2JModSettings.getProperty("EnableMusicPlayer", "true")
+					
+					MUSIC1 = Integer.parseInt(L2JModSettings.getProperty("Music1", "seanpaul"));
+					MUSIC2 = Integer.parseInt(L2JModSettings.getProperty("Music2", "fingers"));
+					MUSIC3 = Integer.parseInt(L2JModSettings.getProperty("Music3", "labouche"));
+					MUSIC4 = Integer.parseInt(L2JModSettings.getProperty("Music4", "maxamilion"));
+					MUSIC5 = Integer.parseInt(L2JModSettings.getProperty("Music5", "rednex"));
+					MUSIC6 = Integer.parseInt(L2JModSettings.getProperty("Music6", "hedboys"));
+					MUSIC7 = Integer.parseInt(L2JModSettings.getProperty("Music7", "mpeople"));
+					MUSIC8 = Integer.parseInt(L2JModSettings.getProperty("Music8", "mcscar"));
+					MUSIC9 = Integer.parseInt(L2JModSettings.getProperty("Music9", "hardtobeat"));
+					MUSIC10 = Integer.parseInt(L2JModSettings.getProperty("Music10", "blink182"));

+					MUSICNAME1 = Integer.parseInt(L2JModSettings.getProperty("Musicname1", "Sean Paul - Got 2 Luv U Ft. Alexis Jordan"));
+					MUSICNAME2 = Integer.parseInt(L2JModSettings.getProperty("Musicname2", "20 Fingers feat. Roula - Lick It"));
+					MUSICNAME3 = Integer.parseInt(L2JModSettings.getProperty("Musicname3", "La Bouche - Be My Love"));
+					MUSICNAME4 = Integer.parseInt(L2JModSettings.getProperty("Musicname4", "Max-A-Million - Hey Fat Boy"));
+					MUSICNAME5 = Integer.parseInt(L2JModSettings.getProperty("Musicname5", "Rednex - Cotton Eye Joe"));
+					MUSICNAME6 = Integer.parseInt(L2JModSettings.getProperty("Musicname6", "Hed Boys - Girls & Boys"));
+					MUSICNAME7 = Integer.parseInt(L2JModSettings.getProperty("Musicname7", "M People - Open Your Heart"));
+					MUSICNAME8 = Integer.parseInt(L2JModSettings.getProperty("Musicname8", "M.C. Sar & The Real McCoy - Run Away"));
+					MUSICNAME9 = Integer.parseInt(L2JModSettings.getProperty("Musicname9", "Hard To Beat (Axwell Remix)-Hard-Fi"));
+					MUSICNAME10 = Integer.parseInt(L2JModSettings.getProperty("Musicname10", "Blink-182 - All The Small Things "));
				}
				catch (Exception e)
				{

Index: java/net/sf/l2j/gameserver/GameServer.java
===================================================================
--- java/net/sf/l2j/gameserver/GameServer.java	(revision 3695)
+++ java/net/sf/l2j/gameserver/GameServer.java	(working copy)
@@ -100,6 +100,7 @@
import net.sf.l2j.gameserver.instancemanager.ZoneManager;
import net.sf.l2j.gameserver.model.AutoChatHandler;
import net.sf.l2j.gameserver.model.AutoSpawnHandler;
+import net.sf.l2j.gameserver.model.MusicPlayer;
import net.sf.l2j.gameserver.model.L2Manor;
import net.sf.l2j.gameserver.model.L2Multisell;
import net.sf.l2j.gameserver.model.L2PetDataTable;
@@ -295,6 +296,8 @@
		TransformationManager.getInstance();
		AirShipManager.getInstance();

+		MusicPlayer.loadData();
+		
		try
		{
			_log.info("Loading Server Scripts");
Index: java/com/l2jserver/gameserver/MusicPlayer/MusicPlayer.java
===================================================================
--- java/com/l2jserver/gameserver/MusicPlayer/MusicPlayer.java	(revision 0)
+++ java/com/l2jserver/gameserver/MusicPlayer/MusicPlayer.java	(revision 0)
@@ -0,0 +1,538 @@
+package com.l2jserver.gameserver.MusicPlayer;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Map;
+
+import javolution.text.TextBuilder;
+import javolution.util.FastList;
+import javolution.util.FastMap;
+import com.l2jserver.Config;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.network.SystemMessageId;
+import com.l2jserver.gameserver.network.serverpackets.Playsong;
+import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
+import com.l2jserver.gameserver.network.serverpackets.PackageToList;
+import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
+
+/**
+ * 
+ * @author MrNapz Based on B1gB0ss AIO ITEM
+ *
+ */
+
+public class MusicPlayer {
+	
+	private static final String _headHtml = "<html><title>Music Player</title><body><center><br>";
+	private static final String _endHtml = "</center></body></html>";
+	
+	/* ogg file name */
+	private static final int _Music1 = Config.MUSIC1;
+	private static final int _Music2 = Config.MUSIC2;
+	private static final int _Music3 = Config.MUSIC3;
+	private static final int _Music4 = Config.MUSIC4;
+	private static final int _Music5 = Config.MUSIC5;
+	private static final int _Music6 = Config.MUSIC6;
+	private static final int _Music7 = Config.MUSIC7;
+	private static final int _Music8 = Config.MUSIC8;
+	private static final int _Music9 = Config.MUSIC9;
+	private static final int _Music10 = Config.MUSIC10;
+
+
+	private static final int Musicname1 = Config.MUSICNAME1;
+	private static final int Musicname2 = Config.MUSICNAME2;
+	private static final int Musicname3 = Config.MUSICNAME3;
+	private static final int Musicname4 = Config.MUSICNAME4;
+	private static final int Musicname5 = Config.MUSICNAME5;
+	private static final int Musicname6 = Config.MUSICNAME6;
+	private static final int Musicname7 = Config.MUSICNAME7;
+	private static final int Musicname8 = Config.MUSICNAME8;
+	private static final int Musicname9 = Config.MUSICNAME9;
+	private static final int Musicname10 = Config.MUSICNAME10;
+
+
+	public boolean useMusicPlayer(String command, L2PcInstance activeChar, String target)
+	{
+		if (command.equalsIgnoreCase("Music1"))
+		{
+			    PlaySound _snd = new PlaySound(1, +Music1+, 0, 0, 0, 0, 0);
+			    activeChar.sendPacket(_snd);
+			    activeChar.sendMessage("Now Playing-"+Musicname1+" ");
+
+		if (command.equalsIgnoreCase("Music2"))
+		{
+			    PlaySound _snd = new PlaySound(1, +Config.Music2+, 0, 0, 0, 0, 0);
+			    activeChar.sendPacket(_snd);
+			    activeChar.sendMessage("Now Playing-"+Musicname2+" ");
+
+		if (command.equalsIgnoreCase("Music3"))
+		{
+			    PlaySound _snd = new PlaySound(1, +Config.Music3+, 0, 0, 0, 0, 0);
+			    activeChar.sendPacket(_snd);
+			    activeChar.sendMessage("Now Playing-"+Musicname3+" ");
+
+		if (command.equalsIgnoreCase("Music3"))
+		{
+			    PlaySound _snd = new PlaySound(1, +Config.Music1+, 0, 0, 0, 0, 0);
+			    activeChar.sendPacket(_snd);
+			    activeChar.sendMessage("Now Playing-"+Musicname1+" ");
+
+		if (command.equalsIgnoreCase("Music4"))
+		{
+			    PlaySound _snd = new PlaySound(1, +Config.Music4+, 0, 0, 0, 0, 0);
+			    activeChar.sendPacket(_snd);
+			    activeChar.sendMessage("Now Playing-"+Musicname4+" ");
+
+		if (command.equalsIgnoreCase("Music5"))
+		{
+			    PlaySound _snd = new PlaySound(1, +Config.Music5+, 0, 0, 0, 0, 0);
+			    activeChar.sendPacket(_snd);
+			    activeChar.sendMessage("Now Playing-"+Musicname5+" ");
+
+		if (command.equalsIgnoreCase("Music6"))
+		{
+			    PlaySound _snd = new PlaySound(1, +Config.Music6+, 0, 0, 0, 0, 0);
+			    activeChar.sendPacket(_snd);
+			    activeChar.sendMessage("Now Playing-"+Musicname6+" ");
+
+		if (command.equalsIgnoreCase("Music7"))
+		{
+			    PlaySound _snd = new PlaySound(1, +Config.Music7+, 0, 0, 0, 0, 0);
+			    activeChar.sendPacket(_snd);
+			    activeChar.sendMessage("Now Playing-"+Musicname7+" ");
+
+		if (command.equalsIgnoreCase("Music8"))
+		{
+			    PlaySound _snd = new PlaySound(1, +Config.Music8, 0, 0, 0, 0, 0);
+			    activeChar.sendPacket(_snd);
+			    activeChar.sendMessage("Now Playing-"+Musicname8" ");
+
+		if (command.equalsIgnoreCase("Music9"))
+		{
+			    PlaySound _snd = new PlaySound(1, +Config.Music9+, 0, 0, 0, 0, 0);
+			    activeChar.sendPacket(_snd);
+			    activeChar.sendMessage("Now Playing-"+Musicname9+" ");
+
+		if (command.equalsIgnoreCase("Music10"))
+		{
+			    PlaySound _snd = new PlaySound(1, +Config.Music10+, 0, 0, 0, 0, 0);
+			    activeChar.sendPacket(_snd);
+			    activeChar.sendMessage("Now Playing-"+Musicname10+" ");
+				
+	private static void showMusicPlayerWindow(L2PcInstance player) 
+	{
+		
+		TextBuilder tb = new TextBuilder();
+		tb.append(_headHtml);
+		tb.append("Choose what music you listen:<br>");
+		tb.append("<a action=\"bypass -h MusicPlayer_Music1" + Musicname1 + "\"></a>");
+		tb.append("<a action=\"bypass -h MusicPlayer_Music2" + Musicname2 + "\"></a>");
+		tb.append("<a action=\"bypass -h MusicPlayer_Music3" + Musicname3 + "\"></a>");
+		tb.append("<a action=\"bypass -h MusicPlayer_Music4" + Musicname4 + "\"></a>");
+		tb.append("<a action=\"bypass -h MusicPlayer_Music5" + Musicname5 + "\"></a>");
+		tb.append("<a action=\"bypass -h MusicPlayer_Music6" + Musicname6 + "\"></a>");
+		tb.append("<a action=\"bypass -h MusicPlayer_Music7" + Musicname7 + "\"></a>");
+		tb.append("<a action=\"bypass -h MusicPlayer_Music8" + Musicname8 + "\"></a>");
+		tb.append("<a action=\"bypass -h MusicPlayer_Music9" + Musicname9 + "\"></a>");
+		tb.append("<a action=\"bypass -h MusicPlayer_Music10" + Musicname10 + "\"></a>");
+		tb.append(_endHtml);
+		
+		NpcHtmlMessage msg = new NpcHtmlMessage(5);
+		msg.setHtml(tb.toString());
+		player.sendPacket(msg);
+	}
+	
+
Index: java/com/l2jserver/gameserver/network/clientpackets/RequestBypassToServer.java
===================================================================
--- java/com/l2jserver/gameserver/network/clientpackets/RequestBypassToServer.java	(revision 3695)
+++ java/com/l2jserver/gameserver/network/clientpackets/RequestBypassToServer.java	(working copy)
@@ -24,6 +24,7 @@
import net.sf.l2j.gameserver.datatables.AdminCommandAccessRights;
import net.sf.l2j.gameserver.handler.AdminCommandHandler;
import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
+import net.sf.l2j.gameserver.model.ItemBypass;
import net.sf.l2j.gameserver.model.L2CharPosition;
import net.sf.l2j.gameserver.model.L2Object;
import net.sf.l2j.gameserver.model.L2World;
@@ -203,6 +204,11 @@
			{
				activeChar.sendPacket(new ExHeroList());
			}
+			else if (_command.startsWith("MusicPlayer")) {
+				
+				String sub = _command.substring(8);
+				ItemBypass.onBypassFeedback(activeChar, sub);
+			}
+
Index: java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java
===================================================================
--- java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java	(revision 3695)
+++ java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java	(working copy)
@@ -195,7 +195,23 @@
			activeChar.setHero(true);

		setPledgeClass(activeChar);
-
+		
+		if(Config.DESTROY_ONDISABLE && !Config.ENABLE_MUSICPLAYER) {
+			if(activeChar.getInventory().getItemByItemId(938) == null)
+				System.out.println(activeChar.getName() +" did not have any Music Player");
+			else if(activeChar.getInventory().getItemByItemId(938).getCount() > 0) 
+				activeChar.destroyItemByItemId("Music Player", 0, activeChar.getInventory().getItemByItemId(938).getCount(), activeChar, true);
+		}
+		if(Config.GIVEANDCHECK_ATSTARTUP && Config.ENABLE_MUSICPLAYER) {
+			if(activeChar.getInventory().getItemByItemId(938) == null) {
+				System.out.println("Character: "+activeChar.getName()+"["+activeChar.getObjectId()+"] didnt had the Music Player");
+				activeChar.addItem("Music Player", 938, 1, activeChar, true);
+			}
+			else if(activeChar.getInventory().getItemByItemId(938).getCount() == 0) {
+				System.out.println("Character: "+activeChar.getName()+"["+activeChar.getObjectId()+"] didnt had the Music Player");
+				activeChar.addItem("Music Player", 938, 1, activeChar, true);
+			}
+		}
		boolean showClanNotice = false;

		// Clan related checks are here
Index: java/com/l2jserver/gameserver/templates/item/L2EtcItemType.java
===================================================================
--- java/com/l2jserver/gameserver/templates/item/L2EtcItemType.java	(revision 3695)
+++ java/com/l2jserver/gameserver/templates/item/L2EtcItemType.java	(working copy)
@@ -33,7 +33,8 @@
	SPELLBOOK(11, "Spellbook"),
	SEED(12, "Seed"),
	SHOT(13, "Shot"),
-	HERB(14, "Herb");
+	HERB(14, "Herb"),
+	MUSICPLAYER(15, "MusicPlayer");

	final int _id;
	final String _name;

Posted

Unique?

 

Why do u make spam men? I see your spam in all the posts ¬¬

 

// Ontopic

 

That is amazing! I'll test it right now!

Posted

Why do u make spam men? I see your spam in all the posts ¬¬

 

// Ontopic

 

That is amazing! I'll test it right now!

ofc the code is not working and misses lots of code,

Posted

Why do u make spam men? I see your spam in all the posts ¬¬

 

// Ontopic

 

That is amazing! I'll test it right now!

 

ofc if all who know code as well help it will be unique on maxcheaters ;D

i tried to code but im an initiate :X i have great idead but i dont know pass it to java x(

but i will learn more to try finish it if no ones help me :'(

 

cheers.

Posted

shitty coded :)

anyway dunno where u want sound to be loaded from, client?

 

yeah if you read i tell im an initiate coder and ofc its a shitty code, whatever, i tried and you cant tell its a good idea what a tried to do thats why i post here if your a good coder why you dont fix the "shitty" code?

 

my idea was creating and Item as Music Player when player open shows the List of 10 musics who can be configurated in .properties file.

 

+# Music Commands

+# Here you should configure the music commands example: seanpaul

+# it will be the bypass the npc will use to play the music

+# it should be the sanem name as the .ogg files in MUSIC folder.

+Music1 = seanpaul

+Muisc2 = fingers

+Music3 = labouche

+Music4 = maxamilion

+Music5 = rednex

+Music6 = hedboys

+Music7 = mpeople

+Music8 = mcscar

+Music9 = hardtobeat

+Music10 = blink182

 

that will be the config to code get the name of .ogg file in MUSIC folder.

example: Music1 = NT_Giran

the Playsound will get the NT_Giran.ogg to play

 

and that

 

+# Music Names

+# here you will put the name of the music used in Music Commads

+# it will show the name on: Now Playing - in the chat

+# example: Now Playing - Blink 182 - All The Small Things

+Musicname1 = Sean Paul - Got 2 Luv U Ft. Alexis Jordan

+Musicname2 = 20 Fingers feat. Roula - Lick It

+Musicname3 = La Bouche - Be My Love

+Musicname4 = Max-A-Million - Hey Fat Boy

+Musicname5 = Rednex - Cotton Eye Joe

+Musicname6 = Hed Boys - Girls & Boys

+Musicname7 = M People - Open Your Heart

+Musicname8 = M.C. Sar & The Real McCoy - Run Away

+Musicname9 = Hard To Beat (Axwell Remix)-Hard-Fi

+Musicname10 = Blink-182 - All The Small Things

 

that was to configure the name of the music to announce on chat

 

if (_command.equalsIgnoreCase("Music1"))

{

    PlaySound _soundFile = new PlaySound(1, + getMusic1 +, 0, 0, 0, 0, 0);

    activeChar.sendPacket(_soundFile);

    activeChar.sendMessage("Now Playing-"+ getMusicname1 +" ");

 

and that is what will show the list of music's when the player open the item

 

+ private static void showMusicPlayerWindow(L2PcInstance player)

+ {

+

+ TextBuilder tb = new TextBuilder();

+ tb.append(_headHtml);

+ tb.append("Choose what music you listen:<br>");

+ tb.append("<a action=\"bypass -h MusicPlayer_Music1" + Musicname1 + "\"></a>");

+ tb.append("<a action=\"bypass -h MusicPlayer_Music2" + Musicname2 + "\"></a>");

+ tb.append("<a action=\"bypass -h MusicPlayer_Music3" + Musicname3 + "\"></a>");

+ tb.append("<a action=\"bypass -h MusicPlayer_Music4" + Musicname4 + "\"></a>");

+ tb.append("<a action=\"bypass -h MusicPlayer_Music5" + Musicname5 + "\"></a>");

+ tb.append("<a action=\"bypass -h MusicPlayer_Music6" + Musicname6 + "\"></a>");

+ tb.append("<a action=\"bypass -h MusicPlayer_Music7" + Musicname7 + "\"></a>");

+ tb.append("<a action=\"bypass -h MusicPlayer_Music8" + Musicname8 + "\"></a>");

+ tb.append("<a action=\"bypass -h MusicPlayer_Music9" + Musicname9 + "\"></a>");

+ tb.append("<a action=\"bypass -h MusicPlayer_Music10" + Musicname10 + "\"></a>");

+ tb.append(_endHtml);

+

+ NpcHtmlMessage msg = new NpcHtmlMessage(5);

+ msg.setHtml(tb.toString());

+ player.sendPacket(msg);

+ }

 

 

remmember dont blame about the bad code and help fix it ;)

Posted

 

yes but that is by voiced command, for you as a player is better have an item to open and choose music or write an voiced command always you want to listen music?

 

btw for you as admin is more easy change in config file or only 2 lines per music or change many lines per music in voicedcommand.

 

gg if you dont like the idea just request an mod to close this topic, i think your help is only to blame and not to develope this.

 

Justice please delete this topic maybe is better for me dont share my ideas. some people cames to topics blame :/ im sorry about the topic i've created who only come "spammers" helping the topic close.

 

 

we have good coders here mxc dont need bad coders like me.

 

B1gB0ss, Matim, Cobra, Rizel, Hnoke, Dominique are great coders and i love them <3

 

for the blamers one day i will code better than you really your blame will make me stronger and with my ideas i will do better things as you low brain's

Posted

very nice idea i can help you finish it if you like. But you have done a pretty vig mistake in the configs :

 

+	public static int MUSIC1;
+	public static int MUSIC2;
+	public static int MUSIC3;
+	public static int MUSIC4;
+	public static int MUSIC5;
+	public static int MUSIC6;
+	public static int MUSIC7;
+	public static int MUSIC8;
+	public static int MUSIC9;
+	public static int MUSIC10;

+	public static int MUSICNAME1 ;
+	public static int MUSICNAME2 ;
+	public static int MUSICNAME3 ;
+	public static int MUSICNAME4 ;
+	public static int MUSICNAME5 ;
+	public static int MUSICNAME6 ;
+	public static int MUSICNAME7 ;
+	public static int MUSICNAME8 ;
+	public static int MUSICNAME9 ;
+	public static int MUSICNAME10 ;

+					MUSIC1 = Integer.parseInt(L2JModSettings.getProperty("Music1", "seanpaul"));
+					MUSIC2 = Integer.parseInt(L2JModSettings.getProperty("Music2", "fingers"));
+					MUSIC3 = Integer.parseInt(L2JModSettings.getProperty("Music3", "labouche"));
+					MUSIC4 = Integer.parseInt(L2JModSettings.getProperty("Music4", "maxamilion"));
+					MUSIC5 = Integer.parseInt(L2JModSettings.getProperty("Music5", "rednex"));
+					MUSIC6 = Integer.parseInt(L2JModSettings.getProperty("Music6", "hedboys"));
+					MUSIC7 = Integer.parseInt(L2JModSettings.getProperty("Music7", "mpeople"));
+					MUSIC8 = Integer.parseInt(L2JModSettings.getProperty("Music8", "mcscar"));
+					MUSIC9 = Integer.parseInt(L2JModSettings.getProperty("Music9", "hardtobeat"));
+					MUSIC10 = Integer.parseInt(L2JModSettings.getProperty("Music10", "blink182"));

+					MUSICNAME1 = Integer.parseInt(L2JModSettings.getProperty("Musicname1", "Sean Paul - Got 2 Luv U Ft. Alexis Jordan"));
+					MUSICNAME2 = Integer.parseInt(L2JModSettings.getProperty("Musicname2", "20 Fingers feat. Roula - Lick It"));
+					MUSICNAME3 = Integer.parseInt(L2JModSettings.getProperty("Musicname3", "La Bouche - Be My Love"));
+					MUSICNAME4 = Integer.parseInt(L2JModSettings.getProperty("Musicname4", "Max-A-Million - Hey Fat Boy"));
+					MUSICNAME5 = Integer.parseInt(L2JModSettings.getProperty("Musicname5", "Rednex - Cotton Eye Joe"));
+					MUSICNAME6 = Integer.parseInt(L2JModSettings.getProperty("Musicname6", "Hed Boys - Girls & Boys"));
+					MUSICNAME7 = Integer.parseInt(L2JModSettings.getProperty("Musicname7", "M People - Open Your Heart"));
+					MUSICNAME8 = Integer.parseInt(L2JModSettings.getProperty("Musicname8", "M.C. Sar & The Real McCoy - Run Away"));
+					MUSICNAME9 = Integer.parseInt(L2JModSettings.getProperty("Musicname9", "Hard To Beat (Axwell Remix)-Hard-Fi"));
+					MUSICNAME10 = Integer.parseInt(L2JModSettings.getProperty("Musicname10", "Blink-182 - All The Small Things "));

 

those must be String types not int ones

:)

anyway if you want we can finish it together

Posted

very nice idea i can help you finish it if you like. But you have done a pretty vig mistake in the configs :

 

+	public static int MUSIC1;
+	public static int MUSIC2;
+	public static int MUSIC3;
+	public static int MUSIC4;
+	public static int MUSIC5;
+	public static int MUSIC6;
+	public static int MUSIC7;
+	public static int MUSIC8;
+	public static int MUSIC9;
+	public static int MUSIC10;

+	public static int MUSICNAME1 ;
+	public static int MUSICNAME2 ;
+	public static int MUSICNAME3 ;
+	public static int MUSICNAME4 ;
+	public static int MUSICNAME5 ;
+	public static int MUSICNAME6 ;
+	public static int MUSICNAME7 ;
+	public static int MUSICNAME8 ;
+	public static int MUSICNAME9 ;
+	public static int MUSICNAME10 ;

+					MUSIC1 = Integer.parseInt(L2JModSettings.getProperty("Music1", "seanpaul"));
+					MUSIC2 = Integer.parseInt(L2JModSettings.getProperty("Music2", "fingers"));
+					MUSIC3 = Integer.parseInt(L2JModSettings.getProperty("Music3", "labouche"));
+					MUSIC4 = Integer.parseInt(L2JModSettings.getProperty("Music4", "maxamilion"));
+					MUSIC5 = Integer.parseInt(L2JModSettings.getProperty("Music5", "rednex"));
+					MUSIC6 = Integer.parseInt(L2JModSettings.getProperty("Music6", "hedboys"));
+					MUSIC7 = Integer.parseInt(L2JModSettings.getProperty("Music7", "mpeople"));
+					MUSIC8 = Integer.parseInt(L2JModSettings.getProperty("Music8", "mcscar"));
+					MUSIC9 = Integer.parseInt(L2JModSettings.getProperty("Music9", "hardtobeat"));
+					MUSIC10 = Integer.parseInt(L2JModSettings.getProperty("Music10", "blink182"));

+					MUSICNAME1 = Integer.parseInt(L2JModSettings.getProperty("Musicname1", "Sean Paul - Got 2 Luv U Ft. Alexis Jordan"));
+					MUSICNAME2 = Integer.parseInt(L2JModSettings.getProperty("Musicname2", "20 Fingers feat. Roula - Lick It"));
+					MUSICNAME3 = Integer.parseInt(L2JModSettings.getProperty("Musicname3", "La Bouche - Be My Love"));
+					MUSICNAME4 = Integer.parseInt(L2JModSettings.getProperty("Musicname4", "Max-A-Million - Hey Fat Boy"));
+					MUSICNAME5 = Integer.parseInt(L2JModSettings.getProperty("Musicname5", "Rednex - Cotton Eye Joe"));
+					MUSICNAME6 = Integer.parseInt(L2JModSettings.getProperty("Musicname6", "Hed Boys - Girls & Boys"));
+					MUSICNAME7 = Integer.parseInt(L2JModSettings.getProperty("Musicname7", "M People - Open Your Heart"));
+					MUSICNAME8 = Integer.parseInt(L2JModSettings.getProperty("Musicname8", "M.C. Sar & The Real McCoy - Run Away"));
+					MUSICNAME9 = Integer.parseInt(L2JModSettings.getProperty("Musicname9", "Hard To Beat (Axwell Remix)-Hard-Fi"));
+					MUSICNAME10 = Integer.parseInt(L2JModSettings.getProperty("Musicname10", "Blink-182 - All The Small Things "));

 

those must be String types not int ones

:)

anyway if you want we can finish it together

 

instead of fixing those configs just remove them they are useless space takers ;)

Posted

You could create little XML parser and get info about music's from XML file, it could be much easier to handle for person which want to add much more sounds, instead of creating XX Configs

Posted

You could create little XML parser and get info about music's from XML file, it could be much easier to handle for person which want to add much more sounds, instead of creating XX Configs

 

Indeed but More sounds = more MB's at the patch.. Witch is totally useless when we have www.winamp.com :D

Posted

Indeed but More sounds = more MB's at the patch.. Witch is totally useless when we have www.winamp.com :D

 

yep, big patchs for a server is not good u.u  if you have to update music like once a week how much is gonna be your patch? in 4 months? :D

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...