Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- args = {...}
- dir=args[1]
- len=tonumber(args[2]) or 1
- cmd=args[3]
- if dir=="right" then
- turtle.turnRight()
- end
- if dir=="left" then
- turtle.turnLeft()
- end
- for ii=1,len,1 do
- turtle.forward()
- end
- if dir=="right" then
- turtle.turnRight()
- end
- if dir=="left" then
- turtle.turnLeft()
- end
- if cmd then
- shell.run(cmd)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement