PKmud - Objects
#OBJECTS #1100 rainbow staff~ the rainbow staff~ The rainbow staff lies here.~ ~ 1 64 65537 0 0 -1 0 8 100 26 A 26 50 A 12 10 A 3 1 A 4 1 #1101 sting~ Sting~ Sting lies here.~ ~ 5 1 8193 0 2 7 11 1 200 15 A 2 2 A 19 2 #1102 sign~ a sign~ A sign demands your attention.~ ~ 12 0 0 0 0 0 0 0 0 0 E sign~ Welcome to the Shire. As you enter the Shire from Haon-Dor you come under the jurisdiction of the Thain, the peacekeeper of the Shire. Consequently, by entering these lands you agree to obey our laws. If you break these laws, you will be severely punished. We do not like riff raff in our peaceful town. The Thain Peacekeeper of the Shire ~ . . . #0
The above is a segment of the object section of The Shire.
"#OBJECTS" denotes the beginning of the objects section, and is required.
"#1100" is the virtual number (VNUM) of the object, and must be unique among all objects in the world.
"rainbow staff" is the keyword list. These are the words which characters use to designate this object. The tilde is required.
"the rainbow staff" is the short description. This is the description shown in inventory and when an item is equipped. The tilde is required.
"The rainbow staff lies here." is the objects description, which is shown when it is on the ground. The tilde is required.
The tilde on the next line is required. In early Dikus, there was another field, the "action description". It is not used, but to keep most compatibility, it was not removed, and is required.
"1" is the item type. This value declares what the second line of values means for the item, which will be described below.
"64" is the item's extra bits. These are declared in the table below.
"65537" is the item's wear flags. If the object can be picked up, this must be an odd number. Unfortunately, being based on Merc code, PKmud does not recognize multiple wear locations, so even if you put more than one, the item will only be wearable on the first one which it checks. I have fixed this on other games before, but I may or may not move the fix to PKmud, so design your items to have only one wear location. Values are in the table below.
"0 0 -1 0" is the item-type dependant set of values for the item.
"8" is the object's weight. Keep in mind that for weapons, this determines whether a character has enough strength to wield a weapon.
"100" is the object's value, which is more or less unused.
"26" is the percentage chance for the item to load.
"A .. 26 50" is a character affect generated by the item when it is worn. "A" declares that an affect is being given. "26" is the location of the affect (see the table below), and "50" is the amount.
In the entry for #1102 (the sign), "E <keyword list>~ description~" is used to give an object descriptions which are viewed by keywords other than it's main keywords. The tildes are required.
Item type Info
Every item has 4 values, numbered 0 through 3, which determine it's properties.
type 1 - light: Only value 2 is used. This is the number of ticks the light works for. If it is set to -1, the light source is permanent.
type 2 - scroll: Value 0 is the spell level. Values 1-3 are the slot numbers of the spells it casts.
type 3 - wand
type 4 - staff: Value 0 is the spell level. Value 1 is the maximum number of charges. Value 2 is the starting number of charges. Value 3 is the slot number of the spell the item casts.
type 5 - weapon: Value 0 is unused. Value 1 and 2 are the damage dice. Roll value_1 dice of size value_2. Value 3 is the damage type. Only damage type 11 can backstab. See the table below for damage types. For ranged weapons, value 0 is the reload time.
type 8 - treasure: All values unused. Useful for selling or spec procs only.
type 9 - armor: Value 0 is the armor class of the item. Values 1-3 are unused.
type 10 - potion: Value 0 is the spell level. Values 1-3 are the slot numbers of the spells it casts.
type 11 - unknown
type 12 - furniture
type 13 - trash: These types ignore their values.
type 15 - container: Value 0 is the amount of weight the container may carry. The rest are unused.
type 17 - drink container: Value 0 is the max number of drink units the container can hold. Value 1 is the number of drink units currently in the container. Value 2 is the liquid contained. See the liquid table for information. Value 3 is normally set to 0. If it is anything other than 0, the item is poisoned.
type 18 - key: These values are ignored, as doors contain the vnum of the key which opens them.
type 19 - food: all values are ignored. If value 3 is not 0, it is poisoned.
type 20 - money: Value 0 is the number of coins the pile holds. All other values are ignored
type 22 - boat: All values are ignored.
type 23 - corpse
type 24 - corpse: All values ignored. Value 0 is capacity, but is usually 0.
type 25 - fountain: Value 2 is the liquid contained.
type 26 - pill: Value 0 is the spell level. Values 1-3 are the slot numbers of the spells it casts.
type 30 - jewelry: Value 0 is the armor class. Jewelry may be enchanted by the enchant weapon spell.
type 31 - quiver: Value 0 is unused. Value 1 is the spell cast by the arrow. If it does not cast, this should be 0. Value 2 is the number of arrows left in the quiver. Value 3 is unused.
type 32 - trap: If value 0 is not 0, it is the slot number of the spell which the trap casts.
Extra bits table.
|4||ITEM_DARK||item is dark|
|8||ITEM_RENAME||for jewelry, wands, staves, scrolls:
item is randomly renamed upon creation.
|16||ITEM_EVIL||item is evil|
|32||ITEM_INVIS||item is invis|
|64||ITEM_MAGIC||item is magic|
|128||ITEM_NODROP||players can not drop the item|
|256||ITEM_BLESS||the item is blessed.|
|512||ITEM_ANTI_GOOD||the item zaps good aligned players|
|1024||ITEM_ANTI_EVIL||the item zaps evil aligned players|
|2048||ITEM_ANTI_NEUTRAL||the item zaps neutral aligned players|
|4096||ITEM_NOREMOVE||the item can not be removed once equipped|
|8192||ITEM_INVENTORY||shops sells more than one of this item|
|524288||ITEM_DISARM||for weapons. this weapon may disarm.|
|1048576||ITEM_RANGED_WEAPON||for weapons. this weapon is also a bow.
in addition, it does half damage in melee.
|2097152||ITEM_RANGED_MAGIC||for quivers: does both magic and normal damage|
Wear bits table.
#define APPLY_STR 1 #define APPLY_DEX 2 #define APPLY_INT 3 #define APPLY_WIS 4 #define APPLY_CON 5 #define APPLY_CLASS 7 #define APPLY_MANA 12 #define APPLY_HIT 13 #define APPLY_AC 17 #define APPLY_HITROLL 18 #define APPLY_DAMROLL 19 #define APPLY_SAVING_PARA 20 #define APPLY_SAVING_ROD 21 #define APPLY_SAVING_PETRI 22 #define APPLY_SAVING_BREATH 23 #define APPLY_SAVING_SPELL 24 #define APPLY_REGEN_HIT 25 #define APPLY_REGEN_MANA 26 #define APPLY_RESIST_FIRE 30 #define APPLY_RESIST_COLD 31 #define APPLY_RESIST_LIGHTNING 32 #define APPLY_RESIST_PHYSICAL 33 #define APPLY_RESIST_MAGIC 34 #define APPLY_RESIST_DRAIN 35 #define APPLY_SKILL_PICK 100 #define APPLY_SKILL_BALANCE 101 #define APPLY_SKILL_SIXTH_SENSE 102 #define APPLY_SKILL_BASH 103 #define APPLY_SKILL_BACKSTAB 104
Weapon Type Table
|0||hit (don't use)|
|9||slime mold juice||green||-100||-100|