ekter

turbine auto boot

May 3rd, 2016
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.25 KB | None | 0 0
  1. turbine = peripheral.wrap("back")
  2. energyStored = turbine.getEnergyStored()
  3.  
  4. while true do
  5.   if energyStored >= 950000 then
  6.     turbine.setActive(false)
  7.   end
  8.  
  9.   if energyStored <= 100000 then
  10.     turbine.setActive(true)
  11.   end
  12.  
  13.   sleep(1)
  14. end
Add Comment
Please, Sign In to add comment