Version = "1.2"
assert(require("ChatterBot/Settings.ini"), "ChatterBots main settings file is missing!!")
assert(require("ChatterBot/Lines.lua"),"Talk line file is missing!!")
--$UserCommand 1 X Where -> 1=Hub Menu 2=User Menu 3=Hub/User Menu
--
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
---------------------------------------------
plz don't want to knw abt chatter 1.3
Chatter 1.3 is too much complicated and many
functiions don't work..so I wanted for script
which I am using
QuoteOriginally posted by kash?
I wanted right click cmd to add lines, show lines
and delete lines for this script available only to
master...
Regards,
You should try to understand and learn how to add rightclick to your scripts.
For that you could use the RightClick in the Lua 5 How-To section and the modded scripts with them (requested by yourself).
Best regards,
jiten
QuoteOriginally posted by kash?
plz don't want to knw abt chatter 1.3Chatter 1.3 is too much complicated and many
functiions don't work..so I wanted for script
which I am using
what functions dont work?
running 1.3 in my hub and no problems sofar.