flag

Settable:
yes
Arguments:
(1) character, string
(2) object, string
(3) room, string
(4) room, string, string
Return Value:
boolean

Much of the information in Sloth Mud is in the form of flags. The four argument lists of this command allow access to four types of flags: flags on characters, flags on objects, flags on rooms, and flags on on exits from rooms. The first argument is the thing which bears the flag; the final string argument is the name of the flag; and for argument list (4), the first string argument is a direction name ('north', 'south', 'east', 'west', 'up', or 'down'). A complete list of available flag names for each of the four types of flags is given at the end of this page.

To turn off %c's gossip channel,
   set( flag( %c, 'gossip' ), false )
To only issue a message in a dark room,
   if ( flag(room(%c),'dark'),
      msg_room( 'You hear a sinister shuffling noise!' ) )
To block movement west with a custom message when the door is closed, set ON_WEST to
   if ( flag( room(%a), 'west', 'closed' ),
     (
       msg_character(%a, 'You walk stupidly into the closed door!  BONK!' ),
       msg_everyone_else(%a, '$n smacks into the closed door!' ),
       return(1)
     )
   )
Note the return(1) which prevents Sloth from processing the "west" command normally after the proc is done with it.

Lists of flags:

Flags that apply to players or mobs (form 1):

blindthe character is blind
chaosif two PCs both have this flag, they can fight each other
charmunder the influence of a charm spell, which means that this player will obey orders from the person he is following
climbpresently climbing something. You can read this flag but never set or unset it.
cursedoes nothing, except to prevent further curses from being laid on this character.
detect-evilthe character sees a red aura around creatures with an alignment of less than -350
detect-invisiblethe character can see invisible people and objects
detect-magicthe character sees a blue aura around magic items
etherealthe character is insubstantial, making him difficult to hit and many other inconvenient things
fearthe character is magically afraid, and will flee at the drop of a hat. Right now this only works on mobs
flyingthe character is capable of flight
hidethe character is hiding, meaning that he won't be apparent to someone looking around the room
holdunused
invisiblethe character is invisible
mindbarthe character is immune to a wide variety of mind-affecting magic
on_pointthe character is in the point position for his group, meaning that he enters rooms first and checks for hostiles before the rest of the group comes in
poisonthe character is poisoned; this mostly stops him from healing damage, lost mana, or exhaustion
protect-evilthe character is immune or resistant to a number of spells that invoke the powers of darkness
resist_magicunused
ridethe character is riding. You can read this flag, but never set or unset it.
sanctuarythe character has a 'sanctuary' spell on him; this reduces damage he takes from most sources by half
sense-lifethe character can detect other beings hiding in the room
shield_of_faiththe character has a 'shield of faith' spell on him; this reduces damage he takes from most source by a quarter
sleepthe character is magically asleep, and cannot wake up until whatever is producing this effect is removed
sneakthe character does not issue messages when he enters a room

Configuration flags that apply only to players (form 1):

ansithe player sees things in color, using ANSI color codes
auctionthe player hears messages on the auction channel
autogroupthe player is automatically grouped
autokillthe player automatically kills any stunned or mortally wounded mobs, rather than having to explicitly kill them.
autolootthe player automatically loots mobs as they corpse
autosplitthe player automatically splits any gold he picks up among his group
briefthe player does not see room descriptions automatically when he enters a room
commasformat numbers with commas
compactthe player does not receive some trailing linefeeds
concisethe player sees a digest form of many game messages; this reduces bandwidth usage
concise_gagthe player doesn't see many incidental strings; equipment changes, etc.
echothe Mud does not tell the player what he just said
fishingthe player is fishing, and has a line in the water
fish_onthe player is fishing, and has a fish on his line
gossipthe player hears messages on the gossip channel
holylitethe player can always see everybody (except Gods)
holywingsspecial form of flying for Gods
lurkthe player is immune to the 'convocation' spell
mspturns on MSP
mxpturns on MXP
mxp_channelsallows him to see MXP on channels
mxp_compassturns on MXP compass
mxp_exitsturns on hyperlinked MXP exits
mxp_itemsturns on hyperlinked MXP items
mxp_promptturns on MXP-enabled prompt
mxp_shopsturns on MXP in shops
newbiethe player hears messages on the newbie channel
nobeepthe player cannot be beeped
noshoutthe player may not use any of the public channels, shout, or otherwise communicate in an annoying manner
notellthe player does not accept tells
prompt_crthe player does not receive a linefeed after his prompt
privateDon't show finger info for this guy
quest_groupthe player is in the quest group
showexitswhen the player enters a room, he sees a list of the immediately obvious exit directions

