nakedmudv3.6/
nakedmudv3.6/lib/
nakedmudv3.6/lib/help/A/
nakedmudv3.6/lib/help/B/
nakedmudv3.6/lib/help/C/
nakedmudv3.6/lib/help/D/
nakedmudv3.6/lib/help/G/
nakedmudv3.6/lib/help/H/
nakedmudv3.6/lib/help/J/
nakedmudv3.6/lib/help/L/
nakedmudv3.6/lib/help/M/
nakedmudv3.6/lib/help/O/
nakedmudv3.6/lib/help/P/
nakedmudv3.6/lib/help/R/
nakedmudv3.6/lib/help/S/
nakedmudv3.6/lib/help/W/
nakedmudv3.6/lib/logs/
nakedmudv3.6/lib/misc/
nakedmudv3.6/lib/players/
nakedmudv3.6/lib/txt/
nakedmudv3.6/lib/world/
nakedmudv3.6/lib/world/examples/
nakedmudv3.6/lib/world/examples/mproto/
nakedmudv3.6/lib/world/examples/oproto/
nakedmudv3.6/lib/world/examples/reset/
nakedmudv3.6/lib/world/examples/rproto/
nakedmudv3.6/lib/world/examples/trigger/
nakedmudv3.6/lib/world/limbo/
nakedmudv3.6/lib/world/limbo/room/
nakedmudv3.6/lib/world/limbo/rproto/
nakedmudv3.6/src/alias/
nakedmudv3.6/src/dyn_vars/
nakedmudv3.6/src/editor/
nakedmudv3.6/src/example_module/
nakedmudv3.6/src/help2/
nakedmudv3.6/src/set_val/
nakedmudv3.6/src/socials/
nakedmudv3.6/src/time/
#ifndef __EVENT_H
#define __EVENT_H
//*****************************************************************************
//
// event.h
//
// this is the interface for the event handler. Events are temporally
// delayed functions. Events and actions (see action.h) may seem similar. They
// do, however, share some distinct differences. Whereas actions can only
// be attached to characters, and only one action can be attached to a 
// character at a time, events can be attached to anything, and anything can
// have any number of events attached to it at a time. And, indeed, they do
// not even need to be attached to anything! Some examples of what might
// constitute an event are things like a quest that is scheduled to start in
// 5 minutes, a disease that will kill someone in 5 minutes unless they find
// a cure for it, or perhaps a scheduled game reboot.
//
//*****************************************************************************



//
// must called before events can be used
//
void init_events();


//
// Pulse all of the events 
//
void pulse_events(int time);


//
// Stop all events involving "thing". "thing" can be anything that
// might be involved in an event (either as the owner of the event
// or some part of the event's data).
//
void interrupt_events_involving(void *thing);


//
// Put an event into the event handler. When the delay reaches 0, 
// on_complete is called.
//
// on_complete must be a function that takes the owner as its first
// argument, the data as its second, and the argument as its third.
//
// check_involvement must be a function that takes the thing to check
// the involvement of as the first argument, and the data to check in
// as its second argument. It must return TRUE if the data contains
// a pointer to the thing, and FALSE otherwise. See admin.c (cmd_devent)
// for an example of how this works. 
//
void start_event(void *owner, 
		 int   delay,
 		 void *on_complete,
		 void *check_involvement,
		 void *data,
		 const char *arg);


//
// same deal as start_event, but will automatically re-queue the event
// after it has fired. Useful for events that are currently running (e.g.
// mudtime updating, ticks, zone reset timers).
//
void start_update(void *owner,
		  int   delay,
		  void *on_complete,
		  void *check_involvement,
		  void *data,
		  const char *arg);

#endif // __EVENT_H