Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local messages = {}
- local keywords =
- {
- "Hi", "Hello", "Hey", "Hello", "Noob", "Right back at ya", "Goodbye", "Cya", "do","end","function","while","repeat","until","if","then","elseif","then","else","for","in","local","return","break",
- "nil","false","true",
- "%.%.%.","==","~=","%.%.","<=",">=","and","or","not",
- "[-+;.:+*/,=%[%]%(%)%<%>%^%%#{}]", ">.<", "<_>", "O_o",
- "I know, that was my reaction too!", "Fart", "*toot*"
- }
- --Format:
- --"What you say", "What they say"
- rednet.open("right")
- while true do
- term.clear()
- term.setCursorPos(1,1)
- print("SmartTurtle v1.0")
- local x,y = term.getSize()
- print("\nTurtle: Hello.")
- for i = 1,#messages do
- print(messages[i])
- end
- term.setCursorPos(1,y)
- write("> ")
- input = read()
- messages[#messages+1] = "- You: " ..input
- term.setCursorPos(1,#messages+4)
- write("- You: " ..input)
- rednet.broadcast(input)
- term.setCursorPos(1, y-1)
- term.clearLine()
- term.setCursorPos(1, y)
- print("Waiting...")
- repeat
- id, message = rednet.receive()
- until id == 324
- messages[#messages+1] = "Turtle: " ..message
- end
Advertisement
Add Comment
Please, Sign In to add comment