Jump to content

[Share] Music Player in Lineage


`Rοmeο

Recommended Posts

Hello there !

In order to make the l2 world better I have decide to make an music player.  :o

When you type .playsound1 you will listen an music ;D

47634797.jpg

I have been pick up the song of Akon feat PitBull - Shut it Down but you can rename it and put another one :)

You can also add more songs just rename the file from PlaySong1.java to any number that you whant :)

In order to change the song folow this guide ~> http://www.maxcheaters.com/forum/index.php?topic=2963.0

 

Go at net.sf.l2j.gameserver.handler.voicedcommandhandlers and create new file named PlaySong1.java

then paste the code there

package net.sf.l2j.gameserver.handler.voicedcommandhandlers;

import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.serverpackets.PlaySound;

/**
* @author SkyLancer
*/
public class PlaySong1 implements IVoicedCommandHandler
{
private static final String[] VOICED_COMMANDS = {"playsong1"};

public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
{
	if (command.equalsIgnoreCase("playsong1"))
	{
		    PlaySound _snd = new PlaySound(1, "song01", 0, 0, 0, 0, 0);
		    activeChar.sendPacket(_snd);
		    activeChar.sendMessage("Now Playing - Pitbull Feat. Akon - Shut it down");
               activeChar.broadcastUserInfo();
	}
	return false;
	}
public String[] getVoicedCommandList()
{
	return VOICED_COMMANDS;
}
}

In order to feel the rhythm you must download the song from ~> http://www.4shared.com/file/141795922/15812bc7/music.html

 

Then just paste it in your game folder and VOALA you are listening a music in l2 ;D

Have fun with mine code dudes :)

 

Link to comment
Share on other sites

so if I continue make this little but awesome scripts I will not earn a karma ? :(

or this is just your factor for giving karma points ?

Link to comment
Share on other sites

actually its pretty useless its just a sendmessage

in my opinion the code is "ok" the 50post hide is useless the idea is nice

Link to comment
Share on other sites

hehe Intrepid like one of mine ideas :)

that mean alot for me ;)

 

so you mean that I must stop hiding the post ?

Link to comment
Share on other sites

hehe Intrepid like one of mine ideas :)

that mean alot for me ;)

 

so you mean that I must stop hiding the post ?

 

post hide is for things that special and harder to make

your share is 1 sendmessage :)

Link to comment
Share on other sites

my friend sorri about my noob Question but how i make a file in directory that you give? i trye to create 1 but it create it at net.sf.l2j.gameserver.handler  and not inside  net.sf.l2j.gameserver.handler.VoicedCommandHandler plz some help!!!

Link to comment
Share on other sites

my friend sorri about my noob Question but how i make a file in directory that you give? i trye to create 1 but it create it at net.sf.l2j.gameserver.handler  and not inside  net.sf.l2j.gameserver.handler.VoicedCommandHandler plz some help!!!

 

hmmmm?your chronicle?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.



  • Posts

    • This is my first and last topic created on a Lineage Forum, because if there's one thing that causes headaches for a lot of people, it's the critical error, that's why I decided to share it...   I'm creating a server again and before starting configurations I started collecting dozens of customs, without realizing my system folder had 950MB of files, so I started to enter the game, every 1 to 2 hours my client was reaching the maximum limit of virtual memory of the game due to the absurd amount of customs inside the system folder, reaching the maximum limit of 2047MB virtual ram, automatically we get critical, regardless of the error that appears on your screen, "THE WORDS ARE IRRELEVANT, unless it is a critical error before the ram memory limit reaches its limit", if you are seeing "2047 MB", it means that the game's virtual memory has reached its limit, and this memory is not configurable due to the game being created on 32-bit architecture, so I significantly reduced the amount of customs within the system from 950MB to 625MB, so my client started to reach the maximum memory limit every 10 to 12h, a huge progress, but my goal was at least 24h before reaching the virtual memory limit (playing frantically), so I reduced the system's custom files from 625MB to 267MB, the result was a first virtual memory limit critical error appearing after 41h.   My client is H5, the only types of customs I added to the game were focused only on equipment, one of the main causes were these skins and cloaks, they consume a huge amount of MB's within the "system", the problem is not adding customs to the client, the problem is adapting a custom and adding it inside the system folder, the system folder was not created with the intention of storing a huge amount of files.   Adding customs to the system folder means significantly reducing the time your client can remain open before reaching the virtual ram limit and make no mistake, there are hundreds of different critical errors with a small summary of the cause of the error, but if the critical table shows 2047MB of RAM, the problem is only 1. Example: I can see 3, 5, 9 critical error with different messages, but if this table is showing 2047MB ram, the reason was the virtual memory limit, an important detail is that this 2047MB ram is not a "fixed message or information from your computer", this 2047MB only appear when the cause is the virtual ram limit, it means that when you get a critical error with random numbers of ram memory appearing, such as 358MB ram, 715MB ram, it means that the cause of this error has no connection with ram virtual memory.
    • DISCORD : utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products  https://discord.gg/hoodservices https://campsite.bio/utchihaamkt
    • hello i want add freya weapons on l2jacis someone can help;
  • Topics

×
×
  • Create New...