Advertisement
Guest User

startup

a guest
Sep 1st, 2014
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.20 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. print("Direction?")
  4. d = read()
  5.  
  6. if d == "forward" then
  7.   term.clear()
  8.   term.setCursorPos(1,1)
  9.   print("How many blocks?")
  10.   local fx = tonumber( read() )
  11.   for counter=1,fx do
  12.     turtle.forward()
  13.   end
  14.   shell.run("startup")
  15. else if d == "back" then
  16.   term.clear()
  17.   term.setCursorPos(1,1)
  18.   print("How many blocks?")
  19.   local bx = tonumber( read() )
  20.   for counter=1,bx do
  21.     turtle.back()
  22.   end
  23.   shell.run("startup")
  24. else if d == "up" then
  25.   term.clear()
  26.   term.setCursorPos(1,1)
  27.   print("How many blocks?")
  28.   local ux = tonumber( read() )
  29.   for counter=1,ux do
  30.     turtle.up()
  31.   end
  32.   shell.run("startup")
  33. else if d == "down" then
  34.   term.clear()
  35.   term.setCursorPos(1,1)
  36.   print("How many blocks?")
  37.   local dx = tonumber( read() )
  38.   for counter=1,dx do
  39.     turtle.down()
  40.   end
  41.   shell.run("startup")
  42. else if d == "right" then
  43.   turtle.turnRight()
  44.   shell.run("startup")
  45. else if d == "left" then
  46.   turtle.turnLeft()
  47.   shell.run("startup")
  48. else if d == "penis" then
  49.   shell.run("penis")
  50.   shell.run("startup")  
  51. else
  52.   print("Please enter valid direction")
  53.   os.sleep(1)
  54.   shell.run("startup")
  55. end
  56. end
  57. end  
  58. end
  59. end
  60. end
  61. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement