Procedure Flags

From WikiName
Revision as of 18:07, 19 March 2016 by Teker (talk | contribs) (Created page with " __TOC__ = Overview = Procedure flags are flags that can be used to modify code behavior during and after special procedures are run. The flags are stored in an integer as...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Overview

Procedure flags are flags that can be used to modify code behavior during and after special procedures are run. The flags are stored in an integer as a bitvector and can be accessed in C code via the pParam->iProcedureFlags variable. In MUDL2 the flags can be accessed using the %f global variable.


Flag Values

C Define MUDL Name Description
PROC_OVERRODE_COMMAND The special procedure has handled the command entered by the player. This tells the MUD that it should abort processing the command after the procedures are complete since the command has already been handled.
PROC_ABORT_PROCS The special procedure uses this flag to tell the MUD to stop running procedures after the current one.
PROC_SUPPRESS_LOOK The special procedure uses this flag to tell the MUD not to perform a "look" command once the player is added to a new room.
PROC_SUCCESS This flag must be used with PROC_OVERRODE_COMMAND. This tells the MUD that it should act as if the command was successfully executed and make any modifications to player statistics as such. Currently used to indicate a spell was successfully cast so that the MUD will subtract the full mana cost of casting the spell.
PROC_SENT_MESSAGES This flag is used to indicate whether messages to the players regarding this command have been sent. In the case of casting a spell, it would be the messages "Player utters the words, ...".