Maxstripe

EnderchestRobber

Dec 18th, 2014
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.80 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.         break
  6.     end
  7. end
  8.  
  9.  
  10. while true do
  11.     term.setTextColor(colors.blue)
  12.     for i = 0, 15 do
  13.         b1 = 2^i
  14.         for k = 0, 15 do
  15.             b2 = 2^k
  16.             for v = 0, 15 do
  17.                 b3 = 2^v
  18.                 chest.setColors(b1,b2,b3)
  19.                 for slot, qty in pairs(chest.getAllStacks()) do
  20.                     if chest.pushItem("down", slot) >= 1 then
  21.                         items = true
  22.                     end
  23.                 end
  24.                 if items then
  25.                     write("Items found in: ")
  26.                     term.setBackgroundColor(b1)
  27.                     write(" ")
  28.                     term.setBackgroundColor(b2)
  29.                     write(" ")
  30.                     term.setBackgroundColor(b3)
  31.                     print(" ")
  32.                     term.setBackgroundColor(colors.black)
  33.                     items = false
  34.                 end
  35.             end
  36.         end
  37.     end
  38. end
Add Comment
Please, Sign In to add comment