Complete guide about items

Deazer

Head Developer
Staff member
Location: gameserver/data/items
Format: XML

For example, let's take the most capacious Infinity Bow with an id 6619 and an item type weapon

XML:
<weapon id="6619" name="Infinity Bow">
    <!-- [the_infinity_bow] -->
    <set name="price" value="48800000"/>
    <set name="crystal_count" value="2850"/>
    <set name="enchantable" value="false"/>
    <set name="atk_reuse" value="1398"/>
    <set name="crystal_type" value="S"/>
    <set name="destroyable" value="false"/>
    <set name="dropable" value="false"/>
    <set name="icon" value="icon.weapon_the_bow_of_hero_i00"/>
    <set name="mp_consume" value="21"/>
    <set name="rnd_dam" value="5"/>
    <set name="sellable" value="false"/>
    <set name="soulshots" value="1"/>
    <set name="spiritshots" value="1"/>
    <set name="tradeable" value="false"/>
    <set name="storeable" value="false"/>
    <set name="type" value="BOW"/>
    <set name="weight" value="1300"/>
    <equip>
      <slot id="LEFT_RIGHT_HAND"/>
    </equip>
    <triggers>
      <trigger id="3594" level="1" type="CRIT" chance="7"/>
    </triggers>
    <skills>
      <skill id="3593" level="1"/>
    </skills>
    <cond msgId="1518">
      <player is_hero="true"/>
    </cond>
    <cond msgId="1507">
      <not>
        <player olympiad="true"/>
      </not>
    </cond>
    <for>
      <add stat="pAtk" order="0x10" value="614"/>
      <add stat="mAtk" order="0x10" value="137"/>
      <set stat="baseCrit" order="0x08" value="120"/>
      <set stat="atkBaseSpeed" order="0x08" value="293"/>
      <add stat="accCombat" order="0x10" value="-4.0000"/>
      <enchant stat="pAtk" order="0x0C" value="0"/>
      <enchant stat="mAtk" order="0x0C" value="0"/>
    </for>
  </weapon>

