Vkouk Posted April 18, 2010 Share Posted April 18, 2010 Well,it has been shared again?If not,then it's good.Now a guy told me to make a code when someone is nobless to change his color name.And i did it.Nothing special though Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 4088) +++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -8223,6 +8223,9 @@ public void setNoble(boolean val) { + if (val) + getAppearance().setNameColor(Config.NOBLESS_COLOR_NAME); + if (val) for (L2Skill s : NobleSkillTable.getInstance().GetNobleSkills()) addSkill(s, false); //Dont Save Noble skills to Sql else 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_NOBLESS_COLOR; + public static int NOBLESS_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_NOBLESS_COLOR = Boolean.parseBoolean(L2JModSettings.getProperty("EnableNoblessColor", "False")); + NOBLESS_COLOR_NAME = Integer.decode("0x" + L2JModSettings.getProperty("NoblessColorName", "000000")); 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 = + +#--------------------------------------------------------------- +# Nobless Color Name - +#--------------------------------------------------------------- +# Enable Nobless Color Name? +# Deafult: False +EnableNoblessColor = False + +# Set Nobless Color +NoblessColorName = 000000 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_NOBLESS_COLOR) + { + if (activeChar.isNoble()) + { + activeChar.getAppearance().setNameColor(Config.NOBLESS_COLOR_NAME); + } + } + if (activeChar.getAllEffects() != null) { Tested and working Credits : Ventic Quote Link to comment Share on other sites More sharing options...
Grim. Posted April 18, 2010 Share Posted April 18, 2010 well i believe that it is only usefull for low rate servers because on pvp everybody would have a color on their name Quote Link to comment Share on other sites More sharing options...
PonyR1der Posted April 18, 2010 Share Posted April 18, 2010 nice ...keep on Quote Link to comment Share on other sites More sharing options...
Vkouk Posted April 18, 2010 Author Share Posted April 18, 2010 well i believe that it is only usefull for low rate servers because on pvp everybody would have a color on their name w/e.someone can use it on pvp server too Quote Link to comment Share on other sites More sharing options...
IPXS Posted April 18, 2010 Share Posted April 18, 2010 Make a good credit, create a party matching on interlude :D Whatever THX. Quote Link to comment Share on other sites More sharing options...
Vkouk Posted April 18, 2010 Author Share Posted April 18, 2010 Make a good credit, create a party matching on interlude :D Whatever THX. a good credit?what do you mean? Quote Link to comment Share on other sites More sharing options...
xAddytzu Posted April 18, 2010 Share Posted April 18, 2010 I can't understand one thing why + if (Config.ENABLE_NOBLESS_COLOR) + { + if (activeChar.isNoble()) + { + activeChar.getAppearance().setNameColor(Config.NOBLESS_COLOR_NAME); + } + if (activeChar.getAllEffects() != null) { @@ -347,6 +355,7 @@ activeChar.sendPacket(new GameGuardQuery());*/ TvTEvent.onLogin(activeChar); + } and not + + if (Config.ENABLE_NOBLESS_COLOR) + { + if (activeChar.isNoble()) + { + activeChar.getAppearance().setNameColor(Config.NOBLESS_COLOR_NAME); + } + } Quote Link to comment Share on other sites More sharing options...
IPXS Posted April 18, 2010 Share Posted April 18, 2010 Sorry a good code share:) http://www.maxcheaters.com/forum/index.php?topic=139785.0 this is from gracia, maybe you make can make on INTERLUDE and share? I think this thing was be useful for everyone server owner. Quote Link to comment Share on other sites More sharing options...
Vkouk Posted April 18, 2010 Author Share Posted April 18, 2010 I can't understand one thing why + if (Config.ENABLE_NOBLESS_COLOR) + { + if (activeChar.isNoble()) + { + activeChar.getAppearance().setNameColor(Config.NOBLESS_COLOR_NAME); + } + if (activeChar.getAllEffects() != null) { @@ -347,6 +355,7 @@ activeChar.sendPacket(new GameGuardQuery());*/ TvTEvent.onLogin(activeChar); + } and not + + if (Config.ENABLE_NOBLESS_COLOR) + { + if (activeChar.isNoble()) + { + activeChar.getAppearance().setNameColor(Config.NOBLESS_COLOR_NAME); + } + } well yes you are right.Let me fix it. Thanks Sorry a good code share:) http://www.maxcheaters.com/forum/index.php?topic=139785.0 this is from gracia, maybe you make can make on INTERLUDE and share? I think this thing was be useful for everyone server owner. i will try. Quote Link to comment Share on other sites More sharing options...
HippO™ Posted April 18, 2010 Share Posted April 18, 2010 it's awesome!! it is working! :D :D Thanks you Ventic! I will try to use something like this color Quote Link to comment Share on other sites More sharing options...
DominiQue Posted April 18, 2010 Share Posted April 18, 2010 And someone will make this soon... : + if (activeChar.isHero()) + { + activeChar.getAppearance().setNameColor(Config.HERO_COLOR_NAME); + } Or : + if (activeChar.isNoble()) + { + activeChar.getAppearance().setTitleColor(Config.NOBLESS_COLOR_TITLE); + } Justy tried to avoid another shares like this... Quote Link to comment Share on other sites More sharing options...
Vkouk Posted April 18, 2010 Author Share Posted April 18, 2010 And someone will make this soon... : + if (activeChar.isHero()) + { + activeChar.getAppearance().setNameColor(Config.HERO_COLOR_NAME); + } Or : + if (activeChar.isNoble()) + { + activeChar.getAppearance().setTitleColor(Config.NOBLESS_COLOR_TITLE); + } Justy tried to avoid another shares like this... Did you ready my first words?A guy told me to code it and i did it.And since it hasn't been an another share like this i share it Quote Link to comment Share on other sites More sharing options...
DominiQue Posted April 18, 2010 Share Posted April 18, 2010 Did you ready my first words?A guy told me to code it and i did it.And since it hasn't been an another share like this i share it What I wanted to say was that someone will make that "Shares" you gave them this idea ;D Quote Link to comment Share on other sites More sharing options...
Theonegandalf Posted April 18, 2010 Share Posted April 18, 2010 With this way, you make everytime that a player logs, to check if the player is noble in order to add the colour. Why don't you make when the players become noble, to add the colour and have it permantly? Quote Link to comment Share on other sites More sharing options...
Matim Posted April 18, 2010 Share Posted April 18, 2010 With this way, you make everytime that a player logs, to check if the player is noble in order to add the colour. Why don't you make when the players become noble, to add the colour and have it permantly? Yes its better way. Because now you're forcing players to log out in order to change player name color. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.