View Single Post
  #2  
Old 01-13-2008, 09:11 PM
Knightly
Accomplished Programmer
 
Join Date: Nov 2006
Location: Honolulu, HI
Posts: 91
Default corollary

The corollary to this, of course, is that if you want Quests to use the same time settings when you are using quest::settime then you have to make a change to questmgr.cpp.

The change is from:
Code:
void QuestManager::settime(int8 new_hour, int8 new_min) {
	if (zone)
		zone->SetTime(new_hour, new_min);
}
to:
Code:
void QuestManager::settime(int8 new_hour, int8 new_min) {
	if (zone)
		zone->SetTime(new_hour + 1, new_min);
}
If you're using the PEQ Quests then you'll need to adjust the following files if you want things to stay the same:
iceclad\110115.pl
kithicor\20250.pl
lakerathe\51150.pl
timorous\#_#_4.pl

However, in looking at kithicor\20250.pl:
Code:
if ($shifter==20) {										#start night spawn
	quest::spawn_condition(kithicor, 2,0); #live are 2
	quest::spawn_condition(kithicor, 1,1); #undead are 1
	quest::settime(20,0);
}
This code actually starts night at 7:00pm before my questmgr change above. I always thought night started at 8:00pm, but I may be getting old. If you don't make the changes in the quests above, the only difference is that instead of night being 7pm to 7am, night is 8pm to 8am.

The quest:settime(24,0); line later in the file would normally be out of place (military time is 0:00 - 23:59 in a day so there is no 24). However, due to the way that the emulator handles the time code...24 actually becomes midnight, or 0 with the questmgr change above so there's nothing to worry about and in my laziness I just left it. So on my server, with unchanged PEQ Quest files, night starts at 8pm.
Reply With Quote