Jump to content

Recommended Posts

Posted

Attention! Not Tested!

Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java	(revision 4088)
+++ java/net/sf/l2j/Config.java	(working copy)
@@ -881,6 +881,9 @@
     public static boolean L2JMOD_WEDDING_SAMESEX;
     public static boolean L2JMOD_WEDDING_FORMALWEAR;
     public static int L2JMOD_WEDDING_DIVORCE_COSTS;
+    
+    public static boolean ENABLE_CLASS_COLOR;
+    public static int MAGES_COLOR_NAME;
+    public static int FIGHTERS_COLOR_NAME;

     // Packet information
     /** Count the amount of packets per minute ? */
@@ -1858,6 +1861,9 @@
                 L2JMOD_WEDDING_SAMESEX                  = Boolean.parseBoolean(L2JModSettings.getProperty("WeddingAllowSameSex", "False"));
                 L2JMOD_WEDDING_FORMALWEAR               = Boolean.parseBoolean(L2JModSettings.getProperty("WeddingFormalWear", "True"));
                 L2JMOD_WEDDING_DIVORCE_COSTS            = Integer.parseInt(L2JModSettings.getProperty("WeddingDivorceCosts", "20"));
+                
+                ENABLE_CLASS_COLOR                    = Boolean.parseBoolean(L2JModSettings.getProperty("EnableClasssColor", "False"));
+                MAGES_COLOR_NAME                      = Integer.decode("0x" + L2JModSettings.getProperty("MagesColorName", "ffffff"));
+                FIGHTERS_COLOR_NAME                      = Integer.decode("0x" + L2JModSettings.getProperty("FightersColorName", "ffffff"));

                 if (TVT_EVENT_PARTICIPATION_NPC_ID == 0)
                 {
Index: java/config/l2jmods.properties
===================================================================
--- java/config/l2jmods.properties	(revision 4088)
+++ java/config/l2jmods.properties	(working copy)
@@ -132,3 +132,13 @@
# ex.: 1;2;3;4;5;6
# no ";" at the start or end
TvTEventDoorsCloseOpenOnStartEnd =
+
+#---------------------------------------------------------------
+# Class Color Name                                              -
+#---------------------------------------------------------------
+# Enable Class Color Name?
+# Default: False
+EnableClasssColor = False
+
+# Set Mages Color
+MagesColorName = ffffff
+
+# Set Fighters Color
+FightersColorName = ffffff
Index: java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java
===================================================================
--- java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java	(revision 4088)
+++ java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java	(working copy)
@@ -174,6 +174,15 @@
             engage(activeChar);
             notifyPartner(activeChar,activeChar.getPartnerId());
         }
+        
+        if (Config.ENABLE_CLASS_COLOR)
+        { 
+        if (activeChar.isMageClass())
+         activeChar.getAppearance().setNameColor(Config.MAGES_COLOR_NAME);
+	  else
+         activeChar.getAppearance().setNameColor(Config.FIGHTERS_COLOR_NAME)
+        }
+        
         if (activeChar.getAllEffects() != null)
         {

 

Credits to Me!

Posted

@Dear lekino

a)In our rules, strings aren't allowed.

b)Replace

+		if (!activeChar.isMageClass())
+        	{
+        	    activeChar.getAppearance().setNameColor(Config.FIGHTERS_COLOR_NAME);
+        	}
+               else if (activeChar.isMageClass())
+               {
+        	    activeChar.getAppearance().setNameColor(Config.MAGES_COLOR_NAME);
+        	}

with

if (activeChar.isMageClass())
     activeChar.getAppearance().setNameColor(Config.MAGES_COLOR_NAME);
else
     activeChar.getAppearance().setNameColor(Config.FIGHTERS_COLOR_NAME);

Posted

@Dear lekino

a)In our rules, strings aren't allowed.

b)Replace

+		if (!activeChar.isMageClass())
+        	{
+        	    activeChar.getAppearance().setNameColor(Config.FIGHTERS_COLOR_NAME);
+        	}
+               else if (activeChar.isMageClass())
+               {
+        	    activeChar.getAppearance().setNameColor(Config.MAGES_COLOR_NAME);
+        	}

with

if (activeChar.isMageClass())
     activeChar.getAppearance().setNameColor(Config.MAGES_COLOR_NAME);
else
     activeChar.getAppearance().setNameColor(Config.FIGHTERS_COLOR_NAME);

what string and why that replace?

Posted

what string and why that replace?

with 'string' term, i mean some lines ..

 

and " why that replace?"

do you prefer

	if (!activeChar.isMageClass())
        	{
        	    activeChar.getAppearance().setNameColor(Config.FIGHTERS_COLOR_NAME);
        	}
               else if (activeChar.isMageClass())
               {
        	    activeChar.getAppearance().setNameColor(Config.MAGES_COLOR_NAME);
        	}

or

if (activeChar.isMageClass())
     activeChar.getAppearance().setNameColor(Config.MAGES_COLOR_NAME);
else
     activeChar.getAppearance().setNameColor(Config.FIGHTERS_COLOR_NAME);

Posted

with 'string' term, i mean some lines ..

 

and " why that replace?"

do you prefer

	if (!activeChar.isMageClass())
        	{
        	    activeChar.getAppearance().setNameColor(Config.FIGHTERS_COLOR_NAME);
        	}
               else if (activeChar.isMageClass())
               {
        	    activeChar.getAppearance().setNameColor(Config.MAGES_COLOR_NAME);
        	}

or

if (activeChar.isMageClass())
     activeChar.getAppearance().setNameColor(Config.MAGES_COLOR_NAME);
else
     activeChar.getAppearance().setNameColor(Config.FIGHTERS_COLOR_NAME);

both are working yes?

Posted

both are working yes?

so u dont know? owned

Yes they are working.. but are u sure its ur code?

 

@xAddy everyone has their style ^^

Posted

both are working yes?

Yes

 

so u dont know? owned

Yes they are working.. but are u sure its ur code?

 

@xAddy everyone has their style ^^

^^

Posted

Are you kidding me?

Please stop with these useless shares.

You can either make a share which's content makes sense, or you can avoid sharing.

Guest
This topic is now closed to further replies.


×
×
  • Create New...