Ver um Único Post
Antigo 19-06-2009, 06:34 PM   #3 (permalink)
KaL
Amigo SE
 
Avatar de KaL
 
Registrado em: Dec 2008
Localização: São Paulo
Posts: 1,188
Agradeceu: 162
Agradecido 1,768 Vezes em 486 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
Meu Estado:
Pontos: 9,136, Nível: 64
Pontos: 9,136, Nível: 64 Pontos: 9,136, Nível: 64 Pontos: 9,136, Nível: 64
Atividade: 16%
Atividade: 16% Atividade: 16% Atividade: 16%

Nome Real: Victor

Inventório de KaL

Padrão

Fica por sua conta a adição no Pack :
Código: [Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
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 )

__________________
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]

[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
KaL está offline  
Os Seguintes 2 Usuários disseram Obrigado(a) para KaL por gostarem deste post :
Rafa_Moca (21-06-2009), vassorarv (19-06-2009)
 

Search Engine Optimization by vBSEO 3.3.0