nakedmud-mod/
nakedmud-mod/html/tutorials/
nakedmud-mod/html/tutorials/building_extras/
nakedmud-mod/html/tutorials/c/
nakedmud-mod/html/tutorials/reference/
nakedmud-mod/html/tutorials/scripting/
nakedmud-mod/html/tutorials/scripting_extras/
nakedmud-mod/lib/
nakedmud-mod/lib/help/A/
nakedmud-mod/lib/help/B/
nakedmud-mod/lib/help/C/
nakedmud-mod/lib/help/D/
nakedmud-mod/lib/help/G/
nakedmud-mod/lib/help/H/
nakedmud-mod/lib/help/J/
nakedmud-mod/lib/help/L/
nakedmud-mod/lib/help/M/
nakedmud-mod/lib/help/O/
nakedmud-mod/lib/help/P/
nakedmud-mod/lib/help/R/
nakedmud-mod/lib/help/S/
nakedmud-mod/lib/help/W/
nakedmud-mod/lib/logs/
nakedmud-mod/lib/misc/
nakedmud-mod/lib/players/
nakedmud-mod/lib/pymodules/polc/
nakedmud-mod/lib/txt/
nakedmud-mod/lib/world/
nakedmud-mod/lib/world/zones/examples/
nakedmud-mod/lib/world/zones/examples/mproto/
nakedmud-mod/lib/world/zones/examples/oproto/
nakedmud-mod/lib/world/zones/examples/reset/
nakedmud-mod/lib/world/zones/examples/rproto/
nakedmud-mod/lib/world/zones/examples/trigger/
nakedmud-mod/lib/world/zones/limbo/
nakedmud-mod/lib/world/zones/limbo/room/
nakedmud-mod/lib/world/zones/limbo/rproto/
nakedmud-mod/src/alias/
nakedmud-mod/src/dyn_vars/
nakedmud-mod/src/editor/
nakedmud-mod/src/example_module/
nakedmud-mod/src/help2/
nakedmud-mod/src/set_val/
nakedmud-mod/src/socials/
nakedmud-mod/src/time/
#ifndef __ACTION_H
#define __ACTION_H
//*****************************************************************************
//
// action.h
//
// this is the interface for the action handler. Actions are temporally
// delayed events (e.g. preparing a spell, swinging a sword, etc). Players
// may only be taking 1 action at a time, and any time a new action for a
// character is added, the previous one is terminated.
//
//*****************************************************************************




//
// must called before actions can be used
//
void init_actions();


//
// Pulse all of the actions 
//
void pulse_actions(int time);


//
// Interrupt whatever action the character is taking. Do nothing if
// the character is not taking an action currently. "where" is used
// in conjunction with the faculties module. If you have not installed
// the faculties module, pass in 1.
//
void interrupt_action(void *ch, bitvector_t where);


//
// Returns TRUE if the character is performing an action with "where". If
// the faculty module is not installed, "where" should be 1.
//
bool is_acting(void *ch, bitvector_t where);


//
// Start a character performing an action. If the delay reaches 0, on_complete
// is run. If the action is terminated prematurely, on_interrupt is run.
//
// on_complete must be a pointer to a function that takes the character as
// its first argument, the data as its second argument, a bitvector for
// faculties (even if you don't have that module installed ... it must take
// this argument, even if it doesn't use it) and the char arg as its 
// fourth argument.
//
// on_interrupt must take the same arguments as on_complete.
//
// "where" is used in conjunection with the faculties module. If you have not
// installed the faculties module, pass in 1.
//
// for an example of how start_action works, see admin.c (cmd_dsay)
//
void start_action(void           *ch, 
		  int          delay,
		  bitvector_t  where,
		  void  *on_complete,
		  void *on_interrupt,
		  void         *data,
		  const char    *arg);

#endif // __ACTION_H