Aonde coloca isso ?
local object_itemid = {
-- Mewtwo Carpet
[20706] = {transform_to = 20705, premium = false, useWith=true},
[20705] = {transform_to = 20706, premium = false, useWith=false},
-- Eyes Dark Carpet
[20682] = {transform_to = 20683, premium = false, useWith=true},
[20683] = {transform_to = 20682, premium = false, useWith=false},
-- Eyes Red Carpet
[20680] = {transform_to = 20681, premium = false, useWith=true},
[20681] = {transform_to = 20680, premium = false, useWith=false},
}
function onUse(cid, item, frompos, item2, topos)
local storage = 789566
local time = 1
local sendEffect = true -- true or false
local EffectId = 1
local item_from_table = object_itemid[item.itemid]
if exhaustion.check(cid, storage) then
return false
end
if item_from_table then
if item_from_table.premium and not isPremium(cid) then
return false and doPlayerSendCancel(cid, "Você não e vip.")
end
doRemoveItem(item.uid,1)
if item_from_table.useWith then
doCreateItem(item_from_table.transform_to,1,topos)
else
doCreateItem(item_from_table.transform_to,1,frompos)
end
if sendEffect then
doSendMagicEffect(getThingPos(cid), EffectId)
end
end
return true and exhaustion.set(cid,storage,time)
end