Posted 23 December 2015 - 02:20 AM
Just a little program to open a door when you say a selected message in chat, thanks again. - WolfyXK
also this is my first program I have posted on the forums so any advice/improvements would be much appreciated :)/>
Just place the chatbox anywhere touching the computer
also this is my first program I have posted on the forums so any advice/improvements would be much appreciated :)/>
Just place the chatbox anywhere touching the computer
pastebin get nsqR30yt startup
-- Change this code
local yourname = "WolfyXK"
local openmessage = "open" -- Make this lowercase
local doorside = "right"
local opentime = 4
--
while true do
local chat = { os.pullEvent("chat_message") }
if chat[3] == yourname and string.lower(chat[4]) == openmessage then
print("Door Opening")
rs.setOutput(doorside, true)
sleep(opentime)
term.clear()
rs.setOutput(doorside, false)
else
end
end
Edited on 24 December 2015 - 02:57 AM