Advertisement
Guest User

wither

a guest
Mar 13th, 2021
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. chest = peripheral.wrap("right")
  2. chest.condenseItems()
  3.  
  4. local ok=2
  5.  
  6. while ok==2 do
  7. ok=0
  8.  
  9. for i=1,27 do
  10.   if chest.getStackInSlot(i)~=nil and ok==0 then
  11.     local slot = chest.getStackInSlot(i)
  12.     print(slot.name.." is in slot "..i)
  13.     if slot.name=="soul_sand" then
  14.       print("Pushing soul sand down from "..i)
  15.       chest.pushItem("down",i,4)
  16.       ok=1
  17.     end
  18. --  else
  19. --    print ("slot "..i.." is empty.")
  20.   end
  21. end
  22.  
  23. sleep(1)
  24.  
  25. for i=1,27 do
  26.   if chest.getStackInSlot(i)~=nil and ok==1 then
  27.     local slot = chest.getStackInSlot(i)
  28.     print(slot.name.." is in slot "..i)
  29.     if slot.name=="skull" then
  30.       print("Pushing skull down from "..i)
  31.       chest.pushItem("down",i,3)
  32.       ok=2
  33.     end
  34.   end
  35. end
  36.  
  37. sleep(3)
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement