/
roa/
roa/lib/boards/
roa/lib/config/
roa/lib/edits/
roa/lib/help/
roa/lib/misc/
roa/lib/plrobjs/
roa/lib/quests/
roa/lib/socials/
roa/lib/www/
roa/lib/www/LEDSign/
roa/lib/www/LEDSign/fonts/
roa/lib/www/LEDSign/scripts/
roa/src/s_inc/
roa/src/sclient/
roa/src/sclient/binary/
roa/src/sclient/text/
roa/src/util/
/************************************************************************
	Realms of Aurealis 		James Rhone aka Vall of RoA

interpreter.h			Header file for command interpreter source.

		******** Heavily modified and expanded ********
		*** BE AWARE OF ALL RIGHTS AND RESERVATIONS ***
		******** Heavily modified and expanded ********
		        All rights reserved henceforth. 

    Please note that no guarantees are associated with any code from
Realms of Aurealis.  All code which has been released to the general
public has been done so with an 'as is' pretense.  RoA is based on both
Diku and CircleMUD and ALL licenses from both *MUST* be adhered to as well
as the RoA license.   *** Read, Learn, Understand, Improve ***
*************************************************************************/
#ifndef ROA_INTERPRETER_H
#define ROA_INTERPRETER_H

#define STATE(d) ((d)->connected)

#define CRYPT(a,b) ((char *) crypt((a),(b))) 

#define SPECIAL(c) int (c)(struct char_data *ch, int cmd, char *arg)

#define ASSIGNMOB(mob, fname) { if (real_mobile(mob) >= 0)  mob_index[real_mobile(mob)].func = fname; }

#define ASSIGNOBJ(obj, fname) { if (real_object(obj) >= 0)  obj_index[real_object(obj)].func = fname; }

#define ASSIGNROOM(room, fname) { if (real_room(room) >= 0)  world[real_room(room)].funct = fname; }

// public interpreter functions
void	command_interpreter(struct char_data *ch, char *argument);
int	search_block(char *arg, char **list, BOOL exact);
char	lower( char c );
char	*any_one_arg(char *argument, char *first_arg);
char	*one_argument(char *argument, char *first_arg);
char	*two_arguments(char *argument, char *first_arg, char *second_arg);
int	fill_word(char *argument);
void	half_chop(char *string, char *arg1, char *arg2);
int	is_abbrev(char *arg1, char *arg2);
int	is_number(char *str);

// some changes here... -jtrhone 4/9/98
struct command_info {
   char comm[64];
   int slot;
   void	(*cmd_ptr) (chdata *ch, char *argument, int cmd, int subcmd);
   int minimum_position;
   int minimum_level;
   int sort_pos;
   int subcmd;
   int bitvector;	// now commands have certain flags set
			// such as CMD_PC_ONLY, CMD_TRUSTED, etc -roa
   int gbitvector;	// throw the grant bits right on the command
			// easy runtime check, no subfunction calls -roa
   int glevel;	// how high level to grant this?
};

// CMD flags begin here
#define CMD_NONE	0
#define CMD_PCONLY	(1 << 0)
#define CMD_TRUSTED	(1 << 1)
#define CMD_TRUECHAR	(1 << 2)

/* bit vector for grant_bits JTRhone */
#define   NOGRANTS 0
#define   GRNT_VNUM             (1 << 0)
#define   GRNT_VSTAT            (1 << 1)
#define   GRNT_LOAD             (1 << 2)
#define   GRNT_FREEZE           (1 << 3)
#define   GRNT_THAW             (1 << 4)
#define   GRNT_SNOOP            (1 << 5)
#define   GRNT_AT               (1 << 6)
#define   GRNT_SWITCH           (1 << 7)
#define   GRNT_MOWSAVE          (1 << 8)
#define   GRNT_SET              (1 << 9)
#define   GRNT_ASSASSIN         (1 << 10)
#define   GRNT_BAN              (1 << 11)
#define   GRNT_UNBAN            (1 << 12)
#define   GRNT_SHUTDOWN         (1 << 13)
#define   GRNT_REBOOT           (1 << 14)
#define   GRNT_GECHO            (1 << 15)
#define   GRNT_PAGE             (1 << 16)
#define   GRNT_MOBEDIT          (1 << 17)
#define   GRNT_OBJEDIT          (1 << 18)
#define   GRNT_ROOMEDIT         (1 << 19)
#define   GRNT_OLC              (1 << 20)
#define   GRNT_TELEPORT         (1 << 21)
#define   GRNT_TRANS            (1 << 22)
#define   GRNT_PURGE            (1 << 23)
#define   GRNT_AWARD            (1 << 24)
#define   GRNT_WAREDIT          (1 << 25)
#define   GRNT_WARDEL           (1 << 26)
#define   GRNT_SOCEDIT          (1 << 27)
#define   GRNT_SOCDEL           (1 << 28)
#define   GRNT_SOCDEL           (1 << 28)
#define   GRNT_ZOPCLO           (1 << 29)
#define   GRNT_HELPED           (1 << 30)


// SCMDs begin here pass to functions...
#define SCMD_INFO       100
#define SCMD_HANDBOOK   101 
#define SCMD_CREDITS    102
#define SCMD_NEWS       103
#define SCMD_WIZLIST    104
#define SCMD_POLICIES   105
#define SCMD_VERSION    106
#define SCMD_IMMLIST    107
#define SCMD_CLEAR	108
#define SCMD_WHOAMI	109
#define SCMD_SKILLS     110
#define SCMD_RACES      111
#define SCMD_MOTD	112
#define SCMD_IMOTD	113

#define SCMD_NOSUMMON   0
#define SCMD_NOHASSLE   1
#define SCMD_BRIEF      2
#define SCMD_COMPACT    3
#define SCMD_NOTELL	4
#define SCMD_NOAUCTION	5
#define SCMD_DEAF	6
#define SCMD_NOWIZ	7
#define SCMD_ROOMFLAGS	8
#define SCMD_NOREPEAT	9
#define SCMD_HOLYLIGHT	10
#define SCMD_SLOWNS	11
#define SCMD_AUTOX      12
#define SCMD_INCOGNITO  13
#define SCMD_MORTLOG    14
#define SCMD_REQASS     15
#define SCMD_SHORTX     16
#define SCMD_NOOOC      17
#define SCMD_NOQA       18

#define SCMD_ASSASSIN   250
#define SCMD_ARENA      251

#define SCMD_PARDON     301
#define SCMD_NOTITLE    302
#define SCMD_SQUELCH    303
#define SCMD_FREEZE	304
#define SCMD_THAW	305
#define SCMD_UNAFFECT	306
#define SCMD_REROLL	307
#define SCMD_NOEMOTE	308

#define SCMD_FWIELD	1   /* for do_low_force */
#define SCMD_FGET	2
#define SCMD_FGRAB	3
#define SCMD_FWEAR	4
#define SCMD_FREMOVE	5
#define SCMD_FDROP	6

#define SCMD_BELLOW	0
#define SCMD_YELL	1
#define SCMD_NEWBIE	2
#define SCMD_PRAYER	3
#define SCMD_OOC	4
#define SCMD_QUESTION	5
#define SCMD_ANSWER	6

#define SCMD_SHUTDOWN   1
#define SCMD_QUIT	1

#define SCMD_COMMANDS	0
#define SCMD_SOCIALS	1
#define SCMD_WIZCOMM	2

#define SCMD_DROP	0
#define SCMD_JUNK	1
#define SCMD_DONATE	2

#define SCMD_BUG	0
#define SCMD_TYPO	1
#define SCMD_IDEA	2

#define SCMD_GECHO	0
#define SCMD_QECHO	1

#define SCMD_POUR	0
#define SCMD_FILL	1

#define SCMD_POOFIN	0
#define SCMD_POOFOUT	1

#define SCMD_WALKIN   	0
#define SCMD_WALKOUT  	1

#define SCMD_HIT	0
#define SCMD_MURDER	1

#define SCMD_EAT	0
#define SCMD_TASTE	1
#define SCMD_DRINK	2
#define SCMD_SIP	3

#define SCMD_BALANCE	0
#define SCMD_DEPOSIT	1
#define SCMD_WITHDRAW	2

// Added for do_commune in speak.c 05/02/98 -callahan
#define SCMD_WHISPER	0
#define SCMD_ASK	1
#define SCMD_SAYTO	2

#endif // header sentry