Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- condition = 'Excellent'
- monitor = peripheral.wrap('right')
- rednet.open('back')
- y = 1
- x = 500
- text1 = 'Time Remaining - '
- text2 = 'Until Overload'
- countdown = false
- countup = false
- monitor.clear()
- monitor.setCursorPos(1,1)
- monitor.write('Current Status - '..condition)
- --event = os.pullEvent('redstone')
- countdown = true
- while true do
- rednet.broadcast(x, 'countdown')
- rednet.broadcast(condition, 'condition')
- if countdown == true then
- x = x - 1
- sleep(0.6)
- end
- if countup == true then
- x = x + 5
- sleep(1)
- end
- if x > 1000 then
- x = 1000
- countup = false
- countdown = false
- condition = 'Perfect'
- text1 = 'Perfect'
- end
- if rs.getInput('left') == true then
- condition = 'Stable'
- text1 = 'Stabilising '
- text2 = ' '
- countdown = false
- countup = true
- for i=1, 10 do
- rednet.broadcast(x, 'lead')
- sleep(0.2)
- end
- sleep(6)
- end
- if x < 300 and x > 50 then
- condition = 'Critical'
- end
- if x < 500 and x > 490 then
- condition = 'Bad'
- end
- if x < 50 and x > 1 then
- condition = 'Danger'
- end
- if x < 1 then
- x = 0
- condition = 'BOOM!'
- end
- if rs.getInput('left') == false then
- monitor.clear()
- monitor.setCursorPos(1,1)
- monitor.write("Current Status -- ".. condition)
- monitor.setCursorPos(1,4)
- monitor.write(text1 ..x)
- monitor.setCursorPos(1,5)
- monitor.write(text2)
- sleep(0.5)
- end
- sleep()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement