Ir para conteúdo
Entre para seguir isso  
Roku

Roku IPS - IP Security on Login

Recommended Posts

Roku    0
Roku

local infos = {
autor = "Roku",
testada= false,
versao = nil
}

CARA, EU ESTAVA COM O TÓPICO QUASE PRONTINHO, ESTAVA SUPER LINDO E GASTEI MAIS DE 1 HR COM FORMATAÇÃO, SEM FALAR DO TEXTO QUE EXPLICAVA TUDO. AI VO COMEMORAR E DO UMA ESPÉCIE DE SUPERSALTONACADEIRA. CAIO DA CADEIRA, QUANDO VOU VER O PC ESTÁ DESLIGADO. ENTÃO NAO VO EXPLICAR COMO INSTALAR, ETC. JA QUE ISSO NAO É TUTORIAL. VOU SÓ FALAR O QUE O SCRIPT FAZ E POSTAR.

SCRIPT

O script, em termos de idéia é fascinante. E tambem, simples =]

Ele consiste em um script que vocÊ defini os nomes dos seus jogadores e IP's,

se um jogador com qualquer um dos nomes definidos por você entrar em com um IP que nao esteja definido, você pode optar por:

 

• mandar msg em Popup pra esse player, dizendo que ele ta entrando com um IP nao definido.

 

• nao deixar ele entrar, isto é, interromper o login.

 

• avisar a um ou mais players que isso ocorreu.

 

vc tbm pode optar por fazer um log, que quem, quando, e com que ip entro.

ai vai ter que criar na pasta do aplicativo do server o arquivo com o seguinte nome:

iplog.txt
é claro, é um arquivo de texto :palm:

O script, em termos de idéia, como dito, é fascinante. Porem aqui os 4 pcs usam a mesma rede portanto tem o mesmo IP. ai nao pude testar nadinha.

Peço a alguem que teste pra mim e poste os erros, para que eu corrija.

 

O SCRIPT, PORTANTO, NÃO TEM NENHUMA GARANTIA DE FUNCIONAMENTO POR ENQUANTO.

olha, rimo :laugh:

↑: mas tambem nao disse que nao funciona.

 

Eu iria (IRIA, ARG!) explicar tudinho, mas to com sono, preciso tomar banho e to com pressa, por tanto toma ai:

local main = {
ips = {myHost = 1111111111, myNotebook = 2222222222, myFriendPc = 3333333333},
cNames = {"Roku","GM Roku","CM Roku","GOD Roku"},
whatDo = "noLogin", --[[ If the creature IP isn't found in table, what should be done? Options: "noLogin" or "kick"/"message" or "alert"/"alertSomeone"]]
whoAlert = {"Amigo do Roku", "Assistente do Roku", "Pessoa responsavel"},
alertMessage = "Roku IPS System\n::Error\n Your IP Adress are not acepted.",
logs = true
}

function onLogin(cid)
       if (table.find(main.cNames,getCreatureName(cid)) and not table.find(main.ips, getPlayerIp(cid))) then
          if (main.whatDo == "noLogin" or main.whatDo == "kick") then
             return FALSE
          elseif (main.whatDo == "alert" or main.whatDo == "message") then
                 doShowTextDialog(cid, 2638, main.alertMessage)
                 elseif (main.whatDo == "alertSomeone") then
                 for player = 1, #main.whoAlert do
doPlayerPopupFYI(getCreatureByName(main.whoAlert[player]), "Roku IPS System\nDear".. getCreatureName(getCreatureByName(main.whoAlert)) ..",\n::Warring\n Someone has logged in character ".. getCreatureName(cid) .."with a non-acepted IP. The server owner has choosed you to recive this message.")
                   elseif (main.logs == true) then
                   file = io.open("iplog.txt", "a+")
                   file:write(os.date() .." - The character [".. getCreatureName(cid) .."] has logged, with the IP addres [".. getPlayerIp(cid) .."]. The system did the option ".. main.whatDo)
                     file:close()
                 end
end
               return TRUE
               end
               return TRUE
               end

salva essa bosta como iplog.lua

configura assim:

ips = {myHost = 1111111111, myNotebook = 2222222222, myFriendPc = 3333333333}, -> os ips. podem ser varios. coloquei com varias variaveis pra se organizar
cNames = {"Roku","GM Roku","CM Roku","GOD Roku"}, -> os chars que voce quer que sejam verificados com o ip
whatDo = "noLogin", --[[ If the creature IP isn't found in table, what should be done? Options: "noLogin" or "kick"/"message" or "alert"/"alertSomeone"]] -> nem preciso explica
whoAlert = {"Amigo do Roku", "Assistente do Roku", "Pessoa responsavel"}, -> se a opção for alertar alguem, vao ser os sortudos ai
alertMessage = "Roku IPS System\n::Error\n Your IP Adress are not acepted.", -> a msg de alerta, é claro se a bosta da opção for essa
log = true -> eu ja disse. se tiver [b][color=Blue]true[/color][/b]zado, nao eskece de criar o arkivo
}

se tiver erro, me avisa por favor.

 

e a tag:

<event type="login" name="IPS" event="script" value="iplog.lua"/>

nem precisa falar que é globalevent :palm:

cara, tinha explicadinho por que é por nome, nao por id, por que é por char, nao por acc. mas agora n vo explica. quando tiver calmo mexo nessa BOSTA

pronto. aproveite.

nao reclamem da formatção, PORQUE DEPOIS DA MERDA QUE ME ACONTECEU VCS AINDA TEM SORTE DEU ESTAR POSTANTO E SO VO MELHORAR AS COISAS QUANDO EU TIVER CALMO. E O TOPICO ESTA NOS PADROES.

falou :fuu::fuu::fuu::fuu::fuu::fuu::fuu::fuu::fuu::fuu::fuu::fuu::fuu::fuu::fuu::fuu::fuu::fuu::fuu::fuu::fuu::fuu:

Editado por Black Ice

Compartilhar este post


Link para o post
Guizim Tibiano    0
Guizim Tibiano

de qualquer jeito é um otimo script... grato =D .... pena que o ip dos meus gms sempre mudam xD... flw ae!

Compartilhar este post


Link para o post
Er4gon II    0
Er4gon II

xD bom n muito util mais bom

Compartilhar este post


Link para o post
Visitante
Este tópico está impedido de receber novos posts.
Entre para seguir isso  
  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×