• 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!

[Advanced] OnEquip

muphet

New Member
Joined
Apr 27, 2008
Messages
233
Reaction score
2
Hi. I have a question. Where is located OnEquip/DeEquip function?
And how to add new requirements for items? I want to add items equipable only with storagevalue..
 
Code:
function onEquip(cid, item, slot)
    if getCreatureStorage(cid, STORAGEVALUEHERE) >= 1 then
        return true
    else
  end
end

That would make the player to be unable to equip the item defined on movements.xml with this script if his storage value isnt higher or equal to 1.

Just a little example, kinda newbie to scripting, but works.

XML Tag example:
Code:
    <movevent type="Equip" itemid="2408" event="script" value="storage_value_requirement.lua"/>

Simple as that.
 
Last edited:
Back
Top