Advertisement
natie3

MazeBuilder

Nov 29th, 2019
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.72 KB | None | 0 0
  1. args = {...}
  2. os.loadAPI("moveAPI.lua")
  3.  
  4. amount = tonumber(args[1])
  5.  
  6. function select(item)
  7.   local slot = item * 3 - 2
  8.   turtle.select(slot)
  9.   if turtle.getItemCount() < 10 then
  10.     turtle.select(slot + 1)
  11.     turtle.transferTo(slot)
  12.     turtle.select(slot + 2)
  13.     turtle.transferTo(slot)
  14.     turtle.select(slot)
  15.   end
  16. end
  17.  
  18. function place()
  19.   select(1)
  20.   moveAPI.move("pu pd b pf r pu pd b pf tl")
  21.   select(2)
  22.   moveAPI.move("pu pd b pf b b r")
  23.   select(1)
  24.   moveAPI.move("pu pd b pf tl")
  25.   select(2)
  26.   moveAPI.move("pu pd b pf")
  27.   select(1)
  28.   moveAPI.move("pu pd b pf tr")
  29.   select(3)
  30.   moveAPI.move("d pf u pf u pf d tl")
  31.   select(1)
  32.   moveAPI.move("pu pd b pf")
  33. end
  34.  
  35. for i = 1, amount do
  36.   place()
  37. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement