Jump to content
  • 0

After Death In Pvp Show Hp/cp


martuxas1

Question

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.");

 

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0

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:

Link to comment
Share on other sites

  • 0

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 by Fanky
Link to comment
Share on other sites

  • 0

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 by martuxas1
Link to comment
Share on other sites

  • 0

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 ! :)

Link to comment
Share on other sites

  • 0

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.");
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...