event-queue.zip
snippets · 3.6 KB · 2010-03-30
Event queue for ROM (from a post by Kyndig): lets code pause inside a function. Includes timer.c and update.c changes.
Download « Back to the snippets list
README.txt
From: Kyndig <kyndig@InfoAve.Net>
To: rom@rom.org
Subject: Re: Pausing within a function
Date: Sun, 23 Jan 2000 00:29:14 -0500
Greets list,
With the aid of a bud, I managed to finally get this beast tamed. The
following are 4 files which will allow for function calls to be placed in
an event timed structure. These events are handled in update.c and
are triggered on a per call basis. Making these handy for any: mobprogs,
oprogs, rprogs, or simply standalone calls within functions. Here is a
quick example:
void do_test(CHAR_DATA *ch, char *argument)
{
wait_printf(ch,1,"This is a test\n\r");
wait_printf(ch,6,"this is a message 6 seconds late\r\n");
wait_function(ch,9,&do_who,"");
return;
}
NoArchive contents (6 files)
| File | Size |
|---|---|
| recycle.c | 502 B |
| timer.c | 3.2 KB |
| update.c | 3.1 KB |
| merc.h | 1.2 KB |
| recycle.h | 155 B |
| README.txt | 731 B |