Advertisement
Guest User

test

a guest
Sep 17th, 2013
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 KB | None | 0 0
  1. local slots = {}
  2. for i = 1,4 do turtle.refuel(1) end
  3. for i = 1, 4 do turtle.suck() end
  4. t = turtle
  5. t.select(1)
  6. t.up()
  7. for i = 1,4 do
  8.   t.select(i)
  9.   t.place()
  10.   if t.detect() then
  11.     slots["diskdrive"] = i
  12.     break
  13.   end
  14. end
  15. t.select(slots["diskdrive"])
  16. t.place()
  17. for i = 1, 4 do
  18.   if i ~=  slots["diskdrive"] then
  19.     t.drop()
  20.     if disk.isPresent("front") then
  21.       sleep(2)
  22.       t.suck()
  23.       slots["disk"] = i
  24.       break
  25.     end
  26.     t.suck()
  27.   end
  28.  
  29. end
  30. t.dig()
  31. print("diskdriver slot = "..slots["diskdrive"])
  32. print("disk slot = "..slots["disk"])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement