Advertisement
Guest User

Cheese.lua

a guest
Dec 15th, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.94 KB | None | 0 0
  1. local soy
  2. local salt
  3. local space
  4. soy = true
  5. salt = true
  6. space = true
  7. while(salt and soy and space)
  8. do
  9.     while(turtle.getItemCount(2) < 1 and soy)
  10.     do
  11.         turtle.select(2)
  12.         if(not turtle.suckUp(64))
  13.         then
  14.             soy = false
  15.         end
  16.     end
  17.     while(turtle.getItemCount(3) < 1 and salt)
  18.     do
  19.         turtle.select(3)
  20.         if(not turtle.suck(64))
  21.         then
  22.             salt = false
  23.         end
  24.     end
  25.     if(soy and salt)
  26.     then
  27.         turtle.select(4)
  28.         if(turtle.getItemCount(4) >= 1)
  29.         then
  30.             if(not turtle.dropDown())
  31.             then
  32.                 space = false
  33.             end
  34.         end
  35.         if(space)
  36.         then
  37.             turtle.craft()
  38.         else
  39.             print("No more space")
  40.         end
  41.     else
  42.         if(soy)
  43.         then
  44.             print("No Salt")
  45.         else
  46.             print("No Soy")
  47.         end
  48.     end
  49. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement