This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
133spider's profile picture

Jarvis [MoarPeripherals Chatbox Program]

Started by 133spider, 19 January 2015 - 10:50 PM
133spider #1
Posted 19 January 2015 - 11:50 PM
Coded this a long time ago, figured it was time to release it.
(NOTE: This program is a modified program of what I had originally coded on the CC server LuaLand. I removed lots of code/features to make it simpler and cleaner)
Do with it what you will.

Read Before Using
@ You need MoarPeripherals Chatbox Peripheral in order to use this
@ You must edit the program and change
 assets = { owner = "Your name here" } 
to your username
@ For the translation, you're going to have to find your own translating api (Sorry)
Spoiler

["@jarvis.pTranslate"] = function(msg)
	-- orig, language = msg:match("([^%d]+) to ([%a]+)")
	-- query = http.get( insert translator here )
	-- got = query.readAll()
	-- sys.respond(got)
	sys.respond("Not yet implemented")
  end

@ If you want to change the name Jarvis to a different one:
edit the program and change
assets = { progName = "Jarvis" }
to whatever you like

@ To use this program, you must send a message in the chat with this format: (assigned progName) (command) —> Jarvis toggle/enable/engage/turn on/anything here silent mode
(Yeah… I'm not the best explainer out there)

Pastebin
pastebin get WYnDYDU6 jarvis
Edited on 21 January 2015 - 08:03 PM
Exerro #2
Posted 20 January 2015 - 05:13 PM
Awesome, I was amazed when Requiem made a door that opened and closed by typing into the chat, and this seems like an extended version of that.

Regarding the "get function name" issue you have, you should look up pairs(). Try this little snippet in a Lua prompt:

for k,v in pairs(table)do print(k)end
133spider #3
Posted 21 January 2015 - 09:03 PM
Awesome, I was amazed when Requiem made a door that opened and closed by typing into the chat, and this seems like an extended version of that.

Regarding the "get function name" issue you have, you should look up pairs(). Try this little snippet in a Lua prompt:

for k,v in pairs(table)do print(k)end

Ah, I'm stupid I realized what I did wrong
I kept returning the v variable instead of the k variable
LeviM #4
Posted 31 January 2015 - 01:08 AM
I made my own version of this about a week ago… I should have beat you too it and put mine up here. I called mine 'Cortana'.