Atrinik Server  4.0
Macros
Flag defines

Macros

#define FLAG_SLEEP   0
 
#define FLAG_CONFUSED   1
 
#define FLAG_PARALYZED   2
 
#define FLAG_SCARED   3
 
#define FLAG_BLIND   4
 
#define FLAG_IS_INVISIBLE   5
 
#define FLAG_IS_ETHEREAL   6
 
#define FLAG_IS_GOOD   7
 
#define FLAG_NO_PICK   8
 
#define FLAG_WALK_ON   9
 
#define FLAG_NO_PASS   10
 
#define FLAG_ANIMATE   11
 
#define FLAG_SLOW_MOVE   12
 
#define FLAG_FLYING   13
 
#define FLAG_MONSTER   14
 
#define FLAG_FRIENDLY   15
 
#define FLAG_REMOVED   16
 
#define FLAG_BEEN_APPLIED   17
 
#define FLAG_AUTO_APPLY   18
 
#define FLAG_IS_NEUTRAL   20
 
#define FLAG_SEE_INVISIBLE   21
 
#define FLAG_CAN_ROLL   22
 
#define FLAG_CONNECT_RESET   23
 
#define FLAG_IS_TURNABLE   24
 
#define FLAG_WALK_OFF   25
 
#define FLAG_FLY_ON   26
 
#define FLAG_FLY_OFF   27
 
#define FLAG_IS_USED_UP   28
 
#define FLAG_IDENTIFIED   29
 
#define FLAG_REFLECTING   30
 
#define FLAG_CHANGING   31
 
#define FLAG_SPLITTING   32
 
#define FLAG_HITBACK   33
 
#define FLAG_STARTEQUIP   34
 
#define FLAG_BLOCKSVIEW   35
 
#define FLAG_UNDEAD   36
 
#define FLAG_CAN_STACK   37
 
#define FLAG_UNAGGRESSIVE   38
 
#define FLAG_REFL_MISSILE   39
 
#define FLAG_REFL_SPELL   40
 
#define FLAG_NO_MAGIC   41
 
#define FLAG_NO_FIX_PLAYER   42
 
#define FLAG_IS_EVIL   43
 
#define FLAG_SOULBOUND   44
 
#define FLAG_RUN_AWAY   45
 
#define FLAG_PASS_THRU   46
 
#define FLAG_CAN_PASS_THRU   47
 
#define FLAG_OUTDOOR   48
 
#define FLAG_UNIQUE   49
 
#define FLAG_NO_DROP   50
 
#define FLAG_INDESTRUCTIBLE   51
 
#define FLAG_CAST_SPELL   52
 
#define FLAG_TWO_HANDED   54
 
#define FLAG_USE_BOW   55
 
#define FLAG_USE_ARMOUR   56
 
#define FLAG_USE_WEAPON   57
 
#define FLAG_CONNECT_NO_PUSH   58
 
#define FLAG_CONNECT_NO_RELEASE   59
 
#define FLAG_READY_BOW   60
 
#define FLAG_XRAYS   61
 
#define FLAG_NO_APPLY   62
 
#define FLAG_IS_FLOOR   63
 
#define FLAG_LIFESAVE   64
 
#define FLAG_IS_MAGICAL   65
 
#define FLAG_STAND_STILL   67
 
#define FLAG_RANDOM_MOVE   68
 
#define FLAG_ONLY_ATTACK   69
 
#define FLAG_STEALTH   71
 
#define FLAG_IS_LINKED   73
 
#define FLAG_CURSED   74
 
#define FLAG_DAMNED   75
 
#define FLAG_IS_BUILDABLE   76
 
#define FLAG_NO_PVP   77
 
#define FLAG_IS_THROWN   80
 
#define FLAG_IS_MALE   83
 
#define FLAG_IS_FEMALE   84
 
#define FLAG_APPLIED   85
 
#define FLAG_INV_LOCKED   86
 
#define FLAG_READY_WEAPON   90
 
