SHARE
TWEET

Untitled

CarraraJF Oct 12th, 2017 42 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local sslot = 1
  2. while true do
  3.  
  4. if turtle.getFuelLevel() > 0 then
  5.     turtle.select(sslot)
  6. if turtle.getItemCount() > 0 then
  7. local details = turtle.getItemDetail()
  8.     if details.name == "Railcraft:track" then
  9.     if turtle.forward() then
  10.  print ("Turtle moved forward.")
  11.     turtle.digDown()
  12.     turtle.placeDown()
  13.     turtle.select(15)
  14.     turtle.drop(1)
  15.     else
  16.     print ("Turtle didn't move forward.")
  17. end
  18.     else
  19.     sslot = (sslot%13)+1
  20.     turtle.select(sslot)
  21.    
  22.     end
  23. else
  24.     sslot = (sslot%13)+1
  25.     turtle.select(sslot)
  26. end
  27. else
  28.     turtle.select(16)
  29.     turtle.refuel(1)
  30. end
  31.     sleep(1)
  32. end
RAW Paste Data
Top