Jump to content
  • 0

Nobless Status After Killing Barakiel For All Party Members


Question

Posted (edited)

Hi all, I added this code to my project and even if player is lvl 1 and without sub he is getting nobless status. Could anyone help me? I want to give nobless status only for players who have active subclass and is level 75+ and send a message to let them know if they are under lvl 75 and dont have sub. Any help is welcome.

 

Edit: this code is inside l2raidbossinstance

if (player.isInParty())
				{
					if (getNpcId() == 25325) // barakielId = 25325;
											{
												
											for(L2PcInstance newNoble : player.getParty().getPartyMembers())
											{
												if (!player.isSubClassActive() || player.getLevel() >= 75 || player.isNoble())																									
												 {
													 newNoble.setNoble(true, true);
													 newNoble.sendMessage("You Are Now a Noble, You Are Granted With Noblesse Status, And Noblesse Skills.");
													 
													 
														
													 	                } 
													 					}
											}
																		
					else 
					{
						if (!player.isSubClassActive() || player.getLevel() < 75);
						player.sendMessage("You don't have subclass level 75 or you are already nobless");	
					}
Edited by ton3

Recommended Posts

  • 0
Posted

but this will give only to one player right? what if they make party with 9 players and only 1 of them last hit barakiel?

when you kill a raid and you are close enough you get raid points? it will work exactly like that, i am testing right now my code, i will reply if it works with party too just to be sure

  • 0
Posted

Its not working probably bcs its under for loop. I experienced that in past.

 

Create a custom script for that.

  • 0
Posted (edited)

int _barakielId = 25325;
if (getNpcId() == _barakielId && !player.isNoble())
{
  if (player.isSubClassActive() && player.getLevel() >= 75) 
 
{
player.setNoble(true);
player.broadcastPacket(new SocialAction( player.getObjectId(), 15));
player.sendMessage("You have received nobless status by killing Raid Boss Barakiel!");
  }
else 
if (!player.isSubClassActive() && player.getLevel() <= 75)
   {
player.sendMessage("You don't have subclass level 75 or you are already nobless"); 
}
}

 

 

MY FAULT WHY I ADDED OR INSTEAD OF AND

 

 

it should work also as:

 

if (getNpcId() == _barakielId  && player.getParty() != null)
{
for (final L2PcInstance member : player.getParty().getPartyMembers())
{
  if (member.isSubClassActive() && member.getLevel() >= 75 && !member.isNoble()) 
  {
   member.setNoble(true);
member.broadcastPacket(new SocialAction( player.getObjectId(), 15));
member.sendMessage("You have received nobless status by killing Raid Boss Barakiel!");
  }
else 
if (!member.isSubClassActive() && member.getLevel() <= 75)
   {
player.sendMessage("You don't meet the required criteria. Your level is too low or you aren't on an active subclass."); 
}
}
Edited by Kelrzher
  • 0
Posted

 

int _barakielId = 25325;

if (getNpcId() == _barakielId && !player.isNoble())

{

  if (player.isSubClassActive() && player.getLevel() >= 75) 

  {

player.setNoble(true);

player.broadcastPacket(new SocialAction( player.getObjectId(), 15));

player.sendMessage("You have received nobless status by killing Raid Boss Barakiel!");

  }

else 

if (!player.isSubClassActive() && player.getLevel() <= 75)

   {

player.sendMessage("You don't have subclass level 75 or you are already nobless"); 

}

}

 

 

MY FAULT WHY I ADDED OR INSTEAD OF AND

 

 

it should work also as:

if (getNpcId() == _barakielId  && player.getParty() != null)
{
for (final L2PcInstance member : player.getParty().getPartyMembers())
{
  if (member.isSubClassActive() && member.getLevel() >= 75 && !member.isNoble()) 
  {
   member.setNoble(true);
member.broadcastPacket(new SocialAction( player.getObjectId(), 15));
member.sendMessage("You have received nobless status by killing Raid Boss Barakiel!");
  }
else 
if (!member.isSubClassActive() && member.getLevel() <= 75)
   {
player.sendMessage("You don't meet the required criteria. Your level is too low or you aren't on an active subclass."); 
}
}

i will test both of them, thank u

  • 0
Posted
if (getNpcId() == _barakielId  && player.getParty() != null)
{
for (final L2PcInstance member : player.getParty().getPartyMembers())
{
  if (member.isSubClassActive() && member.getLevel() >= 75 && !member.isNoble()) 
  {
   member.setNoble(true);
member.broadcastPacket(new SocialAction( player.getObjectId(), 15));
member.sendMessage("You have received nobless status by killing Raid Boss Barakiel!");
  }
else 
if (!member.isSubClassActive() && member.getLevel() <= 75)
   {
player.sendMessage("You don't meet the required criteria. Your level is too low or you aren't on an active subclass."); 
}
}

this one still not sending message to level 1 player, I tried changing the code in many ways but same thing , I believe I will have to try make a script for it.

  • 0
Posted

 

Sorry sdw and sweets, no offense but i made it , so you dont need script or it isnt a fault of the loop, your code obviously hadnt the logic as you guys said.

int _barakielId = 25325;
if (getNpcId() == _barakielId  && player.getParty() != null) //check for party 
{
for (final L2PcInstance member : player.getParty().getPartyMembers())
{
if (member.isSubClassActive() && member.getLevel() >= 75 && !member.isNoble()) //replaced player with the new method 
  {
   member.setNoble(true);
member.broadcastPacket(new SocialAction( player.getObjectId(), 15));
member.sendMessage("You have received nobless status by killing Barakiel!");
  }
else 
if (!member.isSubClassActive() && member.getLevel() <= 75) //the message will appear to ppl that arent subclassed and also they are low leveled, only 
   {
member.sendMessage("You don't meet the required criteria. Your level is too low, you aren't on an active subclass."); 
}
}
}

thank you very much :D

  • 0
Posted

I didn't even look at the code cause the location came first. Putting that code there is just wrong, is all.

  • 0
Posted (edited)

Locked.

 

Btw, the code still is kinda bad. Also, you skipped the solo player, you only reward party.. You should move the party check under the npc check :D

Edited by SweeTs
Guest
This topic is now closed to further replies.


  • Posts

    • I wouldn't expect something less, since you work with Psadek (or I maybe mistake you with NightW0lf from itopz, in that case soz) Let's throw rocks at Java Golds and elevate "original L2OFF Golds", no?
    • We are delighted to announce our partnership with the leading resource, Active Anticheat, specializing in protection against bot programs, clickers, and additional modules for the game client that enhance the experience for both you and the players!   When you purchase Active Anticheat for our product, you will also receive a $50 discount.   Here's a brief overview of the features of Active Anticheat: Best protection against bots, including private and premium versions. Window limitation. HWID spoofing protection. Virtual machine protection. File hash protection for client files, preventing players from modifying them (e.g., interface files). Encryption of any game files. Integration with Discord to attract new players! Additional plugins: - Window with saved player logins/passwords. Players no longer need to enter them every time! - HWID sending to the game server. - Game window optimizer for quick switching. - Background FPS adjustment. - Window name customization in the format "%character_name% - %server_name%". - Ctrl+C/V permission. - Login and password saving (for Interlude -> High Five). - Launching the browser via server packets. - Launching interface events via server packets. - Interlude: fixing a known game bug (History: UpdateAnimation <- AActor::Tick <- TickAllActors <- ULevel::Tick <- (NetMode=0) <- TickLevel <- UGameEngine::Tick <- UpdateWorld <- MainLoop). - Interlude: debuff feature. 9) All of this is available without modifying the game server code (some plugins may require minor changes). Take note of newest plugin, which is highly useful: Guides section
    • The Lucera2 Multiprotocol is an advanced server branch for Lineage 2 that enables seamless support for multiple client versions on a single server instance. This allows players to connect and play using either the legacy (old) client or the newer Classic client simultaneously, without any compatibility issues or loss of functionality. Key Benefits Dual Client Support: Both the old Interlude client and Classic: Secret of Empire 2.6 client can run concurrently on the same server. All features from the Classic client (e.g., enhanced UI, new mechanics) remain fully available, while the old client retains its alternative features (e.g., simplified interfaces for lower-end hardware). Expanded Player Base: Ideal for regions with limited access to modern gaming setups, as it accommodates a wider range of devices and preferences, merging Legacy and Classic communities into one forum section for unified discussions. No Functionality Gaps: Extensive testing ensures zero disruptions—players on either client experience complete game integrity, including quests, PvP, raids, and custom Lucera2 subsystems. You can fully test and explore all aspects of Multiprotocol on the dedicated Test Server. Supported Protocols C6 (Old Client): Protocol versions 740–770. Classic Client (Secret of Empire 2.6): Protocol versions 166–192.
    • Connect to the server you need to >>>download<<< game client launch from /system_en/. Login server setup on auto registration, admin rights in game by default . Or you can use a patch specifying the l2.ini Connect to address classic.lucera2.com if you already have a game client Download updated patch All major/minor subsystems operate in a proper view. Absolutely ready to combat the server.
  • 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