if getTileItemById({x = 140, y = 67, z = 6},2383) == v.itemx then
if getTileItemById({x = 142, y = 67, z = 6},2147) == v.itemy then
doCreateItem(cid,2390)
o certo seria:
if getTileItemById({x = 140, y = 67, z = 6},2383).itemid == v.itemx then
if getTileItemById({x = 142, y = 67, z = 6},2147).itemid == v.itemy then
doPlayerAddItem(cid, 2390, 1)
a função getTileItemById retorna uma table, logo, vc tem que chamar os index. até.



info
Grupo: Campones
Registrado: 10/12/11
Posts: 7
Reputação: +1
Char no Tibia: Edward Demon
um script que eu tava fazendo mais fui testar e n deu nada n deu erro nem nada
function onUse(cid, item, frompos, item2, topos) local creat = { ["Magic Long Sword"] = {itemx = 2383 , itemy = 2147 , pos1 = {x = 140, y = 67, z = 6} , pox2 = {x = 142, y = 67, z = 6} } } for k,v in pairs(creat) do if getTileItemById({x = 140, y = 67, z = 6},2383) == v.itemx then if getTileItemById({x = 142, y = 67, z = 6},2147) == v.itemy then doCreateItem(cid,2390) doSendMagicEffect(getPlayerPosition(cid), 2) else doPlayerSendCancel(cid, "Falhou.") end else doPlayerSendCancel(cid, "Falhou.") end end endquem poder me ajudar dou +REP