Perfect use case for a data bucket.
https://eqemu.gitbook.io/server/cate...g-data-buckets
Code:
sub EVENT_DEATH_COMPLETE {
#:: Key a data bucket
$key = $npc->GetCleanName() . "-kill-count";
#:: Match if the data bucket does not exist
if (!quest::get_data($key)) {
#:: Set the data bucket
quest::set_data($key, 1);
}
else {
#:: Iterate the kill count value stored in the data bucket
quest::set_data($key, quest::get_data($key) + 1);
#:: Match when the value reaches 50 (kills)
if (quest::get_data($key) eq "50") {
#:: Enable the spawn point for North Qeynos >> Fippy_Darkpaw (2001)
quest::enable_spawn2(10875);
#:: Reset the data bucket
quest::delete_data($key);
}
}
}