Jump to content

Question

Posted

Hello community . As you know , there is a bug on L2jFrozen . If admin set to color clan leader title , you can make all players of this clan to have the same title by changing the clan leader .

 

Exemple : I am Leader . I have green color and then i change clan leader . After changing i'm not leader but i have green title color . My friend gonna give my clan back and then he will have green title color too as me , but he's not clan leader .

 

I tryied fix it and i successed.

 

 

                                L2jFrozen Code 

// Apply color settings to clan leader when entering  
	if (activeChar.getClan() != null && activeChar.isClanLeader() && Config.CLAN_LEADER_COLOR_ENABLED && activeChar.getClan().getLevel() >= Config.CLAN_LEADER_COLOR_CLAN_LEVEL)
	{
		if (Config.CLAN_LEADER_COLORED == 1)
			activeChar.getAppearance().setNameColor(Config.CLAN_LEADER_COLOR);
		else
			activeChar.getAppearance().setTitleColor(Config.CLAN_LEADER_COLOR);
	}

                   MY EDIT ADDED .
	if(activeChar.getClan() != null )
		if(!activeChar.isClanLeader())
			activeChar.getAppearance().setTitleColor(Config.CLAN_NOLEADER_COLOR);

 

But that's not really good , cuz player must restart to change his title color from "green"(Config.CLAN_LEADER_COLOR) to "white"Config.CLAN_NOLEADER_COLOR). Can you tell me how i can kill connection ? In moment when clan leader is changed , last clan leader to be kicked , not actually .

 

Sorry for my english ... :D But i hope you understand what i'm writing

9 answers to this question

Recommended Posts

  • 0
Posted

Hello community . As you know , there is a bug on L2jFrozen . If admin set to color clan leader title , you can make all players of this clan to have the same title by changing the clan leader .

 

Exemple : I am Leader . I have green color and then i change clan leader . After changing i'm not leader but i have green title color . My friend gonna give my clan back and then he will have green title color too as me , but he's not clan leader .

 

I tryied fix it and i successed.

 

 

                                L2jFrozen Code 

// Apply color settings to clan leader when entering  
	if (activeChar.getClan() != null && activeChar.isClanLeader() && Config.CLAN_LEADER_COLOR_ENABLED && activeChar.getClan().getLevel() >= Config.CLAN_LEADER_COLOR_CLAN_LEVEL)
	{
		if (Config.CLAN_LEADER_COLORED == 1)
			activeChar.getAppearance().setNameColor(Config.CLAN_LEADER_COLOR);
		else
			activeChar.getAppearance().setTitleColor(Config.CLAN_LEADER_COLOR);
	}

                   MY EDIT ADDED .
	if(activeChar.getClan() != null )
		if(!activeChar.isClanLeader())
			activeChar.getAppearance().setTitleColor(Config.CLAN_NOLEADER_COLOR);

 

But that's not really good , cuz player must restart to change his title color from "green"(Config.CLAN_LEADER_COLOR) to "white"Config.CLAN_NOLEADER_COLOR). Can you tell me how i can kill connection ? In moment when clan leader is changed , last clan leader to be kicked , not actually .

 

Sorry for my english ... :D But i hope you understand what i'm writing

 

 

 

    MY EDIT ADDED .

if(activeChar.getClan() != null )

if(!activeChar.isClanLeader())

-activeChar.getAppearance().setTitleColor(Config.CLAN_NOLEADER_COLOR);

                    +activeChar.getAppearance().setTitleColor(0xFFFFFF);

 

  • 0
Posted

 

    MY EDIT ADDED .

if(activeChar.getClan() != null )

if(!activeChar.isClanLeader())

-activeChar.getAppearance().setTitleColor(Config.CLAN_NOLEADER_COLOR);

 

 

                    +activeChar.getAppearance().setTitleColor(0xFFFFFF);

 

 

 

Buddy , i already finished problem with bug , now i just want to kick last leader after changing leader

  • 0
Posted

I don't know how l2jfrozen does clans but from the default interlude in L2Clan.java you could use this function after doing that crap.

 

public void removeClanMember(String name, long clanJoinExpiryTime)

 

 

  • 0
Posted

I don't know how l2jfrozen does clans but from the default interlude in L2Clan.java you could use this function after doing that crap.

 

public void removeClanMember(String name, long clanJoinExpiryTime)

 

 

 

it's not about kicking him , just close his connection ( lineage 2 screen ).

  • 0
Posted

it's not about kicking him , just close his connection ( lineage 2 screen ).

 

why do you want to close his connection? I don't really see the logic in that but, alright. What you can do is turn on the debugger, freeze your L2PcInstance and see what happens when you trigger a disconnect, perhaps there is a player disconnect function somewhere.

  • 0
Posted

Hi, but about this, I can say, what I have been searching for leader color name changing, and I saw what, leaders name color is changing only when leader is crossing packet Enterworld (or in other words, he is starting playing) and then clan is destroying. But I didn't saw what clan leader color is changing, for example, when he creates the clan, or changes leader. So we can think like this:

Add these:

		if (Config.CLAN_LEADER_COLOR_ENABLED && getLevel() >= Config.CLAN_LEADER_COLOR_CLAN_LEVEL)
		{
			exLeader.getAppearance().setNameColor(0x000000);
			exLeader.getAppearance().setTitleColor(0x9900CC);
			exLeader.updateNameTitleColor();
		}

Below these:

