Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- post_link = "http://cc.ordewittetafel.nl/reactor2.php"
- get_link = "http://cc.ordewittetafel.nl/switch_reactor2.php"
- reactor = {
- name = "Quarry",
- temperature = "not applicable"
- }
- online = 0
- while true do
- reactor.status = tostring(redstone.getInput("bottom"))
- if online < 9 then
- online = online + 1
- else
- online = 0
- end
- http.post(post_link, "reactor=" .. reactor.name .. "&status=" .. reactor.status .. "&temp=" .. reactor.temperature .. "&online=" .. online)
- output = http.get(get_link)
- doOutput = output.readAll()
- if doOutput == "true" then
- redstone.setOutput("bottom", true)
- else
- redstone.setOutput("bottom", false)
- end
- output.close()
- os.sleep(1)
- os.queueEvent("ok")
- os.pullEvent("ok")
- end
Add Comment
Please, Sign In to add comment