Log in

View Full Version : More timers. Daily timers/weekly timers Timers in sql?


fault
04-14-2008, 07:29 PM
A small discussion in irc, let me to make this statement.

[19:22:40] [Spre] to bad we can;t set timers as variables, kept in sql, that way even when a zone resets the timer stays


Would it be possible to pop something like that in eqemu? The discussion came up due to this quest, http://everquest.allakhazam.com/db/quest.html?quest=600 every 5 days the cargo starts up and travels to the windmill where you get attacked by 3 named, Problem that was shown with doing this with quest::settimer(x,x) and event_timer{} is that if the zone crashes or goes down on boot up the timer resets, not many zones are up for 5 days straight so that presents a problem.


So could we do a sql variable for timers? a whole new timer table where npc timers are stored, then any npc that uses a timer would just point to the sql timer with a variable?

say like $sqltimer(string,value);

String being the variable set in sql for the timers and value being its value?

Thnking this would solve alot of quest type issues.


also thinking I posted this in the wrong area not sure :D

trevius
04-14-2008, 07:44 PM
That would be more of a feature request, but I think I have a simple solution to what you are wanting to do. Simply create a spawn in the zone with a 5 day spawn timer. Those timers are kept independent of the zone being up or down. Then, set the quest to be triggered on EVENT_SPAWN and have the NPC killed one way or another after the event is started to set another 5 day cycle. Would that do what you need well enough?

fault
04-14-2008, 07:51 PM
spawn timers don;t get reset on zone resets? I ask because lets us Nejena For example. on PEQ I killed her ph just before the zone went down. when it came back up Nejena herself was up. this was like a 1-4 minute time frame.

cavedude
04-15-2008, 09:05 AM
[19:22:40] [Spre] to bad we can;t set timers as variables, kept in sql, that way even when a zone resets the timer stays

We can... use a global. It'll delete after the time you specify expires, returning it back to undef. I use a global to make sure Aten doesn't pop prematurely after a zone crash.