Advertisement
colhaydutu

steampunk melee turtle

Apr 12th, 2024 (edited)
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. local item1 = "minecraft:air"
  2. local item2 = "minecraft:air"
  3. local item3 = "minecraft:air"
  4.  
  5. while true do
  6. local foundItemToDrop = false
  7. turtle.attack()
  8. for slot = 1, 16 do
  9. local itemDetail = turtle.getItemDetail(slot)
  10. if itemDetail and itemDetail.name ~= item1 and itemDetail.name ~= item2 and not string.match(itemDetail.name, "^" .. item3) then
  11. turtle.select(slot)
  12. turtle.drop()
  13. foundItemToDrop = true
  14. end
  15. end
  16.  
  17. if not foundItemToDrop then
  18. print("No items left to drop.")
  19. sleep(0.5)
  20. end
  21. end
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement