LewdLamb

Untitled

Jan 12th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 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.pushItem("down", slot) >= 1 then
  27. items = true
  28. end
  29. end
  30. if items then
  31. term.write("Items found in: ")
  32. term.setBackgroundColor(b1)
  33. term.write(" ")
  34. term.setBackgroundColor(b2)
  35. term.write(" ")
  36. term.setBackgroundColor(b3)
  37. print(" ")
  38. term.setBackgroundColor(colors.black)
  39. items = false
  40. end
  41. end
  42. end
  43. end
  44. end
Add Comment
Please, Sign In to add comment