1. Consider all the fields in turn:
There are 3 categories of items - weapon (weapon), armor (everything that is worn on the player's body), etcitem (pieces, recipes, quest items, etc.) - in our example <weapon id = "6619" name = "Infinity Bow" > </weapon>

"id" - item identifier
"name" is its name. Mainly used for custom services and drop output. May be empty, but remember to name it in the client.
"price" - the price of the item. Upon delivery to the store, it is divided by 2 by default, the price is also used for validation in personal stores so that it is not lower than the sale to the store.
"crystal_count" - the number of crystals that you will receive when breaking an item, the higher the level of sharpening, the more crystals from the base value.
"enchantable" - True/False you can sharpen the item or not. (Defaults to true even if you haven't added this parameter)
"atk_reuse" - Used only for Bow. This is a delay for a second shot, such a strip is needed for the head.
"destroyable" - True/False whether it can be removed to the trash can. (Defaults to true even if you haven't added this parameter)
"dropable" - True/False whether it can be dropped on the floor. (Defaults to true even if you haven't added this parameter)
"sellable" - True/False whether the item can be sold to the store. (Defaults to true even if you haven't added this parameter)
"tradeable" - True/False whether the item can be sold to the player. (Defaults to true even if you haven't added this parameter)
"storeable" - True/False whether an item can be put into WH/CWH. (Defaults to true even if you haven't added this parameter)
"icon" - the texture of the icon. Found in the game client by default. Used to display for services like Auction
"mp_consume" - used for bows, how much MP will be taken when shooting.
"rnd_dam" - damage spread. Base Damage +0 to + value
"weight" - Item weight

2. Consider the types of items for each category from (armor, weapon, etcitem)

In our example: <set name = "type" value = "BOW" />

armor:
NONE - no type
LIGHT - light armor
HEAVY - heavy armor
MAGIC - magic armor
PET - pet armor
SIGIL - Wrist Staff (Classic only)

weapon:
NONE - no type. For example, fists
SWORD - sword
BLUNT - blunt
DAGGER - dagger
BOW - bow
POLE - lance
ETC - mostly for monsters
FIST - brass knuckles (for cursed weapons)
DUAL - 2 swords
DUALFIST - two-handed knuckles
BIGSWORD - two-handed sword
PET - pet weapon (muzzle for a wolf as an example)
ROD - fishing rod
BIGBLUNT - two-handed club
DUALDAGGER - two-handed dagger (Classic only)

etcitem:
ARROW - arrows for bow
MATERIAL - materials for crafting
PET_COLLAR - pet call
POTION - potions and buffs
RECIPE - recipes for crafting
SCROLL - scrolls (sharpening, teleport, etc.)
QUEST - quest items
MONEY - adena and any other settlement currency in the world
OTHER - if you are not sure about the type of item, put it
SPELLBOOK - skill study books
SEED - Manor Seeds
BAIT - hook for fishing rod
SHOT - the type for Spiritshot
BOLT - bolt (Classic only)
RUNE - for runes that are stored in the inventory and give skills, even if the item is not equipped
HERB - herbs
MERCENARY_TICKET - lottery tickets
ARROW_QUIVER - Arrow Quiver (Classic only)

3. Consider the <equip> </equip> block:
<equip>
<slot id = "LEFT_RIGHT_HAND" />
</equip>

Total slot types:
NONE - no type (mostly for mobs)
CHEST - chest piece
BELT - belt (Classic only)
RIGHT_BRACELET - regular bracelet (Classic only)
LEFT_BRACELET - Agathon slot (Classic only)
BROOCH - Brooch Slot (Classic only)
FULL_ARMOR - the slot takes the chest and pants
HEAD - helmet
HAIR - slot for masks
FACE - slot for masks
HAIR_ALL - slot for masks
UNDERWEAR - tattoo slot
BACK - raincoats (Classic only)
NECKLACE - Necklace
LEGS - pants
FEET - boots
GLOVES - gloves
RIGHT_HAND - right hand
LEFT_HAND - left hand
LEFT_RIGHT_HAND - the slot takes both hands
RIGHT_EAR - left earring
LEFT_EAR - right earring
RIGHT_FINGER - right finger
LEFT_FINGER - left finger
FORMAL_WEAR - the slot takes up all free body cells
TALISMAN - talisman slot (Classic only)
BROOCH_JEWEL - Brooch Jewelry Slot (Classic only)
AGATHION_CHARMRM - Agathion slot (Classic only)

4. Consider the skill blocks:
Passive \ Active skills: In this example, we see that when equipping an item, we will add a passive skill with id 3593 and level 1
<skills>
<skill id = "3593" level = "1" />
</skills>
Chance Skills:
Skill 3594 with level 1 will trigger on a critical attack with a 7% chance
<triggers>
<trigger id = "3594" level = "1" type = "CRIT" chance = "7" />
</triggers>

ADD - the skill is triggered when added to the list
ATTACK - the skill is triggered by a normal attack
RECEIVE_DAMAGE - the skill is triggered when taking damage
CRIT - the skill is triggered when Crete
OFFENSIVE_PHYSICAL_SKILL_USE - the skill is triggered when you receive damage from physical skills
OFFENSIVE_MAGICAL_SKILL_USE - the skill is triggered when you receive damage from magic skills
SUPPORT_MAGICAL_SKILL_USE - the skill is triggered when using magic skills
UNDER_MISSED_ATTACK - the skill is triggered when dodging
DIE - skill triggers on death

5. Block of conditions under which you can equip a weapon or armor:

Hero only:
<cond msgId = "1518">
<player is_hero = "true" />
</cond>
Forbidden to use at the Olympiad
<cond msgId = "1507">
<not>
<player olympiad = "true" />
</not>
</cond>
Forbidden to use at PvP events
<cond>
<not>
<player on_pvp_event = "true" />
</not>
</cond>
and then a list of all available (you can see an example of use in the data / items folder)
classId - class id
forbiddenClassId - forbidden class
olympiad - olympiad
min_pledge_rank - rank in the clan
is_hero - hero or not
on_pvp_event - check for PvP events
class_is_mage - magic class (True / False)
instance_zone - instance zone
minLevel - minimum level
maxLevel - maximum level
race - race (Elf, Dwarf etc)
gender - player gender
maxPK - maximum PC
damage - damage

6. Consider a block with stats:
<for>
<add stat = "pAtk" order = "0x10" value = "614" /> - Physical attack
<add stat = "mAtk" order = "0x10" value = "137" /> - Magic attack
<set stat = "baseCrit" order = "0x08" value = "120" /> - basic critical attack
<set stat = "atkBaseSpeed" order = "0x08" value = "293" /> - base attack speed
<add stat = "accCombat" order = "0x10" value = "- 4.0000" /> - accuracy
<enchant stat = "pAtk" order = "0x0C" value = "0" /> - block for modifying stats when enchanting a physical attack
<enchant stat = "mAtk" order = "0x0C" value = "0" /> - block for modifying stats when enchanting Mage attack
</for>
 
Last edited:
I created some hats, but they are not being equipped.

<armor id="9373" name="Refined Wizard Hat">
<!-- [santas_cap] -->
<set name="tradeable" value="false"/>
<set name="crystal_type" value="NONE"/>
<set name="dropable" value="false"/>
<set name="icon" value="icon.accessory_santas_cap_i00"/>
<set name="sellable" value="false"/>
<set name="type" value="NONE"/>
<set name="weight" value="10"/>
<equip>
<slot id="HAIR"/>
</equip>
</armor>
 
Criei alguns chapéus, mas eles não estão sendo equipados.

<armor id="9373" name="Chapéu de Mago Refinado">
<!-- [santas_cap] -->
<set name="tradeable" value="false"/>
<set name="crystal_type" valor="NONE"/>
<set name="dropable" value="false"/>
<set name="icon" value="icon.acessório_santas_cap_i00"/>
<set name="vendável" valor="falso"/>
<set name="type" valor="NONE"/>
<definir nome="peso" valor="10"/>
<equipar>
<slot id="CABELO"/>
</equip>
</armadura>
voce editou o itenname e o armorgroup?
 
You want to equip shield + 2h staff/bow/sword? What is the logic? Shield is always in the left hand.
I Want the Sigil, which equips in the left_hand/wrist, and yet, allow you to use 2h staff/bows etc.

We have the SIGIL type of armor so, im guessing, we can create SIGIL's on classic clients.

Thanks for the quote:)
 
I Want the Sigil, which equips in the left_hand/wrist, and yet, allow you to use 2h staff/bows etc.

We have the SIGIL type of armor so, im guessing, we can create SIGIL's on classic clients.

Thanks for the quote:)
In this case make the 2h weps one handed (right) and your problem is fixed :)
 
For Sigils, where do I equip them? As if I use LEFT_HAND, it will not equip with 2H staff/bow, etc.
I guess no one knows/wants to share this information?

I tried setting a 2H weapon as 1H weapon, but that's not the correct solution for this issue, as it will alter some part of the ingame animation with 2H items...
 
why i get this error??
17.04.24 13:44:04] ItemParser: Exception: java.lang.IllegalArgumentException: No enum constant l2.gameserver.templates.item.Bodypart.AGATHION_CHARMRM in file: costume.xml
java.lang.IllegalArgumentException: No enum constant l2.gameserver.templates.item.Bodypart.AGATHION_CHARMRM
at java.base/java.lang.Enum.valueOf(Enum.java:240)
at l2.gameserver.templates.item.Bodypart.valueOf(Unknown Source)
at l2.gameserver.data.xml.parser.ItemParser.readData(Unknown Source)
at l2.commons.data.xml.AbstractParser.parseDocument(Unknown Source)
at l2.commons.data.xml.AbstractDirParser.parse(Unknown Source)
at l2.commons.data.xml.AbstractParser.load(Unknown Source)
at l2.gameserver.data.xml.Parsers.parseAll(Unknown Source)
at l2.gameserver.GameServer.<init>(Unknown Source)
at l2.gameserver.GameServer.main(Unknown Source)
the AGATHION_CHARMRM is not used???
 
Back
Top