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

    • This has been happening for years now. That’s exactly why you don’t see many new people joining this forum anymore  most of the community has already moved elsewhere. MaxCheaters has been dying for years, and at this point it feels almost completely dead.  
    • First of all i don't use this account to do anything other than just reported that someone scammed me few bucks 3 days ago.  Second, who says i did scam, my name is ahead many topics because i had the most clients in the forum. Afcourse i had bad deals since 2017.    Also do i even know you? PM me if you have some issue do not write in public as if you are some savior or want maxcheaters owneship. 
    • 🔥 Lin2Web CMS Version 2.0 : New Engine! 🔥                 A fully rebuilt, fast and modern CMS for Lineage 2 servers. ✅ Player panel: game accounts, warehouse, send items to game, HWID/IP protection, unstuck ✅ Donate: 20+ payment systems (PayPal, Stripe, CoinPayments, CryptoCloud, FreeKassa and more) ✅ Services: name/gender change, karma clear, premium, item & skin transfer, starter packs ✅ Bonuses: promo codes, referrals, vote rewards, season, clan leader and streamer rewards ✅ Statistics: PvP/PK, clans, heroes, olympiad, castles, raid & epic bosses ✅ Live map with online players ✅ Events calendar, news, guides, FAQ ✅ Support ticket system ✅ UTM tracking for ads ✅ Full admin panel ✅ Multi-language, multi-server, custom themes   Site cms: Lin2Web.com   🖥 Supported Servers: L2J: Lucera2, L2J-Scripts, aCis, L2J-Eternity, L2JMobius, L2JFrozen, L2JSunrise, L2JHellas, PWSoft, Fandc, L2J Orion, and others PTS: Vanganth, Depmax64 (AdvExt), MyExt64   Telegram Discord
    • 🔥 Fresh batch ready! Buy 2, Get 1 Free deal is live on our shop. Instant delivery 24/7.
    • Dont try trash topic malaka 🙂
  • 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..