Advertisement
nauseant

TurtleGoldCoinSorter

May 2nd, 2024 (edited)
670
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | Gaming | 0 0
  1. function startingFace()
  2.     local success, data = turtle.inspect()
  3.     if success  == true and data.name ~= "thermal:machine_press" then
  4.         turtle.turnLeft()
  5.         startingFace()
  6.     end
  7. end
  8.  
  9. function swapStorage()
  10.     local coin = turtle.getItemCount()
  11.     while coin < 1 do
  12.         turtle.suckDown()
  13.         coin = turtle.getItemCount()
  14.     end
  15.     turtle.drop()
  16.     turtle.turnLeft()
  17. end
  18.  
  19. function main()
  20.     turtle.turnLeft()
  21.     swapStorage()
  22. end
  23.  
  24. startingFace()
  25. while true do
  26.     main()
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement