Guest User

Untitled

a guest
Jan 23rd, 2013
952
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. m = peripheral.wrap("left")
  2.  
  3. redstone.setOutput("top", true)
  4. redstone.setOutput("bottom", false)
  5.  
  6. g = m.get()
  7.  
  8. if (g["Energy Stored"]) then
  9.     print("Cube Startup - Energy Stored")
  10.     redstone.setOutput("top", true)
  11.     redstone.setOutput("bottom", false)
  12. end
  13.  
  14. while true do
  15.  
  16.   g = m.get()
  17.  
  18.   if (g["No Energy"]) then
  19.     print("Cube Empty - Engines Online")
  20.     redstone.setOutput("top", false)
  21.     redstone.setOutput("bottom", true)
  22.   end
  23.  
  24.   if (g["Full Energy"]) then
  25.     print("Cube Full - Engines Offline")
  26.     redstone.setOutput("top", true)
  27.     redstone.setOutput("bottom", false)
  28.   end
  29.  
  30.   sleep(6)
  31.  
  32. end
Advertisement
Add Comment
Please, Sign In to add comment