Ir para conteúdo

Featured Replies

  • Respostas 27
  • Visualizações 5.4k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Nesse war system qualquer player consegue entrar e/ou sair das guilds enquanto ocorre o system. Há algum jeito de deixar bloqueado enquanto estiver tendo o system? Outra dúvida, eu alterando o te

Postado

Acho que não funcionou! http://prntscr.com/4q8ax4 < veja!

 

function onStartup()

db.query("TRUNCATE TABLE `players_online`")
db.query("UPDATE `guild_wars` SET `status` = 4, `ended` = " .. os.time() .. " WHERE `status` = 1 AND (`started` + 2* 60 * 60) < " .. os.time())
db.query("DELETE FROM `players` WHERE `deletion` != 0 AND `deletion` < " .. os.time())
db.query("DELETE FROM `ip_bans` WHERE `expires_at` != 0 AND `expires_at` <= " .. os.time())
db.query("DELETE FROM `market_history` WHERE `inserted` <= " .. (os.time() - configManager.getNumber(configKeys.MARKET_OFFER_DURATION)))
 
-- Move expired bans to ban history
local resultId = db.storeQuery("SELECT * FROM `account_bans` WHERE `expires_at` != 0 AND `expires_at` <= " .. os.time())
if resultId ~= false then
repeat
local accountId = result.getDataInt(resultId, "account_id")
db.query("INSERT INTO `account_ban_history` (`account_id`, `reason`, `banned_at`, `expired_at`, `banned_by`) VALUES (" .. accountId .. ", " .. db.escapeString(result.getDataString(resultId, "reason")) .. ", " .. result.getDataLong(resultId, "banned_at") .. ", " .. result.getDataLong(resultId, "expires_at") .. ", " .. result.getDataInt(resultId, "banned_by") .. ")")
db.query("DELETE FROM `account_bans` WHERE `account_id` = " .. accountId)
until not result.next(resultId)
result.free(resultId)
end
 
-- Check house auctions
local resultId = db.storeQuery("SELECT `id`, `highest_bidder`, `last_bid`, (SELECT `balance` FROM `players` WHERE `players`.`id` = `highest_bidder`) AS `balance` FROM `houses` WHERE `owner` = 0 AND `bid_end` != 0 AND `bid_end` < " .. os.time())
if resultId ~= false then
repeat
local house = House(result.getDataInt(resultId, "id"))
if house ~= nil then
local highestBidder = result.getDataInt(resultId, "highest_bidder")
local balance = result.getDataLong(resultId, "balance")
local lastBid = result.getDataInt(resultId, "last_bid")
if balance >= lastBid then
db.query("UPDATE `players` SET `balance` = " .. (balance - lastBid) .. " WHERE `id` = " .. highestBidder)
house:setOwnerGuid(highestBidder)
end
db.query("UPDATE `houses` SET `last_bid` = 0, `bid_end` = 0, `highest_bidder` = 0, `bid` = 0 WHERE `id` = " .. house:getId())
end
until not result.next(resultId)
result.free(resultId)
end
end

 Até o site tudo bem! Só que não acaba, http://prntscr.com/4qdmse < Imagem

  • 2 weeks later...

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo