This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Minixiri's profile picture

Question: Filling Buckets

Started by Minixiri, 04 November 2012 - 03:30 AM
Minixiri #1
Posted 04 November 2012 - 04:30 AM
hello!! first time using mode and i know 0 about programming turtles. I want to make it fill buckets and deliver them at a chest, is it possible and how can i do that?

Thanks for your help
sjele #2
Posted 04 November 2012 - 04:33 AM

turtle.place() --If a bucket is seletcet and has water in the facing will take water
--turtle.placeDown() --works too
--turtle.placeUp() --works too
--turtle.dropDown() --while above a chest will drop selected slot into chest
--turtle.drop() --drops into check infront of turtle
--turtle.dropUp() --You will guess what this does.

With that info it's easy to make.

turtle.suck() will get items from chest
Minixiri #3
Posted 04 November 2012 - 04:37 AM
what its bios 338: [string "bucketfiller"]: 2: eof expected? it keep
Pharap #4
Posted 04 November 2012 - 05:03 AM
what its bios 338: [string "bucketfiller"]: 2: eof expected? it keep
That's an error occurring on the second line of your code, you'll need to post your code for any of us to tell you what's wrong (though it's likely to be related to a misplaced 'end', given the eof expected message).
Minixiri #5
Posted 04 November 2012 - 05:14 AM
thankyou very much!!!
ok here is my pro code, not sure if works havent tested yet, just tried commands separately.
turtle.place(1)
turtle.place(1)
turtle.place(1)
turn left 2
go forward 2
turtle.select(2)
turtle.drop()
turtle.select(3)
turtle.drop()
turtle.select(4)
turtle.drop()
turtle.select(1)
how can i make it check if buckets empty in inventory and take them
turn left 2
go forward 2
Loop it somehow

ok, so can you help me make it work?
darkrising #6
Posted 04 November 2012 - 05:52 AM


while true do
  sleep(1)
  if turtle.compareTo(2) == false then
	turtle.placeDown()
  end
  turtle.dropUp()
  sleep(1)
  turtle.suckUp()
end

I use this to refill a steam boiler on my map, a full bucket of water is placed in slot 2, the turtle compares this with slot one to see if the bucket is full.

I thought this might be relevant :D/>/>
Minixiri #7
Posted 04 November 2012 - 06:09 AM
can you kinda explain what each line does so i can try to get adapt to my situation?