Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tArgs = {...}
- if #tArgs == 0 then
- print("Invalid syntax: shuffle direction amount")
- elseif tArgs[1] == "right" or tArgs[1] == "left" then
- local amount = 1
- if #tArgs == 2 then
- amount = tonumber(tArgs[2])
- end
- if tArgs[1] == "left" then
- turtle.turnLeft()
- else
- turtle.turnRight()
- end
- for i = 1,amount do
- while not turtle.forward() do end
- end
- if tArgs[1] == "left" then
- turtle.turnRight()
- else
- turtle.turnLeft()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment