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

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

Reply
 
Thread Tools Display Modes
  #1  
Old 01-13-2004, 02:31 PM
m0oni9
Hill Giant
 
Join Date: Dec 2003
Posts: 166
Default reloading perl quests

I got tired of having to restart the server when I made changes to perl quests. It works for me, YMMV.

--
in command.cpp, add to command_init() below the reloadqst reference:

command_add("reloadpl","- Reload perl quest for target",0,command_reloadpl) ||

--
in command.cpp, insert below the command_reloadqst() function:

void command_reloadpl(Client *c, const Seperator *sep)
{
if (c->GetTarget() == 0 || !c->GetTarget()->IsNPC()) {
c->Message(0, "Error: Bad target");
return;
}
c->Message(0, "Reloading perl quest script for NPC type %i.",
c->GetTarget()->GetNPCTypeID());

((PerlembParser *)parse)->LoadScript(c->GetTarget()->GetNPCTypeID(),
zone->GetShortName());
}

--
in command.h, insert below the command_reloadqst() prototype:

void command_reloadpl(Client *c, const Seperator *sep);
Reply With Quote
  #2  
Old 01-13-2004, 03:00 PM
Scorpious2k's Avatar
Scorpious2k
Demi-God
 
Join Date: Mar 2003
Location: USA
Posts: 1,067
Default

Nice work!

Alternately, you could also just modify command_reloadqst to

Code:
void command_reloadqst(Client *c, const Seperator *sep)
{
#ifdef EMBPERL
	if (c->GetTarget() == 0 || !c->GetTarget()->IsNPC()) 
	{ 
		c->Message(0, "Error: Bad target"); 
		return; 
	} 

	c->Message(0, "Reloading perl quest script for NPC type %i.", 
	c->GetTarget()->GetNPCTypeID()); 

	((PerlembParser *)parse)->LoadScript(c->GetTarget()->GetNPCTypeID(), zone->GetShortName()); 
#else
	parse->ClearCache();
	c->Message(0, "Clearing *.qst memory cache.");
#endif
And have #reloadqst reload either old qst or perl depending on which is being used...
__________________
Maybe I should try making one of these servers...
Reply With Quote
  #3  
Old 01-13-2004, 03:48 PM
farce
Hill Giant
 
Join Date: Feb 2003
Posts: 126
Default

you guys forgot to mention that one should

#include "embparser.h"

in command.cpp too =)



farce
Reply With Quote
  #4  
Old 01-13-2004, 05:31 PM
Lurker_005
Demi-God
 
Join Date: Jan 2002
Location: Tourist town USA
Posts: 1,671
Default

Quote:
Originally Posted by farce
you guys forgot to mention that one should

#include "embparser.h"

in command.cpp too =)
Should already be in an ifdef statment at the top... Actually it is in
Code:
#ifdef EMBPERL_PLUGIN
so I guess if you don't do the plugins you are correct.
__________________
Please read the forum rules and look at reacent messages before posting.
Reply With Quote
  #5  
Old 01-13-2004, 07:00 PM
m0oni9
Hill Giant
 
Join Date: Dec 2003
Posts: 166
Default

FYI: Been a problem or two with specific and default quests alike getting assigned incorrectly. Problems seem to come up when reload is used in conjunction with #depop.
Reply With Quote
  #6  
Old 01-13-2004, 07:38 PM
mollymillions's Avatar
mollymillions
Hill Giant
 
Join Date: May 2003
Posts: 176
Default

I have found that using quest::depop(NPCID) depops the whole zone? Is it possible to Repop one NPC, or move it back to its spawn point, from a quest?
Reply With Quote
  #7  
Old 01-14-2004, 02:42 AM
farce
Hill Giant
 
Join Date: Feb 2003
Posts: 126
Default

Lurker... ahhh. yeah i dont think mine's set up for plugins. thanks for the info

farce
Reply With Quote
  #8  
Old 03-12-2004, 02:51 PM
smogo
Discordant
 
Join Date: Jan 2004
Location: 47
Posts: 339
Default

Any idea why this could not be included in the distro ?
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 02:35 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