LewdLamb

ChestColor

Jan 12th, 2018
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.02 KB | None | 0 0
  1. for a,b in pairs(rs.getSides()) do
  2.          if peripheral.getType(b) == "ender_chest" then
  3.          chest = peripheral.wrap(b)
  4.          print("Found Chest on "..b.." side")
  5.      end
  6.      if peripheral.getType(b) == "monitor" then
  7.         screen = peripheral.wrap(b)
  8.         term.redirect(screen)
  9.         term.clear()
  10.         term.setCursorPos(1,1)
  11.         print("Found monitor on "...b..." side")
  12.      end
  13. end
  14. while true do
  15.  term.setTextColor(colors.blue)
  16.  for i = 0, 15 do
  17.    b1 = 2^i
  18.    for k = 0, 15 do
  19.      b2 = 2^k
  20.      for v = 0, 16 do
  21.         b3 = 2^v
  22.  
  23.    chest.setColors(b1,b2,b3)
  24.    for slot, qty in pairs(chest.getAllStacks()) do
  25.    if chest.pushItem("down", slot) >= 1 then
  26.    items = true
  27.   end
  28.  
  29. end
  30.    if items = true
  31.    end
  32. end
  33. if items then
  34.  term.write("Items found in: ")
  35.   term.setBackgroundColor(b1)
  36.    term.write(" ")
  37.     term.setBackgroundColor(b2)
  38.      term.write(" ")
  39.       term.setBackgroundColor(b3)
  40.       print(" ")
  41.       term.setBackgroundColor(colors.black)
  42.  
  43. items = false
  44. end
Add Comment
Please, Sign In to add comment