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

Equipment for vips

Piechu

New Member
Joined
Oct 10, 2008
Messages
113
Reaction score
0
Location
Poland/Jasło
How to make item able to wield only by players which have storagevalue.
Example: If you have Storagevalue(1000) = 1 then you can use Magic Plate Armor. People who dont have these storage can't pick it up from the ground.


Sorry for english.

@edit
I have a new problem. I done it buy attributes in items after equip aren't working.
 
Last edited:
red phrases are to change:
add to movements.xml:
Code:
<movevent type="Equip" itemid="[COLOR="Red"]2161[/COLOR]" slot=[COLOR="Red"]necklace[/COLOR]" event="script" value="[COLOR="Red"]item1.lua[/COLOR]"/>
	<movevent type="DeEquip" itemid="[COLOR="Red"]2161[/COLOR]" slot="[COLOR="Red"]necklace[/COLOR]" event="function" value="onDeEquipItem"/>

and to movements/scripts/item1.lua
Code:
function onEquip(cid, item, slot)
if getPlayerStorageValue(cid,[COLOR="Red"]10000[/COLOR]) == 1 then
return TRUE
else
return False
end
end

then only if player will have storagevalue(10000) == 1 will be able to wear these item.
 
Good work Piechu :thumbup:

Lua:
local storage = 10000
function onEquip(cid, item, slot)
    if getPlayerStorageValue(cid, storage) == 1 then
        return true
    else
        return false
    end
end
 
Back
Top