Farming Turtles
#1
Posted 27 February 2012 - 07:28 AM
#2
Posted 27 February 2012 - 07:57 AM
#3
Posted 27 February 2012 - 12:45 PM
#4
Posted 27 February 2012 - 12:59 PM
Check out my code for planting rows of sapplings:
args = { ... } i=0 i2=0 tt=0 if #args ~= 2 then print( "Usage: tree <saplings> <rowsize>" ) return end while(i < tonumber(args[1])) do if(i2>tonumber(args[2])) then if(tt == 0) then turtle.turnRight() while(turtle.detect()) do turtle.up() end turtle.forward() while(turtle.detect()) do turtle.up() end turtle.forward() while(turtle.detect()) do turtle.up() end turtle.turnRight() while(turtle.detect()) do turtle.up() end turtle.forward() tt = 1 else turtle.turnLeft() while(turtle.detect()) do turtle.up() end turtle.forward() while(turtle.detect()) do turtle.up() end turtle.forward() while(turtle.detect()) do turtle.up() end turtle.turnLeft() while(turtle.detect()) do turtle.up() end turtle.forward() tt = 0 end i2=0 end for i1=1,10 do if(turtle.getItemCount(i1) > 0) then turtle.select(i1) break end end if(turtle.detectDown()) then turtle.up() end turtle.placeDown() while(turtle.detect()) do turtle.up() end turtle.forward() while(turtle.detect()) do turtle.up() end turtle.forward() while(turtle.detect()) do turtle.up() end turtle.forward() while(not turtle.detectDown()) do turtle.down() end i=i+1 i2=i2+1 endI know it could be a lot smaller but I couldn't be bothered.
I have seen the bot plant wheat and such too, so it should be able to fine, just make sure you are one block above the ground when planting.
#6
Posted 27 February 2012 - 01:44 PM
I don't think it is possible to get it to do anything involving items and right-clicking.
There is a block in redpower that places items on right click, you could place a bunch and have the turtle go and power them.
You could also place them but it wouldn't be incredibly easy to get the seeds into the machine.
#7
Posted 27 February 2012 - 02:16 PM
But how can turtle get seeds itself? By sitting on RP tube? Will it connect?
#8
Posted 27 February 2012 - 02:25 PM
#9
Posted 27 February 2012 - 02:44 PM
Turtle inventory can be "special"
#10
Posted 27 February 2012 - 09:35 PM
WireDemon, on 27 February 2012 - 07:57 AM, said:
This is why the seeds wont work, their item id is clasified as an Item and not a block.
Hopefully in the future they wont be limited by a block id classification, seems odd to be able to plant a tree and not seeds.
For now I guess I'll have to find an alternative to fully automate my farm.
#11
Posted 28 February 2012 - 02:44 PM
cokacola, on 27 February 2012 - 01:44 PM, said:
Seeds are technically a block.
#12
Posted 28 February 2012 - 09:37 PM
6677, on 28 February 2012 - 02:44 PM, said:
cokacola, on 27 February 2012 - 01:44 PM, said:
Seeds are technically a block.
Do you have any working code for this?
I'm trying it manually in the lua shell and it will not place a seed being 1 block above the farmland and doing turtle.placeDown()
I've also tried this, doesn't work either. turtle.placeDown() always reports false.
Edited by luanub, 28 February 2012 - 09:48 PM.
#13
Posted 29 February 2012 - 11:48 AM
luanub, on 28 February 2012 - 09:37 PM, said:
6677, on 28 February 2012 - 02:44 PM, said:
cokacola, on 27 February 2012 - 01:44 PM, said:
Seeds are technically a block.
Do you have any working code for this?
I'm trying it manually in the lua shell and it will not place a seed being 1 block above the farmland and doing turtle.placeDown()
I've also tried this, doesn't work either. turtle.placeDown() always reports false.
#14
Posted 29 February 2012 - 01:26 PM
#15
Posted 01 March 2012 - 05:23 AM
cokacola, on 27 February 2012 - 01:44 PM, said:
I don't think it is possible to get it to do anything involving items and right-clicking.
There is a block in redpower that places items on right click, you could place a bunch and have the turtle go and power them.
You could also place them but it wouldn't be incredibly easy to get the seeds into the machine.
You the deployer in rp2 creates a fake player(lol) to do those things
#17
Posted 21 January 2013 - 10:06 AM
#19
Posted 21 January 2013 - 12:53 PM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users