Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for a, b in pairs(rs.getSides()) do
- if peripheral.getType(b) == "manipulator" then
- chat = peripheral.wrap(b)
- break
- end
- end
- for a, b in pairs(rs.getSides()) do
- if peripheral.getType(b) == "modem" then
- rednet.open(b)
- break
- end
- end
- while true do
- local _, player, message, uuid = os.pullEvent("chat_message")
- if message:find("[?!~`]day") then
- -- TODO send to client
- chat.say("Setting time to day...")
- elseif message:find("[?!`~]night") then
- -- TODO send to client
- chat.say("Setting time to night...")
- elseif message:find("[?!`~]clear") then
- -- TODO send to client
- chat.say("Clearing the weather...")
- elseif message:find("[?!`~]rain") then
- -- TODO send to client
- chat.say("Makin' it rain ;)")
- elseif message:find("[?!`~]storm") then
- -- TODO send to client
- chat.say("Creating a storm...")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment