Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 01-13-2009, 01:16 AM
Deimos
Hill Giant
 
Join Date: Jun 2004
Posts: 135
Default

Try just having a zone as a dynamic zone with hold state equal to true in the database. Try adding a spawn to the db and what not. Do #npcstats and look at the SpawnGroupID, not the NPC ID. After that, leave the zone. When you go back in, do #npcstats on them again. There SpawnGroupID (if they are the only one in the zone) will be at 0. Doing a #repop will set their SpawnGroupID to the proper SpawnGroupID in the db.

However, now it looks like I'm running into more issues because spawning another NPC with an NPC requires the NPC ID and not the SpawnGroup ID. The SpawnGroupID is the only ID you can access in PERL via a var. Also, when spawning a new NPC, in that NPC under the sub EVENT_SPAWN, there is no way for them to retrieve the spawngroup ID or the NPC ID (meaning there is no way to tell what the NPC is). You can retrieve names, but all NPCs on my server have no name (i'm testing out a special design), so I need to be able to either access the NPC ID at all times or the SpawnGroupID at all times (I prefer the NPC ID) because the spawn function and most of the functions that access NPCs require the NPC ID but the only thing u can get via variables with PERL is the SpawnGroupID.

So, right now, there is no way for me to detect what type of NPC an NPC is if it's newly spawned and has no spawn group =/=.

Please add code to retrieve an NPC's ID and not their SpawnGroupID or something ^_^, unless you can tell me another way to do it ;p.
__________________
//The Path of Chaos Server-
//Fate Industries
//Lots of stuff O-o
Reply With Quote
  #2  
Old 01-13-2009, 01:47 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Ahh, so it sounds like your issue is with holdzones, not just dynamic zones in general. I haven't tried messing with hold zones yet, so I don't really know much about it or how well it works.

What perl stuff are you running to get the spawngroup ID? To get the NPC ID, you should be able to run something like this:

$npc->GetNPCTypeID();

But, you may have to get the NPC using another command first. You probably won't be able to run any commands to get the spawnID in the EVENT_SPAWN, because all of that stuff is being built as it spawns, so it won't be able to get it until after the spawning is completed. You should be able to start a timer when it spawns and then get the NPC ID later. But, timers probably can't get NPC too easily to run commands on. Not using NPC names will probably complicate things though :P

What exactly are you trying to do with these spawnIDs and spawngroups?
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
Reply

Thread Tools
Display Modes

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 03:05 AM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3