Ellone Posted March 4, 2017 Posted March 4, 2017 It's all in the title, is there a way to change the color of the nickname of the party members ? Quote
Solomun Posted March 4, 2017 Posted March 4, 2017 U can do it server side. for(L2PcInstance p : player.getParty().getPartyMembers()) p.setNameColor("#FF00FF"); Something like that i guess Quote
Ellone Posted March 5, 2017 Author Posted March 5, 2017 (edited) Thanks, that's nice to know. (It would be "#00FF00" for green though I think) But It probably can be done client side, cant it ? Edited March 5, 2017 by Ellone Quote
'Baggos' Posted March 5, 2017 Posted March 5, 2017 Thanks, that's nice to know. (It would be "#00FF00" for green though I think) But It probably can be done client side, cant it ? No. You can't add the name color by editing client side. This is java side. Also, you'll need to check the player on leave party. (Return the namecolor back to normal). Quote
vampir Posted March 7, 2017 Posted March 7, 2017 It would be a lot harder to edit game client, this would require messing in Engine.dll It is easier to make it in server core. What Solomun suggested will not work well, it will make party color to be seen by all players, not only by party members. If you are not into java, it will be hard to be done. You need to: - Check how CharInfo gets color of the nickname, it should have different method than UserInfo and any other call. - CharInfo should provide PcInstance that is about to receive the color. - Returned value should be different than original, if players are party members. Quote
Solomun Posted March 7, 2017 Posted March 7, 2017 It would be a lot harder to edit game client, this would require messing in Engine.dll It is easier to make it in server core. What Solomun suggested will not work well, it will make party color to be seen by all players, not only by party members. If you are not into java, it will be hard to be done. You need to: - Check how CharInfo gets color of the nickname, it should have different method than UserInfo and any other call. - CharInfo should provide PcInstance that is about to receive the color. - Returned value should be different than original, if players are party members. This is the second way i would suggest but i thought it would be the same. I can see the difference now :) But this would need to refresh userInfo when a new party is created, right? Quote
vampir Posted March 7, 2017 Posted March 7, 2017 No. When any user joins party, his UserInfo is sent to nearby players anyway. That broadcast is required to refresh relations. Quote
ganjaradio Posted March 7, 2017 Posted March 7, 2017 couldnt it be done on PartyEnder/accept or how its called and then on leave? Quote
Solomun Posted March 7, 2017 Posted March 7, 2017 No. When any user joins party, his UserInfo is sent to nearby players anyway. That broadcast is required to refresh relations. Ok i got it...Its just that im rusted since i didnt touch l2 coding for 4 years :) Quote
ganjaradio Posted March 7, 2017 Posted March 7, 2017 (edited) 1 question Setnamecolor(int) but rgb colors have letters, when i set the int to String i get error Edit: What ive done: private int afsd; private final int _PartyColorName = 0000; if (_activeChar.isInParty() == true) { afsd = _activeChar.getAppearance().getNameColor(); _activeChar.getAppearance().setNameColor(_PartyColorName); } else if (_activeChar.isInParty() == false) { _activeChar.getAppearance().setNameColor(afsd); } Edited March 7, 2017 by ganjaradio Quote
melron Posted March 7, 2017 Posted March 7, 2017 (edited) 1 question Setnamecolor(int) but rgb colors have letters, when i set the int to String i get error Edit: What ive done: private int afsd; private final int _PartyColorName = 0000; if (_activeChar.isInParty() == true) { afsd = _activeChar.getAppearance().getNameColor(); _activeChar.getAppearance().setNameColor(_PartyColorName); } else if (_activeChar.isInParty() == false) { _activeChar.getAppearance().setNameColor(afsd); } private int _Color = 0xFFFF77; private int _PartyColorName = your color; activeChar.getAppearance().setNameColor(activeChar.isInParty() ? _PartyColorName : _Color); Edited March 7, 2017 by melron Quote
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.