Guest User

emergency

a guest
Jul 8th, 2013
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.36 KB | None | 0 0
  1. while true do
  2.   local l = peripheral.wrap("right")
  3.   l.setFreq(3)
  4.   local v = 2
  5.  
  6.     if l.get() then
  7.       if v == 2 then
  8.         v = 1
  9.         turtle.dig()        
  10.         sleep(5)
  11.       end
  12.     else
  13.       if v == 1 then
  14.         turtle.place()
  15.         turtle.up()
  16.         turtle.attack()
  17.         turtle.down()
  18.         v = 2
  19.       end
  20.     end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment