Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Boden

DerMarten Sep 9th, 2013 24 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. local status = 0 -- 0 = Rechts -- 1 = Links --
  2. local slot = 1
  3. local stop = true
  4. function checkSlot()
  5.         local run = true
  6.         while run do
  7.                 local items = turtle.getItemCount(slot)
  8.                 if items == 0 then
  9.                         if slot == 16 and items == 0 then
  10.                                 stop = false
  11.                         end
  12.                         slot = slot + 1
  13.                 else
  14.                         run = false
  15.                 end
  16.                 os.sleep(0.001)
  17.         end
  18.        
  19. end
  20. turtle.forward()
  21. while stop do
  22.         checkSlot()
  23.         if turtle.detect() == true then
  24.                 if status == 0 then
  25.                         turtle.turnRight()
  26.                         turtle.forward()
  27.                         turtle.turnRight()
  28.                         turtle.forward()
  29.                         status = 1
  30.                 elseif status == 1 then
  31.                         turtle.turnLeft()
  32.                         turtle.forward()
  33.                         turtle.turnLeft()
  34.                         turtle.forward()
  35.                         status = 0
  36.                 end
  37.         elseif turtle.detect() == false then
  38.                 turtle.placeDown()
  39.                 turtle.forward()
  40.         end
  41.         os.sleep(0.5)
  42. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top