Atrinik Server  4.0
Macros
Type defines

Macros

#define PLAYER   1
 
#define BULLET   2
 
#define ROD   3
 
#define TREASURE   4
 
#define POTION   5
 
#define FOOD   6
 
#define REGION_MAP   7
 
#define BOOK   8
 
#define CLOCK   9
 
#define MATERIAL   10
 
#define DUPLICATOR   11
 
#define LIGHTNING   12
 
#define ARROW   13
 
#define BOW   14
 
#define WEAPON   15
 
#define ARMOUR   16
 
#define PEDESTAL   17
 
#define CONFUSION   19
 
#define DOOR   20
 
#define KEY   21
 
#define MAP   22
 
#define MAGIC_MIRROR   28
 
#define SPELL   29
 
#define SHIELD   33
 
#define HELMET   34
 
#define PANTS   35
 
#define MONEY   36
 
#define PAINTING   37
 
#define AMULET   39
 
#define PLAYER_MOVER   40
 
#define CREATOR   42
 
#define SKILL   43
 
#define EXPERIENCE   44
 
#define TRINKET   45
 
#define BLINDNESS   49
 
#define GOD   50
 
#define DETECTOR   51
 
#define SKILL_ITEM   52
 
#define DEAD_OBJECT   53
 
#define DRINK   54
 
#define MARKER   55
 
#define HOLY_ALTAR   56
 
#define PEARL   59
 
#define GEM   60
 
#define SOUND_AMBIENT   61
 
#define FIREWALL   62
 
#define CHECK_INV   64
 
#define EXIT   66
 
#define SHOP_FLOOR   68
 
#define RING   70
 
#define FLOOR   71
 
#define FLESH   72
 
#define INORGANIC   73
 
#define LIGHT_APPLY   74
 
#define WALL   77
 
#define LIGHT_SOURCE   78
 
#define MISC_OBJECT   79
 
#define MONSTER   80
 
#define SPAWN_POINT   81
 
#define LIGHT_REFILL   82
 
#define SPAWN_POINT_MOB   83
 
#define SPAWN_POINT_INFO   84
 
#define BOOK_SPELL   85
 
#define ORGANIC   86
 
#define CLOAK   87
 
#define CONE   88
 
#define SPINNER   90
 
#define GATE   91
 
#define BUTTON   92
 
#define TYPE_HANDLE   93
 
#define WORD_OF_RECALL   96
 
#define SIGN   98
 
#define BOOTS   99
 
#define GLOVES   100
 
#define BASE_INFO   101
 
#define RANDOM_DROP   102
 
#define BRACERS   104
 
#define POISONING   105
 
#define SAVEBED   106
 
#define WAND   109
 
#define ABILITY   110
 
#define SCROLL   111
 
#define DIRECTOR   112
 
#define GIRDLE   113
 
#define FORCE   114
 
#define POTION_EFFECT   115
 
#define JEWEL   116
 
#define NUGGET   117
 
#define EVENT_OBJECT   118
 
#define WAYPOINT_OBJECT   119
 
#define QUEST_CONTAINER   120
 
#define CONTAINER   122
 
#define WEALTH   125
 
#define BEACON   126
 
#define MAP_EVENT_OBJ   127
 
#define COMPASS   151
 
#define MAP_INFO   152
 
#define SWARM_SPELL   153
 
#define RUNE   154
 
#define CLIENT_MAP_INFO   155
 
#define POWER_CRYSTAL   156
 
#define CORPSE   157
 
#define DISEASE   158
 
#define SYMPTOM   159
 
#define OBJECT_TYPE_MAX   160
 

Detailed Description

Type Defines

Only add new values to this list if somewhere in the program code, it is actually needed. Just because you add a new monster does not mean it has to have a type defined here. That only needs to happen if in some .c file, it needs to do certain special actions based on the monster type, that can not be handled by any of the numerous flags.

Also, if you add new entries, try and fill up the holes in this list.

Type 0 will be undefined and show a non valid type information.

Currently unused types to fill: 63, 67, 76, 97, 108, 128, 129, 131, 132, 133, 134, 135, 136, 137, 140, 142, 143, 144, 145, 146, 147, 148, 149, 150, 155, 151, 141, 107, 89, 61, 57, 46, 24.

Macro Definition Documentation

ABILITY   110

Ability.

See Ability

Definition at line 449 of file define.h.

AMULET   39

An amulet.

See Amulet

Definition at line 234 of file define.h.

ARMOUR   16

Armour.

See Brestplate Armour

Definition at line 182 of file define.h.

ARROW   13

An arrow.

See Projectile

