How to add xp to party?

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
xrs
Posts: 25
Joined: Thu Sep 24, 2009 11:05 am
Contact:

How to add xp to party?

Post by xrs »

L2J Revision Number:4487
L2JDP Revision Number:7760

How to add xp to players party members within l2pcinstance.java? I'm working on faction type server, and I need to give xp as a reward for pvp kills to all pp members. With items it's all clear: getParty().distributeItem(this, item); But what about xp? There is a function distributeXpAndSp, but cant find any info how to use it properly.
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 7008
Joined: Tue Aug 11, 2009 3:36 am

Re: How to add xp to party?

Post by Zoey76 »

Code: Select all

         for (L2PcInstance member : player.getParty().getPartyMembers())        {            member.addExpAndSp(addToExp, addToSp);        } 
Powered by Eclipse 4.34 🌌 | Eclipse Temurin 21 ☕ | MariaDB 11.3.2 🗃️ | L2J Server 2.6.3.0 - High Five 🚀

🔗 Join our Discord! 🎮💬
Post Reply