Jump to content

Recommended Posts

Posted

ohai , today I made 2 codes for l2jesios project.

 

1) Simple Killing Spree System

2) .whoami command, informations about yourself.

 

- .whoami command

 

### Eclipse Workspace Patch 1.0
#P l2jesios_gameserver
Index: java/net/sf/l2j/gameserver/handler/VoicedCommandHandler.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/VoicedCommandHandler.java	(revision 55)
+++ java/net/sf/l2j/gameserver/handler/VoicedCommandHandler.java	(working copy)
@@ -67,6 +67,8 @@

		if(Config.ALLOW_VIEW_DETAILS)
		registerVoicedCommandHandler(new ViewDetails());
+		
+		registerVoicedCommandHandler(new WhoAmI());
	}

	public void registerVoicedCommandHandler(IVoicedCommandHandler handler)
Index: java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/WhoAmI.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/WhoAmI.java	(revision 0)
+++ java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/WhoAmI.java	(working copy)
@@ -0,0 +1,115 @@
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+package net.sf.l2j.gameserver.handler.voicedcommandhandlers;
+
+import javolution.text.TextBuilder;
+import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
+import net.sf.l2j.gameserver.model.L2World;
+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
+
+/**
+ *
+ * @author Ravage
+ */
+
+public class WhoAmI implements IVoicedCommandHandler
+{
+	private static final String[] VOICED_COMMANDS = { "whoami" };
+
+	@Override
+	public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
+	{
+		if (command.equals("whoami"))
+		{
+			TextBuilder tb = new TextBuilder();
+			NpcHtmlMessage html = new NpcHtmlMessage(1);
+			               				        
+			tb.append("<html><head><title>Who Am I ?</title></head>");
+		        tb.append("<body>");      
+			tb.append("<center>");
+			tb.append("<table width=\"250\" cellpadding=\"5\" bgcolor=\"000000\">");
+			tb.append("<tr>");
+			tb.append("<td width=\"45\" valign=\"top\" align=\"center\"><img src=\"L2ui_ch3.menubutton4\" width=\"38\" height=\"38\"></td>");
+		        tb.append("<br>");
+			tb.append("<td valign=\"top\"><font color=\"FF6600\">Personal Informations</font>");
+			tb.append("<br>");
+			tb.append("<br1><font color=\"00FF00\">"+activeChar.getName()+"</font>, read this to know some things about your self.</td></tr></table></center>");
+			tb.append("<br>");
+			tb.append("<font color=\"FFAA00\">Your account's username is :</font>"+activeChar.getAccountName());
+			tb.append("<br>");
+			tb.append("<font color=\"FFAA00\">Your character's name is :</font>"+activeChar.getName());
+			tb.append("<br>");
+			tb.append("<font color=\"FFAA00\">Your character's title is :</font>"+activeChar.getTitle());
+			tb.append("<br>");
+			tb.append("<font color=\"FFAA00\">Your adena's count is :</font>"+activeChar.getAdena());
+			tb.append("<br>");
+			tb.append("<font color=\"FFAA00\">Your clan's name is :</font>"+activeChar.getClan());
+			tb.append("<br>");
+			tb.append("<font color=\"FFAA00\">Your current CP is :</font>"+activeChar.getCurrentCp());
+			tb.append("<br>");
+			tb.append("<font color=\"FFAA00\">Your current HP is :</font>"+activeChar.getCurrentHp());
+			tb.append("<br>");
+			tb.append("<font color=\"FFAA00\">Your current MP is :</font>"+activeChar.getCurrentMp());
+			tb.append("<br>");
+			tb.append("<font color=\"FFAA00\">Your death penalty's level is :</font>"+activeChar.getDeathPenaltyBuffLevel());
+			tb.append("<br>");
+			tb.append("<font color=\"FFAA00\">Your karma total is :</font>"+activeChar.getKarma());
+			tb.append("<br>");
+			tb.append("<font color=\"FFAA00\">Your level is :</font>"+activeChar.getLevel());
+			tb.append("<br>");
+			tb.append("<font color=\"FFAA00\">Your max CP is :</font>"+activeChar.getMaxCp());
+			tb.append("<br>");
+			tb.append("<font color=\"FFAA00\">Your max MP is :</font>"+activeChar.getMaxMp());
+			tb.append("<br>");
+			tb.append("<font color=\"FFAA00\">Your max HP is :</font>"+activeChar.getMaxHp());
+			tb.append("<br>");
+			tb.append("<font color=\"FFAA00\">Your pk kills are :</font>"+activeChar.getPkKills());
+			tb.append("<br>");
+			tb.append("<font color=\"FFAA00\">Your pvp kills are :</font>"+activeChar.getPvpKills());
+			tb.append("<br>");
+			tb.append("<font color=\"FFAA00\">Your recommends are :</font>"+activeChar.getRecomHave());
+			tb.append("<br>");
+			tb.append("<font color=\"FFAA00\">Your total subclasses are :</font>"+activeChar.getTotalSubClasses());
+			tb.append("<br>");
+			tb.append("<br>");
+			
+                      int playersOnline = L2World.getInstance().getAllPlayersCount();
+			
+			if (playersOnline == 1)
+				tb.append("<font color=\"FF0000\">Server has </font>" + playersOnline + "<font color=\"FF0000\">player online!</font>");
+			else
+				tb.append("<font color=\"FF0000\">Server has </font>" + playersOnline + "<font color=\"FF0000\">players online!</font>");
+			
+			tb.append("<br>");
+			tb.append("</center>");
+			tb.append("</body></html>");
+			
+			html.setHtml(tb.toString());
+			activeChar.sendPacket(html);
+		}
+		
+		return true;
+}
+
+      @Override
+	public String[] getVoicedCommandList()
+    {
+	    return VOICED_COMMANDS;
+    }
+}
\ No newline at end of file

 

- Killing Spree

 

### Eclipse Workspace Patch 1.0
#P l2jesios_gameserver
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java	(revision 55)
+++ java/net/sf/l2j/Config.java	(working copy)
@@ -216,6 +216,7 @@
     public static String PVP_CHAT_PREFIX;
     public static int PVP_AMOUNT_FOR_CHAT;
     public static boolean ALLOW_VIEW_DETAILS;
+    public static boolean ENABLE_KILLING_SPREE;

	// --------------------------------------------------
	// Events settings
@@ -1443,7 +1444,7 @@
				                PVP_CHAT_PREFIX = esios.getProperty("PvpChatPrefix", "-");
				                
				                ALLOW_VIEW_DETAILS = Boolean.parseBoolean(esios.getProperty("AllowViewDetails", "True"));
-				                
+				                ENABLE_KILLING_SPREE = Boolean.parseBoolean(esios.getProperty("EnableKillingSpree", "True"));
						}
						catch (Exception e)
						{
Index: config/esios.properties
===================================================================
--- config/esios.properties	(revision 55)
+++ config/esios.properties	(working copy)
@@ -223,3 +223,6 @@
#        ViewDetailsVoicedCommand       
#========================================#
AllowViewDetails = True
+
+# Killing Spree System
+EnableKillingSpree = True
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 55)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -38,6 +38,7 @@

import net.sf.l2j.Config;
import net.sf.l2j.L2DatabaseFactory;
+import net.sf.l2j.gameserver.Announcements;
import net.sf.l2j.gameserver.GameTimeController;
import net.sf.l2j.gameserver.GeoData;
import net.sf.l2j.gameserver.ItemsAutoDestroy;
@@ -401,6 +402,9 @@
	        return bastard;
	}

+	// killing spree system.
+	private int killingSpree = 0;
+	
	private boolean _isIn7sDungeon = false;

	private PunishLevel _punishLevel = PunishLevel.NONE;
@@ -4706,11 +4710,40 @@
	/**
	 * Increase the pvp kills count and send the info to the player
	 */
