martuxas1 Posted February 9, 2016 Posted February 9, 2016 Hello devolopers.I have bad day i try 3hours do this and i can't compile.L2jFrozen pack.http://www.maxcheaters.com/topic/196065-show-hp-left-on-pvp-death/ i try this one not working for me, i changed imports, config all.and i try this code on L2PcInstance if (killer instanceof L2PcInstance) sendMessage("You have been slain by "+killer.getName()+", "+(int)killer.getCurrentHp()+" HP and "+(int)killer.getCurrentCp()+" CP remain.");But eclipse says error something bad in Killer word need change or what? or rework code? Forum killer; if (killer instanceof L2PcInstance) sendMessage("You have been slain by "+killer.getName()+", "+ (int)killer.getCurrentHp()+" HP and "+(int)killer.getCurrentCp()+" CP remain.");
0 Tessa Posted February 9, 2016 Posted February 9, 2016 1) Find this: if (pk != null) 2) Put your code somewhere between the braces: sendMessage("You have been slain by "+killer.getName()+", "+(int)killer.getCurrentHp()+" HP and "+(int)killer.getCurrentCp()+" CP remain."); 3) Don't even think about opening a live server! :lol:
0 martuxas1 Posted February 9, 2016 Author Posted February 9, 2016 doDie method @l2pcinstance hope i helped. I rly bad know java, how to do this? :)
0 Fanky Posted February 9, 2016 Posted February 9, 2016 (edited) you can either create a void in @l2pcinstance ; public void deathstats(L2Character killer) { //code here } and call it at doDie @l2pcinstance deathstats(killer); or screw the void above,and put everything in dodie method,properly though Edited February 9, 2016 by Fanky
0 martuxas1 Posted February 9, 2016 Author Posted February 9, 2016 (edited) you can either create a void in @l2pcinstance ; public void deathstats(L2Character killer) { //code here } and call it at doDie @l2pcinstance deathstats(killer); or screw the void above,and put everything in dodie method,properly though (error: Create 'motod deathstats(l2charecter)') Added on public boolean doDie(final L2Character killer){ deathstats(killer); in code error: (L2Character killer) - Syntex error on token "(" ")"then added public void deathstats(L2Character killer) { if (killer instanceof L2PcInstance) sendMessage("You have been slain by "+killer.getName()+", "+(int)killer.getCurrentHp()+" HP and "+(int)killer.getCurrentCp()+" CP remain."); } if i add all in DoDie then i get again error on all killer. Maybe can write all currect code? Edited February 9, 2016 by martuxas1
0 Fanky Posted February 9, 2016 Posted February 9, 2016 the method which you created should be written outside of the doDie method which you will use[doDie] in order to call it.
0 martuxas1 Posted February 9, 2016 Author Posted February 9, 2016 the method which you created should be written outside of the doDie method which you will use[doDie] in order to call it. and lower added
0 martuxas1 Posted February 9, 2016 Author Posted February 9, 2016 1) Find this: if (pk != null) 2) Put your code somewhere between the braces: sendMessage("You have been slain by "+killer.getName()+", "+(int)killer.getCurrentHp()+" HP and "+(int)killer.getCurrentCp()+" CP remain."); 3) Don't even think about opening a live server! :lol: Thanks this working ! :)
0 Tessa Posted February 9, 2016 Posted February 9, 2016 Pf, and not "killer", but "pk". :lol: sendMessage("You have been slain by "+pk.getName()+", "+(int)pk.getCurrentHp()+" HP and "+(int)pk.getCurrentCp()+" CP remain.");
0 Fanky Posted February 9, 2016 Posted February 9, 2016 and lower added you've created a void,inside a void. that's not what i said :D
0 Reborn12 Posted February 9, 2016 Posted February 9, 2016 If you add this and works..then check your pvp update if add +1 pvp than the kill or updates some seconds later..
0 xxdem Posted February 9, 2016 Posted February 9, 2016 you've created a void,inside a void. that's not what i said :D Actually a pro can do that and its efficient
0 Fanky Posted February 9, 2016 Posted February 9, 2016 Actually a pro can do that and its efficient never tried tbh
Question
martuxas1
Hello devolopers.
I have bad day i try 3hours do this and i can't compile.
L2jFrozen pack.
http://www.maxcheaters.com/topic/196065-show-hp-left-on-pvp-death/
i try this one not working for me, i changed imports, config all.
and i try this code on L2PcInstance
But eclipse says error
14 answers to this question
Recommended Posts