Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. term.write("hoelang is een chinees?:")
  2. x = read()
  3. term.write("")
  4. term.write("hoe breed is een chinees?:")
  5. y = read()
  6. function check()
  7. local sslot = 1
  8. turtle.select(sslot)
  9. sslot = (sslot%16) +1
  10. turtle.select(sslot)
  11. turtle.getItemCount(sslot)
  12. while turtle.getItemCount(sslot) <1 do
  13. sslot = (sslot%16)+1
  14. end
  15. turtle.select(sslot)
  16. end
  17.  
  18. function fw()
  19. for i = 1, x do
  20. check()
  21. turtle.placeDown()
  22. turtle.forward()
  23. end
  24. end
  25. function tr()
  26. turtle.turnRight()
  27. turtle.placeDown()
  28. turtle.forward()
  29. turtle.placeDown()
  30. turtle.turnRight()
  31. end
  32. function tl()
  33. turtle.turnLeft()
  34. turtle.placeDown()
  35. turtle.forward()
  36. turtle.placeDown()
  37. turtle.turnLeft()
  38. end
  39.  
  40. function ss()
  41. for i=1,y do
  42. fw()
  43. tr()
  44. fw()
  45. tl()
  46. end
  47. end
  48. ss()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement