Page 1 of 1

Char Name change and hide glow effect (ingame)

Posted: Sun Oct 14, 2012 2:16 am
by Topicus
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number: Trunk 5667
L2JDP Revision Number:

Im trying to change char name ingame to "temporary name" when entering in a custom zone:

Code: Select all

 activeChar.setName("Somename"); 
To my char the name changes. But to other near chars dont. Im tried this:

Code: Select all

 activeChar.setName("Somename");activeChar.broadcastUserInfo(); 
But nothing =/
Can someone help?

Re: Char Name change (ingame)

Posted: Sun Oct 14, 2012 12:01 pm
by UnAfraid
try clear knownlist of all players in yours and then teleport player on his place.

Re: Char Name change (ingame)

Posted: Sun Oct 14, 2012 2:42 pm
by Topicus
Why is needed to teleport char again in same place? There is no "update" knownlist command in l2j? Why activeChar.broadcastTitleInfo(); works for titles, but there is no option for char names? Whats the difference?

im trying, im trying...
Thanks :?

Edit:

Im tried:

Code: Select all

 activeChar.getKnownList().getKnownCharacters().clear(); 
Nothing too, even teleporting in same place.

Re: Char Name change (ingame)

Posted: Sun Oct 14, 2012 3:11 pm
by Topicus
I did it!

Code: Select all

activeChar.getAppearance().setVisibleName("someshit");activeChar.getAppearance().setVisibleTitle("sameshit");
I did not know these methods... easy.

Another question... How to hide enchant glow in other players, like i did with name and title?

Re: Char Name change (ingame)

Posted: Sun Oct 14, 2012 10:06 pm
by Topicus
Topicus wrote: Another question... How to hide enchant glow in other players, like i did with name and title?
i'll help myself :mrgreen:
Whatever, for future reference:

Code: Select all

 Index: E:/workspace/L2J_Server_Trunk_Test/java/com/l2jserver/gameserver/network/serverpackets/CharInfo.java===================================================================--- E:/workspace/L2J_Server_Trunk_Test/java/com/l2jserver/gameserver/network/serverpackets/CharInfo.java    (revision 5667)+++ E:/workspace/L2J_Server_Trunk_Test/java/com/l2jserver/gameserver/network/serverpackets/CharInfo.java    (working copy)@@ -17,11 +17,13 @@ import com.l2jserver.Config; import com.l2jserver.gameserver.datatables.NpcTable; import com.l2jserver.gameserver.instancemanager.CursedWeaponsManager;+import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.actor.L2Decoy; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.actor.templates.L2NpcTemplate; import com.l2jserver.gameserver.model.effects.AbnormalEffect; import com.l2jserver.gameserver.model.itemcontainer.Inventory;+import com.l2jserver.gameserver.model.zone.type.L2SomeZone;  public class CharInfo extends L2GameServerPacket {@@ -276,6 +278,7 @@            writeD(_activeChar.getAppearance().getHairColor());            writeD(_activeChar.getAppearance().getFace());            +            writeS(gmSeeInvis ? "Invisible" : _activeChar.getAppearance().getVisibleTitle());                        if (!_activeChar.isCursedWeaponEquipped())@@ -320,7 +323,14 @@            writeD(_activeChar.getMountNpcId() + 1000000);            writeD(_activeChar.getClassId().getId());            writeD(0x00); // ?-           writeC(_activeChar.isMounted() || _airShipHelm != 0 ? 0 : _activeChar.getEnchantEffect());+           if (_activeChar.isInsideZone(L2Character.ZONE_SOME) && !L2SomeZone._showEnchant && !_activeChar.isGM())+           {+               writeC(0);+           }else+           {+               writeC(_activeChar.isMounted() || _airShipHelm != 0 ? 0 : _activeChar.getEnchantEffect());+           }                        writeC(_activeChar.getTeam()); // team circle around feet 1= Blue, 2 = red 
Thanks and close-me!

Re: Char Name change (ingame)

Posted: Thu Jan 16, 2014 7:12 pm
by u3games
Topicus wrote:I did it!

Code: Select all

activeChar.getAppearance().setVisibleName("someshit");activeChar.getAppearance().setVisibleTitle("sameshit");
I did not know these methods... easy.

Another question... How to hide enchant glow in other players, like i did with name and title?
You can hide name and title in an event? in custom files example ...

Re: Char Name change and hide glow effect (ingame)

Posted: Thu Jan 16, 2014 7:42 pm
by Sdw
As long as you have access to the character you can.