Hero character color name

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
St3eT
Posts: 961
Joined: Sun Mar 07, 2010 6:50 pm

Hero character color name

Post by St3eT »

If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number:
L2JDP Revision Number:

Hello,
I need give to hero chracacter blue nick name.. (no //rec) ..color..
If i should be black sheep for sure no as punishment
Image
User avatar
Flashy
Posts: 310
Joined: Mon Sep 29, 2008 11:49 am
Location: Germany

Re: Hero character color name

Post by Flashy »

wrong forum section....

in future please put such question into feature requests....
Anyway here it is:

Code: Select all

 Index: java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java===================================================================--- java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java (revision 4498)+++ java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java (working copy)@@ -184,6 +184,10 @@                GMSkillTable.getInstance().addSkills(activeChar);        }        +       //L2J Custom: set Hero Color if enable +       if(activeChar.isHero() && !activeChar.isGM() && Config.ALT_HERO_COLOR_ENABLED)+           activeChar.getAppearance().setNameColor(Config.ALT_HERO_COLOR);+               // Set dead status if applies        if (activeChar.getCurrentHp() < 0.5)            activeChar.setIsDead(true);Index: java/com/l2jserver/Config.java===================================================================--- java/com/l2jserver/Config.java  (revision 4498)+++ java/com/l2jserver/Config.java  (working copy)@@ -720,6 +720,8 @@    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 ALT_HERO_COLOR_ENABLED;+   public static int ALT_HERO_COLOR;        //--------------------------------------------------    // NPC Settings@@ -1659,6 +1661,9 @@                    STORE_RECIPE_SHOPLIST = Boolean.parseBoolean(Character.getProperty("StoreRecipeShopList", "False"));                    STORE_UI_SETTINGS = Boolean.parseBoolean(Character.getProperty("StoreCharUiSettings", "False"));                    FORBIDDEN_NAMES = Character.getProperty("ForbiddenNames", "").split(",");+                   ALT_HERO_COLOR_ENABLED = Boolean.parseBoolean(Character.getProperty("HeroNameColorEnabled", "False"));+                   ALT_HERO_COLOR = Integer.decode((new StringBuilder()).append("0x").append(Character.getProperty("HeroColor", "EE0000")).toString()).intValue();+                }                catch (Exception e)                {Index: java/config/Character.properties===================================================================--- java/config/Character.properties    (revision 4498)+++ java/config/Character.properties    (working copy)@@ -20,6 +20,12 @@ # Title color for those matching the above MasterAccess AccessLevel. # Default: 00CCFF MasterTitleColor = 00CCFF+# ---------------------------------------------------------------------------+#Hero Color Support+HeroNameColorEnabled = False++#If Hero Color Support enable: Default: EE0000 (blue)+HeroColor = EE0000  # --------------------------------------------------------------------------- # Statistics  
User avatar
St3eT
Posts: 961
Joined: Sun Mar 07, 2010 6:50 pm

Re: Hero character color name

Post by St3eT »

Thanks,
You can also add nobless?
PS..sorry for section :/
If i should be black sheep for sure no as punishment
Image
User avatar
BiggBoss
L2j Veteran
L2j Veteran
Posts: 1104
Joined: Wed Apr 15, 2009 3:11 pm
Location: Spain

Re: Hero character color name

Post by BiggBoss »

Code: Select all

ALT_HERO_COLOR = Integer.decode((new StringBuilder()).append("0x").append(Character.getProperty("HeroColor", "EE0000")).toString()).intValue(); 
is the same as

Code: Select all

 ALT_HERO_COLOR = Integer.decode("0x"+Character.getProperty("HeroColor","EE0000")); 
Image
User avatar
St3eT
Posts: 961
Joined: Sun Mar 07, 2010 6:50 pm

Re: Hero character color name

Post by St3eT »

Code: Select all

 Index: java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java===================================================================--- java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java (revision 4498)+++ java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java (working copy)@@ -184,6 +184,10 @@GMSkillTable.getInstance().addSkills(activeChar);}   +   //L2J Custom: set Noble Color if enable+   if(activeChar.isNoble() && !activeChar.isGM() && Config.ALT_NOBLE_COLOR_ENABLED)+   activeChar.getAppearance().setNameColor(Config.ALT_NOBLE_COLOR);+  // Set dead status if appliesif (activeChar.getCurrentHp() < 0.5)activeChar.setIsDead(true);Index: java/com/l2jserver/Config.java===================================================================--- java/com/l2jserver/Config.java  (revision 4498)+++ java/com/l2jserver/Config.java  (working copy)@@ -720,6 +720,8 @@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 ALT_NOBLE_COLOR_ENABLED;+   public static int ALT_NOBLE_COLOR; //--------------------------------------------------// NPC Settings@@ -1659,6 +1661,9 @@STORE_RECIPE_SHOPLIST = Boolean.parseBoolean(Character.getProperty("StoreRecipeShopList", "False"));STORE_UI_SETTINGS = Boolean.parseBoolean(Character.getProperty("StoreCharUiSettings", "False"));FORBIDDEN_NAMES = Character.getProperty("ForbiddenNames", "").split(",");+   ALT_NOBLE_COLOR_ENABLED = Boolean.parseBoolean(Character.getProperty("NobleNameColorEnabled", "False"));+   ALT_NOBLE_COLOR = Integer.decode((new StringBuilder()).append("0x").append(Character.getProperty("NobleColor", "EE0000")).toString()).intValue();+}catch (Exception e){Index: java/config/Character.properties===================================================================--- java/config/Character.properties(revision 4498)+++ java/config/Character.properties(working copy)@@ -20,6 +20,12 @@ # Title color for those matching the above MasterAccess AccessLevel. # Default: 00CCFF MasterTitleColor = 00CCFF+# ---------------------------------------------------------------------------+#Noble Color Support+NobleNameColorEnabled = False++#If Noble Color Support enable: Default: EE0000 (blue)+NobleColor = EE0000  # --------------------------------------------------------------------------- # Statistics 
Is that good for nobless?
If i should be black sheep for sure no as punishment
Image
User avatar
Flashy
Posts: 310
Joined: Mon Sep 29, 2008 11:49 am
Location: Germany

Re: Hero character color name

Post by Flashy »

BiggBoss wrote:

Code: Select all

ALT_HERO_COLOR = Integer.decode((new StringBuilder()).append("0x").append(Character.getProperty("HeroColor", "EE0000")).toString()).intValue(); 
is the same as

Code: Select all

 ALT_HERO_COLOR = Integer.decode("0x"+Character.getProperty("HeroColor","EE0000")); 
thx BiggBoss, will it in my mind for future :-)
Ralm
Posts: 154
Joined: Sat Dec 25, 2010 10:09 pm
Location: Portugal

Re: Hero character color name

Post by Ralm »

St3eT did you test the code for nobles?

Or can anyone check please?

For hero I wouldnt use the color name, but for nobles, yeah, why not XD
My teachers XD: jurchiks
User avatar
Flashy
Posts: 310
Joined: Mon Sep 29, 2008 11:49 am
Location: Germany

Re: Hero character color name

Post by Flashy »

its working....
Ralm
Posts: 154
Joined: Sat Dec 25, 2010 10:09 pm
Location: Portugal

Re: Hero character color name

Post by Ralm »

ok thx
My teachers XD: jurchiks
User avatar
St3eT
Posts: 961
Joined: Sun Mar 07, 2010 6:50 pm

Re: Hero character color name

Post by St3eT »

Yes work perfect.. :)
If i should be black sheep for sure no as punishment
Image
Post Reply