#define FLAG_NO_SKILL_IDENT   91
 
#define FLAG_SEE_IN_DARK   93
 
#define FLAG_IS_CAULDRON   94
 
#define FLAG_DUST   95
 
#define FLAG_ONE_HIT   97
 
#define FLAG_DRAW_DOUBLE_ALWAYS   98
 
#define FLAG_BERSERK   99
 
#define FLAG_NO_ATTACK   100
 
#define FLAG_INVULNERABLE   101
 
#define FLAG_QUEST_ITEM   102
 
#define FLAG_IS_TRAPPED   103
 
#define FLAG_SYS_OBJECT   110
 
#define FLAG_USE_FIX_POS   111
 
#define FLAG_UNPAID   112
 
#define FLAG_HIDDEN   113
 
#define FLAG_MAKE_INVISIBLE   114
 
#define FLAG_MAKE_ETHEREAL   115
 
#define FLAG_IS_PLAYER   116
 
#define FLAG_IS_NAMED   117
 
#define FLAG_SPAWN_MOB   118
 
#define FLAG_NO_TELEPORT   119
 
#define FLAG_CORPSE   120
 
#define FLAG_CORPSE_FORCED   121
 
#define FLAG_PLAYER_ONLY   122
 
#define FLAG_ONE_DROP   124
 
#define FLAG_PERM_CURSED   125
 
#define FLAG_PERM_DAMNED   126
 
#define FLAG_DOOR_CLOSED   127
 
#define FLAG_IS_SPELL   128
 
#define FLAG_IS_MISSILE   129
 
#define FLAG_DRAW_DIRECTION   130
 
#define FLAG_DRAW_DOUBLE   131
 
#define FLAG_IS_ASSASSINATION   132
 
#define FLAG_OBJECT_WAS_MOVED   133
 
#define FLAG_NO_SAVE   134
 

Detailed Description

The object flags.

Unused: 77, 78, 128, 98, 81, 82, 104, 105, 106, 107, 108, 109, 96, 87, 88, 54, 53, 89, 79, 44, 48, 19.

Note
object_flag_names has text-representations of these flags, used for saving the flags and accessing them from Python plugin.
Warning
The first 8 bit are used from the map2 cmd as direct mapped data. The order must stay as it is here!

Macro Definition Documentation

FLAG_ANIMATE   11

The object is animated.

See Also
FLAG_ANIMATE Uses

Definition at line 912 of file define.h.

FLAG_APPLIED   85

Object is ready for use by living objects.

See Also
FLAG_APPLIED Uses

Definition at line 1182 of file define.h.

FLAG_AUTO_APPLY   18

Will be applied when created (treasure chest for example).

See Also
FLAG_AUTO_APPLY Uses

Definition at line 938 of file define.h.

#define FLAG_BEEN_APPLIED   17

The object has been applied before.

Definition at line 934 of file define.h.

#define FLAG_BERSERK   99

Monster will attack closest living object, even friends.

Definition at line 1221 of file define.h.

#define FLAG_BLIND   4

Object cannot see the map with eyes, and cannot read books/scrolls/etc.

Definition at line 884 of file define.h.

FLAG_BLOCKSVIEW   35

Object blocks view.

See Also
FLAG_BLOCKSVIEW Uses

Definition at line 1008 of file define.h.

FLAG_CAN_PASS_THRU   47

Object can pass through objects with FLAG_PASS_THRU set.

See Also
FLAG_CAN_PASS_THRU Uses

Definition at line 1058 of file define.h.

FLAG_CAN_ROLL   22

Object can be pushed.

See Also
FLAG_CAN_ROLL Uses

Definition at line 950 of file define.h.

FLAG_CAN_STACK   37

The object can stack.

See Also
FLAG_CAN_STACK Uses

Definition at line 1016 of file define.h.

FLAG_CAST_SPELL   52

Monster can cast spells.

See Also
FLAG_CAST_SPELL Uses

Definition at line 1078 of file define.h.

