I have a custom quest that onKill event is getting the party leader's L2PcInstance and adding 1 to an int variable inside it. The whole party's progress is calculated by the party leader's variable. Now, if the party leader were to change leader then the quest progress would be reset. I have tried doing a for loop through the party members and syncing their variable to the party leader but it acted awkward and didn't work. Any ideas on how I can make it not reset if the leader were to get disconnected? I need some way of transferring the leader's variable to the new leader.
Also, is there a way to detect if someone enters the party? I'd like to display the party's current progress.
Thanks for any input.
Transferring a current party leader's variables to a new one
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
-
- Posts: 13
- Joined: Mon Jul 16, 2012 6:53 pm
- jurchiks
- Posts: 6769
- Joined: Sat Sep 19, 2009 4:16 pm
- Location: Eastern Europe
Re: Transferring a current party leader's variables to a new
set the variable to them all? at least one should remain with the latest value.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.