I haven't really messed with those commands much yet, so I am not sure, but that is another one that KLS made examples for. Here are the examples she made:
Code:
sub EVENT_SAY {
if($text=~/despawn/i)
{
quest::disable_spawn2(10842);
quest::say("Yes sir!");
}
elsif($text=~/enable/i)
{
quest::enable_spawn2(10842);
quest::say("Yes sir!");
}
elsif($text=~/spawn/i)
{
quest::spawn_from_spawn2(10842);
quest::say("Yes sir!");
}
}
I believe you use the spawn group ID, NOT the NPCID, but I could be wrong about that. I also believe that disabling it should depop it for you, so you shouldn't have to use a depop on them as well.