O getThingfromPos retorna uma tabela, com os campos aid, uid, itemid e type. Caso queira mostrar algo, tente assim:
for k,v in pairs(getThingfromPos({x=1040, y=1118, z=10, stackpos=255}) do
doPlayerSendTextMessage(cid, 25, k .. v)
end
flw
info
Grupo: Visconde
Registrado: 03/02/09
Posts: 361
Reputação: +200
Char no Tibia: Fearless Man

O getThingfromPos retorna uma tabela, com os campos aid, uid, itemid e type. Caso queira mostrar algo, tente assim:
for k,v in pairs(getThingfromPos({x=1040, y=1118, z=10, stackpos=255}) do
doPlayerSendTextMessage(cid, 25, k .. v)
end
flw
O getThingfromPos retorna uma tabela, com os campos aid, uid, itemid e type. Caso queira mostrar algo, tente assim:
for k,v in pairs(getThingfromPos({x=1040, y=1118, z=10, stackpos=255}) do doPlayerSendTextMessage(cid, 25, k .. v) end
flw
Pra que usar esse estrutura, nao quero mostrar nada, só quero que o getThingFromPos funciona, você me entende?
A função em questão, não está armazenando valor algum, eu usei o SendMessage para ver o que está armazenado no getthingfrompos.
Da uma olhada nessa mensagem de erro:

Este é meu código:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 4504 then
dust = 5905
vshl = 2534
setPlayerStorageValue(cid,4504,0) -- deletar
posvdust = {x=1038, y=1118, z=10, stackpos=1}
posvshld = {x=1040, y=1118, z=10, stackpos=1}
posnecro = {x=1024, y=1118, z=10}
posnecro1 = {x=1025, y=1118, z=10}
posnecro2 = {x=1024, y=1119, z=10}
queststatus = getPlayerStorageValue(cid,4504)
if queststatus == 0 or queststatus == -1 then
vdust = getThingfromPos(posvdust).itemid
vshld = getThingfromPos(posvshld).itemid
if vdust == dust and vshld == vshl then
doRemoveItem(vdust.uid,1)
doSendMagicEffect(posvdust,13)
doRemoveItem(vshld.uid,1)
doSendMagicEffect(posvshld,13)
doPlayerSendTextMessage(cid,22,"You hear something from the other room.")
doSummonCreature("Necropharus",posnecro)
doSummonCreature("Necromancer",posnecro1)
doSummonCreature("Necromancer",posnecro2)
setPlayerStorageValue(cid,4504,1)
return 0
else
doPlayerSendTextMessage(cid,22,"Primeiro")
return 0
end
else
doPlayerSendTextMessage(cid,22,"Segundo")
return 0
end
else
return 0
end
end
info
Grupo: Campones
Registrado: 29/10/05
Posts: 4
Reputação: 0
Então, eu fiz uma questizinha que deveria pegar os itens que estão no chão e remove-los do jogo e, depois disso, sumonar um boss. Mas tem uma zica e eu acho que está no getThingFromPos.
Eu testei o seguinte:
local vshld = getThingFromPos({x=1040, y=1118, z=10, stackpos=255})
doPlayerSendTextMessage(cid,22,vshld)
Mas quando vem a mensagem, nao mostra nada, ou seja, o get thingfrompos nao resolveu nada. E aí, alguma sugestão?
A propósito, eu estou usando tfs 0.3.6 tibia 8.54.
Valew ae timão, é curintiaaa xDD
Editado Novembro 1 por m4rr3co