#define FLAG_CHANGING   31

Changes to other_arch when anim is done.

Definition at line 988 of file define.h.

#define FLAG_CONFUSED   1

Confused. Random direction when moving.

Definition at line 872 of file define.h.

FLAG_CONNECT_NO_PUSH   58

Connected object is not activated when 'pushed'.

See Also
FLAG_CONNECT_NO_PUSH Uses

Definition at line 1098 of file define.h.

FLAG_CONNECT_NO_RELEASE   59

Connected object is not activated when 'released'.

See Also
FLAG_CONNECT_NO_RELEASE Uses

Definition at line 1102 of file define.h.

FLAG_CONNECT_RESET   23

If set and when connected object is triggered, the object will have the connection reset, so it doesn't need to wait for object that triggered the connection to move off.

See Also
FLAG_CONNECT_RESET Uses

Definition at line 956 of file define.h.

FLAG_CORPSE   120

If set, this monster will drop a corpse.

See Also
FLAG_CORPSE Uses

Definition at line 1288 of file define.h.

#define FLAG_CORPSE_FORCED   121

Force a corpse, even if the object that killed the monster was too high level for any experience.

Definition at line 1293 of file define.h.

FLAG_CURSED   74

The object is cursed.

See Also
FLAG_CURSED Uses

Definition at line 1154 of file define.h.

FLAG_DAMNED   75

The object is very cursed.

See Also
FLAG_DAMNED Uses

Definition at line 1158 of file define.h.

#define FLAG_DOOR_CLOSED   127

The object is a closer door.

Definition at line 1314 of file define.h.

FLAG_DRAW_DIRECTION   130

The object is shown based on its direction and the player's position.

See Also
FLAG_DRAW_DIRECTION Uses

Definition at line 1326 of file define.h.

FLAG_DRAW_DOUBLE   131

The object is drawn twice.

See Also
FLAG_DRAW_DOUBLE Uses

Definition at line 1330 of file define.h.

FLAG_DRAW_DOUBLE_ALWAYS   98

Always draw the object twice.

See Also
FLAG_DRAW_DOUBLE_ALWAYS Uses

Definition at line 1217 of file define.h.

#define FLAG_DUST   95

Item is a powder.

Definition at line 1206 of file define.h.

FLAG_FLY_OFF   27

Object is applied when flying object leaves the tile.

See Also
FLAG_FLY_OFF Uses

Definition at line 972 of file define.h.

FLAG_FLY_ON   26

Object is applied when flying object enters the tile.

See Also
FLAG_FLY_ON Uses

Definition at line 968 of file define.h.

FLAG_FLYING   13

The object is flying.

See Also
FLAG_FLYING Uses

Definition at line 918 of file define.h.

FLAG_FRIENDLY   15

The monster is friendly and will not attack other friendly objects.

See Also
FLAG_FRIENDLY Uses

Definition at line 926 of file define.h.

#define FLAG_HIDDEN   113

The object cannot be seen even with FLAG_SEE_INVISIBLE.

Definition at line 1255 of file define.h.

FLAG_HITBACK   33

Object will hit back when hit.

See Also
FLAG_HITBACK Uses

Definition at line 1000 of file define.h.

FLAG_IDENTIFIED   29

The object is identified.

See Also
FLAG_IDENTIFIED Uses

Definition at line 980 of file define.h.

FLAG_INDESTRUCTIBLE   51

The item cannot be damaged.

See Also
FLAG_INDESTRUCTIBLE Uses

Definition at line 1074 of file define.h.

#define FLAG_INV_LOCKED   86

Item will not be dropped from inventory.

Definition at line 1186 of file define.h.

FLAG_INVULNERABLE   101

Monster can't be killed, and enemies will not consider it for attacking.

See Also
FLAG_INVULNERABLE Uses

Definition at line 1229 of file define.h.

#define FLAG_IS_ASSASSINATION   132

If this and slaying field is set, the object does 2.25 times more damage to race that of the 'slaying' field.

