Jump to content

Recommended Posts

Posted

Well,hi.What to say?Since i am starting practise with java this is my first code,soon i'll try to make more and better codes...I made it for l2j interlude but with some modifications could be for gracia too.A note:Since i have tested petemezi's code and doesn't work,i did again.I hope you like it :).Just press .online in game and will see how many players are online.

Index: java/net/sf/l2j/gameserver/GameServer.java
===================================================================
--- java/net/sf/l2j/gameserver/GameServer.java	(revision 147)
+++ java/net/sf/l2j/gameserver/GameServer.java	(working copy)
@@ -209,6 +209,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.Online;
import net.sf.l2j.gameserver.handler.voicedcommandhandlers.Wedding;
import net.sf.l2j.gameserver.handler.voicedcommandhandlers.stats;
import net.sf.l2j.gameserver.idfactory.IdFactory;
@@ -625,8 +626,10 @@

		if(Config.BANKING_SYSTEM_ENABLED)
			_voicedCommandHandler.registerVoicedCommandHandler(new Banking());
+		
+		if(Config.ONLINE_PLAYERS) 
+			_voicedCommandHandler.registerVoicedCommandHandler(new Online());

-
		_log.config("VoicedCommandHandler: Loaded " + _voicedCommandHandler.size() + " handlers.");


Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java	(revision 147)
+++ java/net/sf/l2j/Config.java	(working copy)
@@ -963,6 +963,7 @@
    public static boolean 	    ALT_GAME_FLAGED_PLAYER_CAN_USE_GK;
    public static boolean       SHOW_WELCOME_HTML_ON_PLAYER_LOGIN;
    public static int           TRADE_UNITS;
+    public static boolean       ONLINE_PLAYERS;
    /** Custom Project Modifications - End */
    
    /** FloodProtector - Start */
@@ -2069,6 +2070,7 @@
                STARTING_TITLE  = L2JModSettings.getProperty("StartingTitle", "Something"); 
                SHOW_WELCOME_HTML_ON_PLAYER_LOGIN = Boolean.parseBoolean(L2JModSettings.getProperty("ShowWelcomeHtmlOnLogin", "False"));
                TRADE_UNITS                        = Integer.parseInt(L2JModSettings.getProperty("TradeUnits", "250"));
+                ONLINE_PLAYERS = Boolean.parseBoolean(L2JModSettings.getProperty("OnlinePLayers", "False"));
                /** Custom Project Modifications - End */

                
Index: java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Online.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Online.java	(revision 0)
+++ java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Online.java	(revision 0)
@@ -0,0 +1,39 @@
+/* This program is free software; you can redistribute it and/or modify */
+package net.sf.l2j.gameserver.handler.voicedcommandhandlers;
+
+
+import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
+import net.sf.l2j.gameserver.model.L2World;
+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+
+/**
+*
+* @author
+*
+* this class...
+* shows the amount of online players to any1 who calls it.
+*/
+public class Online implements IVoicedCommandHandler
+{
+
+
+private static final String[] VOICED_COMMANDS = { "online" };
+
+public boolean useVoicedCommand(String command, L2PcInstance player, String target)
+{
+if (command.equalsIgnoreCase("online"))
+{
+	player.sendMessage("======<Online Players>======");
+	player.sendMessage("There are "+L2World.getInstance().getAllPlayers().size()+" players online");
+	player.sendMessage("=======================");
+}return true;
+
+}
+
+
+
+public String[] getVoicedCommandList()
+{
+   return VOICED_COMMANDS;
+}
+}
\ No newline at end of file
Index: java/config/l2jmods.properties
===================================================================
--- java/config/l2jmods.properties	(revision 147)
+++ java/config/l2jmods.properties	(working copy)
@@ -289,3 +289,8 @@
# This Will Not Alow The Players To Trade From Too Far
# NOTE: DO NOT PUT 0 !!!
TradeUnits = 250
+
+# Allows user to use .online Command
+# Displays The Number of The Players That are Currently Online.
+# Default : False
+OnlinePLayers = False

Tested And absolutely working.

Ventic

Posted

Simple & easy to create it.

 

Keep working bro ^^

I know.Very easy.But i want to thanks some teachers like Coyote-Krash-MaestroLuke(thanks brothers)

Well nice... Keep practising in java ^^ I want to see you soon promoted :)

ofc.on saturday i will buy book for java.so i can practise more.promoted?what do you mean?to l2jdev?No i don't want this position.I am fine with my gold membership

Posted

