Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- args = {...}
- if #args > 0 then
- size = args[1] + 0
- i = args[2] + 0
- phase = args[3] + 0
- torch = args[4] + 0
- else
- size = 1
- i = 0
- phase = 1
- torch = 5
- end
- slot = 1
- turtle.placeDown()
- while slot <= 15 and turtle.getFuelLevel() > 0 do
- turtle.select(slot)
- while turtle.getItemCount() > 0 and turtle.getFuelLevel() > 0 do
- i = i + 1
- if i >= size then
- i = 0
- turtle.turnLeft()
- if phase == 2 then
- size = size + 1
- phase = 1
- else
- phase = 2
- end
- else
- turtle.forward()
- turtle.placeDown()
- torch = torch - 1
- if torch <= 0 then
- torch = math.random(5,15)
- turtle.turnLeft()
- turtle.select(16)
- turtle.place()
- turtle.select(slot)
- turtle.turnRight()
- end
- end
- end
- slot = slot + 1
- end
- print("Save code:"..size.." "..i.." "..phase)
- local file = fs.open("resumePlatform","w")
- file.write('shell.run("platform", "'..size..'", "'..i..'", "'..phase..'", "'..torch..'")')
- file.close()
Advertisement
Add Comment
Please, Sign In to add comment