Definition at line 170 of file define.h.

#define BASE_INFO   101

This object holds the real base stats of monsters.

Definition at line 421 of file define.h.

BEACON   126

A beacon.

See Beacon

Definition at line 502 of file define.h.

#define BLINDNESS   49

Blindness force object.

Definition at line 258 of file define.h.

BOOK   8

Book.

See Book

Definition at line 150 of file define.h.

#define BOOK_SPELL   85

Spell book.

Definition at line 373 of file define.h.

BOOTS   99

Boots.

See Boots

Definition at line 413 of file define.h.

BOW   14

Bow.

See Shooting Weapon

Definition at line 174 of file define.h.

BRACERS   104

Bracers.

See Bracers

Definition at line 433 of file define.h.

#define BULLET   2

A fired spell bullet.

Definition at line 126 of file define.h.

BUTTON   92

Button.

See Button

Definition at line 397 of file define.h.

CHECK_INV   64

Inventory checker.

See Inventory Checker

Definition at line 308 of file define.h.

#define CLIENT_MAP_INFO   155

Client map information.

Definition at line 526 of file define.h.

CLOAK   87

A cloak.

See Cloak

Definition at line 381 of file define.h.

CLOCK   9

Clock. Shows the in-game time.

See Clock

Definition at line 154 of file define.h.

COMPASS   151

Compass.

See Compass

Definition at line 510 of file define.h.

CONE   88

Cone spell.

See Damager

Definition at line 385 of file define.h.

#define CONFUSION   19

Confusion force.

Definition at line 190 of file define.h.

CONTAINER   122

A container.

See Container

Definition at line 493 of file define.h.

#define CORPSE   157

Corpse.

Definition at line 534 of file define.h.

CREATOR   42

Object fields and flags used by this type.

Field/Flag Explanation
connected What connection number will trigger the creator.
living::hp How many times it may create before stopping.
FLAG_LIFESAVE If set, it'll never disappear but will go on creating everytime it's triggered.
object::other_arch The object to create on top of the creator.

Creator object.

See Creator

Definition at line 242 of file define.h.

#define DEAD_OBJECT   53

Players become a DEAD_OBJECT when they logout.

Definition at line 275 of file define.h.

DETECTOR   51

Object fields and flags used by this type.

Field/Flag Explanation
object::slaying Name of the thing the detector is to look for.
object::speed Frequency of 'glances'.
connected Connected value of detector.
living::sp 1 if detection sets buttons, -1 if detection unsets buttons.

Detector is an object which notices the presence of another object and is triggered like buttons.

See Detector

Definition at line 267 of file define.h.

DIRECTOR   112

Director.

See Director

Definition at line 457 of file define.h.

DISEASE   158

Object fields and flags used by this type.

Field/Flag Explanation
object::attack Attack type(s) of the disease, for example, attack_godpower 100.
object::other_arch Object created and dropped when symptom moves.
object::title When the "disease" infects something, it will print "title victim!!!" to the player who owns the "disease".
living::wc The chance of someone in range catching the disease, divided by 127.
object::magic The range at which infection may occur. If negative, the range is NOT level dependent.
object::stats What stats are reduced by the disease (str, con, ...)
living::maxhp How long the disease will persist if the host dies and "drops" it, in "disease moves", i.e., moves of the disease. If negative, permanent.
object::value The counter for maxhp, it starts at maxhp and drops...
living::dam How much damage it does. If positive, it is straight damage. If negative, a percentage.
living::maxgrace How long in "disease moves" the disease lasts in the host, if negative, permanent until cured.
living::food If negative, disease is permanent. Otherwise, decreases at <speed>, disease goes away at food = 0, set to "maxgrace" on infection.
object::speed The speed of the disease, how fast "disease moves" occur.
object::last_sp The lethargy imposed on the player by the disease. A lethargy of "1" reduces the players speed to 1% of its normal value.
living::maxsp How much mana is sapped per "disease move". If negative, a percentage is taken.
living::ac Every "disease move" the severity of the symptoms are increased by ac / 100. (severity = 1 + (accumlated_progression) / 100)
object::last_eat Increases food usage if negative.
object::last_heal If nonzero, disease does NOT grant immunity when it runs out.
living::exp Experience awarded when plague cured.
living::hp Reduces regeneration of disease-bearer.
living::sp Reduces spellpoint regeneration.
object::name Name of the plague.
object::msg What the plague says when it strikes.
object::race Species/race the plague strikes (* = everything).
object::level General description of the plague's deadliness
living::wc Reduction in wc per generation of disease. This builds in a self-limiting factor.

Disease.

See Disease

