Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #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
  #2  
Old 04-26-2008, 12:24 AM
Theeper
Discordant
 
Join Date: May 2004
Posts: 290
Default

Put the variable inside the event and it will work.
Code:
sub EVENT_DEATH {
    my $spawngroup = $npc->GetSp2();
    quest::say("spawngroup = $spawngroup");
}
Reply With Quote
  #3  
Old 04-26-2008, 04:04 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Thanks Thepeer, that did it
__________________
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
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 01:28 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3