Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- post_link = "http://cc.ordewittetafel.nl/reactor1.php"
- get_link = "http://cc.ordewittetafel.nl/switch_reactor1.php"
- reactor = peripheral.wrap("back")
- name = "Amunet"
- online = 0
- while true do
- if online < 9 then
- online = online + 1
- else
- online = 0
- end
- http.post(post_link, "reactor=" .. name .. "&status=" .. tostring(reactor.isActive()) .. "&temp=" .. reactor.getHeat() .. "&online=" .. online .. "&output=" .. reactor.getEUOutput())
- output = http.get(get_link)
- doOutput = output.readAll()
- if doOutput == "true" then
- redstone.setOutput("back", true)
- else
- redstone.setOutput("back", false)
- end
- output.close()
- os.sleep(1)
- os.queueEvent("ok")
- os.pullEvent("ok")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement