From b5cca752b300d8e5e586792ae48bf05946e45a0c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 18 Sep 2017 22:14:59 +0300 Subject: Update documentation from hercules. --- server/items/item_db.txt | 156 ++++++++++++++++++++----------------- server/scripts/constants.md | 62 ++++++++++++++- server/scripts/script_commands.txt | 4 +- 3 files changed, 148 insertions(+), 74 deletions(-) diff --git a/server/items/item_db.txt b/server/items/item_db.txt index 22492a1..f102c7a 100644 --- a/server/items/item_db.txt +++ b/server/items/item_db.txt @@ -26,15 +26,16 @@ item_db: ( MinRange: Minimal Attack Range (int, defaults to 0) Slots: Slots (int, defaults to 0) Job: Job mask (int, defaults to all jobs = 0xFFFFFFFF) - Upper: Upper mask (int, defaults to any = 0x3f) - Gender: Gender (int, defaults to both = 2) - Loc: Equip location (int, required value for equipment) + Upper: Upper mask (bitmask array, string or int, defaults to "ITEMUPPER_ALL") + Gender: Gender (string, defaults to "SEX_ANY") + Loc: Equip location (bitmask array, string or int, required value for equipment) WeaponLv: Weapon Level (int, defaults to 0) EquipLv: Equip required level (int, defaults to 0) EquipLv: [min, max] (alternative syntax with min / max level) Refine: Refineable (boolean, defaults to true) DisableOptions: true/false (boolean, defaults to false !!for equipments only!!) [Smokexyz] - View: View ID (int, defaults to 0) + Subtype: Item Subtype (int, defaults to 0) + ViewSprite: Sprite view ID (int, defaults to 0) BindOnEquip: true/false (boolean, defaults to false) ForceSerial: true/false (boolean, defaults to false) BuyingStore: true/false (boolean, defaults to false) @@ -182,43 +183,54 @@ Job: Equippable jobs. Uses the following bitmask table: All (default value): 0xFFFFFFFF Upper: Equippable upper-types. Uses the following bitmasks: - Normal jobs: 0x01 (1) - Upper jobs: 0x02 (2) - Baby jobs: 0x04 (4) - Third jobs: 0x08 (8) - Upper Third jobs: 0x10 (16) - Baby Third jobs: 0x20 (32) + Normal jobs: ITEMUPPER_NORMAL (0x01) + Upper jobs: ITEMUPPER_UPPER (0x02) + Baby jobs: ITEMUPPER_BABY (0x04) + Third jobs: ITEMUPPER_THIRD (0x08) + Upper Third jobs: ITEMUPPER_THIRDUPPER (0x10) + Baby Third jobs: ITEMUPPER_THIRDBABY (0x20) Under pre-re mode third classes are considered upper, making use of - the 8 and above masks is therefore not necessary unless in renewal - mode. When no value is specified, all classes (mask 0x3f) are able to - equip the item. + the ITEMUPPER_THIRD and above masks is therefore not necessary unless + in renewal mode. When no value is specified, all classes (mask + ITEMUPPER_ALL = 0x3f) are able to equip the item. -Gender: Gender restriction. 0 is female, 1 is male, 2 for both (default value). +Gender: Gender restriction. + Available genders: + SEX_FEMALE: 0 + SEX_MALE: 1 + SEX_ANY: 2 + When not specified, becomes "SEX_ANY". Loc: Equipment's placement. A value needs to be specified if the item is an - equipment piece. Values are: - - 2^0 001 = Lower Headgear - 2^1 002 = Weapon - 2^2 004 = Garment - 2^3 008 = Accessory 1 - 2^4 016 = Armor - 2^5 032 = Shield - 2^6 064 = Footgear - 2^7 128 = Accessory 2 - 2^8 256 = Upper Headgear - 2^9 512 = Middle Headgear - 2^10 1024 = Costume Top Headgear - 2^11 2048 = Costume Mid Headgear - 2^12 4096 = Costume Low Headgear - 2^13 8192 = Costume Garment/Robe - 2^16 65536 = Shadow Armor - 2^17 131072 = Shadow Weapon - 2^18 262144 = Shadow Shield - 2^18 524288 = Shadow Shoes - 2^20 1048576 = Shadow Accessory 2 - 2^21 2097152 = Shadow Accessory 1 + equipment piece. Values are (bitmask arrays are supported): + + Lower Headgear: EQP_HEAD_LOW (2^00 = 0x000001) + Weapon: EQP_HAND_R or EQP_WEAPON (2^01 = 0x000002) + Garment: EQP_GARMENT (2^02 = 0x000004) + Accessory 1: EQP_ACC_L (2^03 = 0x000008) + Armor: EQP_ARMOR (2^04 = 0x000010) + Shield: EQP_HAND_L or EQP_SHIELD (2^05 = 0x000020) + (Both Hands): EQP_ARMS (EQP_HAND_L | EQP_HAND_R = 0x000022) + Footgear: EQP_SHOES (2^06 = 0x000040) + Accessory 2: EQP_ACC_R (2^07 = 0x000080) + (Both Accessories): EQP_ACC (EQP_ACC_R | EQP_ACC_L = 0x000088) + Upper Headgear: EQP_HEAD_TOP (2^08 = 0x000100) + Middle Headgear: EQP_HEAD_MID (2^09 = 0x000200) + (T+M+B Headgear): EQP_HELM (EQP_HEAD_LOW | EQP_HEAD_MID | EQP_HEAD_TOP = 0x000301) + Costume Top Headgear: EQP_COSTUME_HEAD_TOP (2^10 = 0x000400) + Costume Mid Headgear: EQP_COSTUME_HEAD_MID (2^11 = 0x000800) + Costume Low Headgear: EQP_COSTUME_HEAD_LOW (2^12 = 0x001000) + Costume Garment/Robe: EQP_COSTUME_GARMENT (2^13 = 0x002000) + Ammunition: EQP_AMMO (2^15 = 0x008000) + Shadow Armor: EQP_SHADOW_ARMOR (2^16 = 0x010000) + Shadow Weapon: EQP_SHADOW_WEAPON (2^17 = 0x020000) + Shadow Shield: EQP_SHADOW_SHIELD (2^18 = 0x040000) + (Shadow 2H Weapon): EQP_SHADOW_ARMS (EQP_SHADOW_WEAPON | EQP_SHADOW_SHIELD = 0x060000) + Shadow Shoes: EQP_SHADOW_SHOES (2^19 = 0x080000) + Shadow Accessory 2: EQP_SHADOW_ACC_R (2^20 = 0x100000) + Shadow Accessory 1: EQP_SHADOW_ACC_L (2^21 = 0x200000) + (Shadow Accessories): EQP_SHADOW_ACC (EQP_SHADOW_ACC_R | EQP_SHADOW_ACC_L = 0x300000) WeaponLv: Weapon level. Becomes 0 when not specified. @@ -234,45 +246,47 @@ EquipLv: Base level required to be able to equip. It is possible to specify Refineable: true if the item can be refined, false otherwise. If no value is specified, it defaults to true. -View: For normal items, defines a replacement view-sprite for the item (eg: - Making apples look like apple juice). The special case are weapons - and ammo where this value indicates the weapon-class of the item. +ViewSprite: Defines a replacement view-sprite for the item (eg: + Making apples look like apple juice). + +Subtype: For weapons and ammo, indicates the weapon-class of the item. For weapons, the types are: - 0: bare fist - 1: Daggers - 2: One-handed swords - 3: Two-handed swords - 4: One-handed spears - 5: Two-handed spears - 6: One-handed axes - 7: Two-handed axes - 8: Maces - 9: Unused - 10: Staves - 11: Bows - 12: Knuckles - 13: Musical Instruments - 14: Whips - 15: Books - 16: Katars - 17: Revolvers - 18: Rifles - 19: Gatling guns - 20: Shotguns - 21: Grenade launchers - 22: Fuuma Shurikens + W_FIST 0: Bare fist + W_DAGGER 1: Daggers + W_1HSWORD 2: One-handed swords + W_2HSWORD 3: Two-handed swords + W_1HSPEAR 4: One-handed spears + W_2HSPEAR 5: Two-handed spears + W_1HAXE 6: One-handed axes + W_2HAXE 7: Two-handed axes + W_MACE 8: Maces + W_2HMACE 9: Unused + W_STAFF 10: Staves + W_BOW 11: Bows + W_KNUCKLE 12: Knuckles + W_MUSICAL 13: Musical instruments + W_WHIP 14: Whips + W_BOOK 15: Books + W_KATAR 16: Katars + W_REVOLVER 17: Reveolvers + W_RIFLE 18: Rifles + W_GATLING 19: Gatling guns + W_SHOTGUN 20: Shotguns + W_GRENADE 21: Grenade launchers + W_HUUMA 22: Fuuma shurikens + W_2HSTAFF 23: Two-handed staves For ammo, the types are: - 1: Arrows - 2: Throwable daggers - 3: Bullets - 4: Shells - 5: Grenades - 6: Shuriken - 7: Kunai - 8: Cannonballs - 9: Throwable Items (Sling Item) + A_ARROW 1: Arrows + A_DAGGER 2: Throwable daggers + A_BULLET 3: Bullets + A_SHELL 4: Shells + A_GRENADE 5: Grenades + A_SHURIKEN 6: Shuriken + A_KUNAI 7: Kunai + A_CANNONBALL 8: Cannon balls + A_THROWWEAPON 9: Throwable items (Sling Item) BindOnEquip: Whether the item will automatically bind to the character when it is equipped for the first time. An item that has this field set, diff --git a/server/scripts/constants.md b/server/scripts/constants.md index 40d9a26..97dffcc 100644 --- a/server/scripts/constants.md +++ b/server/scripts/constants.md @@ -1316,6 +1316,7 @@ - `SC_TUNAPARTY`: 649 - `SC_SHRIMP`: 650 - `SC_FRESHSHRIMP`: 651 +- `SC_DAILYSENDMAILCNT`: 653 - `SC_DRESS_UP`: 652 ### Emotes @@ -3721,6 +3722,7 @@ - `SEX_FEMALE`: 0 - `SEX_MALE`: 1 +- `SEX_ANY`: 2 ### Script Unit Data Types @@ -3911,6 +3913,14 @@ - `EQP_SHADOW_SHOES`: 524288 - `EQP_SHADOW_ACC_R`: 1048576 - `EQP_SHADOW_ACC_L`: 2097152 +- `EQP_WEAPON`: 2 +- `EQP_SHIELD`: 32 +- `EQP_ARMS`: 34 +- `EQP_HELM`: 769 +- `EQP_ACC`: 136 +- `EQP_COSTUME`: 15360 +- `EQP_SHADOW_ACC`: 3145728 +- `EQP_SHADOW_ARMS`: 393216 ### Item Option Types @@ -3994,6 +4004,56 @@ - `DATATYPE_VAR`: 4096 - `DATATYPE_LABEL`: 8192 +### Item Subtypes (Weapon types) + +- `W_FIST`: 0 +- `W_DAGGER`: 1 +- `W_1HSWORD`: 2 +- `W_2HSWORD`: 3 +- `W_1HSPEAR`: 4 +- `W_2HSPEAR`: 5 +- `W_1HAXE`: 6 +- `W_2HAXE`: 7 +- `W_MACE`: 8 +- `W_2HMACE`: 9 +- `W_STAFF`: 10 +- `W_BOW`: 11 +- `W_KNUCKLE`: 12 +- `W_MUSICAL`: 13 +- `W_WHIP`: 14 +- `W_BOOK`: 15 +- `W_KATAR`: 16 +- `W_REVOLVER`: 17 +- `W_RIFLE`: 18 +- `W_GATLING`: 19 +- `W_SHOTGUN`: 20 +- `W_GRENADE`: 21 +- `W_HUUMA`: 22 +- `W_2HSTAFF`: 23 + +### Item Subtypes (Ammunition types) + +- `A_ARROW`: 1 +- `A_DAGGER`: 2 +- `A_BULLET`: 3 +- `A_SHELL`: 4 +- `A_GRENADE`: 5 +- `A_SHURIKEN`: 6 +- `A_KUNAI`: 7 +- `A_CANNONBALL`: 8 +- `A_THROWWEAPON`: 9 + +### Item Upper Masks + +- `ITEMUPPER_NONE`: 0 +- `ITEMUPPER_NORMAL`: 1 +- `ITEMUPPER_UPPER`: 2 +- `ITEMUPPER_BABY`: 4 +- `ITEMUPPER_THIRD`: 8 +- `ITEMUPPER_THIRDUPPER`: 16 +- `ITEMUPPER_THIRDBABY`: 32 +- `ITEMUPPER_ALL`: 63 + ### Renewal - `RENEWAL`: 1 @@ -8476,7 +8536,7 @@ - `Egir_Shoes`: 2495 - `TE_Woe_Shoes`: 2496 - `TE_Woe_Boots`: 2497 -- `TE_WoE_Magic_Sandal`: 2498 +- `TE_Woe_Magic_Sandal`: 2498 - `Temporal_Boots`: 2499 - `Hood`: 2501 - `Hood_`: 2502 diff --git a/server/scripts/script_commands.txt b/server/scripts/script_commands.txt index 779cd27..79d6091 100644 --- a/server/scripts/script_commands.txt +++ b/server/scripts/script_commands.txt @@ -3186,7 +3186,7 @@ Valid types are: if = 0, then monsters don't drop it at all (rare or a quest item) if = 10000, then this item is sold in NPC shops only 4 - sex; 5 - equip; 6 - weight; 7 - atk; 8 - def; 9 - range; - 10 - slot; 11 - look; 12 - elv; 13 - wlv; 14 - view id + 10 - slot; 11 - subtype; 12 - elv; 13 - wlv; 14 - view id If RENEWAL is defined, 15 - matk @@ -8251,7 +8251,7 @@ Valid types are: if = 0, then monsters don't drop it at all (rare or a quest item) if = 10000, then this item is sold in NPC shops only 4 - sex; 5 - equip; 6 - weight; 7 - atk; 8 - def; 9 - range; - 10 - slot; 11 - look; 12 - elv; 13 - wlv; 14 - view id + 10 - slot; 11 - subtype; 12 - elv; 13 - wlv; 14 - view id Example: -- cgit v1.2.3-60-g2f50