Posted 18 March 2012 - 01:31 PM
Here's two sister programs I made for an airport in my singleplayer/Hamachi world. One program is for computers to broadcast messages to the monitor, and the other will print the message to the monitor and automatically time stamp it with the in-game time.
Broadcaster
Reciever
Of course, it must be changed a little to accomidate modem position and computer ID. Also, the reciever program must be run through the monitor, like "Monitor Right BoardGet" or something. The reciever program also has a redstone output bit, which I used to make a little 'ding dong' with two note blocks avec repeaters, and a light to even more so get people's attention.
This is the first program I made, as it was the first idea I got. I hope you peoples find it usefull.
Broadcaster
term.clear()
rednet.open("back")
term.setCursorPos(1,1)
print("Airport Board Updater")
message = io.read()
rednet.send(0, message)
Reciever
term.clear()
term.setCursorPos(1,1)
rednet.open("left")
while true do
id, message = rednet.receive()
redstone.setOutput("back", true)
local nTime = os.time()write(textutils.formatTime( nTime, false))
print (" - "..message)
print ()
sleep(1)
redstone.setOutput("back", false)
end
Of course, it must be changed a little to accomidate modem position and computer ID. Also, the reciever program must be run through the monitor, like "Monitor Right BoardGet" or something. The reciever program also has a redstone output bit, which I used to make a little 'ding dong' with two note blocks avec repeaters, and a light to even more so get people's attention.
This is the first program I made, as it was the first idea I got. I hope you peoples find it usefull.