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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • ## [1.5.5] - 2026-02-02   ### ✨ New Features - **Discord Login**: You can now sign in with your Discord account. Admins enable and configure Discord login in **cpadmin → Users** (Discord auth settings: Client ID, Client Secret, Redirect URI). If you already have an account with the same email (e.g. forum, Google, or legacy), signing in with Discord links to that account so you keep one profile. Discord login is available on Add Server, My Servers, Vote page, and Premium Ads booking. - **Setup Links**: In **cpadmin → Users**, both Google and Discord login settings now include direct links to their official developer portals (Google Cloud Console and Discord Developer Portal) for easier OAuth app setup.   ### 🔒 Security - **Email Required for Registration**: New user registration via OAuth (Forum, Google, Discord) now requires a valid email address. If the OAuth provider doesn't provide an email (e.g. unverified Discord email), registration is rejected with a clear message. This prevents anonymous accounts and ensures all users can receive important notifications.   ### 🔄 Improvements - **User Auth Badges**: In **cpadmin → Users**, the Registered Members table now shows auth method badges: **Forum**, **Google**, **Discord**, or **Legacy**. Users can have multiple badges if they've linked multiple login methods. - **Server Info Labels**: Translated server info labels (Owner Name, Language, Server Location) are now properly localized in all 5 languages (English, Spanish, Portuguese, Greek, Russian).   ---   ## [1.5.4] - 2026-02-01   ### ✨ New Features - **Google Login**: You can now sign in with your Google account. Admins enable and configure Google login in **cpadmin → Users** (Google auth settings: Client ID, Client Secret, Redirect URI). If you already have an account with the same email (e.g. forum or legacy), signing in with Google links to that account so you keep one profile. The login menu (navbar and login prompts) offers **Login with Forum Account**, **Login with Google** (when enabled), and **Create Forum Account**. Google login is available on Add Server, My Servers, Profile Settings, Vote page, and Premium Ads booking. - **Ban/Unban Members**: In **cpadmin → Users**, admins can ban or unban registered members. Banned users see a full-page message: "Sorry, you are banned from using this site." When a user is banned, all their servers are set to inactive. - **Moderator Activity Log**: **cpadmin → Moderators** now records when a moderator or admin enters the CPAdmin panel (e.g. "Moderator X entered CPAdmin panel at &lt;time&gt;") and when they change any cpadmin settings (only write actions are logged; read-only use is not). - **Clear Moderator Logs**: Admins can clear all moderator activity log entries via a **Clear logs** button with confirmation. Logs are shown at 100 per page with pagination. - **Filter by Moderator**: In the Moderator Activity Log, a **Filter by moderator** dropdown lets you view activity for a specific moderator or "All moderators." - **cpadmin → Users Tab**: New **Users** tab in the admin panel with Registered Members list (paginated), Google auth settings card, and per-user Ban/Unban and server links.   ### 🔄 Improvements - **cpadmin → Servers**: Each server name in the servers table is now clickable and opens that server’s info page. - **cpadmin → Users – Servers column**: The servers count/list is clickable and opens a small modal listing that user’s servers; each server name in the modal links to the server info page. - **cpadmin → Users – Search**: A search bar above the Registered Members table lets you search by **username**, **email**, or **server name**. Results are filtered on the server (paginated); clearing the search resets the list. - **Moderator Activity Log**: Pagination shows "Showing X–Y of Z" and "Page N of M" with Previous/Next when there are more than 100 entries. - **Login UI**: Login options (Forum, Google, Create account) are shown in a consistent dropdown and in modals (Add Server, My Servers, Vote, Premium Ads) for a clearer sign-in experience. - **Vote Page – Unauthenticated**: When you must log in to vote, the page now shows "Vote for [Server Name]" as the main heading and presents login options in a compact section.   ---   ## [1.5.3] - 2026-01-30   ### ✨ New Features - **File Logs in Admin Panel**: Admins can now view CodeIgniter PHP logs (api/writable/logs) directly in **cpadmin → Logs**. Select a date to view the log file, refresh to reload, or delete all log files to free up space.   ### 🔄 Improvements - **Cache System**: Full cache audit and improvements — when you clear cache in cpadmin, both backend and frontend caches are cleared. Server listings, My Servers, pricing, ad config, and chronicles all refresh with fresh data. New paid servers now appear in listings and My Servers immediately. - **Admin Panel – Server Rates**: Server rates in the admin servers table now display in compact format (e.g. x10000 → x10k, x100000 → x100k, x1000000 → x1m) for easier scanning. Hover to see the full value.
    • WTB High Five source running on Salvation/Fafurion client
    • MoMoProxy has updated more static residential proxies for USA location, anyone interested in can view: https://momoproxy.com/static-residential-proxies
    • Hello, i am selling a project that was going to open but at the end i have not the time to do it Its a c4 server ( scripts) with all the c5 changes played from Interlude Client    the server is 1:1 copy of the legendary 2007 L2Revenge server with some bits like events and some more sync stuff There is a lot of retail fixes included  , extender is vanganth and has a lot of mods but mostly fixes on the retail stuff.   Test server is available through discord , i offer client/patch/server/sources The price is 300 Euro and for testing the server you have to pm me at discord banshee1019 , dont really wanna let anybody log because some people are "bad"   Once you buy you also have free support for 1 year , that doesnt mean i will code all your ideas but support you if something comes up , and guide you to do simple edits
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..