1stMUD/corefiles/
1stMUD/gods/
1stMUD/player/
1stMUD/win32/
1stMUD/win32/ROM/
/**************************************************************************
*  Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer,        *
*  Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe.   *
*                                                                         *
*  Merc Diku Mud improvements copyright (C) 1992, 1993 by Michael         *
*  Chastain, Michael Quan, and Mitchell Tse.                              *
*                                                                         *
*  In order to use any part of this Merc Diku Mud, you must comply with   *
*  both the original Diku license in 'license.doc' as well the Merc       *
*  license in 'license.txt'.  In particular, you may not remove either of *
*  these copyright notices.                                               *
*                                                                         *
*  Much time and thought has gone into this software and you are          *
*  benefiting.  We hope that you share your changes too.  What goes       *
*  around, comes around.                                                  *
***************************************************************************
*       ROM 2.4 is copyright 1993-1998 Russ Taylor                        *
*       ROM has been brought to you by the ROM consortium                 *
*           Russ Taylor (rtaylor@hypercube.org)                           *
*           Gabrielle Taylor (gtaylor@hypercube.org)                      *
*           Brian Moore (zump@rom.org)                                    *
*       By using this code, you have agreed to follow the terms of the    *
*       ROM license, in the file Rom24/doc/rom.license                    *
***************************************************************************
*       1stMUD ROM Derivative (c) 2001-2002 by Ryan Jennings              *
*            http://1stmud.dlmud.com/  <r-jenn@shaw.ca>                   *
***************************************************************************/

/* this is a listing of all the commands and command related data */
#if !defined(INTERP_H)
#define INTERP_H

/* wrapper function for safe command execution */
void do_function args((CHAR_DATA * ch, DO_FUN * do_fun, const char *argument));

extern char last_command[MAX_STRING_LENGTH];
extern char last_command2[MAX_INPUT_LENGTH];
extern DESCRIPTOR_DATA *last_descriptor;

/* for command types */
#define ML 	MAX_LEVEL			/* implementor */
#define L1	MAX_LEVEL - 1		/* creator */
#define L2	MAX_LEVEL - 2		/* supreme being */
#define L3	MAX_LEVEL - 3		/* deity */
#define L4 	MAX_LEVEL - 4		/* god */
#define L5	MAX_LEVEL - 5		/* immortal */
#define L6	MAX_LEVEL - 6		/* demigod */
#define L7	MAX_LEVEL - 7		/* angel */
#define L8	MAX_LEVEL - 8		/* avatar */
#define IM	LEVEL_IMMORTAL		/* avatar */
#define HE	LEVEL_HERO			/* hero */

#define COM_INGORE	1

/*
 * Structure for a command in the command lookup table.
 */
struct cmd_type
{
	const char *name;
	DO_FUN *do_fun;
	int position;
	int level;
	int log;
	bool show;
};

/* the command table itself */
extern struct cmd_type *cmd_table;

struct dofun_type
{
	const char *name;
	DO_FUN *fun;
};

extern const struct dofun_type dofun_table[];

/*
 * Command logging types.
 */
#define LOG_NORMAL	0
#define LOG_ALWAYS	1
#define LOG_NEVER	2

/*
 * Command functions.
 * Defined in act_*.c (mostly).
 */
#include "dofun.h"
DECLARE_DO_FUN(do_null);
DECLARE_DO_FUN(do_oldhelp);
DECLARE_DO_FUN(do_mstat);
DECLARE_DO_FUN(do_ostat);
DECLARE_DO_FUN(do_sset);
DECLARE_DO_FUN(do_mfind);
DECLARE_DO_FUN(do_ofind);
DECLARE_DO_FUN(do_rset);
DECLARE_DO_FUN(do_mload);
DECLARE_DO_FUN(do_oload);
DECLARE_DO_FUN(do_rstat);
DECLARE_DO_FUN(do_mset);
DECLARE_DO_FUN(do_oset);
DECLARE_DO_FUN(do_slookup);

#endif