Been a while since I checked in here, figured I might just do that.
The way I handled it on my mud was to add another pulse entry to system_data, and then making that as long as I wanted the weather messages to be.
in the update_timers function, you'll need to add an entry for sysdata.pulseweather something like this:
void update_timers( void )
sysdata.pulsetick = sysdata.secpertick * sysdata.pulsepersec;
sysdata.pulseviolence = 3 * sysdata.pulsepersec;
sysdata.pulsemobile = 4 * sysdata.pulsepersec;
sysdata.pulsecalendar = 4 * sysdata.pulsetick;
sysdata.pulseweather = 6 * sysdata.pulsetick;
Update your update_handler to use the new value, something like this:
if( --pulse_weather <= 0 )
pulse_weather = sysdata.pulseweather;
UpdateWeather( ); /* New Weather Updater -Kayle */
Then in the system_data struct you'll need to add an int pulseweather; in there somewhere, like:
And lastly, in do_cset, you'll need to add a spot for it to display, like:
pager_printf_color( ch, " &wPULSE_CALENDAR&W: &G%d &wPULSE_WEATHER&W: &G%d&D\r\n",
sysdata.pulsecalendar, sysdata.pulseweather );
If you use the values provided, your weather update cycle will update I believe every 1680 pulses, which would be something like... every 7 and a half minutes. If that's not long enough changes the 6 to an 8, and that'll update every.. let's see.. 8 * 280 = 2240. 4 pulses per second, so 240 pulses in a minute. So then 2240 / 240 = 9.3333333. So, changing the 6 to an 8 in update_timers function will slow your updates considerably. But it's up to you how you want to handle it. I'm still trying to find time to look into your other issues, in addition to work, there's now talk of the possibility that being a father might be in my future. So I've spent a lot of time at the Doctor with the wife the last couple days as well. Anyway, hope all this helps.