abc123mewot

echestsearch

Jan 12th, 2018 (edited)
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.14 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.  
  15. while true do
  16.   term.setTextColor(colors.blue)
  17.   for i = 0, 15 do
  18.     b1 = 2^i
  19.     for k = 0, 15 do
  20.       b2 = 2^k
  21.       for v = 0, 15 do
  22.         b3 = 2^v
  23.         chest.setColors(b1, b2, b3)
  24.         items = false
  25.         for slot, qty in pairs(chest.getAllStacks()) do
  26.           if chest.pullItem("down", slot) >= 1 then
  27.             print("test1")
  28.             items = true
  29.           end
  30.         end
  31.         if items then
  32.           term.write("Items found in: ")
  33.           term.setBackgroundColor(b1)
  34.           term.write(" ")
  35.           term.setBackgroundColor(b2)
  36.           term.write(" ")
  37.           term.setBackgroundColor(b3)
  38.           print(" ")
  39.           term.setBackgroundColor(colors.black)
  40.           items = false
  41.         end
  42.       end
  43.     end
  44.   end
  45. end
Advertisement
Add Comment
Please, Sign In to add comment