Page 1 of 1
Hero character color name
Posted: Thu Feb 17, 2011 1:50 pm
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..
Re: Hero character color name
Posted: Thu Feb 17, 2011 2:31 pm
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
Re: Hero character color name
Posted: Thu Feb 17, 2011 3:03 pm
by St3eT
Thanks,
You can also add nobless?
PS..sorry for section :/
Re: Hero character color name
Posted: Thu Feb 17, 2011 3:07 pm
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"));
Re: Hero character color name
Posted: Thu Feb 17, 2011 3:23 pm
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?
Re: Hero character color name
Posted: Thu Feb 17, 2011 4:32 pm
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

Re: Hero character color name
Posted: Mon Feb 21, 2011 1:17 pm
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
Re: Hero character color name
Posted: Mon Feb 21, 2011 1:31 pm
by Flashy
its working....
Re: Hero character color name
Posted: Tue Feb 22, 2011 12:25 am
by Ralm
ok thx
Re: Hero character color name
Posted: Tue Feb 22, 2011 2:49 pm
by St3eT
Yes work perfect..
