Jump to content




mining turtle that checks loot chest



  • You cannot reply to this topic
8 replies to this topic

#1 Vorg

  • Members
  • 48 posts

Posted 03 August 2014 - 07:52 AM

I'm using this mining program: http://www.computerc...hole-excavator/ and it works fine, but I would like the turtle to check loot chest and maybe even scoop bee hives. Any programs like that around?

#2 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 03 August 2014 - 03:10 PM

<shameless promotion> I've got a branch mining script that will empty chests and other inventories when it runs into them. </shameless promotion>

Here's how I do it, if you are interested in writing/modifying your own:
if turtle.suck() then --#if an inventory with items in it, suck will return true
 while turtle.suck() do end --#basically, keep sucking until nothing is left to suck
end
--#repeat for all directions


#3 flaghacker

  • Members
  • 655 posts

Posted 03 August 2014 - 04:05 PM

View PostKingofGamesYami, on 03 August 2014 - 03:10 PM, said:

<shameless promotion> I've got a branch mining script that will empty chests and other inventories when it runs into them. </shameless promotion>

Here's how I do it, if you are interested in writing/modifying your own:
if turtle.suck() then --#if an inventory with items in it, suck will return true
while turtle.suck() do end --#basically, keep sucking until nothing is left to suck
end
--#repeat for all directions

Why do you have that if statement?

while turtle.suck() do end


#4 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 03 August 2014 - 04:46 PM

View Postflaghacker, on 03 August 2014 - 04:05 PM, said:

View PostKingofGamesYami, on 03 August 2014 - 03:10 PM, said:

<shameless promotion> I've got a branch mining script that will empty chests and other inventories when it runs into them. </shameless promotion>

Here's how I do it, if you are interested in writing/modifying your own:
if turtle.suck() then --#if an inventory with items in it, suck will return true
while turtle.suck() do end --#basically, keep sucking until nothing is left to suck
end
--#repeat for all directions

Why do you have that if statement?

while turtle.suck() do end
I've got a bunch of other checks running along side of it. I actually add "and turtle.detect()" to it in my script.

#5 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 03 August 2014 - 05:44 PM

Moved to Ask a Pro.

#6 hilburn

  • Members
  • 153 posts
  • LocationLondon, England

Posted 03 August 2014 - 07:06 PM

Another option is if you have openp is to have a blacklist of items to not pick up. What turtle needs torches or string?

#7 Vorg

  • Members
  • 48 posts

Posted 03 August 2014 - 07:57 PM

View PostKingofGamesYami, on 03 August 2014 - 03:10 PM, said:

<shameless promotion> I've got a branch mining script that will empty chests and other inventories when it runs into them. </shameless promotion>

Here's how I do it, if you are interested in writing/modifying your own:
if turtle.suck() then --#if an inventory with items in it, suck will return true
while turtle.suck() do end --#basically, keep sucking until nothing is left to suck
end
--#repeat for all directions

Does turtle.suckUp() and turtle.suckDown() not work now? I tried using these and turtle.suck() empties chest in front, but Up/Down doesn't.

#8 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 03 August 2014 - 08:13 PM

View PostVorg, on 03 August 2014 - 07:57 PM, said:

View PostKingofGamesYami, on 03 August 2014 - 03:10 PM, said:

<shameless promotion> I've got a branch mining script that will empty chests and other inventories when it runs into them. </shameless promotion>

Here's how I do it, if you are interested in writing/modifying your own:
if turtle.suck() then --#if an inventory with items in it, suck will return true
while turtle.suck() do end --#basically, keep sucking until nothing is left to suck
end
--#repeat for all directions

Does turtle.suckUp() and turtle.suckDown() not work now? I tried using these and turtle.suck() empties chest in front, but Up/Down doesn't.
I'm not sure. It should... provided there is room in the turtle's inventory and items in the chest.

#9 Vorg

  • Members
  • 48 posts

Posted 03 August 2014 - 08:29 PM

Here is the dig up part I modded. Set to just dig a 3 x 2 x 3 and put 3 chest in front stacked each with just a few items. Even tried with just 1 item in each and it empties the middle chest which part of dig forward. But the above and below gets dumped. So turtle is empty cept for a few charcoal for fuel.

local tries = 3
	    while not turtle.up() do
			    if bDebug then print("goUp: while not loop tries="..tries) end
			    if turtle.detectUp() then
					    if bDebug then print("goUp: detectUp") end
-- Dig Up
					    if turtle.suckUp() then --#if an inventory with items in it, suck will return true
							    while turtle.suckUp() do end --#basically, keep sucking until nothing is left to suck
					    end

						  if not turtle.digUp() then






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users