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.

Reply
 
Thread Tools Display Modes
  #1  
Old 04-03-2004, 07:57 PM
m0oni9
Hill Giant
 
Join Date: Dec 2003
Posts: 166
Default Trouble with mutliple spawn commands

edit: Erased this post so someone didn't confuse changes.. see latest post in thread.
Reply With Quote
  #2  
Old 04-04-2004, 07:00 AM
smogo
Discordant
 
Join Date: Jan 2004
Location: 47
Posts: 339
Default

Doesn't this override or break the fix described in this post ?
http://www.eqemulator.net/forums/vie...asc&highlight=
Reply With Quote
  #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
  #4  
Old 04-18-2004, 01:34 PM
smogo
Discordant
 
Join Date: Jan 2004
Location: 47
Posts: 339
Default

merged in, together with 0.5.6dr1 code, to CVS repository :
http://quests.eqemulator.net

Go to : Menu-> CVS web

eqemu files are in the eqemu module
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 04:23 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