MatthewGB

AutoPlaceDown

Jul 15th, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. ms = 2 -- material slot
  2. turtle.select(ms)
  3. while 1<2 do
  4.  if turtle.getFuelLevel() < 10 then
  5.   print "refuelling"
  6.   ms = turtle.getSelectedSlot()
  7.   turtle.select(1)
  8.   turtle.refuel(1)
  9.   turtle.select(ms)
  10.  end
  11.  if turtle.up() then
  12.   if turtle.placeDown() then
  13.    print "placed"
  14.   else
  15.    print "changing slot"
  16.    ms = ms + 1
  17.    turtle.select(ms)
  18.    turtle.placeDown()
  19.   end
  20.  else
  21.   print "job done"
  22.   break
  23.  end
  24. end
Advertisement
Add Comment
Please, Sign In to add comment