Guest User

Bruecke

a guest
Jan 12th, 2013
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.95 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. textutils.slowPrint("#######################################")
  4. textutils.slowPrint("########Bridge builder activated#######")
  5. textutils.slowPrint("#######################################")
  6. print("Put ground material in slot 2!")
  7. write("How long should the bride be?")
  8. laenge = tonumber(read())
  9. write("How wide should the Bridge be?")
  10. breite = tonumber(read())
  11. write("In what direction should the turtle go?(Right or left)")
  12. richtung = read()
  13. if string.lower(richtung) == "right" then
  14.  richtung = "turnRight"
  15. end
  16. if string.lower(richtung) == "left" then
  17.  richtung = "turnLeft"
  18. end
  19. print("Should a fence be built right and left?(Yes or no)")
  20. write("(If yes put fence material in slot 3!")
  21. zaun = read()
  22. if string.lower(zaun) == "ja" then
  23.  for a = 1, laenge do
  24.   turtle[richtung]()
  25.   turtle.select(2)
  26.   for x = 2, breite do
  27.    turtle.placeDown()
  28.    turtle.attack()
  29.    turtle.dig()
  30.    turtle.forward()
  31.   end
  32.   turtle.placeDown()
  33.   turtle.digUp()
  34.   turtle.attackUp()
  35.   turtle.up()
  36.   turtle.select(3)
  37.   turtle.placeDown()
  38.   for b = 0, 1 do
  39.    turtle[richtung]()
  40.   end
  41.   for c = 2, breite do
  42.    turtle.attack()
  43.    turtle.dig()
  44.    turtle.forward()
  45.   end
  46.   turtle.placeDown()
  47.   turtle[richtung]()
  48.   turtle.attack()
  49.   turtle.dig()
  50.   turtle.forward()
  51.   turtle.digDown()
  52.   turtle.attackDown()
  53.   turtle.down()
  54.  end
  55. end
  56.  
  57. if string.lower(zaun) == "nein" then
  58.  for d = 2, laenge do
  59.   turtle[richtung]()
  60.   turtle.select(2)
  61.    for y = 2, breite do
  62.     turtle.placeDown()
  63.     turtle.attack()
  64.     turtle.dig()
  65.     turtle.forward()
  66.     turtle.placeDown()
  67.    end
  68.    for ad = 0,2 do
  69.     turtle[richtung]()
  70.    end
  71.    turtle.attack()
  72.    turtle.dig()
  73.    turtle.forward()
  74.    for af = 0,2 do
  75.     turtle[richtung]()
  76.    end
  77.    for f = 2, breite do
  78.     turtle.attack()
  79.     turtle.dig()
  80.     turtle.forward()
  81.    end
  82.    turtle[richtung]()
  83.   end
  84.  end
  85. turtle.select(1)
  86. term.clear()
  87. term.setCursorPos(1,1)
Advertisement
Add Comment
Please, Sign In to add comment