You need to know how to write the quest api to do it.
There's a lot of edge cases to decide on to make this happen, I'll briefly note them as I break down the steps.
Inside the file quests/global/global_npc.lua (or .pl), add an entry or create one for event_death.
Inside event_death, Check the killer's ID argument, and if they're in the zone via entity_list, then check their level compared to the dying NPC. It may also be wise to check if the killer id is in a group, and if that group is in zone, and the highest level of a group mate. If there's a level problem, then iterate all the loot on the mob and remove it.
There's a chance you may need to use event_death_complete instead, and also killer_id may be 0, in cases e.g. a dot kills a mob after the owner zones. This is a way to get around the loot flushing as well, dot a mob, zone, zone back, loot. Not sure there's a way to really counteract this.
|