Author Topic: Lancer Hider By Phatty  (Read 2947 times)

0 Members and 1 Guest are viewing this topic.

Offline pHaTTy

  • Forum Legend
  • ***
  • Posts: 1 916
  • Karma: +5/-1
Lancer Hider By Phatty
« on: 13 December, 2003, 01:19:22 »
well i got sick of the nick taken error so decided to start on a proper one ;)

Code: [Select]

--Lance Evol v1.00
--Hider Bot, this one does not give the nick taken error ;)
--Written by Phatty 12th December 2k3
--Need to sort the Logged in LogedIn not work neither any ideas?

Bot = "?????R"
Hidden = {}

function NewUserConnected(user)
if Hidden == nil then
return 1
else
for i,v in Hidden do
user:SendData( "$Quit "..i )
end
end
end

function OpConnected(user)
if Hidden == nil then
return 1
else
for i,v in Hidden do
user:SendData( "$Quit "..i )
end
end
end

function DataArrival(user, data)
if(strsub(data, 1, 4) == "$Quit ") then
if Hidden[user.sName] == 1 then
Hidden[user.sName] = nil
end
end

if strsub(data, 1, 1) == "<" then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")

if cmd == "hide" then
if user.bOperator then
SendToAll( "$Quit "..user.sName )
Hidden[user.sName] = 1
end
elseif cmd == "unhide" then
if user.bOperator then
SendToAll( "$LoggedIn "..user.sName )
Hidden[user.sName] = nil
end
end
end
end


i need to sort a few things when i get time.....but it works......:))

-phatty
Resistance is futile!

PtokaX forum

Lancer Hider By Phatty
« on: 13 December, 2003, 01:19:22 »

Offline tezlo

  • Triple Ace
  • **
  • Posts: 225
  • Karma: +1/-0
(No subject)
« Reply #1 on: 13 December, 2003, 01:29:13 »
$Hello

Offline pHaTTy

  • Forum Legend
  • ***
  • Posts: 1 916
  • Karma: +5/-1
(No subject)
« Reply #2 on: 13 December, 2003, 01:34:00 »
Quote
Originally posted by tezlo
$Hello

Dam yep thats it Thanx dude :)))
Resistance is futile!

Offline pHaTTy

  • Forum Legend
  • ***
  • Posts: 1 916
  • Karma: +5/-1
(No subject)
« Reply #3 on: 13 December, 2003, 01:34:49 »
change


            SendToAll( "$LoggedIn "..user.sName )

to


            SendToAll( "$Hello "..user.sName )


thanx agen tezlo :)
Resistance is futile!

Offline kepp

  • Scripter
  • King
  • ******
  • Posts: 790
  • Karma: +2/-0
(No subject)
« Reply #4 on: 16 December, 2003, 18:38:42 »
Thank you :)
Guarding    

Offline BlazeXxX

  • Lord
  • ***
  • Posts: 375
  • Karma: +3/-0
(No subject)
« Reply #5 on: 17 December, 2003, 17:57:00 »
Nice one dude ;-) Hope to see more useful script from you  :D

Offline xokas

  • Double Ace
  • *
  • Posts: 133
  • Karma: +0/-0
(No subject)
« Reply #6 on: 17 December, 2003, 18:02:22 »
this script is for?it does the same as nicktakenbot?and no offense phatty but works good?

Offline jiten

  • Scripter
  • Forum Legend
  • ******
  • Posts: 1 577
  • Karma: +71/-5
(No subject)
« Reply #7 on: 29 September, 2004, 21:17:32 »
hi there Phatty.

just wanted to ask you something about this hider.
i've tried this one and nErBos'.
the problem is that both of them have bugs.

This one doesn't give the nick taken error, but, when i hide myself from the userlist, i always reappear after some minutes, and can't stay "invisible" for more than that time..

On the other hand, the one made by nErBoS gives the nick taken error, when i try to reconnect, even after doing the !unhide command. so, i always have to restart the hub, to reconnect again.