Behavior flags that apply only to mobs (form 1):

a-bit-aggressivethe mob is very occasionally aggressive, but usually not
aggressivethe mob attacks players when it sees them
aggr_hiddenthe mob attacks hidden players
aggr_nonfemalethe mob attacks all players that aren't female
aggr_nonmalethe mob attacks all players that aren't male
alignmentthe mob attacks people with an opposite alignment to the mob; for neutral mobs this does nothing
astralthe mob leaves no corpse when it dies; anything it was carrying is dropped
chargesthe mob charges into nearby rooms to attack players there (if it is also aggressive). This trumps nocharge for some reason
damaged-by-healsthe mob takes damage from healing magic, rather than being healed.
daythe mob appears during the day and disappears when the sun goes down
do-not-displacethis mob cannot be pushed, thrown, teleported, or otherwise moved from the room in any way
hatesunused
helpsunused
homelessthe mob does not walk home if he finds himself out of the room he was born in. This is only meaningful for mobs with the sentinel flag set.
mount_airif mounted, this mob can fly when ordered to
mount_grndif mounted, this mob can walk on land when ordered to. If you set mount_water and not mount_grnd, then the mount can't leave the water
mount_watrif mounted, this mob can walk on water when ordered to
nice-thiefthe mob doesn't attack people it catches stealing from it, it just yells at them
nightthe mob appears during the night and disappears when the sun rises
nogripthe mob is immune to deathgrip
nostabthe mob cannot be backstabbed, presumably because it doesn't have any vital organs. This is automatically true of mobs that are of certain types, such as plants, oozes, and automata.
no_chargethe mob doesn't charge into another room even if it's aggressive and there are players there it could attack
scavengerthe mob loots corpses and picks up stuff on the ground, and uses it if he can
sentinelthe mob does not wander around. This also means it won't charge to attack unless the 'charges' flag is set. If he does find himself out of his home room, he will walk home.
stay-zoneif the mob does wander around, he won't ever leave the zone he was born in
thoughtlessthe mob has no thoughts and thus produces nothing for the 'telepathy' spell
wimpythe mob flees if badly hurt; also it is aggressive vs. sleeping people
woundedsuppresses the aggressive flag when the mob is down more than 20% of its hit points

Object flags indicating where an object can be worn (form 2):

aboutworn about the body, like a cloak
armsworn on the arms (phylacteries, bracers)
bodyworn as body armor (e.g. a chain shirt)
feetworn as shoes
fingerworn as a ring or other finger adornment
handsworn on the hands, like gloves
headworn as a hat or helmet
holdheld in the off-hand, like a torch
legsworn on the legs, e.g. pants or greaves
neckworn around the neck
shieldheld as a shield
takemust be set if if the item can be picked up off the ground
throwcan be thrown
two-handeda weapon that is wielded in two hands
waistworn about the waist, like a belt
wieldwielded in one hand
wristworn on the wrist

Other object flags (form 2):

