Jump to content

Recommended Posts

	public void setClan(Clan clan)
	{
		_clan = clan;
		setTitle("");
		
		if (clan == null)
		{
			_clanId = 0;
			_clanPrivileges = 0;
			_pledgeType = 0;
			_powerGrade = 0;
			_lvlJoinedAcademy = 0;
			_apprentice = 0;
			_sponsor = 0;
			return;
		}
		
		if (!clan.isMember(getName()))
		{
			// char has been kicked from clan
			setClan(null);
			return;
		}
		
		_clanId = clan.getClanId();
		
		// Add clan leader skills if clanleader
		addClanLeaderSkills(isClanLeader() && (clan.getLevel() >= 4));
	}

if i delete setTitle(""), will player be able to set title on their own again? please tell me

Link to comment
Share on other sites

1 hour ago, Dramzes said:
	public void setClan(Clan clan)
	{
		_clan = clan;
		setTitle("");
		
		if (clan == null)
		{
			_clanId = 0;
			_clanPrivileges = 0;
			_pledgeType = 0;
			_powerGrade = 0;
			_lvlJoinedAcademy = 0;
			_apprentice = 0;
			_sponsor = 0;
			return;
		}
		
		if (!clan.isMember(getName()))
		{
			// char has been kicked from clan
			setClan(null);
			return;
		}
		
		_clanId = clan.getClanId();
		
		// Add clan leader skills if clanleader
		addClanLeaderSkills(isClanLeader() && (clan.getLevel() >= 4));
	}

if i delete setTitle(""), will player be able to set title on their own again? please tell me

Can, this code deletes the current title when joining a clan.

Link to comment
Share on other sites

1 hour ago, Dramzes said:

i did add pvp pk title, but i can change my title, i want to disable players to change titles

So ... CharInfo and UserInfo packets sending the title info. Change inside this packets code to your conditions.
Some ideas: add a custom item to change the title (example id:4007). Or try to find any good dev to write the code for you. I guess its not more than 10 lines.

Link to comment
Share on other sites

RequestGiveNickName() packet

 

find:

// Noblesse can bestow a title to themselves
        if (player.isNoble() && _name.matches(player.getName()))
        {
            player.setTitle(_title);
            player.sendPacket(SystemMessageId.TITLE_CHANGED);
            player.broadcastTitleInfo();
        }
        else
        {
            // Can the player change/give a title?
            if (!player.hasClanPrivileges(Clan.CP_CL_GIVE_TITLE))
            {
                player.sendPacket(SystemMessageId.YOU_ARE_NOT_AUTHORIZED_TO_DO_THAT);
                return;
            }
            
            if (player.getClan().getLevel() < 3)
            {
                player.sendPacket(SystemMessageId.CLAN_LVL_3_NEEDED_TO_ENDOWE_TITLE);
                return;
            }
            
            final ClanMember member = player.getClan().getClanMember(_name);
            if (member != null)
            {
                final Player playerMember = member.getPlayerInstance();
                if (playerMember != null)
                {
                    playerMember.setTitle(_title);
                    
                    playerMember.sendPacket(SystemMessageId.TITLE_CHANGED);
                    if (player != playerMember)
                        player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CLAN_MEMBER_S1_TITLE_CHANGED_TO_S2).addCharName(playerMember).addString(_title));
                    
                    playerMember.broadcastTitleInfo();
                }
                else
                    player.sendPacket(SystemMessageId.TARGET_IS_NOT_FOUND_IN_THE_GAME);
            }
            else
                player.sendPacket(SystemMessageId.TARGET_MUST_BE_IN_CLAN);
        }

 

and replace with

 

// Noblesse can bestow a title to themselves
        if (player.isNoble() && _name.matches(player.getName()))
        {
            player.sendMessage("Titles are disabled.");    
            return;
        }
        else
        {
            player.sendMessage("Titles are disabled.");    
            return;
        }

 

not tested but should work

 

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • What unique features ? 
    • Welcome to SmurfsZone   Buy League of Legends accounts across all servers and jump straight into Ranked Games with amazing quality and support.   Why Choose SmurfsZone? 24/7 Instant Delivery: Get your full access LoL smurf account immediately. 100% Hand-Leveled: High-quality accounts leveled by hand. Versatile MMR Options: High MMR, Standard MMR, Fresh MMR (ARAMs), and Ranked accounts available. Valorant Accounts: Expand your gaming experience. Our Commitment to You: Unopened Loot: Customize your champion pool. Lifetime Warranty: Valid if you change the email, username, and password upon purchase. Password Changeable: Ensure your account's security. Full Recovery Information: Complete access to account recovery details. Unverified and Changeable Email: Easy to personalize and secure your account. Completely Unranked: Fresh start with no ranked history in any season. Responsive Customer Support: Our dedicated team is available to assist you 24/7.   Experience the best place to buy League of Legends accounts with exceptional quality and dedicated support. We're here for YOU!
    • Thanks! I'll take a second look and let you know if my implementation of the clearCircle() helps with the stuttering once I find time for some extensive testing.
    • Thank you for your reply. I have removed it from the L2Server.exe file, but the L2Server still crashes. It doesn't crash if I don't start l2npc, otherwise it will crash within a few days at the latest.
    • Welcome to my store :  https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10$ 2017 Discord Account :3.99 $ 2018 Discord Account : 3.50$ 2019 Discord Account : 2.70 $ 2020 Discord Account :1.50$ 2021 Discord Account :0.99$ 2022 Discord Account :0.70$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11 Telegram : https://t.me/ultrastore1 Welcome to my store :  https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10$ 2017 Discord Account :3.99 $ 2018 Discord Account : 3.50$ 2019 Discord Account : 2.70 $ 2020 Discord Account :1.50$ 2021 Discord Account :0.99$ 2022 Discord Account :0.70$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11 Welcome to my store :  https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10$ 2017 Discord Account :3.99 $ 2018 Discord Account : 3.50$ 2019 Discord Account : 2.70 $ 2020 Discord Account :1.50$ 2021 Discord Account :0.99$ 2022 Discord Account :0.70$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11
  • Topics

×
×
  • Create New...