merc.h

merc.h · 1.2 KB

From the archive event-queue.zip

Download the archive   « Back to the archive contents

/** Add to the end of the typedef structs **/
typedef struct event_data        EVENT_DATA;

/** Add this to your pulse list **/
#define PULSE_EVENT     ( 2 * PULSE_PER_SECOND)

/** Add this code somewhere before char_data **/
/* timer */

#define ACTION_PRINT	A 
#define ACTION_WAIT		B
#define ACTION_ACT		C
#define ACTION_FUNCTION	D

struct event_data 
{
   int       delay;        
   CHAR_DATA   *to;       
   int      action;        
   DO_FUN   *do_fun;     
   char   *args[5];
   void   *argv[5];
   int     argi[5];
   EVENT_DATA *next;     
   bool      valid; 
};
extern EVENT_DATA *events;


/** Pick and choose from format.c what you want, put it wherever you want.. **/

/* timer.c */
void  printf_to_world(char *, ...);
void  printf_to_room    args( (ROOM_INDEX_DATA *, char *, ...) );
char *   nsprintf       args( (char *, char *, ...) );
void  wait_wait         args( (CHAR_DATA *, int, int) );
void  wait_printf       args( (CHAR_DATA *, int, char *, ...) );
void  wait_act          args( (int, char *, void *, void *, void *, int)
);
void  wait_function     args( (CHAR_DATA *ch,int delay, DO_FUN *do_fun,
char *argument) );
EVENT_DATA *create_event(int, char *);

Site Stats

Snippets: 1791
Codebases: 571