Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local side = "back"
- local battery = "xu2:tilepowerbattery_0"
- local function energy(x) return peripheral.call(x, "getEnergyStored") / peripheral.call(x, "getEnergyCapacity") end
- while true do
- rs.setOutput(side, energy(side) < 0.9 or energy(battery) < 0.3)
- sleep(3)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement