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..

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

    • Dear friends, we are pleased to announce great news — we are launching our new bot for purchasing and renting virtual numbers for receiving SMS from any services! Are you tired of reused or resold numbers from other platforms? Try our solution! Our service allows you to receive SMS from any major popular services. The list includes more than 200 services! SMS receiving country: USA (+1). Real physical US numbers are used — never previously used on other platforms! Currently, only short-term rental is available. The rental duration for each phone number is shown when purchasing. The cost of each number is also shown next to the service before purchase. You can also receive an additional SMS for your number for the selected service (no extra charge for receiving one more SMS). To quickly find the service you need, you can use the convenient search — just type the name of the service you need and get a number for activation. Available payment methods: cryptocurrencies, bank cards, and balance transfer from our other bots. Thank you for your trust! Active links: Virtual Number Service: Go Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store through Telegram messenger. Telegram Bot for purchasing Telegram Stars: Go – fast and profitable purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing goods and services from our platform: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, Bot) during October! You can also use the promo code for your first purchase: SOCNET (15% discount) 2. Get $1 credited to your store balance or a 10–20% discount — simply post your username after registration on our website using the following format: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3. Get $1 for your first SMM Panel trial — just open a ticket titled “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Dear friends, we are pleased to announce great news — we are launching our new bot for purchasing and renting virtual numbers for receiving SMS from any services! Are you tired of reused or resold numbers from other platforms? Try our solution! Our service allows you to receive SMS from any major popular services. The list includes more than 200 services! SMS receiving country: USA (+1). Real physical US numbers are used — never previously used on other platforms! Currently, only short-term rental is available. The rental duration for each phone number is shown when purchasing. The cost of each number is also shown next to the service before purchase. You can also receive an additional SMS for your number for the selected service (no extra charge for receiving one more SMS). To quickly find the service you need, you can use the convenient search — just type the name of the service you need and get a number for activation. Available payment methods: cryptocurrencies, bank cards, and balance transfer from our other bots. Thank you for your trust! Active links: Virtual Number Service: Go Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store through Telegram messenger. Telegram Bot for purchasing Telegram Stars: Go – fast and profitable purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing goods and services from our platform: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, Bot) during October! You can also use the promo code for your first purchase: SOCNET (15% discount) 2. Get $1 credited to your store balance or a 10–20% discount — simply post your username after registration on our website using the following format: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3. Get $1 for your first SMM Panel trial — just open a ticket titled “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Dear friends, we are pleased to announce great news — we are launching our new bot for purchasing and renting virtual numbers for receiving SMS from any services! Are you tired of reused or resold numbers from other platforms? Try our solution! Our service allows you to receive SMS from any major popular services. The list includes more than 200 services! SMS receiving country: USA (+1). Real physical US numbers are used — never previously used on other platforms! Currently, only short-term rental is available. The rental duration for each phone number is shown when purchasing. The cost of each number is also shown next to the service before purchase. You can also receive an additional SMS for your number for the selected service (no extra charge for receiving one more SMS). To quickly find the service you need, you can use the convenient search — just type the name of the service you need and get a number for activation. Available payment methods: cryptocurrencies, bank cards, and balance transfer from our other bots. Thank you for your trust! Active links: Virtual Number Service: Go Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store through Telegram messenger. Telegram Bot for purchasing Telegram Stars: Go – fast and profitable purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing goods and services from our platform: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, Bot) during October! You can also use the promo code for your first purchase: SOCNET (15% discount) 2. Get $1 credited to your store balance or a 10–20% discount — simply post your username after registration on our website using the following format: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3. Get $1 for your first SMM Panel trial — just open a ticket titled “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Dear friends, we are pleased to announce great news — we are launching our new bot for purchasing and renting virtual numbers for receiving SMS from any services! Are you tired of reused or resold numbers from other platforms? Try our solution! Our service allows you to receive SMS from any major popular services. The list includes more than 200 services! SMS receiving country: USA (+1). Real physical US numbers are used — never previously used on other platforms! Currently, only short-term rental is available. The rental duration for each phone number is shown when purchasing. The cost of each number is also shown next to the service before purchase. You can also receive an additional SMS for your number for the selected service (no extra charge for receiving one more SMS). To quickly find the service you need, you can use the convenient search — just type the name of the service you need and get a number for activation. Available payment methods: cryptocurrencies, bank cards, and balance transfer from our other bots. Thank you for your trust! Active links: Virtual Number Service: Go Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store through Telegram messenger. Telegram Bot for purchasing Telegram Stars: Go – fast and profitable purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing goods and services from our platform: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, Bot) during October! You can also use the promo code for your first purchase: SOCNET (15% discount) 2. Get $1 credited to your store balance or a 10–20% discount — simply post your username after registration on our website using the following format: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3. Get $1 for your first SMM Panel trial — just open a ticket titled “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Dear friends, we are pleased to announce great news — we are launching our new bot for purchasing and renting virtual numbers for receiving SMS from any services! Are you tired of reused or resold numbers from other platforms? Try our solution! Our service allows you to receive SMS from any major popular services. The list includes more than 200 services! SMS receiving country: USA (+1). Real physical US numbers are used — never previously used on other platforms! Currently, only short-term rental is available. The rental duration for each phone number is shown when purchasing. The cost of each number is also shown next to the service before purchase. You can also receive an additional SMS for your number for the selected service (no extra charge for receiving one more SMS). To quickly find the service you need, you can use the convenient search — just type the name of the service you need and get a number for activation. Available payment methods: cryptocurrencies, bank cards, and balance transfer from our other bots. Thank you for your trust! Active links: Virtual Number Service: Go Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store through Telegram messenger. Telegram Bot for purchasing Telegram Stars: Go – fast and profitable purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing goods and services from our platform: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, Bot) during October! You can also use the promo code for your first purchase: SOCNET (15% discount) 2. Get $1 credited to your store balance or a 10–20% discount — simply post your username after registration on our website using the following format: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3. Get $1 for your first SMM Panel trial — just open a ticket titled “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock