Advertisement
JesusHasselhoff

Untitled

Jul 12th, 2014
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. print("vor?")
  2. local x=io.read()
  3. print("rechts?")
  4. local y=io.read()
  5.  
  6. local invbl=0
  7. local benbl=x*y
  8. local slot=1
  9. local flag=0
  10.  
  11. for i=1,16 do
  12. invbl=invbl+turtle.getItemCount(i)
  13. end
  14.  
  15.  
  16.  
  17. if invbl >= benbl then
  18. turtle.forward()
  19. for i=1,y do
  20. for j=1,x do
  21. turtle.select(slot)
  22. turtle.placeDown()
  23. if turtle.getItemCount(slot) < 1 then
  24. slot=slot+1
  25. end
  26. turtle.forward()
  27. end
  28. turtle.placeDown()
  29. if turtle.getItemCount(slot) < 1 then
  30. slot=slot+1
  31. end
  32. if flag==0 then
  33. turtle.turnRight()
  34. turtle.forward()
  35. turtle.turnRight()
  36. flag=1
  37. else
  38. turtle.turnLeft()
  39. turtle.forward()
  40. turtle.turnLeft()
  41. flag=0
  42. end
  43. end
  44. else
  45. print("zu wening blรถcke")
  46. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement