PtokaX forum

Archive => Archived 5.0 boards => Help with scripts => Topic started by: kash? on 01 July, 2005, 19:11:20

Title: Chatter Bot 1.2 Help !!!
Post by: kash? on 01 July, 2005, 19:11:20
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.3Chatter 1.3 is too much complicated and many
functiions don't work..so I wanted for script
which I am using
Title:
Post by: kash? on 01 July, 2005, 19:15:00
I wanted right click cmd to add lines, show lines
and delete lines for this script available only to
master...

Regards,
Title:
Post by: jiten on 01 July, 2005, 22:53:00
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
Title:
Post by: kash? on 04 July, 2005, 18:50:10
I tried to but I couln't understand it,
and I just don't want right click, I want addition
in that script i.e. add and delete lines which is
not in that script

Regards...
Title:
Post by: Cêñoßy†ê on 29 September, 2005, 11:25:51
QuoteOriginally posted by kash?
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

    what functions dont work?

    running 1.3 in my hub and no problems sofar.