public boolean setLeader(L2ClanMember member)
{
	if(member==null){
		return false;
	}

	L2ClanMember old_leader = _leader;
	_leader = member;
	_members.put(member.getName(), member);

	//refresh oldleader and new leader info
	if(old_leader!=null){

		L2PcInstance exLeader = old_leader.getPlayerInstance();
		exLeader.setClan(this);
		exLeader.setPledgeClass(exLeader.getClan().getClanMember(exLeader.getObjectId()).calculatePledgeClass(exLeader));
		exLeader.setClanPrivileges(L2Clan.CP_NOTHING);

And then, these:

		if (Config.CLAN_LEADER_COLOR_ENABLED && getLevel() >= Config.CLAN_LEADER_COLOR_CLAN_LEVEL)
		{
			if (Config.CLAN_LEADER_COLORED == 1)
				newLeader.getAppearance().setNameColor(Config.CLAN_LEADER_COLOR);
			else
				newLeader.getAppearance().setTitleColor(Config.CLAN_LEADER_COLOR);
			newLeader.updateNameTitleColor();
		}

Below these:

	updateClanInDB();


	if(member.getPlayerInstance()!=null){

		L2PcInstance newLeader = member.getPlayerInstance();
		newLeader.setClan(this);
		newLeader.setPledgeClass(member.calculatePledgeClass(newLeader));
		newLeader.setClanPrivileges(L2Clan.CP_ALL);

 

P.s. Sorry, I haven't finded good project with svn, so I couldn't put patch.

P.s.s. All this change is in L2Clan.java / setLeader method.

P.s.s.s. Sorry for bad English. :)

  • 0
Posted

main thing:

exLeader.updateNameTitleColor();

But without these:

				exLeader.getAppearance().setNameColor(0x000000);
			exLeader.getAppearance().setTitleColor(0x9900CC);

You have nothing to update...  :-X

  • 0
Posted

you set the colors, but you will not see them if you dont send some update packet to the client, that why the client still see the old colors, usualy its:

 

sendPacket(new ShortBuffStatusUpdate(0, 0, 0));

type

for example

 

but that function looks like it does send the packet inside it, check it, and if its ot doing it, the find what packet you need to send and send it

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
Answer this question...

×   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

    • My official facebook profile!: https://www.facebook.com/spectrumL2 Specifications: Revamped L2JACIS revision FROM the core Private project!!! Revision that has been receiving corrections for over 3 years!!! Events already installed in the revision: TVT CTF KTB PARTY FARM SPOIL EVENT CRAZY RATES TOURNAMENT TIME ZONE (INSTANCE) All working correctly!!! SIEGE ESSENTIAL FEATURES: Walls fix Gates fix Flags fix 100% functional: OLYMPIADS: Implemented settings Hero receives enchanted Weapons with equal status PvP Weapons Optional /true/false Hero can acquire all Hero Weapons Optional true/false OTHER IMPLEMENTATIONS: Teleport fixed (directly to Giran) Teleport effect classic Vip skins vip collor name Pack NPCs with effect already configured BOSES already configured Mobs already configured CLASS BALANCE SPECIAL SYSTEM We have a SPECIAL system developed for Class Balance with only 1 digit in XML %tage of configurable debuffs Player limitation system in BOSES or PvP zones BS blocking system in FLEG zones or events Among others dozens of improvements made in the review... price: 390 USD !  OBS: WE CAN CHANGE THE BANNER AND NAME OF THE SERVICE TO THE ONE OF YOUR PREFERENCE BUT THE SETTINGS MUST BE KEPT ANY CHANGES REQUIRE ADDITION        
    • Server is Online – 1,000+ Active Players! We’re excited to announce the addition of a Europe Proxy to improve connectivity for our EU players! Clans can now benefit from VIP Access to help you catch up faster. 🎯 If you're a clan leader with at least 9 active members, join our Discord and open a ticket to claim your VIP rewards!  
    • The Telegram team is rolling out a new batch of Stars-only gifts you’ll be able to mint as NFTs. Don’t miss your chance to join the next Telegram trend and earn from it! Buy Telegram Stars cheap and KYC-free 1 Star from $0.0149 (min. 50 Stars, bulk discounts available) Promo code STARS5 — 5 % off Pay any way you like: bank cards · crypto · other popular methods How to purchase: ➡Online Store — Click ➡ Telegram bot — Click Other services: ➡ SMM panel — Click Regular buyers get extra discounts and promo codes. Support: ➡ Telegram: https://t.me/solomon_bog ➡ Telegram channel: https://t.me/accsforyou_shop ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store Use these contacts to discuss wholesale orders, partnerships (current list: https://socnet.bgng.io/partners) or to become a supplier. SocNet — your shop for digital goods and premium subscriptions
    • The Telegram team is rolling out a new batch of Stars-only gifts you’ll be able to mint as NFTs. Don’t miss your chance to join the next Telegram trend and earn from it! Buy Telegram Stars cheap and KYC-free 1 Star from $0.0149 (min. 50 Stars, bulk discounts available) Promo code STARS5 — 5 % off Pay any way you like: bank cards · crypto · other popular methods How to purchase: ➡Online Store — Click ➡ Telegram bot — Click Other services: ➡ SMM panel — Click Regular buyers get extra discounts and promo codes. Support: ➡ Telegram: https://t.me/solomon_bog ➡ Telegram channel: https://t.me/accsforyou_shop ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store Use these contacts to discuss wholesale orders, partnerships (current list: https://socnet.bgng.io/partners) or to become a supplier. SocNet — your shop for digital goods and premium subscriptions
    • 📜 • Mass PVP – Craft – Progressive Server (ITEMS, ARMOR, WEAPONS, ETC) 🕹️ • Chronicles: Lineage 2 - Interlude (C6) 🛠️ • Retail status 🕒 • Server Time: GMT -3 🏙️ • Main Town: Giran ✨ • Teleportation for all Towns, Gk Global 🛡️ • NPC BUFFER - GMSHOP B-GRADE - DONATION SHOP - AUCTION MANAGER 🐉 • Epic Bosses: Chaotic Zones 🔁 • Protection respawn: 15 seconds ⏰ • Restart Server: 05:00 AM Today 💸 • RTM allowed between players (ask Staff if in doubt) 📊 SERVER RATES: • EXP: x8 • SP: x10 • Adena: x3 • Seal Stone: x3 • Drop: x3 • Spoil: x5 • Raid EXP/SP/Drop: x3 • Premium Rates: x2 🌐 Website: https://www.l2roosters.com 💬 Discord: https://discord.gg/cUyYXrfy 🔥 Join us now and forge your legacy at Roosters Gaming!
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock