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-30-2006, 03:50 AM
Paine
Fire Beetle
 
Join Date: Apr 2006
Posts: 1
Default Issue with quest for a mass of NPCs

Hiho, I have got some issue with a quest that is supposed to make alot of mobs sit (mobs with the same name)

Since EVENT_SPAWN didnt do the trick for sitting (just froze ne NPCs) I decided to do a timed event for that.

My file looks like this:

sub EVENT_SPAWN
{
quest::starttimer(1,5);
}

sub EVENT_TIMER
{
$npc->SetAppearance(2);
quest::shout("TIMEREVENT TRIGGERED FOR NPC: $mname, $mobid");
}

sub EVENT_SAY
{
$npc->SetAppearance(2);
quest::shout("SAYEVENT TRIGGERED FOR NPC: $mname, $mobid");
}

This works all fine as long as I have a single mob spawned with that name.
However I have a bunch of mobs and for some odd reason it doesnt work in that case. The sayevent gets triggered properly tho.
What I expected (since I am a bit unsure about how EQemu handles these scripts) that only one mob was going to trigger that, but no mob at all triggered the timer event.
I thought it might be an issue with the timerid and changed the ID to $mname and $mobid, however both didnt work either. The only time I had the timerevent fire at all (at least the only time I had a shout) was when I did a random(50) for the timerid. For some odd reason, in some instances after repopping I had a single npc fire the timerevent constantly every 5 seconds.

Any ideas?
Reply With Quote
  #2  
Old 05-01-2006, 02:39 AM
mystic414's Avatar
mystic414
Hill Giant
 
Join Date: Sep 2004
Posts: 100
Default

Are you using the latest server version? There used to be an issue where there could only be one timer with a given id running at a time, but that was fixed somewhat recently.

Do the mobs spawn naturally, or do they spawn as part of a quest? If the latter, you could probably do something like this:

Code:
$entid1 = quest::spawn2(npcid, 0, 0, x, y, z, h);
my $mob1 = $entity_list->GetMobID($entid1);
if ($mob1) {
  my $mobnpc1 = $mob1->CastToNPC();
  $mobnpc1->SetAppearance(2);
}
and do that for each mob that is spawned
__________________
The PEQ Database Editor is available!
Edit Loot, NPCs, Spawns, Merchants, Factions, NPC Spell Lists, and Tradeskills with ease!
Check it out!
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 07:43 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3