PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: Loading on 05 July, 2005, 23:16:48

Title: ScreenCleaner
Post by: Loading on 05 July, 2005, 23:16:48
hi ppl

can anyone make this script
with this :

CanDo = {
   --ScreenCleaner.lua 1.1 by yepyepyep4711 and Hawk
    --!cls will wipe the main chat clean (does that remind you of something? ;) )
    --the command will be added to the rightclick menu of the OPs (optional)

    botname = "?Robocop?"

    rightclick = 1 -- if anything else than 1 rightclick menu won't appear

    function MyINFOArrival(curUser, sData)
    command=string.sub(sData,1,string.len(sData)-1)
    s,e,cmd = string.find(command,"%b<>%s+(%S+)")
    if curUser.bOperator then
    if cmd=="!cls" then
    temp = "\r\n"
    SendToAll(botname, string.rep(temp,200))
    end
    end
    end

    function OpConnected(curUser)
    if rightclick == 1 then
    curUser:SendData("$UserCommand 255 7")
    curUser:SendData("$UserCommand 0 3")
    curUser:SendData("$UserCommand 1 2 Clear Screen$<%[mynick]> !cls|")
    end
    end

best regards

Loading
Title:
Post by: blackwings on 05 July, 2005, 23:37:47
done = --ScreenCleaner.lua 1.1 by yepyepyep4711 and Hawk
--!cls will wipe the main chat clean (does that remind you of something? ;) )
--the command will be added to the rightclick menu of the OPs (optional)

botname = "?Robocop?"

CanDo = {
[0] = 1, -- Master
[1] = 1, -- Operator
[2] = 1, -- VIP
[3] = 0, -- Reg
[4] = 0, -- Moderator
[5] = 1, -- Netfounder
[-1] =0, -- User
}

rightclick = 1 -- if anything else than 1 rightclick menu won't appear

function MyINFOArrival(curUser, sData)
command=string.sub(sData,1,string.len(sData)-1)
s,e,cmd = string.find(command,"%b<>%s+(%S+)")
if CanDo[curUser.iProfile]==1 then
if cmd=="!cls" then
temp = "\r\n"
SendToAll(botname, string.rep(temp,200))
end
end
end

function OpConnected(curUser)
if rightclick == 1 then
curUser:SendData("$UserCommand 255 7")
curUser:SendData("$UserCommand 0 3")
curUser:SendData("$UserCommand 1 2 Clear Screen$<%[mynick]> !cls|")
end
end
Title:
Post by: ??????Hawk?????? on 05 July, 2005, 23:49:03

    --ScreenCleaner.lua 1.1 by yepyepyep4711 and ??????Hawk??????
    --!cls will wipe the main chat clean (does that remind you of something? ;) )
    --the command will be added to the rightclick menu of the OPs (optional)

CanDo = {
[0] = 1, -- Master
[1] = 1, -- Operator
[2] = 1, -- VIP
[3] = 0, -- Reg
[4] = 0, -- Moderator
[5] = 1, -- Netfounder
[-1] =0, -- User
}


function ChatArrival(curUser, sData)
    sData=string.sub(sData,1,string.len(sData)-1)
    local _,_,cmd = string.find(sData,"%b<>%s+(%S+)")
    if cmd and cmd=="!cls" and CanDo[curUser.iProfile] == 1 then
    SendToAll("Cleaner",string.rep("\r\n\r\n",2000))
return 1
end
end

function OpConnected(curUser)
    if CanDo[curUser.iProfile] == 1 then
    curUser:SendData("$UserCommand 255 7")
    curUser:SendData("$UserCommand 1 3 Clear Screen$<%[mynick]> !cls|")
    end
end



hehehe it amazes me how scripts can start life as a perfectly good running script, Go around dc for a few months and the return here looking so messed up  ..lol

ChatArrival is needed for this not MyINFOArrival


 pls keep bringing these old script back just so we can give them a service and send them out working again  ...  :D  :D  :D

OR  you could search the board and get the origional ones  before they did their HARSH rounds on DC land..

Have fun peep  
Title:
Post by: Loading on 05 July, 2005, 23:56:50
hi

