Advertisement
Guest User

startup

a guest
Jun 29th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.82 KB | None | 0 0
  1. local fluids0 = {"Rocket Fuel", "Liquid xp", "Life Essence", "Bedrockium", "Primal Mana", "Draconium", "Destabilised Redstone", "Blazing Pyrotheum", "UU Matter"}
  2.  
  3. function set(col)
  4.   redstone.setBundledOutput("right", col)
  5. end
  6.  
  7. function rset(col)
  8.   redstone.setBundledOutput("right", colours.subtract(redstone.getBundledOutput("right"), col))
  9. end
  10.  
  11.  
  12. function test(col0)
  13.   if redstone.testBundledInput("back", col0) then
  14.     return false
  15.   else
  16.     return true
  17.   end
  18. end
  19.  
  20. function fill(fluid)
  21.   set(fluid)
  22.   while test(fluid) do
  23.       sleep(1)
  24.   end
  25.   rset(fluid)
  26. end
  27. ------------------------------------------------
  28.  
  29. while 1 do
  30.   for i = 0, 8, 1 do
  31.     if test(2^i) then
  32.       print("Filling " .. fluids0[i+1])
  33.       fill(2^i)
  34.     end
  35.   end
  36.   sleep(1)
  37. end
  38.  
  39. -------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement