THeMaxPoweR Posted June 19, 2016 Posted June 19, 2016 (edited) hey guys .. now iam working on l2 tales based on l2f files .. and i wanna add custom pvp announce like .. when player kill 3 players it says killing spree .. i'v done form the massage .. and it work perfectly public int kss;pk.setPvpKills(pk.getPvpKills() + 1); kss ++ ;if (kss == 3){Announcements.getInstance().announceToAll("killing spree " , ChatType.CRITICAL_ANNOUNCE);}i need to make kss reset to zero when player get killed and start counting again so what ihave to do ???sorry for my bad en Edited June 19, 2016 by THeMaxPoweR
0 SweeTs Posted June 19, 2016 Posted June 19, 2016 (edited) As Tk said, search for Player.java (gameserver/model location). Maybe as you posted above, check onDeath method. Edited June 19, 2016 by SweeTs
0 bidi1252 Posted June 19, 2016 Posted June 19, 2016 try if (kss == 3){ Announcements.getInstance().announceToAll("killing spree " , ChatType.CRITICAL_ANNOUNCE); kss = 0; }
0 THeMaxPoweR Posted June 19, 2016 Author Posted June 19, 2016 it will set counter to zero with without being killed :D i need to reset after death :]
0 Tryskell Posted June 19, 2016 Posted June 19, 2016 L2PcInstance.doDie after super.doDie check kss = 0;
0 Tryskell Posted June 19, 2016 Posted June 19, 2016 (edited) L2PcInstance Doesn't exist Player if you use a random russian pack. Otherwise search better. It's L2PcInstance since L2J exists. Search doDie at worst, none renames that. Edited June 19, 2016 by Tryskell
0 THeMaxPoweR Posted June 19, 2016 Author Posted June 19, 2016 (edited) i got only one do die method at Creature.java public final void doDie(Creature killer) { // killing is only possible one time if(!isDead.compareAndSet(false, true)) return; onDeath(killer); } Edited June 19, 2016 by THeMaxPoweR
0 THeMaxPoweR Posted June 19, 2016 Author Posted June 19, 2016 (edited) Solved :D thnx guys Edited June 19, 2016 by THeMaxPoweR
Question
THeMaxPoweR
hey guys ..
now iam working on l2 tales based on l2f files ..
and i wanna add custom pvp announce like ..
when player kill 3 players it says killing spree ..
i'v done form the massage ..
and it work perfectly
i need to make kss reset to zero when player get killed and start counting again so what ihave to do ???sorry for my bad en
Edited by THeMaxPoweR9 answers to this question
Recommended Posts