Ve se da certo agora:
function getResets(cid)
local check = db.getResult("SELECT `reset` FROM `players` WHERE `id`= "..getPlayerGUID(cid))
return check:getDataInt("reset") <= 0 and 0 or check:getDataInt("reset") end
function onUse(cid, item, frompos, item2, topos)
local reset_need = 30
if getResets(cid) < reset_need then
return doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Voce não tem mais de "..reset_need.." resets.")
end
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, topos, true)
return false
end


info
Grupo: Visconde
Registrado: 21/08/11
Posts: 470
Reputação: +5
Char no Tibia: ...
Galera meu script de door por resets está com um bug ao player abrir a porta a porta abre normalmente ao ele sair a porta fecha normalmente mais se ele clica na porta com a porta aberta a porta começa a se transformar em outras portas teria como alguem me ajudar aki está o script
function getResets(cid) local check = db.getResult("SELECT `reset` FROM `players` WHERE `id`= "..getPlayerGUID(cid)) return check:getDataInt("reset") <= 0 and 0 or check:getDataInt("reset") end function onUse(cid, item, frompos, item2, topos) local reset_need = 30 if getResets(cid) < reset_need then return doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Voce não tem mais de "..reset_need.." resets.") end doTransformItem(item.uid, item.itemid + 1) doTeleportThing(cid, topos, TRUE) return true end