• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Attribute in Backpack

DiegoRulez

Member
Joined
Apr 16, 2012
Messages
93
Reaction score
11
Location
Feira de Santana - Brasil
I would like to know how I can put attributes in a backpack .. It seems simple right? But I can not! Probably this does not have it, but before they ask: Distro OTX, based on TFS 0.4

Sorry for the bad english

I use:

Item.xml
Code:
    <item id="2365" article="a" name="backpack of holding">
        <attribute key="weight" value="1800"/>
        <attribute key="containerSize" value="20"/>
        <attribute key="slotType" value="backpack"/>
        <attribute key="magiclevelpoints" value="3"/>
    </item>

Movements.xml
Code:
    <!-- Backpacks -->
   <movevent type="Equip" itemid="2365" slot="backpack" event="function" value="onEquipItem"/>
   <movevent type="DeEquip" itemid="2365" slot="backpack" event="function" value="onDeEquipItem"/>

Untitled_1.jpg

Does anyone know how to solve it?
 
Description is just text and does not effect the stats of a player. They can use a movements script onE/Dequip and assign stats that way as a condition.
But he's already done this, I think his doubt is about show the attributes on look, and a backpack dont show it (source).

-- Edit --
My bad, i was using a source that was edited and i didnt realized it.
C++:
if(it.weaponType != WEAPON_NONE || it.armor || (item && item->getArmor()))

Btw, you can use the attribute showAttributes.
 
Last edited:
Back
Top