I'm trying to find a way to get the Spawn Group ID (or even better yet, a Spawn Point ID) for an NPC in a quest. This is what I have found so far:
Quote:
Originally Posted by gernblan
c->Message(0,"Spawn Group: %i",c->GetTarget()->CastToNPC()->GetSp2());
|
Which is in the
current source. This led me to using a
quest object:
Code:
NPC
.....
GetSp2()
.....
So, I used the following:
Code:
my $spawngroup = $npc->GetSp2();
sub EVENT_DEATH {
quest::say("spawngroup = $spawngroup");
}
However, on death, the NPC says the following:
Quote:
Soandso says 'spawngroup = '
|
So that doesn't seem to work. Then I tried the following:
Code:
my $spawngroup = $mob->CastToNPC()->GetSp2();
sub EVENT_DEATH {
quest::say("spawngroup = $spawngroup");
}
and I got the same thing. I also tried it without my & undefined it at the end of the script and still got the same issue:
Code:
$spawngroup = $npc->GetSp2();
sub EVENT_DEATH {
quest::say("spawngroup = $spawngroup");
}
$spawngroup = undef;
Anyone have any ideas or thoughts?