Jump to content

Question

Posted

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

 

14 answers to this question

Recommended Posts

  • 0
Posted

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
Posted (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 by Fanky
  • 0
Posted (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 by martuxas1
  • 0
Posted

the method which you created should be written outside of the doDie method which you will use[doDie] in order to call it.

  • 0
Posted

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
Posted

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.");
Guest
This topic is now closed to further replies.


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock