Postado Agosto 16, 2014 10 anos Tenho um script q toda vez q alguem pega top no ot manda uma broad pra todo mundo X é o novo top do ot passa Y no lvl 100! N da erros, nada, mas n funciona =\ Ve se consegue me ajudar alguem creatScript: <event type="advance" name="checkNewTop" script="newtop.lua"/> login.lua registerCreatureEvent(cid, "checkNewTop") newtop.lua function getTop() -- função by vodkart local query = db.getResult("SELECT `name`, `level` FROM `players` WHERE `id` > 6 AND `group_id` < 2 ORDER BY `level` DESC, `name` ASC;") if (query:getID() ~= -1) then return {query:getDataString("name"),query:getDataInt("level")} end return false end function onAdvance(cid, oldLevel, newLevel) if skill == 8 then local top = getTop() if newLevel > top[2] and getCreatureName(cid) ~= top[1] then broadcastMessage(getCreatureName(cid).." new TOP server! Level: [" .. newLevel .. "] !", 25) end end return true end
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.