Secret Experience

Secret Experience (https://secretexperience.net/)
-   [L2J] Dúvidas Solucionadas (https://secretexperience.net/l2j-duvidas-solucionadas/)
-   -   Como mudo a cor Nick com 1000 pvp? (https://secretexperience.net/l2j-duvidas-solucionadas/9744-como-mudo-cor-nick-com-1000-pvp.html)

vassorarv 19-06-2009 06:11 PM

Como mudo a cor Nick com 1000 pvp?
 
Alguem sabe como configuro o serve Pra quando os Players Fizerem 1000 pvp, a cor do nick muda de cor.... Servidor l2jfree tem como ?:err:

paytaly 19-06-2009 06:19 PM

@vassorarv, tudo é possível. Do mesmo jeito que tem como fazer em outro Pack
tem como fazer no L2JFree.

Porém para fazer isso é necessário um bom conhecimento de Java.
Caso você não entenda, sugiro que desista da idéia pois vai ser perda de tempo, você
não conseguirá fazer.

Sugiro que use L2Dot, ele já tem esse sistema implementado e tem muito mais BUGs
corrigidos que o L2JFree.
Você pode encontrar Pack L2Dot na área de Server Packs aqui do Fórum.

KaL 19-06-2009 06:34 PM

Fica por sua conta a adição no Pack :
Código:

Index: config/options.properties
===================================================================
--- config/options.properties    (revision 4339)
+++ config/options.properties    (working copy)
@@ -350,4 +350,33 @@
EnableJythonShell = False

# Interval in ms to check for deadlocks, 0 to disable
-DeadLockCheck =10000
\ No newline at end of file
+DeadLockCheck =10000
+
+# ---------------------------------------
+# Section: PvP Nick Color System
+# ---------------------------------------
+# Each Ammount will set The proper Color
+# Ex:  PvpAmmount1 = 10, when character reaches 10 pvps, will get Name Color correspondent to ColorForAmmount1 and Title Color correspondent to TitleForAmmount1
+# WAN: Colors Must Use RBG format
+PvPColorSystem = true
+
+# Pvp Ammounts
+PvpAmmount1 = 25
+PvpAmmount2 = 50
+PvpAmmount3 = 100
+PvpAmmount4 = 500
+PvpAmmount5 = 1000
+PvpAmmount6 = 2000
+PvpAmmount7 = 3000
+PvpAmmount8 = 4500
+PvpAmmount9 = 5500
+PvpAmmount10 = 7000
+
+# Name Colors
+ColorForAmmount1 = 99FF99
+ColorForAmmount2 = FFFF66
+ColorForAmmount3 = 66FFFF
+ColorForAmmount4 = 00FFFF
+ColorForAmmount5 = 0099FF
+ColorForAmmount6 = 99FF99
+ColorForAmmount7 = FFFF66
+ColorForAmmount8 = 66FFFF
+ColorForAmmount9 = 00FFFF
+ColorForAmmount10 = 0099FF
+
+# Title Colors
+TitleForAmmount1 = 99FF99
+TitleForAmmount2 = FFFF66
+TitleForAmmount3 = 66FFFF
+TitleForAmmount4 = 00FFFF
+TitleForAmmount5 = 0099FF
+TitleForAmmount6 = 99FF99
+TitleForAmmount7 = FFFF66
+TitleForAmmount8 = 66FFFF
+TitleForAmmount9 = 00FFFF
+TitleForAmmount10 = 0099FF
\ No newline at end of file
Index: src/main/java/com/l2jfree/Config.java
===================================================================
--- src/main/java/com/l2jfree/Config.java    (revision 4339)
+++ src/main/java/com/l2jfree/Config.java    (working copy)
@@ -1121,6 +1121,24 @@
    public static boolean            ONLY_GM_ITEMS_FREE;                            // Only GM buy items for free
    public static int                DEADLOCKCHECK_INTERVAL;

+    public static int            COLOR_FOR_AMMOUNT1;
+    public static int            COLOR_FOR_AMMOUNT2;
+    public static int            COLOR_FOR_AMMOUNT3;
+    public static int            COLOR_FOR_AMMOUNT4;
+    public static int            COLOR_FOR_AMMOUNT5;
+    public static int            COLOR_FOR_AMMOUNT6;
+    public static int            COLOR_FOR_AMMOUNT7;
+    public static int            COLOR_FOR_AMMOUNT8;
+    public static int            COLOR_FOR_AMMOUNT9;
+    public static int            COLOR_FOR_AMMOUNT10;
+    public static int            PVP_AMMOUNT1;
+    public static int            PVP_AMMOUNT2;
+    public static int            PVP_AMMOUNT3;
+    public static int            PVP_AMMOUNT4;
+    public static int            PVP_AMMOUNT5;
+    public static int            PVP_AMMOUNT6;
+    public static int            PVP_AMMOUNT7;
+    public static int            PVP_AMMOUNT8;
+    public static int            PVP_AMMOUNT9;
+    public static int            PVP_AMMOUNT10;
+    public static boolean        PVP_COLOR_SYSTEM;
+
+    public static int            TITLE_COLOR_FOR_AMMOUNT1;
+    public static int            TITLE_COLOR_FOR_AMMOUNT2;
+    public static int            TITLE_COLOR_FOR_AMMOUNT3;
+    public static int            TITLE_COLOR_FOR_AMMOUNT4;
+    public static int            TITLE_COLOR_FOR_AMMOUNT5;
+    public static int            TITLE_COLOR_FOR_AMMOUNT6;
+    public static int            TITLE_COLOR_FOR_AMMOUNT7;
+    public static int            TITLE_COLOR_FOR_AMMOUNT8;
+    public static int            TITLE_COLOR_FOR_AMMOUNT9;
+    public static int            TITLE_COLOR_FOR_AMMOUNT10;
+
    // ********************************************************************************
***********
    public static void loadOptionsConfig()
    {
@@ -1294,6 +1312,23 @@
            ALT_DEV_NO_SPAWNS = Boolean.parseBoolean(optionsSettings.getProperty("AltDevNoSpawns", "False"));
            ENABLE_JYTHON_SHELL = Boolean.parseBoolean(optionsSettings.getProperty("EnableJythonShell", "False"));
            DEADLOCKCHECK_INTERVAL = Integer.parseInt(optionsSettings.getProperty("DeadLockCheck", "10000"));
+            // ------ PVP Color System-----------
+            PVP_COLOR_SYSTEM = Boolean.parseBoolean(optionsSettings.getProperty("PvPColorSystem", "false"));
+            COLOR_FOR_AMMOUNT1 = Integer.decode("0x" + optionsSettings.getProperty("ColorForAmmount1", "00FF00"));
+            COLOR_FOR_AMMOUNT2 = Integer.decode("0x" + optionsSettings.getProperty("ColorForAmmount2", "00FF00"));
+            COLOR_FOR_AMMOUNT3 = Integer.decode("0x" + optionsSettings.getProperty("ColorForAmmount3", "00FF00"));
+            COLOR_FOR_AMMOUNT4 = Integer.decode("0x" + optionsSettings.getProperty("ColorForAmmount4", "00FF00"));
+            COLOR_FOR_AMMOUNT5 = Integer.decode("0x" + optionsSettings.getProperty("ColorForAmmount5", "00FF00"));
+            COLOR_FOR_AMMOUNT1 = Integer.decode("0x" + optionsSettings.getProperty("ColorForAmmount6", "00FF00"));
+            COLOR_FOR_AMMOUNT2 = Integer.decode("0x" + optionsSettings.getProperty("ColorForAmmount7", "00FF00"));
+            COLOR_FOR_AMMOUNT3 = Integer.decode("0x" + optionsSettings.getProperty("ColorForAmmount8", "00FF00"));
+            COLOR_FOR_AMMOUNT4 = Integer.decode("0x" + optionsSettings.getProperty("ColorForAmmount9", "00FF00"));
+            COLOR_FOR_AMMOUNT5 = Integer.decode("0x" + optionsSettings.getProperty("ColorForAmmount9", "00FF00"));
+            TITLE_COLOR_FOR_AMMOUNT1 = Integer.decode("0x" + optionsSettings.getProperty("TitleForAmmount1", "00FF00"));
+            TITLE_COLOR_FOR_AMMOUNT2 = Integer.decode("0x" + optionsSettings.getProperty("TitleForAmmount2", "00FF00"));
+            TITLE_COLOR_FOR_AMMOUNT3 = Integer.decode("0x" + optionsSettings.getProperty("TitleForAmmount3", "00FF00"));
+            TITLE_COLOR_FOR_AMMOUNT4 = Integer.decode("0x" + optionsSettings.getProperty("TitleForAmmount4", "00FF00"));
+            TITLE_COLOR_FOR_AMMOUNT5 = Integer.decode("0x" + optionsSettings.getProperty("TitleForAmmount5", "00FF00"));
+            TITLE_COLOR_FOR_AMMOUNT1 = Integer.decode("0x" + optionsSettings.getProperty("TitleForAmmount6", "00FF00"));
+            TITLE_COLOR_FOR_AMMOUNT2 = Integer.decode("0x" + optionsSettings.getProperty("TitleForAmmount7", "00FF00"));
+            TITLE_COLOR_FOR_AMMOUNT3 = Integer.decode("0x" + optionsSettings.getProperty("TitleForAmmount8", "00FF00"));
+            TITLE_COLOR_FOR_AMMOUNT4 = Integer.decode("0x" + optionsSettings.getProperty("TitleForAmmount9", "00FF00"));
+            TITLE_COLOR_FOR_AMMOUNT5 = Integer.decode("0x" + optionsSettings.getProperty("TitleForAmmount10", "00FF00"));
+            PVP_AMMOUNT1 = Integer.parseInt(optionsSettings.getProperty("PvpAmmount1", "25"));
+            PVP_AMMOUNT2 = Integer.parseInt(optionsSettings.getProperty("PvpAmmount2", "50"));
+            PVP_AMMOUNT3 = Integer.parseInt(optionsSettings.getProperty("PvpAmmount3", "100"));
+            PVP_AMMOUNT4 = Integer.parseInt(optionsSettings.getProperty("PvpAmmount4", "500"));
+            PVP_AMMOUNT5 = Integer.parseInt(optionsSettings.getProperty("PvpAmmount5", "100"));
+            PVP_AMMOUNT1 = Integer.parseInt(optionsSettings.getProperty("PvpAmmount6", "2000"));
+            PVP_AMMOUNT2 = Integer.parseInt(optionsSettings.getProperty("PvpAmmount7", "3000"));
+            PVP_AMMOUNT3 = Integer.parseInt(optionsSettings.getProperty("PvpAmmount8", "4500"));
+            PVP_AMMOUNT4 = Integer.parseInt(optionsSettings.getProperty("PvpAmmount9", "5500"));
+            PVP_AMMOUNT5 = Integer.parseInt(optionsSettings.getProperty("PvpAmmount10", "7000"));
        }
        catch (Exception e)
        {
Index: src/main/java/com/l2jfree/gameserver/network/clientpackets/EnterWorld.java
===================================================================
--- src/main/java/com/l2jfree/gameserver/network/clientpackets/EnterWorld.java    (revision 4339)
+++ src/main/java/com/l2jfree/gameserver/network/clientpackets/EnterWorld.java    (working copy)
@@ -44,6 +44,7 @@
import com.l2jfree.gameserver.model.L2Object;
import com.l2jfree.gameserver.model.L2ShortCut;
import com.l2jfree.gameserver.model.L2World;
+import com.l2jfree.gameserver.model.actor.appearance.PcAppearance;
import com.l2jfree.gameserver.model.actor.instance.L2PcInstance;
import com.l2jfree.gameserver.model.entity.ClanHall;
import com.l2jfree.gameserver.model.entity.Couple;
@@ -186,6 +187,46 @@
                activeChar.getAppearance().setNameColor(Config.CHAR_VIP_COLOR);
        }

+        //Custom PVP Color System
+        if (!activeChar.isGM()) // skip gms.;)
+        {
+            int pvpAmmount = activeChar.getPvpKills();
+            PcAppearance charAppearance = activeChar.getAppearance();
+
+            if (Config.PVP_COLOR_SYSTEM)
+            {
+                //can't use a switch here , cause the ammount aren't constants and we cant convert to final in Config.
+                // since need to be parsed :S
+                if (pvpAmmount >= Config.PVP_AMMOUNT1 && pvpAmmount < Config.PVP_AMMOUNT2)
+                {
+                    charAppearance.setNameColor(Config.COLOR_FOR_AMMOUNT1);
+                    charAppearance.setTitleColor(Config.TITLE_COLOR_FOR_AMMOUNT1);
+                }
+                else if (pvpAmmount >= Config.PVP_AMMOUNT2 && pvpAmmount < Config.PVP_AMMOUNT3)
+                {
+                    charAppearance.setNameColor(Config.COLOR_FOR_AMMOUNT2);
+                    charAppearance.setTitleColor(Config.TITLE_COLOR_FOR_AMMOUNT2);
+                }
+                else if (pvpAmmount >= Config.PVP_AMMOUNT3 && pvpAmmount < Config.PVP_AMMOUNT4)
+                {
+                    charAppearance.setNameColor(Config.COLOR_FOR_AMMOUNT3);
+                    charAppearance.setTitleColor(Config.TITLE_COLOR_FOR_AMMOUNT3);
+                }
+
+                else if (pvpAmmount >= Config.PVP_AMMOUNT4 && pvpAmmount < Config.PVP_AMMOUNT5)
+                {
+                    charAppearance.setNameColor(Config.COLOR_FOR_AMMOUNT4);
+                    charAppearance.setTitleColor(Config.TITLE_COLOR_FOR_AMMOUNT4);
+                }
+                else if (pvpAmmount >= Config.PVP_AMMOUNT5 && pvpAmmount < Config.PVP_AMMOUNT6)
+                {
+                    charAppearance.setNameColor(Config.COLOR_FOR_AMMOUNT5);
+                    charAppearance.setTitleColor(Config.TITLE_COLOR_FOR_AMMOUNT5);
+                }
+                else if (pvpAmmount >= Config.PVP_AMMOUNT5 && pvpAmmount < Config.PVP_AMMOUNT7)
+                {
+                    charAppearance.setNameColor(Config.COLOR_FOR_AMMOUNT6);
+                    charAppearance.setTitleColor(Config.TITLE_COLOR_FOR_AMMOUNT6);
+                }
+                else if (pvpAmmount >= Config.PVP_AMMOUNT5 && pvpAmmount < Config.PVP_AMMOUNT8)
+                {
+                    charAppearance.setNameColor(Config.COLOR_FOR_AMMOUNT7);
+                    charAppearance.setTitleColor(Config.TITLE_COLOR_FOR_AMMOUNT7);
+                }
+                else if (pvpAmmount >= Config.PVP_AMMOUNT5 && pvpAmmount < Config.PVP_AMMOUNT9)
+                {
+                    charAppearance.setNameColor(Config.COLOR_FOR_AMMOUNT8);
+                    charAppearance.setTitleColor(Config.TITLE_COLOR_FOR_AMMOUNT8);
+                }
+                else if (pvpAmmount >= Config.PVP_AMMOUNT5 && pvpAmmount < Config.PVP_AMMOUNT10)
+                {
+                    charAppearance.setNameColor(Config.COLOR_FOR_AMMOUNT9);
+                    charAppearance.setTitleColor(Config.TITLE_COLOR_FOR_AMMOUNT9);
+                }
+                else if (pvpAmmount >= Config.PVP_AMMOUNT5 && pvpAmmount > Config.PVP_AMMOUNT9)
+                {
+                    charAppearance.setNameColor(Config.COLOR_FOR_AMMOUNT10);
+                    charAppearance.setTitleColor(Config.TITLE_COLOR_FOR_AMMOUNT10);
+                }
+            }
+        }
+        // Custom PVP Color System
+
        if (activeChar.getStatus().getCurrentHp() < 0.5) // is dead
            activeChar.setIsDead(true);

Créditos : Equipe de Desenvolvedores da L2jFree ( acho xD )

vassorarv 19-06-2009 07:14 PM

vlw galera pela força.. mais ainda nao sei mecher com arquivo java :v_SPIN: . Vo procura aprende vlw ^^


Horários baseados na GMT -3. Agora são 03:26 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0