Jump to content
  • 0

[Request] Change name


Question

Posted

Καλησπέρα. Θα ήθελα αν γίνεται να μου δώσετε script ή handler για να επιλογή ο παίχτης να αλλάζει το όνομα του.

Έψαξα, αλλά δυστυχώς δεν βρήκα κάτι τέτοιο.

Ευχαριστώ

4 answers to this question

Recommended Posts

  • 0
Posted

Δες πως αλλάζει το admin το όνομα κάποιου παίκτη,και μετά φτιάξε ένα npc ή ένα vc που να κάνει το ίδιο.

 

δεν είναι δύσκολο.

  • 0
Posted

eisai sigouros oti tha doulepsei m auton tn tropo?

anyway euxaristw file m

Δεν σου είπα να το αντιγράψεις όπως είναι,θα χρειαστούν κάποιες (μίκρο)αλλαγές,αλλά ο κορμός είναι πάνω κάτω ο ίδιος.
  • 0
Posted
		if (command.startsWith("changename"))
	{
		try
		{
			String val = command.substring(17);
			L2Object target = activeChar.getTarget();
			L2PcInstance player = null;
			if (target instanceof L2PcInstance)
				player = (L2PcInstance) target;
			else
				return false;
			if (CharNameTable.getInstance().getIdByName(val) > 0)
			{
				activeChar.sendMessage("Warning, player "+val+" already exists");
				return false;
			}
			player.setName(val);
			player.store();

			player.sendMessage("Your name has been changed");
			player.broadcastUserInfo();
			CommunityServerThread.getInstance().sendPacket(new WorldInfo(player, null, WorldInfo.TYPE_UPDATE_PLAYER_DATA));

			if (player.isInParty())
			{
				// Delete party window for other party members
				player.getParty().broadcastToPartyMembers(player, PartySmallWindowDeleteAll.STATIC_PACKET);
				for (L2PcInstance member : player.getParty().getMembers())
				{
					// And re-add
					if (member != player)
						member.sendPacket(new PartySmallWindowAll(member, player.getParty()));
				}
			}
			if (player.getClan() != null)
			{
				player.getClan().broadcastClanStatus();
			}

			RegionBBSManager.getInstance().changeCommunityBoard();
		}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..