I know.Very easy.But i want to thanks some teachers like Coyote-Krash-MaestroLuke(thanks brothers)ofc.on saturday i will buy book for java.so i can practise more.promoted?what do you mean?to l2jdev?No i don't want this position.I am fine with my gold membership

i mean to promote your skills more :)
Posted

Cool share ventic , you learn fast :) thanks for sharing with us

Not really.I need more practise.Btw thanks brother.

Posted

Actually you are not, obviously because of your inactivity. Anyway, this is shared already since 2008.

axaxaxaxaxa inactivity?how do you know that?you have 17 posts and you can tell me that i am inactive.log off plz.

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

    • EspadaWorld Reborn - Lineage 2 High Five Private Server Official Website: https://l2espadaworld.com   GitHub Presentation: https://github.com/worldespada-cloud/EspadaWorld   About EspadaWorld Reborn   EspadaWorld Reborn is a cinematic Lineage 2 High Five private server project built on a customized FandC / L2J-style High Five core. The project is focused on balanced gameplay, PvP competition, PvE progression, custom systems, vote rewards, rankings, protection integration, website features, and long-term stability. EspadaWorld is not a clean stock pack. The server has been extended with custom systems, website integration, vote reward logic, protection-related modules, custom instance content, gameplay improvements, and server-side adjustments. Server Foundation Chronicle: Lineage 2 High Five Base: FandC High Five core, heavily customized Core style: L2J-based server architecture Build system: Apache Ant Java target: Java 25 Database: MySQL Project type: Active development / production server environment Main Features - Custom Lineage 2 High Five server environment - FandC-based core with custom improvements - Custom Community Board systems - Player ranking systems - PvP-focused gameplay logic - PvE progression support - Custom Espada instance and custom gameplay content - Vote reward system with multiple vote website integrations - Unified .getreward command - Website, account, ranking, vote, media, and download integration - Protection module integration - Admin tools and server management systems - Datapack and server packaging scripts Vote Reward System EspadaWorld includes a custom vote reward flow based around the .getreward command. The system verifies votes from all enabled vote websites and gives one unified global reward only after all required votes are confirmed. Current vote integration includes: - iTopZ - HopZone - L2Network - L2JBrasil - L2TopZone - L2Votes Vote system features: - Unified reward after all votes are confirmed - Configurable global reward list - Item amount and chance configuration - Cooldown / reuse protection - HWID / IP-based reward protection - Debug logging for vote verification - Anti-abuse logic for repeated reward claims Protection & Security The project includes protection-related modules and integration points designed to improve server and client-side security. Protection-related areas include: - Runtime protection module integration - Client protection support - Server-side validation systems - Anti-abuse logic around vote rewards and account actions - Configuration-driven security behavior - Release packaging support for protected builds Private protection details, keys, internal configuration, and production security data are not public. Custom Gameplay Content EspadaWorld Reborn includes custom gameplay work designed to give the server its own identity while keeping the Lineage 2 High Five feeling. Examples of custom content and systems: - Custom Espada instance - PvP-oriented systems and zones - PvE progression systems - Ranking and competition systems - Community Board extensions - Custom HTML and datapack content - Gameplay scripts and server-side feature extensions - Vote reward progression Website & Community Platform EspadaWorld also includes a modern web platform connected to the server community. Website features include: - Modern responsive website - Account panel - Download section - Vote section - Ranking pages - Media section - News and information system - Admin-controlled website settings - Theme/template system - SEO optimization - Performance optimization The website has been optimized for speed, accessibility, best practices, and SEO, offering a clean public presentation for the server and community. Useful Links Website: https://l2espadaworld.com   GitHub Presentation: https://github.com/worldespada-cloud/EspadaWorld   EspadaWorld Reborn is a cinematic Lineage 2 High Five private server project built on a customized FandC-based core.
    • Hi,im looking for "stable" mid rate high five l2j files source included,i prefer not clean files but something already used by another server in the past,if you have something intrested and not shared pm me.
    • Hello, We are currently looking for an experienced Lineage 2 High Five client developer for our project EldoriaWorld. At the moment we need help with: High Five client edits Launcher integration Interface/UI improvements Branding changes Textures/icons/loading screens System modifications Client optimization We already have website, launcher setup and server infrastructure prepared. If interested, please message me with: your experience previous projects/work contact details Contact: Telegram: FrankJan Discord: LosBanannos Regards, Frank EldoriaWorld
    • Hi guys, I am interested. Added you on Telegram. Please reply.
  • 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..