View Single Post
  #1  
Old 04-25-2008, 06:39 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default Finding a mob's Spawn Group

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 View Post
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?
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote