Advertisement
Guest User

quarry

a guest
Feb 21st, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.95 KB | None | 0 0
  1. X = 10
  2. Y= 10
  3. szam=0
  4. p=1
  5.  
  6. Function main (a,b)
  7.   for k= 1,2 do
  8.     for i= 1,a do
  9.       turtle.dig()
  10.       turtle.forward()
  11.     end
  12.     turtle.turnRight()
  13.     for j= 1,b do
  14.       turtle.dig()
  15.       turtle.forward()
  16.     end
  17.     turtle.turnRight()
  18.   end
  19.   turtle.turnRigt()
  20.   turtle.turnRight()  
  21.   for h= 1,2 do
  22.     for m = 1,a do
  23.       if szam==64 then
  24.         p = p+1
  25.         turtle.select(p)
  26.         turtle.back()
  27.         turtle.place()
  28.         szam = 1
  29.       else
  30.         turtle.back()
  31.         turtle.place()
  32.         szam = szam + 1
  33.       end
  34.     end
  35.     turtle.turnLeft()
  36.     for n = 1,b do
  37.       if szam==64 then
  38.         p = p+1
  39.         turtle.select(p)
  40.         turtle.back()
  41.         turtle.place()
  42.         szam = 1
  43.       else
  44.         turtle.back()
  45.         turtle.place()
  46.         szam = szam + 1
  47.       end
  48.     end
  49.     turtle.turnLeft()
  50.   end
  51.  
  52. if 2*(x+y)<=1024 then
  53.   main(x,y)
  54. else
  55.   Print("túl nagy terület")
  56. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement