Guest User

bb

a guest
Feb 27th, 2015
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.39 KB | None | 0 0
  1. fuel = turtle.getFuelLevel()
  2. term.clear()
  3. turtle.select(1)
  4. term.setCursorPos(2, 6)
  5. textutils.slowPrint("Enter how long should the bridge be?")
  6. term.setCursorPos(2, 7)
  7. textutils.slowPrint("DO NOT ENTER LETTERS OR I WILL CRASH")
  8. term.setCursorPos(19, 8)
  9. long = read()
  10. if tonumber(long) > 20 then
  11.   term.clear()
  12.   term.setCursorPos(15, 6)
  13.   textutils.slowPrint("Too long")
  14.   sleep(5)
  15.   term.clear()
  16.   term.setCursorPos(1, 1)
  17.   return
  18. end
  19. should = tonumber(long)*3
  20. is = turtle.getItemCount
  21. if is == should or is > should then
  22.   for i= 1, tonumber(long) do
  23.     if fuel > 1000 then
  24.       sleep(2)
  25.       term.clear()
  26.       term.setCursorPos(1, 1)
  27.       print("Enugh fuel. Working")
  28.       term.setCursorPos(1, 2)
  29.       print(i)
  30.       turtle.back()
  31.       turtle.place()
  32.       turtle.turnLeft()
  33.       turtle.forward()
  34.       turtle.turnRight()
  35.       turtle.place()
  36.       turtle.turnRight()
  37.       turtle.forward()
  38.       turtle.forward()
  39.       turtle.turnLeft()
  40.       turtle.place()
  41.       turtle.turnLeft()
  42.       turtle.forward()
  43.       turtle.turnRight()
  44.       else
  45.         term.clear()
  46.         term.setCursorPos(1, 1)
  47.         term.print("Not enugh fuel")
  48.         break
  49.       end
  50.     end  
  51.   else
  52.     term.clear()
  53.     term.setCursorPos(1, 1)
  54.     textutils.slowPrint("Sorry. Not enugh items in slot 1!")
  55.     sleep(5)
  56.     term.clear()
  57.     term.setCursorPos(1, 1)
  58.     return
  59. end
Advertisement
Add Comment
Please, Sign In to add comment