Definition at line 1335 of file define.h.

#define FLAG_IS_BUILDABLE   76

Used for floor: is the floor buildable?

Definition at line 1162 of file define.h.

FLAG_IS_CAULDRON   94

Container can make alchemical stuff.

See Also
FLAG_IS_CAULDRON Uses

Definition at line 1202 of file define.h.

#define FLAG_IS_ETHEREAL   6

Object is ethereal.

Definition at line 892 of file define.h.

FLAG_IS_EVIL   43

The object is evil.

See Also
FLAG_IS_EVIL Uses

Definition at line 1040 of file define.h.

FLAG_IS_FEMALE   84

Object is female.

See Also
FLAG_IS_FEMALE Uses

Definition at line 1178 of file define.h.

#define FLAG_IS_FLOOR   63

The object is a floor.

Definition at line 1118 of file define.h.

FLAG_IS_GOOD   7

Alignment flag.

See Also
FLAG_IS_GOOD Uses

Definition at line 896 of file define.h.

FLAG_IS_INVISIBLE   5

Can only be see by objects with FLAG_SEE_INVISIBLE.

See Also
FLAG_IS_INVISIBLE Uses

Definition at line 888 of file define.h.

#define FLAG_IS_LINKED   73

The object is linked with other objects.

Definition at line 1150 of file define.h.

FLAG_IS_MAGICAL   65

Item is magical.

See Also
FLAG_IS_MAGICAL Uses

Definition at line 1129 of file define.h.

FLAG_IS_MALE   83

Object is male.

See Also
FLAG_IS_MALE Uses

Definition at line 1174 of file define.h.

#define FLAG_IS_MISSILE   129

Object is a missile.

Definition at line 1322 of file define.h.

#define FLAG_IS_NAMED   117

Object name is "unique"- for artifacts like Stormbringer.

Unique objects don't have a race or material (no "elven iron Stormbringer")

Definition at line 1274 of file define.h.

FLAG_IS_NEUTRAL   20

Neutrally aligned object.

See Also
FLAG_IS_NEUTRAL Uses

Definition at line 942 of file define.h.

#define FLAG_IS_PLAYER   116

Object is a player.

Definition at line 1267 of file define.h.

#define FLAG_IS_SPELL   128

Object is a spell.

Definition at line 1318 of file define.h.

#define FLAG_IS_THROWN   80

Object is designed to be thrown.

Definition at line 1170 of file define.h.

#define FLAG_IS_TRAPPED   103

Object is trapped, ie, there is a known trap inside the object's inventory. Used for map and below inventory, to mark containers like corpses where player found traps.

Definition at line 1239 of file define.h.

FLAG_IS_TURNABLE   24

Object will change face with direction.

See Also
FLAG_IS_TURNABLE Uses

Definition at line 960 of file define.h.

#define FLAG_IS_USED_UP   28

The object will be removed when object::food reaches 0.

Definition at line 976 of file define.h.

FLAG_LIFESAVE   64

Saves a player's life once, then destructs itself.

See Also
FLAG_LIFESAVE Uses

Definition at line 1125 of file define.h.

FLAG_MAKE_ETHEREAL   115

Makes the wearer ethereal.

See Also
FLAG_MAKE_ETHEREAL Uses

Definition at line 1263 of file define.h.

FLAG_MAKE_INVISIBLE   114

Makes the wearer invisible.

See Also
FLAG_MAKE_INVISIBLE Uses

Definition at line 1259 of file define.h.

#define FLAG_MONSTER   14

The object is a monster, golem, etc.

Definition at line 922 of file define.h.

#define FLAG_NO_APPLY   62

Avoids walk_on/fly_on events for this object.

Definition at line 1114 of file define.h.

FLAG_NO_ATTACK   100

Object will never attack.

See Also
FLAG_NO_ATTACK Uses

Definition at line 1225 of file define.h.

FLAG_NO_DROP   50

Object can't be dropped.

See Also
FLAG_NO_DROP Uses

