ve se é isso:
function onUse(cid, item, fromPosition, itemEx, toPosition)
-- chance em porcentagem
items = {
{id= 2472,chance=1},
{id= 2492,chance=2},
{id= 2466,chance=3},
{id= 2487,chance=4},
{id= 8891,chance=5},
{id= 2476,chance=20},
{id= 2463,chance=25}
}
local RARE_RUSTY_ARMOR = 9810
if itemEx.itemid == RARE_RUSTY_ARMOR then
local m = math.random(1,#items)
if math.random(1,100) <= items[m].chance then
doTransformItem(itemEx.uid,items[m].id)
else
doRemoveItem(itemEx.uid)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"The armor was already damaged so badly that it broke when you tried to clean it.")
end
end
return TRUE
end




info
Grupo: Campones
Registrado: 28/07/07
Posts: 27
Reputação: 0
Char no Tibia: Kombosabo
Tentei fazer o script sozinho, mas foi um completo disastre...
Editado Fevereiro 21 por Kombosabo OT Server