Noticias:

Debes de estar registrado para poder ver el contenido indicado. Registrate o Conectate

Menú Principal

Chat only PvP Points

Iniciado por Swarlog, Ago 19, 2022, 01:30 AM

Tema anterior - Siguiente tema

Swarlog

Index: dist/game/config/l2jmods.properties
===================================================================
--- dist/game/config/l2jmods.properties (revision 5761)
+++ dist/game/config/l2jmods.properties (working copy)
@@ -426,3 +426,20 @@
# will be 1+2=3. Use 0 or negative value for unlimited number of connections.
# Default: 127.0.0.1,0 (no limits from localhost)
DualboxCheckWhitelist = 127.0.0.1,0

+#=======================================================#
+# PvP For Use Chat #
+#=======================================================#
+
+# Enable Chat Shout Whit PvP?
+ChatShout = False
+
+# PvPs For Use Chat Shout
+PvpsToUseChatShout = 0
+
+# Enable Chat Trade Whit PvP?
+ChatTrade = False
+
+# PvPs For use Chat Trade
+PvPsToUseChatTrade = 0
+
\ No newline at end of file
Index: java/com/l2jserver/Config.java
===================================================================
--- java/com/l2jserver/Config.java (revision 5761)
+++ java/com/l2jserver/Config.java (working copy)
@@ -725,6 +725,11 @@
public static int L2JMOD_DUALBOX_CHECK_MAX_PLAYERS_PER_IP;
public static int L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP;
public static TIntIntHashMap L2JMOD_DUALBOX_CHECK_WHITELIST;
+ public static boolean CHAT_SHOUT;
+ public static int PVPS_TO_USE_CHAT_SHOUT;
+ public static boolean CHAT_TRADE;
+ public static int PVPS_TO_USE_CHAT_TRADE;

@@ -2502,6 +2507,11 @@

+ CHAT_SHOUT = Boolean.parseBoolean(L2JUltramodsSettings.getProperty("ChatShout", "False"));
+ PVPS_TO_USE_CHAT_SHOUT = Integer.parseInt(L2JUltramodsSettings.getProperty("PvpsToUseChatShout", "30"));
+ CHAT_TRADE = Boolean.parseBoolean(L2JUltramodsSettings.getProperty("ChatTrade", "False"));
+ PVPS_TO_USE_CHAT_TRADE = Integer.parseInt(L2JUltramodsSettings.getProperty("PvpsToUseChatTrade", "30"));

Index: Datapack/dist/game/data/scripts/handlers/chathandlers/ChatTrade.java
===================================================================
--- Datapack/dist/game/data/scripts/handlers/chathandlers/ChatTrade.java (revision 5761)
+++ Datapack/dist/game/data/scripts/handlers/chathandlers/ChatTrade.java (working copy)
@@ -24,6 +24,11 @@

public void handleChat(int type, L2PcInstance activeChar, String target, String text)
{

+ if (Config.CHAT_TRADE)
+ {
+ if (activeChar.getPvpKills() < Config.PVPS_TO_USE_CHAT_TRADE)
+ {
+ activeChar.sendMessage("You need " + Config.PVPS_TO_USE_CHAT_TRADE + " pvps for use this chat.");
+ return;
+ }
+ }
+

Index: Datapack/dist/game/data/scripts/handlers/chathandlers/ChatShout.java
===================================================================
--- Datapack/dist/game/data/scripts/handlers/chathandlers/ChatShout.java (revision 5761)
+++ Datapack/dist/game/data/scripts/handlers/chathandlers/ChatShout.java (working copy)
@@ -24,6 +24,11 @@

public void handleChat(int type, L2PcInstance activeChar, String target, String text)
{

+ if (Config.CHAT_SHOUT)
+ {
+ if (activeChar.getPvpKills() < Config.PVPS_TO_USE_CHAT_SHOUT)
+ {
+ activeChar.sendMessage("You need " + Config.PVPS_TO_USE_CHAT_SHOUT + " pvps for use this chat.");
+ return;
+ }
+ }
+