How can i get a specific mob id when a player kill him? I mean...When you kill a poring 5 times you will receive 5 apples.
i think on this...
- script 0a10 -1,{
setarray .control[0],0,0,0,0,0,0;
OnNPCKillEvent:
if (BaseLevel <= 10){
if (killedrid == 1002) {
.controle[0] = .controle[0]+1;
}
}
http://rathena.org/board/topic/85798-onnpc-kill-summon-monster/ -> but this args change my mind Like already discussed in this area, you should use the monster command and an additional label to be triggered when the monster dies if you only want to trigger the death of a few certain monsters. OnNPCKillEvent should only be used if you want a general label which is triggered whenever any monster on the server is killed. You could want to use this, for instance, if you want to count all the monsters a player kills, but not if you want to trigger the death of certain, few monsters. The resource difference might not be that noticable for all cases, since we are talking about a very short time duration, but it still exists and if you run many unoptimised scripts, you will eventually notice a different.
And this, change my mind again...
monster "prontera",123,42,"Poringz0rd",2341,23,"Master::OnThisMobDeath"; amatsu,13,152,4 script Master 767,{ mes "Hi there"; close; OnThisMobDeath: announce "Hey, "+strcharinfo(0)+" just killed a Poringz0rd!",bc_blue|bc_all; end; }