Tente agora
local config = {
fromItem = 0, -- Item que precissa.
toItem = 7702 -- Item que vai transformar.
}
getPlayerStorageValue(uid, valueid)
function onCastSpell(cid, var)
if (getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid == config.fromItem or getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid == config.fromItem) then
doPlayerAddItem(cid, config.toItem, 1)
else
doPlayerSendCancel(cid, "You must have a " .. getItemNameById(config.fromItem) .. " in your hand to cast this spell.")
end
return true
end







info
Grupo: Campones
Registrado: 20/01/08
Posts: 56
Reputação: 0
Char no Tibia: SKyDevILFiRe
Dale galerinha õ/, alguem pode por para apenas usar se tiver a storage necessaria ? =)
local config = {
fromItem = 0, -- Item que precissa.
toItem = 7702 -- Item que vai transformar.
}
function onCastSpell(cid, var)
if (getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid == config.fromItem or getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid == config.fromItem) then
doPlayerAddItem(cid, config.toItem, 1)
else
doPlayerSendCancel(cid, "You must have a " .. getItemNameById(config.fromItem) .. " in your hand to cast this spell.")
end
return true
end