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

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


  • Posts

    • Provide proofs not providing any kind of proofs i will just issue warnings
    • For the odbc you have to run the Instalador.exe and click crear dsn, but you have to rename them so the lin2clancomm.dsn for example becomes l2c4_lin2clancomm but also check if the file inside has as database value the correct file name, about the client i also wanted a clean client because i had a problem with the monsters because the character didn't have collision with the monsters and he was running through them but i fixed it with files from a normal interlude client, also my client is now c3 😛 i changed the maps, staticmeshes, systextures so now i do not have the fortresses at antharas lair for example but i also have the c3 sounds and login screen. Where is @GX-Ext
    • I really wonder if they launched the server without testing it even once. All players are creating new characters and transferring the level 20 reward to their main ones. It seems banning people is much easier than sending them a direct message in-game. If you can’t do your job properly, get in touch with people who can help you. I made 17 million in 10 minutes on a 1x Adena rate server and got an Icarus weapon. My suggestion to you — as it's written on the character you banned — is to wipe the server and run a proper OBT. Good luck with your time as administrators; although it doesn't look like it will last very long.  
    • all the reports vanished into thin air  
    • 🔥L2 INTERPRIDE - Pride Style  OPENING THIS NOVEMBER! 🔥  ✅ Grand Opening - November 15th! ✅ ❤️ Open Beta - October 08th! ❤️  🩵  The most up-to date client on the market! ▶️  Retail Pride Style Interlude with the new Client! 💡Discord: https://discord.gg/l2interpride 🌍 General Information Client: Interlude Type: Custom PvP Server Rates: High Rates Starting Level: 56 Balanced PvP Environment Unique PvP Enchant System PvP Synergy System: Support Classes earn PvP Score when assisting DDs in kills Toggle Skills → Now Passive Killing Spree: Every 25 kills grants Hero Aura + Hero Skills until death 🐉 Raid Boss System If you are within 1500 radius when a Raid Boss dies, you automatically receive 1 Raid Boss Chest in your inventory! 💫 Join the Battle ⚔️ Experience modern PvP gameplay on a classic Interlude foundation! 🔥 Build your power. Earn glory. Dominate Aden. 🧙 Custom Items Armors: 🛡️ Tier 1: Dread ⚔️ Tier 2: Titanium 👑 Tier 3: Pride Weapons: 🔱 Tier 1: Unique (PvP / PvE) ⚔️ Tier 2: Pride 💀 Tier 3: Abyssal Accessories: Up to 30 custom accessories with unique stats Legendary Dyes: +5 / -2 Belts: Various special stats ⚔️ Custom PvP Skills PvPs Name Color Reward Skill 500 Blue Firework CP Heal +800 1000 Violet Firework Cleanse 1500 Green Blessed Body 2000 Yellow MP Recharge 2500 Light Blue Special Focus 3000 Orange Death Whisper Debuff 3500 Dark Purple Might 4000 Red Empower 4500 Red Increase Weight Debuff 5000 Red Wind Walk 6000 Red Berserker Spirit 7000 Red Recall NPC 🛒 Shops & NPCs Item Store: Up to A/S grade, Potions, Consumables & more Mysterious Merchant: Custom Armors, Weapons, Accessories NPC Buffer: All Buffs + Scheme System Class Master: Free Class Change 🔥 Enchant System Safe Enchant: +7 Max Enchant: +25 Weapon Rate: Custom (higher enchant = lower rate) Armor Rate: Custom (higher enchant = lower rate) Jewel Rate: Custom (higher enchant = lower rate) ⚙️ Rates Experience: x5000 Skill Points: x5000 Drop Rate: x1 Adena: x500 🏆 Events Team vs Team (TvT) Capture the Flag (CTF) Death Match Castle Siege Hunting Grounds URF TvT 💎 Custom Features ALT + Left Click → Remove selected Buff ALT + F → Teleport System Shift + Left Click → View Monster Droplist
  • 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