THeMaxPoweR Posted June 19, 2016 Share 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 Link to comment Share on other sites More sharing options...
0 SweeTs Posted June 19, 2016 Share 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 Link to comment Share on other sites More sharing options...
0 bidi1252 Posted June 19, 2016 Share Posted June 19, 2016 try if (kss == 3){ Announcements.getInstance().announceToAll("killing spree " , ChatType.CRITICAL_ANNOUNCE); kss = 0; } Link to comment Share on other sites More sharing options...
0 THeMaxPoweR Posted June 19, 2016 Author Share Posted June 19, 2016 it will set counter to zero with without being killed :D i need to reset after death :] Link to comment Share on other sites More sharing options...
0 Tryskell Posted June 19, 2016 Share Posted June 19, 2016 L2PcInstance.doDie after super.doDie check kss = 0; Link to comment Share on other sites More sharing options...
0 THeMaxPoweR Posted June 19, 2016 Author Share Posted June 19, 2016 L2PcInstance Doesn't exist Link to comment Share on other sites More sharing options...
0 Tryskell Posted June 19, 2016 Share 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 Link to comment Share on other sites More sharing options...
0 THeMaxPoweR Posted June 19, 2016 Author Share 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 Link to comment Share on other sites More sharing options...
0 THeMaxPoweR Posted June 19, 2016 Author Share Posted June 19, 2016 (edited) Solved :D thnx guys Edited June 19, 2016 by THeMaxPoweR Link to comment Share on other sites More sharing options...
0 Katherine Posted June 19, 2016 Share Posted June 19, 2016 Locked. Link to comment Share on other sites More sharing options...
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 THeMaxPoweRLink to comment
Share on other sites
9 answers to this question
Recommended Posts