Definition at line 538 of file define.h.

DOOR   20

Door.

See Door

Definition at line 194 of file define.h.

DRINK   54

Drink.

See Drink

Definition at line 279 of file define.h.

DUPLICATOR   11

Duplicator.

See Duplicator

Definition at line 162 of file define.h.

EVENT_OBJECT   118

Event/script object.

See Event Object

Definition at line 481 of file define.h.

EXIT   66

Stairs, holes, portals, etc.

See Exit

Definition at line 312 of file define.h.

#define EXPERIENCE   44

An experience object.

Definition at line 250 of file define.h.

FIREWALL   62

Fire wall.

See Magic Wall

Definition at line 304 of file define.h.

FLESH   72

Animal body parts.

See Flesh

Definition at line 328 of file define.h.

FLOOR   71

This is a floor tile.

See Floor

Definition at line 324 of file define.h.

FOOD   6

Food.

See Food

Definition at line 142 of file define.h.

#define FORCE   114

A generic force object.

Definition at line 465 of file define.h.

GATE   91

Object fields and flags used by this type.

Field/Flag Explanation
living::hp How long a gate is open/closed.
living::maxhp Initial value for living::hp.
living::sp If zero the gate is closed, if 1 the gate is open.

Gate.

See Gate

Definition at line 393 of file define.h.

GEM   60

Gem.

See Gems

Definition at line 296 of file define.h.

GIRDLE   113

Girdle.

See Girdle

Definition at line 461 of file define.h.

GLOVES   100

Gloves.

See Gloves

Definition at line 417 of file define.h.

#define GOD   50

God.

Definition at line 262 of file define.h.

HELMET   34

Helmet.

See Helmet

Definition at line 218 of file define.h.

HOLY_ALTAR   56

Holy altar.

See Holy Altar

Definition at line 288 of file define.h.

INORGANIC   73

Metals and minerals.

See Inorganic

Definition at line 332 of file define.h.

JEWEL   116

A jewel.

See Jewels

Definition at line 473 of file define.h.

KEY   21

Key to unlock a locked door.

See Key

Definition at line 198 of file define.h.

LIGHT_APPLY   74

Light source for players - torch, lantern, etc.

See Applyable Light

Definition at line 336 of file define.h.

LIGHT_REFILL   82

Refilling item for LIGHT_APPLY.

See Light Refill Object

Definition at line 361 of file define.h.

LIGHT_SOURCE   78

Light source on a map (invisible light).

See Light Source

Definition at line 344 of file define.h.

#define LIGHTNING   12

Lightning.

Definition at line 166 of file define.h.

MAGIC_MIRROR   28

A magic mirror which allows you to see objects on a different coordinate.

See Magic Mirror

Definition at line 206 of file define.h.

#define MAP   22

Map object. Used internally.

Definition at line 202 of file define.h.

MAP_EVENT_OBJ   127

Map event object.

See Map Event Object

Definition at line 506 of file define.h.

MAP_INFO   152

Map information object.

See Map Info

Definition at line 514 of file define.h.

MARKER   55

Object fields and flags used by this type.

Field/Flag Explanation
living::hp How many times the marker will work. If zero, infinite, otherwise every time the marker grants a mark, the value is decremented and when reached zero, the marker is removed.

Inserts an invisible, weightless force into a player with a specified string.

See Marker

Definition at line 284 of file define.h.

#define MATERIAL   10

Material used for the construction skill.

Definition at line 158 of file define.h.

MISC_OBJECT   79

Miscellaneous objects are for objects without a function in the engine, like statues, clocks, chairs, etc.

See Misc Object

Definition at line 349 of file define.h.

MONEY   36

Money (copper, silver, etc).

See Money

Definition at line 226 of file define.h.

MONSTER   80

A real living creature.

See Monster & NPC

Definition at line 353 of file define.h.

NUGGET   117

Nugget.

See Nuggets

Definition at line 477 of file define.h.

ORGANIC   86

Body parts which can't be eaten - dragon scales for example

See Organic

Definition at line 377 of file define.h.

#define PAINTING   37

A painting.

Definition at line 230 of file define.h.

#define PANTS   35

Pants.

Definition at line 222 of file define.h.

#define PEARL   59

Pearl.

Definition at line 292 of file define.h.

PEDESTAL   17

Pedestal.

See Pedestal

Definition at line 186 of file define.h.

#define PLAYER   1

The object is a player object.

Definition at line 122 of file define.h.

PLAYER_MOVER   40

Object fields and flags used by this type.

