PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: Quattro on 26 February, 2005, 16:28:23

Title: Yeah i want the new Robocop
Post by: Quattro on 26 February, 2005, 16:28:23
gehehe wanted first post in here ;-)
Title:
Post by: Optimus on 26 February, 2005, 16:38:33
hehehe :D
Title:
Post by: Tw?sT?d-d?v on 26 February, 2005, 17:04:20
LMAO     .......    I want it to :))
Title:
Post by: Daywalker on 26 February, 2005, 19:25:18
gehehe.....it's like a little child waiting for an icecream.  :P
Title:
Post by: imby on 26 February, 2005, 19:56:15
QuoteOriginally posted by Daywalker
gehehe.....it's like a little child waiting for an icecream.  :P

Perfect analogy  :P
Title:
Post by: Event_Horizon on 27 February, 2005, 19:13:14
aren't we all childs in this way  ;)
Title:
Post by: Quattro on 27 February, 2005, 19:20:04
absolutely  :D
Title: Seculite
Post by: Bobby1999 on 05 March, 2005, 02:41:30
I would like Seculite in lua 5
Title:
Post by: Psycho_Chihuahua on 05 March, 2005, 04:41:01
QuoteOriginally posted by Bobby1999
I would like Seculite in lua 5

same goes for me, spent all off yesterday trying to convert it but i'm hopeless at it -.-
with each error i fix i end up with 3 more
Title: seclite
Post by: Skynet on 05 March, 2005, 14:32:40
if i rember that script right some bits of it you would
need a plugin ptokaX's not got LuaSockets i may be wrong about script ,but if it the one i think it it will

Skynet
landofkaraoke
Title:
Post by: Jelf on 06 March, 2005, 19:23:19
Why not try this...

--// --// a peerguardian script ..
--// by Typhoon?/Ratcom_Typhoon?
--// 09-05-2004
--// idea and code from NXS-4 by NightLitch
--// converted to Lua5 by Jelf

---- setup

GuardianCheck = 1
check = 1

---- setup end

BotName = frmHub:GetHubBotName()

GuardianFile = "Guard/Guarding.P2P"

Guard = {}
----------------------------
function Main()

       LoadTable(Guard,GuardianFile)  
end
----------------------------
function NewUserConnected(curUser)

if GuardianCheck==1 then
local check,comp = BlockGuard(curUser.sIP)
if check==1 then
curUser:Disconnect()
SendPmToOps(BotName,"*** "..curUser.sName.." - ( "..curUser.sIP.." ) from Company ( "..comp.." ) tried to login! ***")
check = 0
end
end
end
------------------------------
function BlockGuard(ip)

local _,_,a,b,c,d = string.find(ip, "(%d*).(%d*).(%d*).(%d*)")
if ( tonumber(a) and tonumber(b) and tonumber(c) and tonumber(d) ) then
local uip = ComputeIP(ip)
if uip then
for range,comp in Guard do
local _,_,r1,r2 = string.find(range, "(.*)-(.*)")
r1 = ComputeIP(r1)
r2 = ComputeIP(r2)
if uip>=r1 and uip<=r2 then
return 1,comp
end
end
end
end
end
---------------------------------
function ComputeIP(curIP)

local _,_,a,b,c,d = string.find(curIP, "(%d+).(%d+).(%d+).(%d+)")
return a*16777216 + b*65536 + c*256 + d
end
---------------------------------
function LoadTable(table,file)

local handle = io.open(file, "r")
if (handle) then
    local line = handle:read()
    while line do
s,e,ind,val = string.find( line, "(.*):(.*)")
table[val]=ind
line = handle:read()
    end
  handle:close()
end
end
Just need to place guarding.p2p file (from peerguardian) into folder named "Guard".
Title:
Post by: Bobby1999 on 06 March, 2005, 19:34:24
Cheers will try it when new Robo is out :)
Title: good one
Post by: Skynet on 06 March, 2005, 19:45:28
Good one jelf number one m8