Advertisement
RLPGhost

Vidage Inventaire

Feb 4th, 2015
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.73 KB | None | 0 0
  1. -- Vidage inventaire coffre Thermal par RLP Ghost :)
  2.  
  3. local premierSlot = 1
  4. local dernierSlot = 13
  5. local thermalChestSlot = 14
  6.  
  7. function videInventaire()   -- if turtle.getItemCount(dernierSlot) > 0
  8.  
  9.         local slot
  10.         if turtle.detectDown() then turtle.digDown() end
  11.         turtle.select(thermalChestSlot)
  12.         turtle.placeDown()
  13.         for slot=premierSlot,dernierSlot do
  14.                 turtle.select(slot)
  15.                 while turtle.getItemCount(slot) > 0 do
  16.                         turtle.dropDown(turtle.getItemCount(slot))
  17.                         if turtle.getItemCount(slot) > 0 then
  18.                                 sleep(0.5)
  19.                         end
  20.                 end
  21.         end
  22.  
  23.         turtle.select(thermalChestSlot)
  24.         turtle.digDown()
  25. end
  26.  
  27.  
  28. while true do
  29.     if turtle.getItemCount(dernierSlot) > 0 then videInventaire() end
  30. sleep(2);
  31. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement