Jump to content

Recommended Posts

Posted

ok i wrote a little voice command that shows the online players to the one that calls it

 

Curent ver: Kamael:Hellbound or ct1.5 :P

 

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


import net.sf.l2j.gameserver.model.L2World;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.network.SystemMessageId;
import net.sf.l2j.gameserver.serverpackets.SystemMessage;
import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;

/**
*
* @author Ombladon
*
* this class...
* shows the amount of online players to any1 who calls it.
*/
public class OnlinePlayers implements IVoicedCommandHandler
{


private static final String[] VOICED_COMMANDS = {"online"};

public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
{
if (command.startsWith("online"))
{
showPlayers(activeChar, target);
}

return true;

}



public String[] getVoicedCommandList()
{
return VOICED_COMMANDS;
}


public void showPlayers (L2PcInstance player, String target)

{
SystemMessage sm = new SystemMessage(SystemMessageId.S1);
sm = new SystemMessage(SystemMessageId.S1);
sm.addString("======<Online Players>======");
player.sendPacket(sm);
sm = new SystemMessage(SystemMessageId.S1);
sm.addString("There are "+L2World.getInstance().getAllPlayers().size()+" players on.");
player.sendPacket(sm);

sm = new SystemMessage(SystemMessageId.S1);
sm.addString("=======================");
player.sendPacket(sm);
}


}

Cheerz,

¤!¦•[†OmbladoN†]•¦!¤

Posted

lol just put that file in : net.sf.l2j.gameserver.handler.voicedcommandhandlers

 

and register it in net.sf.l2j.gameserver.GameServer.java

using this code:

Index: D:/L2J/workspace/Hellbound/java/net/sf/l2j/gameserver/GameServer.java
===================================================================
--- D:/L2J/workspace/Hellbound/java/net/sf/l2j/gameserver/GameServer.java	(revision 2048)
+++ D:/L2J/workspace/Hellbound/java/net/sf/l2j/gameserver/GameServer.java	(working copy)
@@ -204,6 +204,7 @@
import net.sf.l2j.gameserver.handler.usercommandhandlers.PartyInfo;
import net.sf.l2j.gameserver.handler.usercommandhandlers.Time;
import net.sf.l2j.gameserver.handler.voicedcommandhandlers.Banking;
+import net.sf.l2j.gameserver.handler.voicedcommandhandlers.OnlinePlayers;
import net.sf.l2j.gameserver.handler.voicedcommandhandlers.Wedding;
import net.sf.l2j.gameserver.handler.voicedcommandhandlers.stats;
import net.sf.l2j.gameserver.idfactory.IdFactory;
@@ -631,6 +632,7 @@
		_voicedCommandHandler = VoicedCommandHandler.getInstance();
		_voicedCommandHandler.registerVoicedCommandHandler(new stats());

+		_voicedCommandHandler.registerVoicedCommandHandler(new OnlinePlayers());
		if(Config.L2JMOD_ALLOW_WEDDING)
			_voicedCommandHandler.registerVoicedCommandHandler(new Wedding());

 

 

  • 2 weeks later...
Posted

Tony Montana

 

When you Check Out L2j Free have it command .bank .online and .wedding....

 

You need sources files to complete and create a new java file. u have only server compile you cant.

  • 6 months later...
  • 9 months later...
  • 5 months later...
Guest
This topic is now closed to further replies.


  • Posts

    • Hi I would like to buy your panel, please reach me out from discord: doncarlo thanks in advance 🙂
    • Hi,   I am looking for experienced L2J developer who can handle Java work – systems, shops, buffer, custom features and client-side edits. Paid work. If you are interested, contact me: Discord: doncarlo
    • Hi all, I am looking for very experienced L2J developer to join and help with my Lineage 2 Interlude project (server launching soon). What I need: Build and manage shop system (manager shops) Buffer service, GM shop, custom services Good understanding of server-side (L2J) and also client-side edits Clean, stable and professional work (no random fixes) Important: Must have real experience with L2J / Interlude Must understand how to properly structure systems, not just copy-paste This is paid work, I respect your time and effort. If you are serious and experienced, contact me on Discord: doncarlo Thanks.    
    • Hey, I went through your NimeraCP and honestly, it looks really solid. Instantly bought for my server! Compared to most L2 panels, this is on a completely different level — the UI is clean, modern, and doesn’t feel like some 15-year-old system. I really like how everything is in one place — shop, referrals, rewards, roll & lucky wheel. The automation and real-time features (If you ask Splicho nicely, hahaha) are a big win too, since most panels are missing that. Overall though, great job. It feels like a next-gen panel, not just another copy. Definitely has the potential to be one of the top solutions in the L2 scene.
    • Helloo i was wonder if in interlude there is a way to increase font ui size ?  becouse sometimes when i put the game in full screen all the bars buff inventory etc are very  small  and i dont see very good .. , some one know if i can edit something in system?
  • 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..