Jump to content

Recommended Posts

Posted

Hello. As usual I share nothing amazing. This patch allows you to transform all clan members(if clan has aden castle) to npc.

 

Index: java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java	(revision 5)
+++ java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java	(working copy)
@@ -24,6 +24,7 @@
import net.sf.l2j.gameserver.datatables.MapRegionTable;
import net.sf.l2j.gameserver.datatables.SkillTable;
import net.sf.l2j.gameserver.datatables.SkillTable.FrequentSkill;
+import net.sf.l2j.gameserver.instancemanager.CastleManager;
import net.sf.l2j.gameserver.instancemanager.ClanHallManager;
import net.sf.l2j.gameserver.instancemanager.CoupleManager;
import net.sf.l2j.gameserver.instancemanager.DimensionalRiftManager;
@@ -35,6 +36,7 @@
import net.sf.l2j.gameserver.model.L2World;
import net.sf.l2j.gameserver.model.actor.L2Character;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+import net.sf.l2j.gameserver.model.entity.Castle;
import net.sf.l2j.gameserver.model.entity.ClanHall;
import net.sf.l2j.gameserver.model.entity.Couple;
import net.sf.l2j.gameserver.model.entity.Siege;
@@ -114,6 +116,17 @@

		if (activeChar.getClan() != null)
		{
+			L2Clan clan = activeChar.getClan();
+			Castle castle = CastleManager.getInstance().getCastleByOwner(clan);
+			if (Config.ALLOW_ADEN_TRANFORM && (castle != null) && (castle == CastleManager.getInstance().getCastleById(5)))
+			{
+				String aden_transform_id = Config.TRANSFORM_NPC_ADEN;
+				activeChar.getPoly().setPolyInfo("npc", aden_transform_id);
+				activeChar.teleToLocation(activeChar.getX(), activeChar.getY(), activeChar.getZ(), false);				
+				activeChar.sendMessage("The castle of Aden Belongs to your clan");				
+				activeChar.sendMessage("You have been transformed to "+Config.TRANSFORM_NPC_ADEN_NAME+".");
+				activeChar.broadcastUserInfo();
+			}
			activeChar.sendPacket(new PledgeSkillList(activeChar.getClan()));
			notifyClanMembers(activeChar);
			notifySponsorOrApprentice(activeChar);

Index: config/ByLeki.properties
===================================================================
--- config/ByLeki.properties	(revision 6)
+++ config/ByLeki.properties	(working copy)
@@ -26,4 +26,17 @@
PKCleanItemID = 4037

#PK Cleaning price
-PKCleanPrice = 1
+PKCleanPrice = 1
+
+########################################
+# Allow clan members tranformation if 
+# it has Aden Castle?
+########################################
+#Default: False
+EnableTransformAden = False
+
+#NPC id of transformation
+TransformAdenNPCID = 12564
+
+#NPC name
+TransformAdenNPCName = Sin Eater
\ No newline at end of file
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java	(revision 6)
+++ java/net/sf/l2j/Config.java	(working copy)
@@ -505,7 +505,10 @@
	public static boolean SEVEN_SIGNS_MSG;		
	public static boolean GM_STARTUP_HASTE;		
	public static int PK_CLEAN_ID;	
-	public static int PK_CLEAN_PRICE;		
+	public static int PK_CLEAN_PRICE;
+	public static boolean ALLOW_ADEN_TRANFORM;		
+	public static String  TRANSFORM_NPC_ADEN;
+    public static String  TRANSFORM_NPC_ADEN_NAME;
	// --------------------------------------------------------
	// Rates
	// --------------------------------------------------------
@@ -1305,7 +1308,10 @@
				SEVEN_SIGNS_MSG = Boolean.parseBoolean(byleki.getProperty("Allow7SignsMsg", "True"));
				GM_STARTUP_HASTE = Boolean.parseBoolean(byleki.getProperty("StartupGMHaste", "True"));	
				PK_CLEAN_ID = Integer.parseInt(byleki.getProperty("PKCleanItemID", "4037"));
-				PK_CLEAN_PRICE = Integer.parseInt(byleki.getProperty("PKCleanPrice", "1"));						
+				PK_CLEAN_PRICE = Integer.parseInt(byleki.getProperty("PKCleanPrice", "1"));
+				ALLOW_ADEN_TRANFORM = Boolean.parseBoolean(byleki.getProperty("EnableTransformAden", "False"));
+				TRANSFORM_NPC_ADEN = byleki.getProperty("TransformAdenNPCID", "12564");
+				TRANSFORM_NPC_ADEN_NAME = byleki.getProperty("TransformAdenNPCName", "Sin Eater");			
			}
			catch (Exception e)
			{

 

waiting for feedback.

Credits to me

  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...