Advertisement
Guest User

feed

a guest
Feb 7th, 2016
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.30 KB | None | 0 0
  1. print("began")
  2. local num = ...
  3. print("1")
  4. local count = tonumber(num)
  5. print("2")
  6. local halfCrafts = count/6
  7. print("3")
  8. local halfPlanks = halfCrafts*3
  9. print("4")
  10. local chestPlanks = count*7
  11. print("5")
  12. local totalPlanks = halfPlanks+chestPlanks
  13. print("6")
  14. local totalWood = math.ceil(totalPlanks/4)
  15.  
  16. print("blah")
  17. print("you will need ")
  18. print(tostring(totalWood+count*7))
  19. print(" wood. Do you have it? y/n")
  20.  
  21. if "y" == "y" then
  22.  
  23.   turtle.select(16)
  24.   turtle.turnLeft()
  25.   turtle.suck(totalWood)
  26.   turtle.turnRight()
  27.  
  28.   turtle.craft()
  29.   turtle.transferTo(1,count)
  30.   turtle.transferTo(2,count)
  31.   turtle.transferTo(3,count)
  32.   turtle.transferTo(5,count)
  33.   turtle.transferTo(7.count)
  34.   turtle.transferTo(9,count)
  35.   turtle.transferTo(10,count)
  36.   turtle.transferTo(11,count)
  37.  
  38.   turtle.turnRight()
  39.   turtle.drop()
  40.   turtle.turnLeft()
  41.  
  42.   turtle.select(1)
  43.   turtle.craft()
  44.   turtle.dropUp()
  45.  
  46.   turtle.select(16)
  47.   turtle.turnRight()
  48.   turtle.suck()
  49.   turtle.turnLeft()
  50.  
  51.   turtle.transferTo(1,math.ceil(halfCrafts))
  52.   turtle.transferTo(2,math.ceil(halfCrafts))
  53.   turtle.transferTo(3,math.ceil(halfCrafts))
  54.   turtle.dropUp()
  55.  
  56.   turtle.select(1)
  57.   turtle.craft()
  58.   turtle.dropUp()
  59.  
  60.   turtle.turnLeft()
  61.   turtle.suck(count*7)
  62.   turtle.dropUp()
  63.   turtle.turnRight()
  64.  end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement