
so pra constar:
os scripts estao assim:
function onThink(interval, lastExecution)
if getInfoFromDatabase("players", "id", "name", "Sorcerer Sample") == 3 then
doBroadcastMessage("ok")
else
doBroadcastMessage("fechar")
end
return true
end
function getInfoFromDatabase(table, column, condition, id)
local a = db.getResult("SELECT `"..column.."` FROM `"..table.."` WHERE `"..condition.."` = "..id..";")
if a:getID() == -1 then return false end
local b = a:getDataString(""..column.."")
return b, a:free()
end





info
Grupo: Marquês
Registrado: 22/07/12
Posts: 1.1k
Reputação: +400
Gênero: Masculino
Char no Tibia: Luck Oake
function getInfoFromDatabase(table, column, condition, id) local a = db.getResult("SELECT `"..column.."` FROM `"..table.."` WHERE `"..condition.."` = "..id..";") if a:getID() == -1 then return false end local b = a:getDataString(""..column.."") return b, a:free() endVê ai.