Whitemambaa

turtle control program

Sep 4th, 2015
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.45 KB | None | 0 0
  1. --[[
  2.  
  3. Made by Quaternions
  4.  
  5. gf=go forward
  6. tl=turn left
  7. dd=dig down
  8.  
  9. etc...
  10.  
  11. use like:
  12.  
  13. [program name] df gf df gf tl df gf
  14.  
  15. --]]
  16.  
  17. local arg={...}
  18. local f={
  19. gf=turtle.forward,
  20. gu=turtle.up,
  21. gb=turtle.back,
  22. gd=turtle.down,
  23. tl=turtle.turnLeft,
  24. tr=turtle.turnRight,
  25. df=turtle.dig,
  26. dd=turtle.digDown,
  27. du=turtle.digUp,
  28. }
  29.  
  30. for i=1,#arg do
  31.     local c=f[arg[i]]
  32.     if c then
  33.         repeat until c()--if someone or something gets in the way
  34.     end
  35. end
Advertisement
Add Comment
Please, Sign In to add comment