Advertisement
Guest User

dig

a guest
Jul 24th, 2014
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.38 KB | None | 0 0
  1. function tunnel(x,y,z) --Funzione Tunnel--
  2.  
  3.   ------VARIABILI------
  4.  
  5.   counterX=1
  6.   counterY=1
  7.   counterZ=0
  8.  
  9.   ------ESECUZIONE------
  10.  
  11.   while counterZ<=z do --Controlla la lunghezza del tunnel
  12.  
  13.     while counterX<x do --Controlla la larghezza
  14.      
  15.       turtle.dig()
  16.      
  17.       while counterY<y do --Controlla l'altezza
  18.        
  19.         turtle.up()
  20.         turtle.dig()
  21.         counterY=counterY+1
  22.        
  23.         end
  24.        
  25.       turtle.turnRight()
  26.       turtle.forward()
  27.       turtle.turnLeft()
  28.       while counterY>1 do
  29.         turtle.up()
  30.         counterY=counterY-1
  31.         end
  32.       counterX=counterX+1
  33.       end
  34.     turtle.turnLeft()  
  35.     while counterX>1 do
  36.       turtle.forward()
  37.       counterX=counterX-1
  38.       end
  39.     counterZ=counterZ+1
  40.     end
  41.   end
  42.  
  43.  
  44. ------OBSIDIAN MINE------
  45.  
  46. function obsidian(x,y)
  47.  
  48.   ------VARIABILI------
  49.   counterX=1
  50.   counterY=1
  51.   while counterX<x do
  52.    
  53.    
  54.     while counterY<y do
  55.       turtle.digDown()
  56.       turtle.placeDown()
  57.       turtle.dig()
  58.       turtle.forward()
  59.       counterY=counterY+1
  60.       end
  61.     turtle.turnRight()
  62.     turtle.dig()
  63.     turtle.forward()
  64.     turtle.turnRight()
  65.     while counterY>1 do
  66.       turtle.dig()
  67.       turtle.forward()
  68.       counterY=counterY-1
  69.       end
  70.     turtle.turnRight()
  71.     turtle.turnRight()
  72.     counterX=counterX+1
  73.     end
  74.   end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement