Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local sslot = 1
- while true do
- if turtle.getFuelLevel() > 0 then -- check fuel level
- turtle.select(sslot) -- if it has fuel it proceeds
- print ("todo bien")
- if turtle.getItemCount() > 0 then -- checks if current slot has items
- local details = turtle.getItemDetail() -- check if item is a rail
- if details.name = "Railcraft:track" then-- check if item is a rail
- turtle.forward() then -- moves forward
- turtle.digDown()
- turtle.placeDown()
- print ("todo bien")
- if turtle.getItemCount(15) > 1 then
- turtle.drop(1)
- print ("todo bien")
- end
- else
- sslot = (sslot%16)+1
- turtle.select(sslot)
- print ("todo bien")
- end
- else
- sslot = (sslot%16)+1
- turtle.select(sslot)
- print ("todo bien")
- end
- else
- turtle.select(16)
- turtle.refuel(1)
- print ("todo bien")
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement