PtokaX forum

Archive => Archived 5.0 boards => Finished Scripts => Topic started by: 6Marilyn6Manson6 on 09 October, 2005, 15:05:44

Title: Lance Evol v1.00
Post by: 6Marilyn6Manson6 on 09 October, 2005, 15:05:44
--Lance Evol v1.00 Lua 5
--Hider Bot, this one does not give the nick taken error ;)
--Written by Phatty 12th December 2k3
--Need to table.sort the Logged in LogedIn not work neither any ideas?
--Reminded by tezlo thanx, fixed $Hello
--//Converted by 6Marilyn6Manson6 by 10/09/2005
-- Added Registration of Bot in UserList6Marilyn6Manson6
-- Small buf fixed with commands by 6Marilyn6Manson6

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

function Main()
frmHub:RegBot(Bot)
end

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 ChatArrival(user, data)
if(string.sub(data, 1, 4) == "$Quit ") then
if Hidden[user.sName] == 1 then
Hidden[user.sName] = nil
end
end
if string.sub(data, 1, 1) == "<" then
data=string.sub(data,1,string.len(data)-1)
s,e,cmd = string.find(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( "$Hello "..user.sName )
Hidden[user.sName] = nil
end
end
end
end

C ya
Title:
Post by: Thor on 09 October, 2005, 17:11:38
I have a  little problem with this great script: when i "go back" to the userlist, my nick is on the bottom of the userlist. But when i refresh the userlist, it takes me back to up. So if it's possible, take a command to in, which is refresh the userlist for all. Thx
Title:
Post by: 6Marilyn6Manson6 on 09 October, 2005, 17:45:57
Try this:

--Lance Evol v1.1
--Converted by 6Marilyn6Manson6 by 10/09/2005
--Rewrite all code by 6Marilyn6Manson6
--Added Registration of Bot in UserList by 6Marilyn6Manson6
--Small buf fixed with refresh userlist by 6Marilyn6Manson6 (tnk Hungarista)
--Commands1: !hide   -- for Hide nick in userlist
--Commands2: !unhide   -- for unHide nick in userlist

Bot = "?????R"

function Main()
frmHub:RegBot(Bot)
end

ChatArrival = function(user, data)
local s, e, cmd,victim = string.find( data, "%b<>%s+(%S+)%s+(.*)")
if cmd == "!hide" then
if (user.iProfile == 0) then
SendToAll("*** Ghost mode activated to "..victim)
SendToAll("$Quit "..victim)
end
return 1
end
local s, e, cmd,victim = string.find( data, "%b<>%s+(%S+)%s+(.*)")
if cmd == "!unhide" then
if (user.iProfile == 0) then
SendToAll("*** Ghost mode disabled from "..victim)
SendToAll("$OpList "..victim)
end
return 1
end
end

c ya