Advertisement
Guest User

ITEM

a guest
Mar 20th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.28 KB | None | 0 0
  1. local function LINE()
  2.   if turtle.getFuelLevel() < 10 then
  3.     turtle.select(1)
  4.     turtle.refuel()
  5.   end
  6.   for i = 0, 8 do
  7.       turtle.suckDown()
  8.       turtle.forward()
  9.   end
  10.   turtle.suckDown()
  11. end
  12. local function SIFT()
  13.   local run = 1
  14.   while run == 1 do
  15.       local scrap, message = rednet.receive()
  16.       if message == "siftForItems" then
  17.         turtle.up()
  18.         for o = 0, 3 do
  19.             LINE()
  20.             turtle.turnRight()
  21.             turtle.forward()
  22.             turtle.turnRight()
  23.             LINE()
  24.             turtle.turnLeft()
  25.             turtle.forward()
  26.             turtle.turnLeft()
  27.         end
  28.         LINE()
  29.         turtle.turnRight()
  30.         turtle.forward()
  31.         turtle.turnRight()
  32.         LINE()
  33.         turtle.turnRight()
  34.         LINE()
  35.         turtle.down()
  36.       elseif message == "endTurtle" then
  37.         run = 0
  38.         rednet.close("right")
  39.         textutils.slowPrint("Console ended program.")
  40.       elseif message == "endBoth" then
  41.         run = 0
  42.         rednet.close("right")
  43.         textutils.slowPrint("Console ended program.")
  44.       end
  45.   end
  46. end
  47. print("-------------------------")
  48. textutils.slowPrint("SifTur receiving")
  49. textutils.slowPrint("Ready for input")
  50. print("-------------------------")
  51. SIFT()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement