Ir para conteúdo

Pesquisar na Comunidade

Mostrando resultados para as tags ''banimento system''.

  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Fóruns

  • xTibia - Notícias e Suporte
    • Regras
    • Noticias
    • Soluções
    • Projetos Patrocinados
    • Tutoriais para Iniciantes
    • Imprensa
  • OTServ
    • Notícias e Debates
    • OTServlist
    • Downloads
    • Recursos
    • Suporte
    • Pedidos
    • Show-Off
    • Tutoriais
  • OFF-Topic
    • Barzinho do Éks
    • Design
    • Informática

Encontrar resultados em...

Encontrar resultados que contenham...


Data de Criação

  • Início

    FIM


Data de Atualização

  • Início

    FIM


Filtrar pelo número de...

Data de Registro

  • Início

    FIM


Grupo


Sou

Encontrado 1 registro

  1. Venho trazer a versão do 1.0 do banimento system Segue o link: http://www.xtibia.co...to-system-beta/ O script foi todo reformulado. O player fala /ban(nome do player,dias de ban,porque ele foi banido,["true" para banir o ip]) E o player e kikado e depois quando ele tentar logar aparece a mensagem de banimento. O player também podera ver a lista de banidos dizendo /bans. Vá na sua database e execute os seguintes comandos: CREATE TABLE "ban" ( "player" INT NOT NULL, "ip" INT NOT NULL, "time" INT NOT NULL, `coment` text ) Vá em lib e crie um arquivo lua chamado de ban e coloque isto: function setBanTime(cid, time, coment, ip) db.executeQuery("INSERT INTO `ban` VALUES (".. getPlayerGUID(cid) ..", ".. ip ..", ".. os.time() + time*36000 ..", '".. coment .."')") end function getPlayerBans(cid) local ban = db.getResult("SELECT * FROM `ban` WHERE `player` = ".. getPlayerGUID(cid) ..";") if ban:getID() == -1 then return false end local time = ban:getDataInt("time") > os.time() and ban:getDataInt("time") < 100+os.time() return time and false or true end function getPlayerComent(cid) local ban = db.getResult("SELECT * FROM `ban` WHERE `player` = ".. getPlayerGUID(cid) ..";") return ban:getDataString("coment") end function getPlayerTimeBan(cid) local ban = db.getResult("SELECT * FROM `ban` WHERE `player` = ".. getPlayerGUID(cid) ..";") return ban:getDataInt("time") - os.time() end function getPlayerIpBan(cid) local ban = db.getResult("SELECT * FROM `ban` WHERE `player` ORDER BY `time`") if ban:getID() == -1 then return false end while true do local ips = ban:getDataInt("ip") if getPlayerIp(cid) == ips then return true end if not ban:next() then return false end end end function doShowTextBans(cid) local ban = db.getResult("SELECT * FROM `ban` WHERE `player` ORDER BY `time`") str = "Players Banidos:\n\n" if ban:getID() == -1 then doShowTextDialog(cid, 1387, "Não existe nenhum player Banido") return true end while true do local name = ban:getDataInt("player") local player = getPlayerNameByGUID(name) local time = ban:getDataInt("time") - os.time() str = str .. player .. " - Banido por "..math.floor((time/36000)).." \n\n" if not ban:next() then doShowTextDialog(cid, 1397, str) break end end end Vá em talkactions e crie um arquivo lua chamado de ban e coloque isto: function onSay(cid, words, param, channel) local t = string.explode(param, ",") if param == " " or param == "" or not param or isNumeric(param) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Coloque o nome do player dizendo /ban(nome do player,dias de ban,por que ele foi banido)") end if t[2] == " " or t[2] == "" or not t[2] then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Coloque os dias do player dizendo /ban(nome do player,dias de ban,por que ele foi banido)") end if t[3] == " " or t[3] == "" or not t[3] then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Coloque o comentario do banimento dizendo /ban(nome do player,dias de ban,comentario)") end local player = getPlayerByNameWildcard(t[1], false) if not player then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Este player "..t[1].." não existe") end setBanTime(player, t[2], t[3], t[4] == "true" and getPlayerIp(player) or 0) doRemoveCreature(player) return true end Continuando em talkactions crie um arquivo lua chamado de bans e coloque isto: function onSay(cid, words, param, channel) doShowTextBans(cid) return true end Agora vá em talkactions.xml e coloque estas tags: Agora vá em creaturescripts e crie um arquivo lua chamado de ban e coloque isto: function onLogin(cid) if getPlayerBans(cid) then local time = math.floor(getPlayerTimeBan(cid)/36000) doPlayerPopupFYI(cid, "Você esta banido por "..getPlayerComent(cid).." durante "..time.." dias") return addEvent(doRemoveCreature, 180, cid) end if getPlayerIpBan(cid) then doPlayerPopupFYI(cid, "Seu ip esta banido") return addEvent(doRemoveCreature, 180, cid) end return true end Agora vá em login.lua e registre o evento colocando isto antes do ultimo return: registerCreatureEvent(cid, "ban") Coloque esta tag em talkactions.xml
×
×
  • Criar Novo...