alextoti99 Posted March 10, 2014 Posted March 10, 2014 (Gr) Geia sas eftiaxa ena code (to prwto mou) to opoio einai basismeno sto pvp chat tou Rizlaa. (Eng) Hello I created my first code which is based on Rizlaa's pvp chat code. My Code ( It is based on l2jfree source): ### Eclipse Workspace Patch 1.0#P Chr.6GMSIndex: java/config/l2jmods.properties===================================================================--- java/config/l2jmods.properties (revision 5263)+++ java/config/l2jmods.properties (working copy)@@ -91,6 +91,11 @@#Cost of Divorce, % of AdenaWeddingDivorceCosts=20++#Custom Chat via PKs+AllowPkChat = False+#Pvps to talk there+PksToChat = 500+ #--------------------------------------------------------------- # Team vs. Team Event Engine (by FBIagent) - #---------------------------------------------------------------Index: java/net/sf/l2j/gameserver/clientpackets/Say2.java===================================================================--- java/net/sf/l2j/gameserver/clientpackets/Say2.java (revision 5263)+++ java/net/sf/l2j/gameserver/clientpackets/Say2.java (working copy)@@ -233,6 +233,14 @@ } break; case ALL:+ if(Config.ALLOW_PK_CHAT){+ if(activeChar.getPvpKills() >= Config.PKS_TO_CHAT) + if(_text.startsWith("*")){ + String customChat = _text.substring(1); + for(L2PcInstance players : L2World.getInstance().getAllPlayers()) + players.sendPacket(new CreatureSay(activeChar.getObjectId(),15,activeChar.getName(),customChat)); + }+ } } if (_text.startsWith(".")) { StringTokenizer st = new StringTokenizer(_text); Index: java/net/sf/l2j/Config.java===================================================================--- java/net/sf/l2j/Config.java (revision 5263)+++ java/net/sf/l2j/Config.java (working copy)@@ -881,7 +881,12 @@ public static boolean L2JMOD_WEDDING_SAMESEX; public static boolean L2JMOD_WEDDING_FORMALWEAR; public static int L2JMOD_WEDDING_DIVORCE_COSTS; + + //pk chat+ public static boolean ALLOW_PK_CHAT;+ public static int PKS_TO_CHAT;+ // Packet information /** Count the a-beep-t of packets per minute ? */ public static boolean COUNT_PACKETS = false; @@ -1859,6 +1864,10 @@ L2JMOD_WEDDING_FORMALWEAR = Boolean.parseBoolean(L2JModSettings.getProperty("WeddingFormalWear", "True")); L2JMOD_WEDDING_DIVORCE_COSTS = Integer.parseInt(L2JModSettings.getProperty("WeddingDivorceCosts", "20")); + + ALLOW_PK_CHAT=Boolean.valueOf(L2JModSettings.getProperty("AllowPkChat","False"));+ PKS_TO_CHAT=Integer.parseInt(L2JModSettings.getProperty("PksToChat","500"));+ if (TVT_EVENT_PARTICIPATION_NPC_ID == 0) { TVT_EVENT_ENABLED = false;
Red-Hair-Shanks Posted March 15, 2014 Posted March 15, 2014 [gr] exei ginei paromio share an den kanw la8os...
Grax Posted March 16, 2014 Posted March 16, 2014 So its for pvp or pk ? :D [+ if(activeChar.getPvpKills() >= Config.PKS_TO_CHAT)]
Recommended Posts