Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This program will works only with a Minium Stone provided in the first slot of a crafty turtle
- -- exactly in this setup http://tinypic.com/r/16c71w8/6
- -- The stone never worns out, you can stress the crafty placing blaze powders in every slot while it -- works, no matter. Only don't put blaze powder in slot 16 or they'll return to macerator!
- -- Note: this program will become obsolete when they'll fix the turtle.drop() and turtle.suck() commands
- -- that afflicts CC 1.5, but will work anyway.
- -- WARNING: You have to put AT LEAST 10 powders in crafty's inventory or in the chest below.
- tWait = 5 -- A higher value will slow down the turtle, just for th sake of your little generator
- goodstack = 30 -- Numbers of blaze that the turtle will TRY to process in one load.
- -- It needs at least 10, but will go faster with higher stacks: raise this value and
- -- fill the chest below with 4 stacks (depending on macerator upgrades) for top speed.
- local function getcount()
- numstack2 = turtle.getItemCount (2)
- numstack3 = turtle.getItemCount (3)
- numstack16 = turtle.getItemCount (16)
- sleep (0.1)
- end
- local function destroy()
- for x = 4,15 do
- turtle.select(x)
- turtle.dropUp()
- sleep (0.1)
- end
- end
- local function seek()
- for x = 4, 15 do
- if turtle.getItemCount (x) > 0 and
- forbidden == false then
- forbidden = true
- destroy()
- forbidden = false
- sleep (0.1)
- end
- end
- end
- while true do
- forbidden = false
- seek()
- sleep (0.1)
- if forbidden == false then
- getcount ()
- if numstack2 == 0 and
- numstack3 == 0 then
- turtle.select (2)
- turtle.suckDown()
- numstack2div = turtle.getItemCount (2) / 2
- turtle.transferTo (3, numstack2div)
- getcount()
- elseif numstack2 > numstack3 or
- numstack2 < numstack3 then
- turtle.select (3)
- turtle.transferTo (2, numstack3)
- turtle.dropUp()
- turtle.select (2)
- numstack2div = turtle.getItemCount (2) / 2
- turtle.transferTo (3, numstack2div)
- getcount()
- if numstack2 == numstack3 + 1 then
- turtle.select (2)
- turtle.transferTo (4, 1)
- getcount()
- else end
- elseif numstack2 == numstack3 and
- numstack2 >= 5 then
- turtle.select (16)
- turtle.craft()
- turtle.dropUp()
- turtle.craft()
- turtle.dropUp()
- turtle.craft()
- turtle.dropUp()
- turtle.craft()
- turtle.dropUp()
- turtle.craft()
- turtle.dropUp()
- getcount()
- elseif numstack2 == numstack3 and
- numstack2 < 5 then
- turtle.select (3)
- turtle.transferTo (2, numstack3)
- turtle.select (2)
- turtle.suckDown()
- print ("Acquiring Blaze Powders...")
- getcount()
- if numstack2 < goodstack then
- print ("It needs more Blaze Powders!")
- sleep (tWait)
- turtle.select (2)
- turtle.suckDown()
- term.clear()
- term.setCursorPos(1,1)
- getcount()
- else end
- elseif numstack16 > 0 then
- turtle.select (16)
- turtle.dropUp()
- turtle.select (2)
- getcount()
- else forbidden = true
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement