EdenEternal Posted July 31, 2012 Share Posted July 31, 2012 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 Quote Link to comment Share on other sites More sharing options...
Vince* Posted July 31, 2012 Share Posted July 31, 2012 Awesome Share broh!!!!!!!!!!!!!!!! +1 For your good work! Quote Link to comment Share on other sites More sharing options...
EdenEternal Posted July 31, 2012 Author Share Posted July 31, 2012 Awesome Share broh!!!!!!!!!!!!!!!! +1 For your good work! Thank you Exile For FeedBack. Quote Link to comment Share on other sites More sharing options...
`BoØmBoØm Posted July 31, 2012 Share Posted July 31, 2012 Awesome share .... +1 for me too ! :) Quote Link to comment Share on other sites More sharing options...
EdenEternal Posted July 31, 2012 Author Share Posted July 31, 2012 Awesome share .... +1 for me too ! :) Thanks Guys for feedback now i making new java codes ( : Stay tuned! Quote Link to comment Share on other sites More sharing options...
Lucky Dice Posted July 31, 2012 Share Posted July 31, 2012 Didnt understand what exactly doing .. Quote Link to comment Share on other sites More sharing options...
EdenEternal Posted July 31, 2012 Author Share Posted July 31, 2012 Didnt understand what exactly doing .. if a clan has aden castle, the members of this clan transform to npc you choose. Quote Link to comment Share on other sites More sharing options...
Lucky Dice Posted July 31, 2012 Share Posted July 31, 2012 if a clan has aden castle, the members of this clan transform to npc you choose. Ok thanks :) Quote Link to comment Share on other sites More sharing options...
xrulezz Posted July 31, 2012 Share Posted July 31, 2012 Awesome share!!! +1 too for your good work! Quote Link to comment Share on other sites More sharing options...
xFranky Posted July 31, 2012 Share Posted July 31, 2012 Ohh realy GOOD JOB Man! Quote Link to comment Share on other sites More sharing options...
niko001 Posted August 2, 2012 Share Posted August 2, 2012 Good Share! Thanks a lote! very nice idea :P Quote Link to comment Share on other sites More sharing options...
nery Posted December 24, 2012 Share Posted December 24, 2012 I did not post this all plays transforms into npc?? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.