Ir para conteúdo

Vodkart

Herói
  • Total de itens

    3406
  • Registro em

  • Última visita

  • Dias Ganhos

    113

Tudo que Vodkart postou

  1. aho qu não tem nada a ver com esse script, porque esse só deleta o char que já possui na conta e só
  2. que erro do account manager? ele ta deletando o account manager? vou sim, quando eu chegar em casa hoje de noite
  3. não, ese de aparecer somente 4 é eu q fiz besteira kkkk mas deleta as demais conta... tenta assim pra ve se vai aparecer só 4 de novo: function onStartup() function getDBPlayersCount() local result = db.getResult("SELECT COUNT(`id`) as `count` FROM `players`;") local tmp = result:getDataInt("count") result:free() return tmp end local DB_BEFORE = getDBPlayersCount() local cleanup = { {level = 11, time = 5 * 24 * 60 * 60}, {level = 50, time = 15 * 24 * 60 * 60}, {level = 100, time = 30 * 24 * 60 * 60}, {level = 200, time = 60 * 24 * 60 * 60}, {level = 300, time = 90 * 24 * 60 * 60} } for i = 1, #cleanup do db.executeQuery("DELETE FROM `players` WHERE `level` < ".. cleanup[i].level .." AND `id` > 6 AND `group_id` < 2 AND `lastlogin` < "..os.time() - cleanup[i].time) end local DB_NOW = DB_BEFORE - getDBPlayersCount() if DB_NOW > 0 then local text = ">> [DBCLEANUP] "..DB_NOW.." inactive players have been deleted from database." print("" .. text .. "") local file = io.open("data/logs/db_cleanup.txt", "a") file:write("\n[".. os.date("%d %B %Y %X ", os.time()) .."] "..text.."") file:close() end return true end
  4. é porque tem jogadores que são donos de guild, ai teria que deletar a guild antes para depois deletar o player... quando eu tiver um tempinho eu faço esse script para deletar guild, house e o player
  5. Vodkart

    MKick

    for _, pid in ipairs(getPlayersOnline()) do doRemoveCreature(pid) end
  6. function onStartup() local count,cleanup = 0, { {level = 11, time = 5 * 24 * 60 * 60}, {level = 50, time = 15 * 24 * 60 * 60}, {level = 100, time = 30 * 24 * 60 * 60}, {level = 200, time = 60 * 24 * 60 * 60}, {level = 300, time = 90 * 24 * 60 * 60} } for i = 1, #cleanup do if db.executeQuery("DELETE FROM `players` WHERE `level` < ".. cleanup.level .." AND `id` > 6 AND `group_id` < 2 AND `lastlogin` < "..os.time() - cleanup.time) then count = count + 1 end end if count > 0 then local text = ">> [DBCLEANUP] "..count.." inactive players have been deleted from database." print("" .. text .. "") local file = io.open("data/logs/db_cleanup.txt", "a") file:write("\n[".. os.date("%d %B %Y %X ", os.time()) .."] "..text.."") file:close() end return true end
  7. UNIX_TIMESTAMP() por os.time() ficando assim: -- [[> Automated Database Cleanup 1.1 //By Cybermaster <]] -- -- [[> Function getDBPlayersCount() by Elf <]] -- function getDBPlayersCount() local result = db.getResult("SELECT COUNT(`id`) as `count` FROM `players`;") local tmp = result:getDataInt("count") result:free() return tmp end function onStartup() local DB_BEFORE = getDBPlayersCount() --In each table, players with below specified level, and days of inactivity will be deleted from db on server startup local cleanup = { [1] = {level = 11, time = 5 * 24 * 60 * 60}, [2] = {level = 50, time = 15 * 24 * 60 * 60}, [3] = {level = 100, time = 30 * 24 * 60 * 60}, [4] = {level = 200, time = 60 * 24 * 60 * 60}, [5] = {level = 300, time = 90 * 24 * 60 * 60} } for i = 1, #cleanup do db.executeQuery("DELETE FROM `players` WHERE `level` < ".. cleanup[i].level .." AND `id` > 6 AND `group_id` < 2 AND `lastlogin` < os.time() - ".. cleanup[i].time ..";") end local DB_NOW = DB_BEFORE - getDBPlayersCount() if DB_NOW > 0 then local text = ">> [DBCLEANUP] "..DB_NOW.." inactive players have been deleted from database." print("" .. text .. "") local file = io.open("data/logs/db_cleanup.txt", "a") file:write("\n[".. os.date("%d %B %Y %X ", os.time()) .."] "..text.."") file:close() end return true end
  8. Vodkart

    Quem vai jogar GTA V?

    n tem pra pc ainda seu preto fiz a missão de roubar dois aviões com o trevor manieco agr n to jogando mto pq sempre chego cansado mas por enquanto ta rox
  9. -- [[> Automated Database Cleanup 1.1 //By Cybermaster <]] -- -- [[> Function getDBPlayersCount() by Elf <]] -- function getDBPlayersCount() local result = db.getResult("SELECT COUNT(`id`) as `count` FROM `players`;") local tmp = result:getDataInt("count") result:free() return tmp end function onStartup() local DB_BEFORE = getDBPlayersCount() --In each table, players with below specified level, and days of inactivity will be deleted from db on server startup local cleanup = { [1] = {level = 11, time = 5 * 24 * 60 * 60}, [2] = {level = 50, time = 15 * 24 * 60 * 60}, [3] = {level = 100, time = 30 * 24 * 60 * 60}, [4] = {level = 200, time = 60 * 24 * 60 * 60}, [5] = {level = 300, time = 90 * 24 * 60 * 60} } for i = 1, #cleanup do db.executeQuery("DELETE FROM `players` WHERE `level` < ".. cleanup[i].level .." AND `id` > 6 AND `group_id` < 2 AND `lastlogin` < UNIX_TIMESTAMP() - ".. cleanup[i].time ..";") end local DB_NOW = DB_BEFORE - getDBPlayersCount() if DB_NOW > 0 then local text = ">> [DBCLEANUP] "..DB_NOW.." inactive players have been deleted from database." print("" .. text .. "") local file = io.open("data/logs/db_cleanup.txt", "a") file:write("\n[".. os.date("%d %B %Y %X ", os.time()) .."] "..text.."") file:close() end return true end
  10. o certo não é doPlayerRemoveMount(cid, mountId) ? uma vez eu criei uma função parecida para meu npc aluguel de montarias: function doRemovePlayerMount(cid, mountId) -- vodka doPlayerRemoveMount(cid, mountId) return doCreatureChangeOutfit(cid,{lookType = getCreatureOutfit(cid).lookType, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons}) end
  11. Vodkart

    Quem vai jogar GTA V?

    to na missão ainda que tinha que roubar a joalheria, show de bola librei o trevor agr, as missões deles são insanas demais ta mto legal por enquanto
  12. é pq vc está usando os.time() rsrsrs function onStepIn(cid, item, position, fromPosition) local storage = 666 if getPlayerStorageValue(cid, storage) - os.time() <= 0 or not isPremium(cid) then doPlayerSendCancel(cid, 'n pode passa.') doTeleportThing(cid, fromPosition, true) return true end return true end
  13. isso é simples, qndo vc for se aperfeiçoando as ideias viram, por enquanto vc ainda está na fase de aprender.
  14. Vodkart

    Quem vai jogar GTA V?

    100 pratas? onde fi q eu qro saber paguei 200 no meu (jogo PS3 + sedex)
  15. Vodkart

    Quem vai jogar GTA V?

    primeiro to fechando o GTA dps eu vou pro online
  16. se a tabela só contém uma idex, porque colocar index? poderia fazer direto a pos, ex: ["Articuno"] = {x = 1344, y = 1718, z = 10},
  17. NAO FUNCIONOU VODKART, só ta funcionando se tiver premmy e a storage eu queria q fosse assim: Se tiver premmy passa Se tiver storage 666 passa Ta assim: Se tiver premmy e storage passa, se tiver um só n passa function onStepIn(cid, item, position, fromPosition) if isPremium(cid) == FALSE then doTeleportThing(cid, fromPosition, false) doSendMagicEffect(position, CONST_ME_MAGIC_BLUE) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente jogadores VIP-SOCIOS podem passar...") end return TRUE end mas o meu está exatamente como vc pediu, mudou o valor da storage? function onStepIn(cid, item, position, fromPosition) local storage = 666 if getPlayerStorageValue(cid, storage) <= 0 or not isPremium(cid) then doPlayerSendCancel(cid, 'n pode passa.') doTeleportThing(cid, fromPosition, true) return true end return true end
  18. rsrsrsrsrs, valeu mais uma vez alex! abraços
  19. Vodkart eu já enchi a barra de alerta 3x quando o anyur era Coordenador de mapping.. UAhUAhUAh eu tenho 2 páginas de alerta, se vc quiser eu tiro print UEHUEHEUEUEUE
  20. quero pedir para que façam uma medalha especial chamada de "bad boy", sou o membro mais alertado do xtibia e ainda estou ativo
  21. function onStepIn(cid, item, position, fromPosition) local storage = 5013 if getPlayerStorageValue(cid, storage) <= 0 or not isPremium(cid) then doPlayerSendCancel(cid, 'n pode passa.') doTeleportThing(cid, fromPosition, true) return true end return true end
  22. Olá, gostaria de receber a medalha de Herói pois já fui colaborador e estagiário do Xtibia, prestei meus serviços e tudo mais... Obrigado! E também gostaria de receber a medalha "Membro honorário", eu já tinha ela mas depois do update sumiu das minhas medalhas...
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...