Advertisement
Plazter

platformer

Sep 28th, 2013
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. -- Plat form builder
  2. -- Plazter v.1---
  3. --2013
  4.  
  5. slot = 1
  6.  
  7. local args = {...}
  8.  
  9.  
  10. function platform()
  11.  
  12. for i = 1,args[1] do
  13. turtle.placeDown()
  14. turtle.forward()
  15.  
  16. if turtle.getItemCount(slot) < 1 then
  17. slot = slot+1
  18. turtle.select(slot)
  19. end
  20. end
  21. end
  22.  
  23. function right()
  24. turtle.turnRight()
  25. turtle.placeDown()
  26. turtle.forward()
  27. turtle.turnRight()
  28. end
  29.  
  30.  
  31. function left()
  32. turtle.turnleft()
  33. turtle.placeDown()
  34. turtle.forward()
  35. turtle.turnLeft()
  36. end
  37.  
  38. function full()
  39. platform()
  40. right()
  41. platform()
  42. left()
  43. end
  44.  
  45. function row()
  46. for i = 1,args[2]/2 do
  47. full()
  48. end
  49. end
  50.  
  51. row()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement