Yes, you would spawn it in perl upon task completion.
If you want to use globals, this might be what you are trying to do:
(untested)
Code:
sub EVENT_DEATH {
if (defined($qglobals{orcpawndeath}) {
quest::setglobal("orcpawndeath",$qglobals{orcpawndeath}+1,0,"F");
}
else {
quest::setglobal("orcpawndeath",1,0,"F");
}
if ($qglobals{orcpawndeath} == 4) {
quest::setglobal("orcpawndeath",0,0,"F");
quest::unique_spawn(999149,0,0,1652,1535,-9,69);
}
}