can you fix this in your hider?
thanks.

jiten

Offline nErBoS

  • Emperor
  • **
  • Posts: 1 149
  • Karma: +3/-1
(No subject)
« Reply #8 on: 30 September, 2004, 00:12:13 »
Hi,

Little Update...

Code: [Select]
--Lance Evol v1.01
--Hider Bot, this one does not give the nick taken error ;)
--Written by Phatty 12th December 2k3
--little update today ehmm today issss 14th april 2k4
--Update on Saving Table by nErBoS
--User still hide by refresh list by nErBoS

Bot = "?bot?" ;
Hidden = {}
fHidden = "hidden.dat"

--## Configuration ##--

uLaterPtokax = 0 -- Choose 0 if your Ptokax Version is 0.3.3.0 or higher
-- Choose 1 if your Ptokax Version is lower then 0.3.3.0

--## END ##--

function Main()
frmHub:EnableFullData(1)
LoadFromFile(fHidden)
end

function OnExit()
SaveToFile(fHidden , Hidden , "Hidden")
end

function NewUserConnected(user)
if (Hidden[user.sName] ~= nil) then
SendToAll("$Quit "..user.sName)
end
if Hidden ~= nil then
for i,v in Hidden do
user:SendData("$Quit "..i)
end
end
return 1
end

OpConnected = NewUserConnected

function DataArrival(user, data)
if(strsub(data, 1, 5) == "$Quit") then
if Hidden[user.sName] == 1 then
Hidden[user.sName] = nil
if (uLaterPtokax == 1) then
OnExit()
end
end
elseif strsub(data, 1, 1) == "<" then
local data=strsub(data,1,strlen(data)-1)
local s,e,cmd = strfind(data,"%b<>%s+(%S+)")
if cmd == "!hide" and user.bOperator then
SendToAll( "$Quit "..user.sName )
Hidden[user.sName] = 1
if (uLaterPtokax == 1) then
OnExit()
end
return 1
elseif cmd == "!unhide" and user.bOperator then
SendToAll( "$Hello "..user.sName )
Hidden[user.sName] = nil
if (uLaterPtokax == 1) then
OnExit()
end
return 1
end
elseif strsub(data, 1, 8) == "$GetINFO" then
local s,e,who = strfind(data, "%$GetINFO%s+(%S+)")
if (Hidden[who] ~= nil) then
user:SendData("$Quit "..who )
return 1
end
end
end

function Serialize(tTable, sTableName, sTab)
assert(tTable, "tTable equals nil");
assert(sTableName, "sTableName equals nil");

assert(type(tTable) == "table", "tTable must be a table!");
assert(type(sTableName) == "string", "sTableName must be a string!");

sTab = sTab or "";
sTmp = ""

sTmp = sTmp..sTab..sTableName.." = {\n"

for key, value in tTable do
local sKey = (type(key) == "string") and format("[%q]",key) or format("[%d]",key);

if(type(value) == "table") then
sTmp = sTmp..Serialize(value, sKey, sTab.."\t");
else
local sValue = (type(value) == "string") and format("%q",value) or tostring(value);
sTmp = sTmp..sTab.."\t"..sKey.." = "..sValue
end

sTmp = sTmp..",\n"
end

sTmp = sTmp..sTab.."}"
return sTmp
end

function SaveToFile(file , table , tablename)
writeto(file)
write(Serialize(table, tablename))
writeto()
end

function LoadFromFile(file)
if (readfrom(file) ~= nil) then
readfrom(file)
dostring(read("*all"))
readfrom()
end
end

The Connect still miss, if anyone have any ideia please post it.

Best regards, nErBoS
--## nErBoS Spot ##--

[NL]Pur

  • Guest
(No subject)
« Reply #9 on: 30 September, 2004, 16:09:50 »
btw it's logedin
not loggedin

and yes the one who designed te protocol wasn't good in english.

PtokaX forum

(No subject)
« Reply #9 on: 30 September, 2004, 16:09:50 »