i want a script to display message in box under chat
a message in a box under chat????, could u explain better?
QuoteOriginally posted by Dessamator
a message in a box under chat????, could u explain better?
hey m8,
box under chat means the box below where you type in hub
or
where it is written "Stored password sent.."
QuoteOriginally posted by dkt
QuoteOriginally posted by Dessamator
a message in a box under chat????, could u explain better?
hey m8,
box under chat means the box below where you type in hub
or
where it is written "Stored password sent.."
hmm, so u want a simple script that sendsa msg in something shaped like a box?
I think dkt means a script that displays a message where the kick messages get displayed(just under the main chat)
QuoteOriginally posted by (uk)jay
I think dkt means a script that displays a message where the kick messages get displayed(just under the main chat)
Indeed :D
He wants the message to be displayed in the StatusBar under the ChatLine.
I think it can not be done...
//NL
QuoteOriginally posted by NightLitch
He wants the message to be displayed in the StatusBar under the ChatLine.
I think it can not be done...
//NL
Only if 'Filter kick...' is on, and it should be a RAW like "*** anything"
Status field in dc based klients - earlier used by flooders
well, in theory it can be done, although all messages will include for eg."x is kicking x because: happy birthday", :), either way thats a client thing , cant be scripted without adding that kicking msg !!
QuoteOriginally posted by (uk)jay
I think dkt means a script that displays a message where the kick messages get displayed(just under the main chat)
yeah right m8
QuoteOriginally posted by NightLitch
He wants the message to be displayed in the StatusBar under the ChatLine.
I think it can not be done...
//NL
it can be done m8....
just check out the chatter bot 1.3....
theres an option to display in box under hub chat..
but it gives this error
Syntax cannot read lines.tbl: No such file or directory
i have seen this in a hub...i asked the owner of tat hub ...which script is tat ..he said chatter bot 1.2..i searched here on forums for chatter bot 1.2..but didnt found..if any1 founds here pls inform me...u know guys even the current date day and time is also displayed and also ur edited messages are displayed....
hmmm, maybe hes right on my dc++, it has an option to filter nmdc debug msgs, and kick msgs, maybe if we can emulate an nmdc debug msg, it might work !, then again i might be wrong, some clients other might not do that :)
--By Dessamator
--" Box Msg" sender v1
--Idea from Chatterbot
--request by dkt
bot=frmHub:GetHubBotName() --bots name
function ChatArrival(user,data)
data= string.sub(data,1,string.len(data)-1)
s,e,cmd,msg = string.find(data,"%b<>%s+(%S+)%s+(.*)")
if msg then
if cmd =="!sendmsg" and string.len(msg)<120 then
SendToAll("\t"..msg..string.rep("\t",11).." is kicking because:")
return 1
elseif string.len(msg)>120 then
user:SendData(bot,"Message too long !")
return 1
end
end
end
Done!
"Theory becomes reality", :)
QuoteOriginally posted by Dessamator
--By Dessamator
--" Box Msg" sender v1
--Idea from Chatterbot
--request by dkt
bot=frmHub:GetHubBotName() --bots name
function ChatArrival(user,data)
data= string.sub(data,1,string.len(data)-1)
s,e,cmd,msg = string.find(data,"%b<>%s+(%S+)%s+(%S+)")
if msg then
if cmd =="!sendmsg" and string.len(msg)<120 then
SendToAll("\t"..msg..string.rep("\t",11).." is kicking because:")
return 1
elseif string.len(msg)>120 then
user:SendData(bot,"Message too long !") return 1
end
end
end
Done!
"Theory becomes reality", :)
good one !! working fine !!
but if u type !sendmsg welcome to dkt's hub, thn it shows only welcome..i mean the only the first word is shown..
i want this script to show as many lines u want stored or saved somewhere to be displayed under hub chat box at regular intervals ( say one minute ).
is it possible ?
hmm, first bug fixed, now u want to send one line at a time, at regular interval, or randomly?
QuoteOriginally posted by Dessamator
hmm, first bug fixed, now u want to send one line at a time, at regular interval, or randomly?
one line at a time at regular intervals ( for e.g. one minute )
--By Dessamator
--"Box Msg" sender v1.2
--Idea from Chatterbot
--request by dkt
tLines = {n=0}
--Config
bot=frmHub:GetHubBotName() --bots name
Filename = "boxmsgs.txt" -- enter filename
Time = 10 -- enter time in minutes
TimerOn =false -- true to send box msg at intervals
--
function Main()
local file=io.open(Filename,"r")
if not(file) then
io.output(Filename)
io.close()
io.output()
end
if TimerOn then
SetTimer(60000*Time)
StartTimer()
end
end
function ChatArrival(user,data)
data= string.sub(data,1,string.len(data)-1)
s,e,cmd,msg = string.find(data,"%b<>%s+(%S+)%s+(.*)")
if msg then
if cmd =="!sendmsg" and string.len(msg)<120 then
SendToAll("\t"..msg..string.rep("\t",11).." is kicking because:")
return 1
elseif cmd == "!addboxmsg" then
addline(Filename, msg)
user:SendData(bot,"Done ,added box msg!")
return 1
elseif string.len(msg)>120 then
user:SendData(bot,"Message too long !")
return 1
end
end
end
function OnTimer()
GetLines(Filename)
for pos,line in tLines do
if tonumber(pos) and line and i then
if tonumber(pos)<=i then
temp=line
end
elseif not(i) or i==table.getn(tLines) then
i=1
end
end
if temp then
i=i+1
SendToAll("\t"..temp..string.rep("\t",11).." is kicking because:")
end
end
function GetLines(filename)
tLines =nil
tLines = {n=0}
local file = io.open(filename, "r")
for line in file:lines() do
table.insert(tLines, line)
end
file:close()
end
function addline(filename,msg)
local file = io.open(filename, "a+")
file:write("\n"..msg)
file:close()
end
Done !
thanks m8..all working fine...gr8 job man !! keep it up :)
ur welcome ! :]
get this error
!sendmsg works
Syntax cannot read lines.tbl: No such file or directory
hmm, i dont get that error, when does it happen, did u use any command? and theres no line.tbl in my script , so i assume u renamed the
Filename = "boxmsgs.txt"
i need more info to be able to solve it, btw try copying it again,im quite sure u copied an older version of the script,or u messed with something in it-
the script creates the file at start, and thus that should never happen , anyways if copying it again fails, try posting ur modded script here!
-- Chatterbot 1.2 [Mod from Mutors Random chatter]
Bot = "????Chatter????" -- Name for bot --
cMenu = "?~Chatter~?" -- RightClick menu name --
Where = 2 -- Where you want messages go 2=topic 1=main 0=box under chat
Mins = 10 -- Interval [in minutes] between messages
CommOn = "!advon" -- Command for Start the script
CommOff = "!advoff" -- Command for Stop the script
StartOn = "0" -- Start script on start 1=on 0=off
SendComm = 1 -- RightClick commands on/off 1=on 0=off
Version = "1.2"
SetTo = {
[0] = 1, -- Masters -- Give right click commands 1=yes 0=no
[1] = 1, -- Operators -- Give right click commands 1=yes 0=no
[4] = 1, -- Moderator -- Give right click commands 1=yes 0=no
[5] = 1, -- NetFounder -- Give right click commands 1=yes 0=no
}
local tmp = os.clock()
local days, hours, minutes = math.floor(tmp/86400), math.floor(math.mod(tmp/3600, 24)), math.floor(math.mod(tmp/60, 60))
Lines = {
"Check our network forum at [URL]http://knightvision.no-ip.org[/URL]",
"This hub is member of ?-=[K?igh?Visio?.::.?e?WorX]=-?",
"We currently have "..string.format("%.2f TB",frmHub:GetCurrentShareAmount()/(1024 * 1024 * 1024 * 1024)).." of stuff here.",
"Powered With PtokaX DC Hub 0.3.3.0 build 16.09a with Lua 5.02",
""..frmHub:GetUsersCount().." of "..frmHub:GetMaxUsers().." maximum users connected",
"Today is "..os.date("%A %d %B %Y ").."",
"My uptime is now "..days.." Days "..hours.." Hours and "..minutes.." Minutes",
"This Hub is running with Robocop 10.01c - Made by Optimus",
"You can add your friends with command !regop ",
"Our user record is "..frmHub:GetMaxUsersPeak().." users",
"Hi.. im ChatterBot V:"..Version.." made by C??o?y??",
}
function NewUserConnected(user)
SendToAll(MyInfoString)
if SendComm == 1 and SetTo[user.iProfile] == 1 then
user:SendData("$UserCommand 1 3 "..cMenu.."\\?~Chatter bot v"..Version.."~?$<%[mynick]> "..CommOn.."||")
user:SendData("$UserCommand 1 3 "..cMenu.."\\Turn chatter on$<%[mynick]> "..CommOn.."||")
user:SendData("$UserCommand 1 3 "..cMenu.."\\Turn chatter off$<%[mynick]> "..CommOff.."||")
user:SendData("$UserCommand 1 3 "..cMenu.."\\Bot version$<%[mynick]> !cvers||")
end
end
OpConnected = NewUserConnected
function Main()
SetTimer(Mins*60000)
if StartOn == "1" then
StartTimer()
end
end
function ChatArrival(user, data)
s,e,cmd = string.find(data, "%b<>%s+(%S+)(%S+)")
if (cmd==CommOn) and user.bOperator then
user:SendData(Bot," Started ?? Messages will be shown in every "..Mins.." minute/s. Type '"..CommOff.."' to stop me.")
StartTimer()
return 1
elseif (cmd==CommOff) and user.bOperator then
StopTimer()
user:SendData(Bot," Stopped ?? Type "..CommOn.." to start me again.")
return 1
elseif (cmd=="!cvers") and user.bOperator then
user:SendData(Bot,"hello i am ChatterBot v: "..Version.." made by C??o?y??")
return 1
end
end
function OnTimer()
local RandomChat = Lines[math.random(1, table.getn(Lines))]
if Where==1 then
SendToAll(Bot,"\n\r\n\t"..RandomChat.."\r\n")
elseif Where==2 then
frmHub:SetHubTopic(RandomChat)
elseif Where==0 then
SendToAll("\t"..RandomChat.."\t\t\t\t\t\t\t\t\t\t\t is kicking because:")
end
end