Field/Flag Explanation
object::direction Direction the activating object will be moved to, if zero, a random one will be chosen. Perhaps useful for a dance club.
object::speed How often it will move objects.
FLAG_LIFESAVE If set, it'll disappear after living::hp + 1 moves.
living::maxsp, living::sp If both are set, it'll paralyze the victim for living::maxsp * his speed / object::speed

Player mover.

See Mover

Definition at line 238 of file define.h.

#define POISONING   105

Poison force.

Definition at line 437 of file define.h.

POTION   5

Potion.

See Potion

Definition at line 138 of file define.h.

#define POTION_EFFECT   115

A force, holding the effect of a potion.

Definition at line 469 of file define.h.

POWER_CRYSTAL   156

Power crystal.

See Power Crystal

Definition at line 530 of file define.h.

QUEST_CONTAINER   120

Used to store quest information in players.

See Quest Container

Definition at line 489 of file define.h.

RANDOM_DROP   102

Only used for spawn point monsters:

If found inside the monster, there is a random chance based on the object's weight limit to drop the object's inventory into the monster.

See Random Drop Container

Definition at line 429 of file define.h.

#define REGION_MAP   7

Region map.

Definition at line 146 of file define.h.

RING   70

A ring.

See Ring

Definition at line 320 of file define.h.

ROD   3

Rod.

See Rod

Definition at line 130 of file define.h.

RUNE   154

Rune.

See Rune

Definition at line 522 of file define.h.

SAVEBED   106

A savebed.

See Savebed

Definition at line 441 of file define.h.

SCROLL   111

Scroll.

See Scroll

Definition at line 453 of file define.h.

SHIELD   33

Shield.

See Shield

Definition at line 214 of file define.h.

SHOP_FLOOR   68

Object fields and flags used by this type.

Field/Flag Explanation
object::randomitems If not NULL, will be the goods to generate on map load.
FLAG_AUTO_APPLY If set, will generate goods from object::randomitems on map load.
FLAG_CURSED If set, randomly generated goods will not be clone items.
living::exp Quality level of randomly generated goods, if 0, will use map's difficulty.
FLAG_DAMNED If set, generated goods will never become artifacts.
FLAG_IS_MAGICAL If set, the shop floor will be a unique shop; items dropped will stay there until someone buys them or the map resets.

Shop floor.

See Shop Floor

Definition at line 316 of file define.h.

SIGN   98

Sign.

See Sign

Definition at line 409 of file define.h.

#define SKILL   43

Skill object.

Definition at line 246 of file define.h.

#define SKILL_ITEM   52

Item required to be equipped in order to use a skill.

Definition at line 271 of file define.h.

SOUND_AMBIENT   61

Ambient sound effect.

See Ambient Sound Effect

Definition at line 300 of file define.h.

SPAWN_POINT   81

A spawn point object.

See Spawn Point

Definition at line 357 of file define.h.

#define SPAWN_POINT_INFO   84

Used to find spawn point where monster came from.

Definition at line 369 of file define.h.

SPAWN_POINT_MOB   83

Monster inside a spawn point.

See Spawn Point Monster

Definition at line 365 of file define.h.

#define SPELL   29

Spell information object.

Definition at line 210 of file define.h.

SPINNER   90

Spinner.

See Spinner

Definition at line 389 of file define.h.

#define SWARM_SPELL   153

A swarm spell.

Definition at line 518 of file define.h.

#define SYMPTOM   159

Object fields and flags used by this type.

Field/Flag Explanation
object::stats Modify stats
living::hp Modify regen
object::value Progression counter (multiplier = value / 100)
living::food Modify food use (from object::last_eat in DISEASE)
living::maxsp Suck mana (as noted for DISEASE)
object::last_sp Lethargy
object::msg What to say
object::speed Speed of movement, from DISEASE

Disease symptom.

Definition at line 542 of file define.h.

TREASURE   4

An object that will generate treasure.

See Treasure

Definition at line 134 of file define.h.

#define TYPE_HANDLE   93

Handle.

Definition at line 401 of file define.h.

WALL   77

This is a wall.

See Wall

Definition at line 340 of file define.h.

WAND   109

Wand.

See Wand & Staff

Definition at line 445 of file define.h.

WAYPOINT_OBJECT   119

Waypoint object.

See Waypoint Object

Definition at line 485 of file define.h.

#define WEALTH   125

This is a raw wealth object. When generated it's transformed into real money depending on the environment where it's generated.

Definition at line 498 of file define.h.

WEAPON   15

Weapon.

See Weapon

Definition at line 178 of file define.h.

#define WORD_OF_RECALL   96

Special force for word of recall.

Definition at line 405 of file define.h.