Vamos lá. Tente este:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local c = {
monsterName = "Rotworm",
outfitId = {lookType = 127},
chance = 10
}
if isCreature(itemEx.uid) then
if getCreatureName(itemEx.uid) == c.monsterName then
if math.random(100) <= c.chance then
doRemoveItem(item.uid, 1)
doRemoveCreature(itemEx.uid)
doPlayerAddOutfit(cid,c.outfitId, 2)
else
doRemoveItem(item.uid, 1)
end
else
doPlayerSendCancel(cid, "Sorry, not possible.")
end
end
return true
end
flw







info
Grupo: Barão
Registrado: 06/07/08
Posts: 206
Reputação: +14
Char no Tibia: Nao Jogo tibia
Ae galera, alguem podeia fazer um script que voce usasse um item x num monstro x(vivo) e que este item tivesse uma chance de quebrar, caso voce tenha sucesso você ganharia um outfit qualquer, se tivesse como fazer o monstro sumir assim que voce ganhasse o outfit seria perfeito.