View Single Post
  #6  
Old 05-10-2014, 07:07 AM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,603
Default

You would want sub EVENT_DEATH_COMPLETE, like I said, as it works in NPC and client scripts, whereas sub EVENT_SLAY is for NPCs only. You can also make sure that the killer is an NPC so they don't lose levels from PvP.

Put this in the global folder in global_player.pl.
Code:
sub EVENT_DEATH_COMPLETE {
    if ($entity_list->GetMobByID($killer_id)->IsNPC()) {
        quest::level(1);
    }
}
Reply With Quote