> 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); > } In TimeTraveller, I have a lot of my shops open and close based on the hours of the day, and the shopkeepers actually leave the store and go to their respective houses located in town/in an apartment above the shop/outside of town. If you have anything that is dependant on checking time, a timeset command may mess that up a little bit. This will prevent problems like that, and will just advance time as if it has already passed, rather than jumping over a few hours. for (i = 0; i < hrs; i++) { zone_update(); mobile_activity(); another_hour(); affect_update(); point_update(); (...) } Enjoy. - B. Brown -- +---------------------------------------------------------------+ | 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