tanks for the modification in the script

but the script don't work

i have the script configurated like this:

--ScreenCleaner.lua 1.1 by yepyepyep4711 and ??????Hawk??????

--!cls will wipe the main chat clean (does that remind you of something? ;) )

--the command will be added to the rightclick menu of the OPs (optional)

--converted & more compact by blackwings





botname = "?CIA??"


CanDo = {

[0] = 1, -- Master

[1] = 1, -- Operator

[2] = 1, -- VIP

[3] = 1, -- Reg

[4] = 1, -- Moderator

[5] = 1, -- Netfounder

[-1] =0, -- User

}



rightclick = 0 -- if anything else than 1 rightclick menu won't appear



function MyINFOArrival(curUser, sData)

command=string.sub(sData,1,string.len(sData)-1)

s,e,cmd = string.find(command,"%b<>%s+(%S+)")

if CanDo[curUser.iProfile]==1 then

if cmd=="!cls" then

temp = "\r\n"

SendToAll(botname, string.rep(temp,200))

end

end

end



function OpConnected(curUser)

if rightclick == 1 then

curUser:SendData("$UserCommand 255 7")

curUser:SendData("$UserCommand 0 3")

curUser:SendData("$UserCommand 1 2 Clear Screen$<%[mynick]> !cls|")

end

end

i run the comand and nothing hapens  :(

best regards

Loading
Title:
Post by: ??????Hawk?????? on 05 July, 2005, 23:58:44
use the one i posted then   :P  :P  :P
Title:
Post by: Loading on 06 July, 2005, 00:13:52
hi

it works

tanks Hawk :)

best regards

Loading
Title:
Post by: ??????Hawk?????? on 06 July, 2005, 00:33:44
y/w  ;)
Title:
Post by: kunal on 12 July, 2005, 14:53:28
can the script be modified so that the screen is automatically cleaned maybe after every 30 min
Title:
Post by: blackwings on 12 July, 2005, 15:18:00
something like this? = botname = "ChatCleaner"

Min = 30

function Main()
SetTimer(Min*60000)
end

function OnTimer(user)
SendToAll(botname,string.rep("\r\n\r\n",500))
end
Title:
Post by: kunal on 12 July, 2005, 16:07:06
thank you m8 :]
Title:
Post by: BeeR on 12 July, 2005, 18:49:20
Hi

just an idea that popped up - dunno if this already exists

take a good antiadvertise script and add a automatic screencleaner -
that automatic erase mainchat after som1 has done a advertise

as i sad first - dunno if this already exists !!

Best Regards :]
Title:
Post by: blackwings on 12 July, 2005, 19:22:32
QuoteOriginally posted by BeeR
Hi

just an idea that popped up - dunno if this already exists

take a good antiadvertise script and add a automatic screencleaner -
that automatic erase mainchat after som1 has done a advertise

as i sad first - dunno if this already exists !!

Best Regards :]
why clear screen instead of kick ?(
Title:
Post by: Dessamator on 12 July, 2005, 20:40:17
indeed, just use return 1 to cut whatever they wrote, and kick the user
Title:
Post by: Loading on 12 July, 2005, 20:49:40
yap

is no ussless if the other users scroll up the mainchat and see what the user who make the pub wrote

the better thing is one antiadvertise

Loading
Title:
Post by: BeeR on 12 July, 2005, 22:05:22
QuoteOriginally posted by blackwings
QuoteOriginally posted by BeeR
Hi

just an idea that popped up - dunno if this already exists

take a good antiadvertise script and add a automatic screencleaner -
that automatic erase mainchat after som1 has done a advertise

as i sad first - dunno if this already exists !!

Best Regards :]
why clear screen instead of kick ?(

Maybe u missundestand me a little bit

yes - a advertiser should have a kick (atleast) for that :]

but insted of some1 with a key clear the screen its automated function AND
a cleaning ca be so many lines that no users ca scroll up and take a look :]
Title:
Post by: damo on 13 July, 2005, 19:27:06
or you could even use a advertise script so if they do post addys and such it works for you. scripts are outthere to do it but yes screen cleaner is good