OnPCDieEvent check if killed by MOBS

OnPCDieEvent:
 
This special label triggers when a player dies. The variable 'killerrid' 
is set to the ID of the killer.
killerrid < 1500000 (min char_id)

 
Last edited by a moderator:
OnPCDieEvent:
 
This special label triggers when a player dies. The variable 'killerrid' 
is set to the ID of the killer.
killerrid < 1500000 (min char_id)
Dunno why it's not working.. 

I tried if 

OnPCDieEvent:
if ( killerrid < 1500000 ) {
 do;
}
else
 
 
and OnPCDieEvent:
if ( killerrid < 150000 ) {
 do;
}
else
 
 
EDITED:
 
Solved.
 
killerrid >= 110000000
 
Last edited by a moderator:
try

if(killerrid >= 1001 && killerrid <= 3109)

 
why not do a test ?

OnPCDieEvent:  // display killerid 

and you will see what killerid is really or the value, in that way you can easily do something on your script

its like reversing the process .,.. check the value first then once you have the value do the correct conditional statement

you will be amazed ...

OnPCDieEvent:
 
This special label triggers when a player dies. The variable 'killerrid'
is set to the ID of the killer.
 
OnPCDieEvent:
  if ( killerrid >= 110000000  ) { //--->killed by a mob

...........................

}

  end;

if(killerrid==getcharid(3))----->killed by him/her self (ex: Grand Cross)

if(!killerrid) ----->eat poison potion

 
Last edited by a moderator:
OnPCDieEvent:

  if ( killerrid >= 110000000  ) {

...........................

}

  end;

if(killerrid==getcharid(3))----->killed by him/her self

if(!killerrid) ----->eat poison potion
Thanks for this

if(killerrid==getcharid(3))----->killed by him/her self

if(!killerrid) ----->eat poison potion

I was able to solved it using killerrid >= 110000000

Thanks everyone!

 
Last edited by a moderator:
OnPCDieEvent:

  if ( killerrid >= 110000000  ) { //--->killed by a mob

...........................

}

  end;

if(killerrid==getcharid(3))----->killed by him/her self (ex: Grand Cross)

if(!killerrid) ----->eat poison potion
Ohh, always I thought, killerrid will return mobid.

 
Back
Top