I grabbed the stars snippet off of Vedic's website, but was rather
annoyed at having to wait for night to check it out, so I imp'ed a
little settime function for LVL_IMPL chars. Quite trivial:
ACMD(do_settime)
{
char arg[MAX_INPUT_LENGTH];
int new_time = 0;
one_argument(argument, arg);
new_time = atoi(arg);
if (new_time < 0 || new_time > 23) {
send_to_char(ch, "Invalid time! Must be between 0 and 23.\r\n");
return;
}
time_info.hours = new_time;
send_to_char(ch, "Time set to %d.\r\n", new_time);
}
I actually separated out the switch statement of the sun
rising/setting text from another_hour() (weather.c) into a separate
function and called it from do_settime as well, but since that's
not stock to have that as a separate function I leave it as an
excerise for the reader :)
Note this also assumes you haven't changed the number of hours in
a mud day :p
Is your boss reading your email? ....Probably
Keep your messages private by using Lycos Mail.
Sign up today at http://mail.lycos.com
--
+---------------------------------------------------------------+
| FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
| Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
| Newbie List: http://groups.yahoo.com/group/circle-newbies/ |
+---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 06/25/03 PDT