Advertisement
Guest User

Quarry

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