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 04-01-2004, 06:23 PM
m0oni9
Hill Giant
 
Join Date: Dec 2003
Posts: 166
Default Default perl quest for each zone

sandy was mentioning that he was having trouble with per-zone default quests. The following should enable the allowance of having multiple default quests, ie: quests/feerrott/default.pl, quests/nexus/default.pl, instead of _only_ quests/default.pl. Line numbers are approximate.

To start off, remove the old default quest loader.
zone/embperl.cpp, lines 25-32:
Code:
        //let's load the default script
        try { LoadScript(0, NULL); }
        catch(const char * err)
        {
                LogFile->write(EQEMuLog::Status, "Error loading default script: %s", err);
        }
Find the following code, and replace.
zone/embperl.cpp, lines 290-301:
Code:
        if(!npcid || !zone)
        {
                filename += DEFAULT_QUEST_PREFIX;
                filename += ".pl";
        }
        else
        {
                filename += zone;
                filename += "/";
                filename += itoa(npcid);
                filename += ".pl";
        }
with:
Code:
        if (zone)
        {
                filename += zone;
                filename += "/";
                if (npcid)
                        filename += itoa(npcid);
                else
                        filename += DEFAULT_QUEST_PREFIX;
        }
        else
                filename += DEFAULT_QUEST_PREFIX;

        filename += ".pl";
Finally, insert the following, which will load the default script when the zone initializes.
zone/zone.cpp, line 434
Code:
        parse->ClearCache();

#ifdef EMBPERL
        // Load the default quest file for zone
        try {((PerlembParser *)parse)->LoadScript(0, short_name); }
        catch(const char * err)
        {
                LogFile->write(EQEMuLog::Status,
                "Error loading default script: %s", err);
        }
#endif

        cout << ", timezone data";
        zone->zone_time.setEQTimeZone(database.GetZoneTZ(zoneid));
This is the best place I could figure to add the last bit. Please report if there are problems or not.
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 06:12 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