anti-evilunused
anti-goodunused
anti-neutralunused
blessthe item is blessed. This has no automatic game effects but can be used with, for example, MUDL scripts
can-shapeshiftthe item shapeshifts with a druid when the druid changes form, and continues to provide any magic effects it provided before he shifted
crumble-readthe item crumbles after being studied (for spellbooks)
doub-40-itemthe item can only be used by characters with at least level 40 in their primary and secondary classes
enchantedthe item has been enchanted and cannot be enchanted again
evilthe item is evil. This has no automatic game effects (other than glowing red if the viewer has a 'detect evil' spell up) but can be used with, for example, MUDL scripts.
floatthe item floats in water, instead of sinking out of sight (and being destroyed)
glowthe item glows
humthe item hums
invisiblethe item is invisible
magicthe item has a spell on it; it glows blue if a viewer has a 'detect magic' spell up
nodropthe item cannot be removed once equipped; used for cursed items. A 'remove curse' spell will remove this flag.
no_findthe item is obscure, so the 'wealth and glory' song will not help locate it
no-magicspells will not work on this item
poisonedunused
restrungthe strings on this item have been changed from the usual item of that vnum, and must be saved separately when a player rents
sancbusterdamage from this item, if it's a weapon, goes through 'sanctuary' and 'shield of faith' spells unreduced
shoulderif the item is set as a "neck" item, it is actually worn about the shoulders instead of around the neck. This just changes the messages, the item still uses a "neck" slot
temporarythe item cannot be sold, and gets silently destroyed if the bearer rents or enters certain rooms
tri-40-itemthe item can only be used by players who have achieved level 40 in their three most primary classes
under-2x40the item can only be used by players who have not yet achieved level 40 in their primary and secondary classes
under-3x40the item can only be used by players who have not yet achieved level 40 in their three most primary classes
zap-getif for some reason you are not able to wear this item (alignment or class restrictions, for example) then it burns you if you touch it

Room flags (form 3):

arenaexperience is awarded differently for fights here, and text sent to this room is also sent to rooms with the 'listen' flag set that are in the same zone
cavernthe 'enter' command from an adjacent room will take you into this room, and the 'leave' command will take you to an adjacent outdoors room without this flag set
chaosplayers can attack each other in this room
unapprovedThis room is not in-game; players should not go here
darkthe room is dark (unless someone brings a light source into it)
freshwater_fishingyou can fish here. You will potentially catch freshwater fish
indoorsthe room is inside, meaning that messages describing the changing weather etc are not visible here. This also has various other game effects
listenanything that happens in rooms in the same zone with the 'arena' flag set is visible in this room as well
no_broadcastthis room does not receive broadcast messages about weather, time of day, etc.
no_fleeyou cannot flee into this room; useful to prevent mobs from fleeing off of cliffs, etc.
no_gateyou cannot magically get to this room with 'gate', 'teleport', 'relocation', or similar spells
no_hidethere is nowhere to hide in this room
no_huntSloth Mud's automatic path building algorithm (the one used by hunt) will not build paths through this room
no_mobmobs cannot enter this room
no_mountmounts cannot enter this room (while someone is riding them)
no_recallyou cannot use the 'word of recall' spell from this room
no_stabyou cannot backstab or ambush in this room
no_tmp_itemswhen someone enters this room, any items he has with the temporary flag are silently destroyed
safezoneyou cannot push creatures out of this room, or cast any spells here
saltwater_fishingYou can fish here. You will potentially catch saltwater fish
vaultThis room is part of a vault

Room exit flags (form 4):

is-doorthe exit is a door and thus can be opened and closed; otherwise it can't
closedthe exit is closed, and cannot be passed until opened
lockedthe exit is locked, and cannot be opened until unlocked
no_mobmobs never go through this exit
invisiblethe game does nothing to give away the existence of this exit when it's closed - in all circumstances (except opening it) it looks just like there's no exit there
pickproofthe lock cannot be picked
windowyou cannot pass through this exit at all, although you can 'spy' and 'scan' through it
eat-keythe lock destroys a correct key once the door has unlocked
hiddenif this exit is closed, it provides messages just like there was no exit in that direction
narrowonly very small creatures (typically much smaller than players, other than druids shapeshifted into certain forms) can pass through this exit
silenteverybody passing through this exit is effectively sneaking, and thus sends no message to the room when they enter or leave
no-sneakit is impossible to sneak through this exit