Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Initializing..")
- if not fs.exists("cleverbot") then
- print("Downloading cleverbot API..")
- shell.run("pastebin", "get", "Dv9x1ppc", "cleverbot")
- end
- print("Loading API..")
- os.loadAPI("cleverbot")
- print("Creating bot1..")
- local bot1 = cleverbot.Cleverbot.new()
- print("Creating bot2..")
- local bot2 = cleverbot.Cleverbot.new()
- local message = ""
- local response = ""
- write("What will Bot1 say first? ")
- local starter = read()
- print("Starting conversation!")
- sleep(1)
- term.clear()
- term.setCursorPos(1,1)
- print("Bot1: " .. starter)
- response = bot1:send(starter)
- print("Bot2: " .. response)
- while true do
- message = bot1:send(response)
- print("Bot1: " .. message)
- response = bot2:send(message)
- print("Bot2: " .. response)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement