Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local start = true
- resupply=peripheral.wrap("right")
- while true do
- --Startup
- if start == true then
- print("Hi! My name is Chunky!")
- print("Job: Chunk'n dat shizzle")
- print("")
- print("Inventory:")
- print("#,#,#,#")
- print("#,#,#,#")
- print("#,#,#,#")
- print("#,#,#,#")
- print("")
- if turtle.getItemCount(16) ~= 0 then
- os.terminate()
- end
- start = false
- end
- --[[function refuelSelf()
- if turtle.getFuelLevel()<500 then
- while turtle.getFuelLevel()<500 do
- for i=1,15,1 do
- if resupply.resupply(i) then
- break
- end
- if i == 15 then
- os.terminate()
- end
- end
- end
- end
- end]]--
- function refuelSelf()
- if turtle.getFuelLevel()<500 then
- while turtle.getFuelLevel()<500 do
- for i=1,16,1 do
- turtle.select(i)
- turtle.refuel(1)
- turtle.select(1)
- end
- end
- end
- end
- --Main
- refuelSelf()
- if turtle.getItemCount(16) > 0 then
- turtle.select(16)
- for i=1,15,1 do
- if turtle.transferTo(i) then
- break
- end
- if i == 15 then
- os.terminate()
- end
- end
- else
- turtle.select(16)
- if turtle.compare() then
- os.sleep(3)
- while not turtle.forward() do
- os.sleep(3)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement