Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Quests

Archive::Quests Archive area for Quests's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 04-05-2004, 09:24 AM
m0oni9
Hill Giant
 
Join Date: Dec 2003
Posts: 166
Default

Well, I found that the above change helped with spawning multiple mobs, but the message to those newly spawned mobs wasn't getting through. I thought that I had posted this last night (hope I included everything), but I guess not. Disregard the above change. This is what needs to be done:

changes to zone/embparser.cpp

about line 312, replace:

Code:
std::string cmd = "@quest::cmd_queue = (); package " + (std::string)(pkgprefix) + (std::string)(";");
with:
Code:
std::string cmd = "package " + (std::string)(pkgprefix) + (std::string)(";");
about line 325, replace this block of code
Code:
int numcoms = perl->geti("quest::qsize()");
for(int c = 0; c < numcoms; ++c)
{
  char var[1024] = {0};
  sprintf(var,"$quest::cmd_queue[%d]{func}",c);
  std::string cmd = perl->getstr(var);
  sprintf(var,"$quest::cmd_queue[%d]{args}",c);
  std::string args = perl->getstr(var);
  size_t num_args = std::count(args.begin(), args.end(), ',') + 1;
  ExCommands(cmd, args, num_args, npcid, other, mob);
}
with:
Code:
static int c = 0;
while (c < perl->geti("quest::qsize()"))
{
  char var[1024];
  sprintf(var,"$quest::cmd_queue[%d]{func}",c);
  std::string cmd = perl->getstr(var);
  sprintf(var,"$quest::cmd_queue[%d]{args}",c);
  std::string args = perl->getstr(var);
  size_t num_args = 1;
  if (!(!strcmp(cmd.c_str(), "say") ||
        !strcmp(cmd.c_str(), "echo") ))
       for (const char *c = args.c_str(); *c; c++)
         if (*c == ',')
           num_args++;

  c++;
  ExCommands(cmd, args, num_args, npcid, other, mob);
}

if (c)
  perl->eval("@quest::cmd_queue = ();");
c = 0;
changes to zone/entity.cpp

about line 342, replace (first occurance):
Code:
parse->Event(EVENT_SPAWN, npc->GetNPCTypeID(), 0, npc->CastToMob(), 0);
with:
Code:
parse->Event(EVENT_SPAWN, npc->GetNPCTypeID(), 0, npc->CastToMob(), npc);
As far as the other change goes, the "CastToClient" error was because the of the last arg (0). Having it as-is, with npc should work.
Reply With Quote
 

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