The only way that counter would work is if there are several of those NPCs spawned already and no new NPCs of the same version spawn in between kills. If that is the case, then yes, the variable declaration is correct. Otherwise it seems you might be better off using quest globals. Also, the spawn definition is incorrect. The reason it says heading=0 is to let you either use a number or use nothing at all which will default to 0. And don't forget your condition check and semicolons..
$orcmysticsdead = $orcmysticsdead + 1;
if ($orcmysticsdead == 4){
quest::unique_spawn(999149,0,0,1652,1535,-9,69);
FYI: I am just basing off your script, not your title. The title asked for local variables. Remember, that local means only in your scope. This method "bleeds" over multiple scripts making it more global. Not the preferred method, but it can work.
|