EdenEternal Posted June 5, 2010 Posted June 5, 2010 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!
xAddytzu Posted June 5, 2010 Posted June 5, 2010 @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);
Setekh Posted June 5, 2010 Posted June 5, 2010 @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?
xAddytzu Posted June 5, 2010 Posted June 5, 2010 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);
EdenEternal Posted June 5, 2010 Author Posted June 5, 2010 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?
Setekh Posted June 5, 2010 Posted June 5, 2010 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 ^^
xAddytzu Posted June 5, 2010 Posted June 5, 2010 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 ^^ ^^
EdenEternal Posted June 5, 2010 Author Posted June 5, 2010 but are u sure its ur code? yes i have create it!
RainWalker Posted June 5, 2010 Posted June 5, 2010 well if you had created it well done it is really awesome and thnx!
Coyote™ Posted June 5, 2010 Posted June 5, 2010 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.
Recommended Posts