View Single Post
  #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