Definition at line 1070 of file define.h.

#define FLAG_NO_FIX_PLAYER   42

living_update() won't be called.

Definition at line 1036 of file define.h.

FLAG_NO_MAGIC   41

Wizard-like spells cannot pass this tile.

See Also
FLAG_NO_MAGIC Uses

Definition at line 1032 of file define.h.

FLAG_NO_PASS   10

Nothing can pass.

See Also
FLAG_NO_PASS Uses

Definition at line 908 of file define.h.

FLAG_NO_PICK   8

Object can't be picked up.

See Also
FLAG_NO_PICK Uses

Definition at line 900 of file define.h.

FLAG_NO_PVP   77

PvP is disabled on the tile this object is on.

See Also
FLAG_NO_PVP Uses

Definition at line 1166 of file define.h.

#define FLAG_NO_SAVE   134

Don't save this object - remove it before we save.

Definition at line 1343 of file define.h.

#define FLAG_NO_SKILL_IDENT   91

If set, won't get exp for reading the book.

Definition at line 1194 of file define.h.

FLAG_NO_TELEPORT   119

Objects with this flag will not be teleported by teleporters unless they are in inventory of an object without this flag.

See Also
FLAG_NO_TELEPORT Uses

Definition at line 1284 of file define.h.

#define FLAG_OBJECT_WAS_MOVED   133

Internally used from object_remove() and insert_xx().

Definition at line 1339 of file define.h.

FLAG_ONE_DROP   124

One drop item. Used for quests, where the quest item with this flag set will never drop more than once for one player.

See Also
FLAG_ONE_DROP Uses

Definition at line 1302 of file define.h.

FLAG_ONE_HIT   97

Monster can only hit once, then evaporates.

See Also
FLAG_ONE_HIT Uses

Definition at line 1213 of file define.h.

#define FLAG_ONLY_ATTACK   69

Monster will evaporate if there is no enemy.

Definition at line 1141 of file define.h.

#define FLAG_OUTDOOR   48

Outdoor tile.

Definition at line 1062 of file define.h.

#define FLAG_PARALYZED   2

Paralyzed, cannot do various movement-related actions.

Definition at line 876 of file define.h.

FLAG_PASS_THRU   46

Objects with can_pass_thru can pass through this object as if it wasn't there.

See Also
FLAG_PASS_THRU Uses

Definition at line 1054 of file define.h.

FLAG_PERM_CURSED   125

Object is permanently cursed.

See Also
FLAG_PERM_CURSED Uses

Definition at line 1306 of file define.h.

FLAG_PERM_DAMNED   126

Object is permanently damned.

See Also
FLAG_PERM_DAMNED Uses

Definition at line 1310 of file define.h.

FLAG_PLAYER_ONLY   122

Only players can enter the tile with object that has this flag.

See Also
FLAG_PLAYER_ONLY Uses

Definition at line 1297 of file define.h.

#define FLAG_QUEST_ITEM   102

Special quest object.

Definition at line 1233 of file define.h.

FLAG_RANDOM_MOVE   68

Monster will move randomly.

See Also
FLAG_RANDOM_MOVE Uses

Definition at line 1137 of file define.h.

#define FLAG_READY_BOW   60

Monster has a readied bow.

Definition at line 1106 of file define.h.

#define FLAG_READY_WEAPON   90

Player has a weapon readied.

Definition at line 1190 of file define.h.

FLAG_REFL_MISSILE   39

Object will reflect missiles.

See Also
FLAG_REFL_MISSILE Uses

Definition at line 1024 of file define.h.

FLAG_REFL_SPELL   40

Object will reflect spells.

See Also
FLAG_REFL_SPELL Uses

Definition at line 1028 of file define.h.

#define FLAG_REFLECTING   30

Object reflects from walls (lightning, missiles).

Definition at line 984 of file define.h.

#define FLAG_REMOVED   16

Object is not in any map or inventory.

Definition at line 930 of file define.h.

