Fala, meu colega, utilize a seguinte construção condicional.
local position = {x = 100, y = 100, z = 7}
if getThingPosition(item2).x == position.x and getThingPosition(item2).y == position.y and getThingPosition(item2).z == position.z then
-- INSERIR CÓDIGO MACARRÔNICO AQUI
end
Abraços.





info
Grupo: Visconde
Registrado: 21/09/10
Posts: 319
Reputação: +27
Char no Tibia: lest sarif
Olá galera eu quero por uma limitaçao nessa script
-- TonyNamoral Scripts --
items = {
[0] = {id = 2472, count = 1, chance = 2},
[1] = {id = 2466, count = 1, chance = 5},
[2] = {id = 8930, count = 1, chance = 10},
[3] = {id = 8858, count = 1, chance = 15},
[4] = {id = 2160, count = 10, chance = 30},
[5] = {id = 6569, count = 50, chance = 100}
}
function onUse(cid, item, fromPos, item2, toPos)
if item2.itemid == 2472 then
for i = 0, #items do
if (items.chance > math.random(1, 100)) then
doPlayerAddItem(cid, items.id, items.count)
doPlayerSendTextMessage(cid,27,"You make a "..getItemNameById(items.id).."")
doRemoveItem(item2.uid, 1)
return true
end
end
doPlayerSendTextMessage(cid,27,"You dont make nothing")
doRemoveItem(item2.uid, 1)
return false
end
end
Bom eu so quero por assim , o player só pode usar o "use with" , no item2 , se o item2 tiver em uma certa posiçao.