Python constants

List of the Python plugin constants and their meaning.

Name Details Notes
NORTH 1
NORTHEAST 2
EAST 3
SOUTHEAST 4
SOUTH 5
SOUTHWEST 6
WEST 7
NORTHWEST 8
llevError An irrecoverable fatal error; the server will shut down.
llevBug A bug; after too many of these in a single tick the server will shut down.
llevInfo Just tell the log stuff we think it's useful to know.
llevDebug Give out maximal information for debug and bug control.
EVENT_APPLY Object applied/unapplied.
EVENT_ATTACK Monster attacked or scripted weapon was used.
EVENT_DEATH Player or monster was killed.
EVENT_DROP Object dropped on the floor.
EVENT_PICKUP Object picked up.
EVENT_SAY Someone speaks.
EVENT_STOP Thrown object stopped.
EVENT_TIME Triggered each time the object can react/move.
EVENT_THROW Object is thrown.
EVENT_TRIGGER Button pushed, lever pulled, etc.
EVENT_CLOSE Container closed.
EVENT_TIMER Timer connected triggered it.
EVENT_BORN
EVENT_CLOCK
EVENT_CRASH
EVENT_GDEATH
EVENT_GKILL
EVENT_LOGIN
EVENT_LOGOUT
EVENT_MAPENTER
EVENT_MAPLEAVE
EVENT_MAPRESET
EVENT_REMOVE
EVENT_SHOUT
EVENT_TELL
MAP_INFO_NORMAL Normal map info, to everyone in range of 12 tiles.
MAP_INFO_ALL To everyone on a map; a value of 9999 should be enough.
COST_TRUE True value of item, unadjusted.
COST_BUY Value for buying the item.
COST_SELL Value for selling the item.
APPLY_TOGGLE 0
APPLY_ALWAYS
UNAPPLY_ALWAYS
UNAPPLY_NO_MERGE
UNAPPLY_IGNORE_CURSE
APPLY_NO_EVENT
NEUTER Neuter: no gender.
MALE Male.
FEMALE Female.
HERMAPHRODITE Hermaphrodite: both genders.
MAXLEVEL The maximum level.
CAST_NORMAL 0
CAST_POTION 1
LEARN 0
UNLEARN 1
UNIDENTIFIED 0
IDENTIFIED 1
IDENTIFY_NORMAL Normal identification.
IDENTIFY_ALL Identify everything.
IDENTIFY_MARKED Identify only marked item.
CLONE_WITH_INVENTORY 0
CLONE_WITHOUT_INVENTORY 1
EXP_AGILITY
EXP_MENTAL
EXP_MAGICAL
EXP_PERSONAL
EXP_PHYSICAL
EXP_WISDOM
COLOR_WHITE Default color is white (0), if no color is selected
COLOR_ORANGE Orange.
COLOR_NAVY Navy.
COLOR_RED Red.
COLOR_GREEN Green.
COLOR_BLUE Blue.
COLOR_GREY Grey.
COLOR_BROWN Brown.
COLOR_PURPLE Purple.
COLOR_PINK Pink.
COLOR_YELLOW Yellow.
COLOR_DK_NAVY Dark navy.
COLOR_DK_GREEN Dark green.
COLOR_DK_ORANGE Dark orange.
NDI_SAY Say command.
NDI_SHOUT The message is a shout.
NDI_TELL The message is a tell.
NDI_PLAYER This message comes from a player.
NDI_ANIM Message will be played as animation in the middle of the client screen.
NDI_EMOTE Message is an emote command.
NDI_ALL Inform all players of this message.
PLAYER_EQUIP_MAIL Armor.
PLAYER_EQUIP_GAUNTLET Gauntlets.
PLAYER_EQUIP_BRACER Bracers.
PLAYER_EQUIP_HELM Helmet.
PLAYER_EQUIP_BOOTS Boots.
PLAYER_EQUIP_CLOAK Cloak.
PLAYER_EQUIP_GIRDLE Girdle.
PLAYER_EQUIP_SHIELD Shield.
PLAYER_EQUIP_RRING Right ring.
PLAYER_EQUIP_LRING Left ring.
PLAYER_EQUIP_AMULET Amulet.
PLAYER_EQUIP_WEAPON Weapon.
PLAYER_EQUIP_BOW Bow/crossbow/etc.
QUEST_TYPE_SPECIAL The quest is not handled by the server quest module; instead, it is handled specially by scripts.
QUEST_TYPE_KILL The quest requires you to kill X monsters.
QUEST_TYPE_KILL_ITEM The quest requires you to get item X from monster Y.
QUEST_STATUS_COMPLETED The quest has been completed.
TYPE_PLAYER The object is a player object.
TYPE_BULLET A fired spell bullet.
TYPE_ROD Rod.See Rod
TYPE_TREASURE An object that will generate treasure.See Treasure
TYPE_POTION Potion.See Potion
TYPE_FOOD Food.See Food
TYPE_POISON Poison.See Poison Food
TYPE_BOOK Book.See Book
TYPE_CLOCK Clock. Shows the in-game time.See Clock
TYPE_FBULLET
TYPE_FBALL
TYPE_LIGHTNING Lightning.
TYPE_ARROW An arrow.See Projectile
TYPE_BOW Bow.See Shooting Weapon
TYPE_WEAPON Weapon.See Weapon
TYPE_ARMOUR Armour.See Brestplate Armour
TYPE_PEDESTAL Pedestal.See Pedestal
TYPE_ALTAR Altar.See Altar
TYPE_CONFUSION Confusion force.
TYPE_LOCKED_DOOR
TYPE_SPECIAL_KEY
TYPE_MAP
TYPE_DOOR Door.
TYPE_KEY Key to unlock a locked door.
TYPE_MMISSILE Magic missile.
TYPE_TIMED_GATE 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.
Timed gate.See Timed Gate
TYPE_TRIGGER Trigger.See Handle Trigger
TYPE_GRIMREAPER
TYPE_MAGIC_EAR Magic ear.See Magic Ear
TYPE_TRIGGER_BUTTON Trigger button.See Trigger Button
TYPE_TRIGGER_ALTAR Trigger altar.See Altar Trigger
TYPE_TRIGGER_PEDESTAL Trigger pedestal.See Trigger Pedestal
TYPE_SHIELD Shield.See Shield
TYPE_HELMET Helmet.See Helmet
TYPE_HORN Horn.See Horn
TYPE_MONEY Money (copper, silver, etc).See Money
TYPE_CLASS Object for applying character class modifications to someone.
TYPE_GRAVESTONE Objects that appear on place of player's death.
TYPE_AMULET An amulet.See Amulet
TYPE_PLAYERMOVER 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
TYPE_TELEPORTER Teleporter.See Teleporter
TYPE_CREATOR 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
TYPE_SKILL Skill object.
TYPE_EXPERIENCE An experience object.
TYPE_EARTHWALL
TYPE_GOLEM
TYPE_BOMB Bomb.
TYPE_THROWN_OBJ Thrown object.
TYPE_BLINDNESS Blindness force object.
TYPE_GOD God.
TYPE_DETECTOR 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 presense of another object and is triggered like buttons.See Detector
TYPE_SKILL_ITEM Item required to be equipped in order to use a skill.
TYPE_DEAD_OBJECT Players become a DEAD_OBJECT when they logout.
TYPE_DRINK Drink.See Drink
TYPE_MARKER 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
TYPE_HOLY_ALTAR Holy altar.See Holy Altar
TYPE_PLAYER_CHANGER
TYPE_PEARL Pearl.
TYPE_GEM Gem.See Gems
TYPE_FIRECHEST
TYPE_FIREWALL Fire wall.See Magic Wall
TYPE_CHECK_INV Inventory checker.See Inventory Checker
TYPE_MOOD_FLOOR Object fields and flags used by this type.

Field/Flag Explanation
object::last_sp Used to differentiate mood floors. Value meanings:
  • 0 = furious, all monsters become aggressive.
  • 1 = angry, all but friendly become aggressive.
  • 2 = calm, all aggressive monsters calm down.
  • 3 = sleep, all monsters fall asleep.
Mood floor can affect how monsters behave once they step on it.Values of last_sp set how to change:

  • 0 = furious, all monsters become aggressive
  • 1 = angry, all but friendly become aggressive
  • 2 = calm, all aggressive monsters calm down
  • 3 = sleep, all monsters fall asleep
See Mood Floor
TYPE_EXIT Stairs, holes, portals, etc.See Exit
TYPE_SHOP_FLOOR 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
TYPE_SHOP_MAT Shop mat.See Shop Mat
TYPE_RING A ring.See Ring
TYPE_FLOOR This is a floor tile.See Floor
TYPE_FLESH Animal body parts.See Flesh
TYPE_INORGANIC Metals and minerals.See Inorganic
TYPE_LIGHT_APPLY Light source for players - torch, lantern, etc.See Applyable Light
TYPE_LIGHTER Lighter.
TYPE_WALL This is a wall.See Wall
TYPE_LIGHT_SOURCE Light source on a map (invisible light).See Light Source
TYPE_MISC_OBJECT Miscellaneous objects are for objects without a function in the engine, like statues, clocks, chairs, etc.See Misc Object
TYPE_MONSTER A real living creature.See Monster & NPC
TYPE_SPAWN_POINT A spawn point object.See Spawn Point
TYPE_LIGHT_REFILL Refilling item for LIGHT_APPLY.See Light Refill Object
TYPE_SPAWN_POINT_MOB Monster inside a spawn point.See Spawn Point Monster
TYPE_SPAWN_POINT_INFO Used to find spawn point where monster came from.
TYPE_SPELLBOOK Spell book.See Spellbook
TYPE_ORGANIC Body parts which can't be eaten - dragon scales for exampleSee Organic
TYPE_CLOAK A cloak.See Cloak
TYPE_CONE Cone spell.See Hazard Floor
TYPE_AURA
TYPE_SPINNER Spinner.See Spinner
TYPE_GATE Gate.See Gate
TYPE_BUTTON Button.See Button
TYPE_HANDLE Handle.See Handle
TYPE_PIT Pit is like an exit, but it does damage to alive object falling into it.See Pit
TYPE_TRAPDOOR A trapdoor.See Trapdoor
TYPE_WORD_OF_RECALL Special force for word of recall.
TYPE_SIGN Sign.See Sign & MagicMouth
TYPE_BOOTS Boots.See Boots
TYPE_GLOVES Gloves.See Gloves
TYPE_BASE_INFO This object holds the real base stats of monsters.
TYPE_RANDOM_DROP 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
TYPE_CONVERTER Convert one object into another.See Converter
TYPE_BRACERS Bracers.See Bracers
TYPE_POISONING Poison force.
TYPE_SAVEBED A savebed.See Savebed
TYPE_POISONCLOUD
TYPE_WAND Wand.See Wand & Staff
TYPE_ABILITY Ability.See Ability
TYPE_SCROLL Scroll.See Scroll
TYPE_DIRECTOR Director.See Director
TYPE_GIRDLE Girdle.See Girdle
TYPE_FORCE A generic force object.
TYPE_POTION_EFFECT A force, holding the effect of a potion.
TYPE_JEWEL A jewel.See Jewels
TYPE_NUGGET Nugget.See Nuggets
TYPE_EVENT_OBJECT Event/script object.See Event Object
TYPE_WAYPOINT_OBJECT Waypoint object.See Waypoint Object
TYPE_QUEST_CONTAINER Used to store quest informations in players.See Quest Container
TYPE_CLOSE_CON Id for close_container archetype.
TYPE_CONTAINER A container.See Container
TYPE_ARMOUR_IMPROVER Armour improver scroll.
TYPE_WEAPON_IMPROVER Weapon improver scroll.
TYPE_WEALTH This is a raw wealth object. When generated it's tranformed into real money depending on the enviroment where it's generated.
TYPE_SKILLSCROLL Can teach player a skill it holds.
TYPE_DEEP_SWAMP Deep swamp.See Swamp
TYPE_IDENTIFY_ALTAR Identification altar.
TYPE_CANCELLATION
TYPE_BALL_LIGHTNING
TYPE_SWARM_SPELL A swarm spell.
TYPE_RUNE Rune.See Rune & Trap
TYPE_POWER_CRYSTAL Power crystal.See Power Crystal
TYPE_CORPSE Corpse.
TYPE_DISEASE 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
TYPE_SYMPTOM 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.
SOUNDTYPE_NORMAL
SOUNDTYPE_SPELL
SOUND_LEVEL_UP
SOUND_FIRE_ARROW
SOUND_LEARN_SPELL
SOUND_FUMBLE_SPELL
SOUND_WAND_POOF
SOUND_OPEN_DOOR
SOUND_PUSH_PLAYER
SOUND_HIT_IMPACT
SOUND_HIT_CLEAVE
SOUND_HIT_SLASH
SOUND_HIT_PIERCE
SOUND_MISS_BLOCK
SOUND_MISS_HAND
SOUND_MISS_MOB
SOUND_MISS_PLAYER
SOUND_PET_IS_KILLED
SOUND_PLAYER_DIES
SOUND_OB_EVAPORATE
SOUND_OB_EXPLODE
SOUND_PLAYER_KILLS
SOUND_TURN_HANDLE
SOUND_FALL_HOLE
SOUND_DRINK_POISON
SOUND_DROP_THROW
SOUND_LOSE_SOME
SOUND_THROW
SOUND_GATE_OPEN
SOUND_GATE_CLOSE
SOUND_OPEN_CONTAINER
SOUND_GROWL
SOUND_ARROW_HIT
SOUND_DOOR_CLOSE
SOUND_TELEPORT
SOUND_CLICK
SOUND_MAGIC_DEFAULT
SOUND_MAGIC_ACID
SOUND_MAGIC_ANIMATE
SOUND_MAGIC_AVATAR
SOUND_MAGIC_BOMB
SOUND_MAGIC_BULLET1
SOUND_MAGIC_BULLET2
SOUND_MAGIC_CANCEL
SOUND_MAGIC_COMET
SOUND_MAGIC_CONFUSION
SOUND_MAGIC_CREATE
SOUND_MAGIC_DARK
SOUND_MAGIC_DEATH
SOUND_MAGIC_DESTRUCTION
SOUND_MAGIC_ELEC
SOUND_MAGIC_FEAR
SOUND_MAGIC_FIRE
SOUND_MAGIC_FIREBALL1
SOUND_MAGIC_FIREBALL2
SOUND_MAGIC_HWORD
SOUND_MAGIC_ICE
SOUND_MAGIC_INVISIBLE
SOUND_MAGIC_INVOKE
SOUND_MAGIC_INVOKE2
SOUND_MAGIC_MAGIC
SOUND_MAGIC_MANABALL
SOUND_MAGIC_MISSILE
SOUND_MAGIC_MMAP
SOUND_MAGIC_ORB
SOUND_MAGIC_PARALYZE
SOUND_MAGIC_POISON
SOUND_MAGIC_PROTECTION
SOUND_MAGIC_RSTRIKE
SOUND_MAGIC_RUNE
SOUND_MAGIC_SBALL
SOUND_MAGIC_SLOW
SOUND_MAGIC_SNOWSTORM
SOUND_MAGIC_STAT
SOUND_MAGIC_STEAMBOLT
SOUND_MAGIC_SUMMON1
SOUND_MAGIC_SUMMON2
SOUND_MAGIC_SUMMON3
SOUND_MAGIC_TELEPORT
SOUND_MAGIC_TURN
SOUND_MAGIC_WALL
SOUND_MAGIC_WALL2
SOUND_MAGIC_WOUND
PARTY_MESSAGE_STATUS Status is used for party messages like password change, join/leave, etc.
PARTY_MESSAGE_CHAT Chat is used for party chat messages from party members.
COST_TRUE True value of item, unadjusted.
COST_BUY Value for buying the item.
COST_SELL Value for selling the item.
ATNR_IMPACT Impact.
ATNR_SLASH Slash.
ATNR_CLEAVE Cleave.
ATNR_PIERCE Pierce.
ATNR_WEAPON_MAGIC Weapon magic. Common for spells like magic bullet.
ATNR_FIRE Fire.
ATNR_COLD Cold.
ATNR_ELECTRICITY Electricity.
ATNR_POISON Poison,
ATNR_ACID Acid.
ATNR_MAGIC Magic.
ATNR_MIND Mind.
ATNR_BLIND Blind.
ATNR_PARALYZE Paralyze. Affected object will be rooted to the spot.
ATNR_FORCE Force.
ATNR_GODPOWER Godpower.
ATNR_CHAOS Chaos.
ATNR_DRAIN Drain.
ATNR_SLOW Slow.
ATNR_CONFUSION Confusion. Affected object will move in random directions until the effect wears off.
ATNR_INTERNAL Used for internal calculations.
NROFATTACKS Number of the attacks.

Generated by  doxygen 1.6.2