+	@SuppressWarnings("static-access")
	public void increasePvpKills()
	{
		// Add karma to attacker and increase its PK counter
		setPvpKills(getPvpKills() + 1);

+		if (Config.ENABLE_KILLING_SPREE)
+			{
+			    killingSpree++;
+			}
+			        
+			switch (killingSpree){
+			        
+			case 5 :
+			Announcements.getInstance().announceToAll(getName()+" is dominating!");
+			break;
+			        	
+			case 10 :
+			Announcements.getInstance().announceToAll(getName()+" is on rampage!");
+			break;
+			        	
+			case 15 :	
+			Announcements.getInstance().announceToAll(getName()+" is on a killing spree!");
+			break;
+			       	
+			case 20 :	
+			Announcements.getInstance().announceToAll(getName()+" is unstoppable!");
+			break;
+			       	
+			case 25 :	
+			Announcements.getInstance().announceToAll(getName()+" is on a hilarious kill!");
+			break;      
+		}
+		
		if(Config.PVP_COLOR_ENABLED)
		{
			PvPColorSystem pvpcolor = new PvPColorSystem();

 

Thanks!

Posted

since its for l2jesios why you post it herE? go on l2jesios forum...

Posted

That codes are shared 3742589446 times and dint tell me that u shared them here cuz for others and not for a little fame..

you can't get fame by sharing such codes,even if you want it too much :P

 

locked anyway.

Guest
This topic is now closed to further replies.


  • Posts

    • A widespread proxy service, operating through hijacked devices, has been shut down in a cross-industry effort led by Google. The network, known as IPIDEA, functioned by secretly converting millions of personal devices into proxies for malicious actors. The Mechanism of the Scheme The operation distributed hidden code within seemingly legitimate free apps and VPN services. Once installed, this code enrolled the user’s device into a pool of residential IP addresses. These addresses were then sold anonymously, primarily to cybercriminal and state-sponsored groups, to mask the origin of attacks, fraud, and espionage. Key impacts of the network included: Facilitating operations for more than 550 identified threat actors. Exposing unsuspecting device owners to potential legal and security risks by associating their IP addresses with criminal traffic. The Takedown Strategy Google and its partners disrupted the service by: Seizing core operational domains. Using Google Play Protect to detect and remove malicious applications. Coordinating with infrastructure providers to prevent the network from reestablishing itself. The action highlights the necessity of continuous user awareness, developer diligence in code reviews, and proactive industry cooperation to maintain cybersecurity. Front Companies Associated with IPIDEA IPIDEA masked its activities under various brand names, such as: Proxy Brands: 360 Proxy, 922 Proxy, Luna Proxy, IP2World, ABC Proxy. VPN Brands: Door VPN, Radish VPN, Galleon VPN. SDK Brands: PacketSDK, HexSDK (the toolkits used to embed proxy code).   Choosing Ethical Proxy Services Alternatives For lawful purposes like market research, ad verification, or data aggregation, selecting a transparent and consensual provider is essential. Reputable services obtain explicit user permission for their networks and enforce strict compliance measures. Examples of Established Providers: Bright Data: A leading, consent-based residential proxy network. Oxylabs: Provides large-scale proxy solutions for enterprise needs. MoMoProxy: Maintains a large pool of residential IPs for tasks like web scraping.   Only $850/1TB.  https://momoproxy.com   Identifying a Legitimate Provider: A trustworthy service will typically demonstrate: Informed Consent: Networks are built with the clear agreement of participants. Robust Compliance: Proactive systems to prevent abuse and respect website terms. Operational Transparency: Public-facing policies, identifiable corporate structure, and genuine customer support. Conduct thorough due diligence. Opt for providers that are clear about their IP sources and maintain strong anti-abuse policies, ensuring your legitimate activities do not inadvertently support harmful operations.
    • Lineage 2 Interlude Developer – Cliente + Datapack Hola, soy developer especializado en Lineage 2 Interlude con experiencia tanto en cliente como datapack/core. ✔ Desarrollo datapack (Java, scripts, quests, balance PvP/PvE) ✔ Fixes core / geodata / exploits ✔ Sistemas custom (events, Olympiad, instancias, mods PvP) ✔ Cliente: interface mods, system patches, .dat edits, UI personalizada ✔ Optimización y estabilidad de servidor ✔ Trabajo freelance o colaboración fija Si necesitáis soporte dev o mejoras para vuestro servidor Interlude, podéis contactarme por DM. Portfolio y ejemplos disponibles bajo petición.
    • Lineage 2 Interlude Developer – Cliente + Datapack Hola, soy developer especializado en Lineage 2 Interlude con experiencia tanto en cliente como datapack/core. ✔ Desarrollo datapack (Java, scripts, quests, balance PvP/PvE) ✔ Fixes core / geodata / exploits ✔ Sistemas custom (events, Olympiad, instancias, mods PvP) ✔ Cliente: interface mods, system patches, .dat edits, UI personalizada ✔ Optimización y estabilidad de servidor ✔ Trabajo freelance o colaboración fija Si necesitáis soporte dev o mejoras para vuestro servidor Interlude, podéis contactarme por DM. Portfolio y ejemplos disponibles bajo petición.
  • 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..