não testei...
-- Sistema de Forja by Flatronez
function onUse(cid, item, fromPosition, itemEx, toPosition)
local player = getCreatureName(cid)
if getItemName(itemEx.uid) == "piece of iron" then
if toPosition.stackpos == 2 then
setItemName(itemEx.uid, "Prepared Metal")
doSetItemSpecialDescription(itemEx.uid, "Can be enchanted by a jewel.")
doPlayerSendCancel(cid, "The metal is prepared to receive the jewel.")
end
-- Se a pedra já estiver encantada ele continua
elseif getItemName(itemEx.uid) == "Enchanted Metal" then
if toPosition.stackpos == 2 then
local items = {2472, 2506, 2463, 2487, 2466} -- items que serão sorteados
doCreateItem(items[math.random(#items)], 1, toPosition)
doPlayerSendCancel(cid, "Forge done successfully!")
doRemoveItem(itemEx.uid)
else
doPlayerSendCancel(cid, "This is not the correct metal.")
end
end
end


info
Grupo: Campones
Registrado: 20/08/10
Posts: 6
Reputação: 0
Char no Tibia: leledib
Ola galera ! preciso mais uma vez a ajuda de voces !
Eu gostaria que alguem editasse esse script que eu peguei em um ot !
No caso o item que eu receberia após usar um FORGE HAMMER em um METAL seria uma fire sword.
Porem eu gostaria que ao invés de receber a fire sword eu ganha-se um item randomico entre uma lista pré-determinada...
Entenderam ? se tiver meio confuso eu tento explicar melhor
Editado Agosto 27 por dotatibia