FLAG_RUN_AWAY   45

Object runs away from nearest player but can still attack from distance.

See Also
FLAG_RUN_AWAY Uses

Definition at line 1049 of file define.h.

#define FLAG_SCARED   3

Monster is scared.

Definition at line 880 of file define.h.

FLAG_SEE_IN_DARK   93

If set object can see even in darkness.

See Also
FLAG_SEE_IN_DARK Uses

Definition at line 1198 of file define.h.

FLAG_SEE_INVISIBLE   21

Can see invisible objects.

See Also
FLAG_SEE_INVISIBLE Uses

Definition at line 946 of file define.h.

FLAG_SLEEP   0

Monster is sleeping. While active, the monster's visibility range is reduced.

See Also
FLAG_SLEEP Uses

Definition at line 868 of file define.h.

FLAG_SLOW_MOVE   12

Uses the living::exp to slow down movement.

See Also
FLAG_SLOW_MOVE Uses

Definition at line 916 of file define.h.

#define FLAG_SOULBOUND   44

The object is soulbound to the player.

Definition at line 1044 of file define.h.

#define FLAG_SPAWN_MOB   118

Monsters with this flag are created by spawn point and have a spawn info object inside inventory.

Definition at line 1279 of file define.h.

FLAG_SPLITTING   32

Object splits into stats.food other objs.

Todo:
Remove?
See Also
FLAG_SPLITTING Uses

Definition at line 996 of file define.h.

FLAG_STAND_STILL   67

Monster will never, ever move.

See Also
FLAG_STAND_STILL Uses

Definition at line 1133 of file define.h.

FLAG_STARTEQUIP   34

Object will disappear when dropped.

See Also
FLAG_STARTEQUIP Uses

Definition at line 1004 of file define.h.

FLAG_STEALTH   71

Allows players to pass quietly past monsters, with less chance of the monsters noticing the player.

See Also
FLAG_STEALTH Uses

Definition at line 1146 of file define.h.

FLAG_SYS_OBJECT   110

The object cannot be seen by anyone except DMs.

See Also
FLAG_SYS_OBJECT Uses

Definition at line 1243 of file define.h.

#define FLAG_TWO_HANDED   54

Item requires two hands to wield.

Definition at line 1082 of file define.h.

FLAG_UNAGGRESSIVE   38

Monster doesn't attack enemies, only if it's attacked first.

See Also
FLAG_UNAGGRESSIVE Uses

Definition at line 1020 of file define.h.

FLAG_UNDEAD   36

Monster is undead.

See Also
FLAG_UNDEAD Uses

Definition at line 1012 of file define.h.

FLAG_UNIQUE   49

Item is unique.

See Also
FLAG_UNIQUE Uses

Definition at line 1066 of file define.h.

FLAG_UNPAID   112

Object hasn't been paid for yet.

See Also
FLAG_UNPAID Uses

Definition at line 1251 of file define.h.

FLAG_USE_ARMOUR   56

Monster can wear armour like shields, plate mails, helms, etc.

See Also
FLAG_USE_ARMOUR Uses

Definition at line 1090 of file define.h.

FLAG_USE_BOW   55

Monster can fire bows.

See Also
FLAG_USE_BOW Uses

Definition at line 1086 of file define.h.

#define FLAG_USE_FIX_POS   111

When putting an object on map, do it exactly on position.

Definition at line 1247 of file define.h.

FLAG_USE_WEAPON   57

Monster can wield weapons.

See Also
FLAG_USE_WEAPON Uses

Definition at line 1094 of file define.h.

FLAG_WALK_OFF   25

Object is applied when left.

See Also
FLAG_WALK_OFF Uses

Definition at line 964 of file define.h.

FLAG_WALK_ON   9

Applied when it's walked upon.

See Also
FLAG_WALK_ON Uses

Definition at line 904 of file define.h.

FLAG_XRAYS   61

X-ray vision.

See Also
FLAG_XRAYS Uses

Definition at line 1110 of file define.h.