Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = peripheral.wrap("right")
- m.link(2)
- local tArgs= { ... }
- local l=tonumber(tArgs[1])
- local w=tonumber(tArgs[2])
- local h=tonumber(tArgs[3])
- local function refuel()
- turtle.select(1)
- turtle.refuel(5)
- m.resupply(1)
- turtle.select(2)
- end
- local function buildForward(n)
- x = 0
- while x<n do
- if turtle.getFuelLevel()<50 then refuel() end
- m.resupply(2)
- turtle.placeDown()
- x = x + 1
- if x < n then turtle.forward() end
- end
- end
- z = 0
- turtle.select(2)
- while z < h do
- buildForward(l)
- turtle.turnLeft()
- buildForward(w)
- turtle.turnLeft()
- buildForward(l)
- turtle.turnLeft()
- buildForward(w)
- turtle.turnLeft()
- z = z + 1
- if z < h then turtle.up() end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement