14 posts
Posted 19 May 2014 - 07:34 PM
Hello World!
I am new to the ComputerCraft Forums and was hoping I could get some help with my felling program. I am trying to make a lumber jack script and was wondering how you could make the turtle suck up a certain amount of items based on how many are needed to make it a full stack.
For example, I need to restock the bonemeal and seen as the amount of bonemeal used each time is random, I can't just have it suck up a certain amount each time to fill the stack.
Thanks in advance for any help. :)/>
Edited on 19 May 2014 - 05:59 PM
148 posts
Posted 19 May 2014 - 08:44 PM
14 posts
Posted 19 May 2014 - 09:08 PM
CCGrimHaxor
Thanks a lot for the reply. :D/>
I'll figure out some sort of way to incorporate that in my program using turtle.getItemCount() to find the remainder and suck the required amount.
Really should of put two and two together on this one. Having a 'Slow' day I guess.
1281 posts
Posted 19 May 2014 - 09:31 PM
Actually i don't think turtle.suck accepts any arguments
http://computercraft.info/wiki/Turtle.suckIf you have openP installed however, you could use that. Or you could check the rest of the turtle inventory for bonemeal after sucking it up, and drop the extras back in.
14 posts
Posted 20 May 2014 - 12:00 AM
CometWolf
I Haven't had a chance to test what he said so I'll take your word for it.
I will probably end up doing that but I was just looking for a more efficient way to go about doing it.
One more thing, seen as I am trying to make this as efficient as possible, what happens if I have it drop the remainder in and then next time it goes to suck, it only sucks up like 4? Then It would have to go and suck up more in a little bit.
Thanks for all of your help!
Edited on 19 May 2014 - 10:01 PM
31 posts
Location
Brazil
Posted 20 May 2014 - 12:33 AM
Actually i don't think turtle.suck accepts any arguments
http://computercraft...iki/Turtle.suckIf you have openP installed however, you could use that. Or you could check the rest of the turtle inventory for bonemeal after sucking it up, and drop the extras back in.
I'm quite noob about computercraft yet, but I saw in direwolf20 MOD SPOTLIGHT that since computercraft 1.6 the turtle.suck() accept arguments.
EDIT
http://youtu.be/S731LoSHYXw?t=36m57s
Edited on 19 May 2014 - 10:53 PM
14 posts
Posted 20 May 2014 - 12:41 AM
macss_
Thaks a lot for the information. :)/> You'll be teaching us all with it.
Really hope it does. Will make my program a lot easier!
31 posts
Location
Brazil
Posted 20 May 2014 - 12:54 AM
Thank you! Bro, and yes it is possible… :D/>
14 posts
Posted 20 May 2014 - 12:58 AM
Macss_
Yay! Thanks so much!
Program = 100 times easier. :)/>
Thanks a bunch for your help and the link.
Take it easy.
1281 posts
Posted 20 May 2014 - 08:53 AM
I wouldn't know, i don't use 1.6 :P/>
14 posts
Posted 20 May 2014 - 03:08 PM
CometWolf
It's all good man. :)/> I haven't really checked out 1.6 either. I've done most of my learning in the earlier versions.
Thanks for your input though! It's much appreciated.