Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI('lz')
- lz.load('turtle', 't')
- local arguments = {...}
- assert(#arguments > 0, 'No direction passed')
- local verify = function(direction)
- local valid = {
- up = true,
- down = true,
- forward = true
- }
- assert(valid[direction], 'Invalid direction \'' .. direction .. '\'')
- end
- local direction = arguments[1]
- verify(direction)
- local steps = arguments[2] or 1
- lz.t[direction](steps)
Add Comment
Please, Sign In to add comment