Posted 04 August 2012 - 06:36 PM
Hi there. I know quite a bit of lua, so now i made a huge project including the new crafting turtle. (You might be able to guess what)
I am making a turtle captable of crafting all craftable vanilla items and blocks. I have very good ideas at how, and i've made some code already.
Code:
And a little screenie:
Yea, turtle has to move over, pick up a stack of stone, return, do the same again and craft it.
Hope all of this is understandable, readable and explainable.
I am making a turtle captable of crafting all craftable vanilla items and blocks. I have very good ideas at how, and i've made some code already.
Code:
--Easier for me to program.
local function f() turtle.forward() end
local function b() turtle.back() end
local function l() turtle.turnLeft() end
local function r() turtle.turnRight() end
local function u() turtle.up() end
local function d() turtle.down() end
local function sel(slot) turtle.select(slot) end
local function c(num) turtle.craft(num) end
local function s() turtle.suck() end
function stone(s) f() f() l() f() f() f() sel(s) s() b() b() b() r() b() b() end --Line disfunctioning.
function wood(s) f() f() l() f() f() f() u() sel(s) s() d() b() b() b() r() b() b() end
function piston(s) for i=1,6 do f() end l() sel(s) s() r() for i=1,6 do b() end end
stone(1)
stone(5)
c(1)
And a little screenie:
Yea, turtle has to move over, pick up a stack of stone, return, do the same again and craft it.
Hope all of this is understandable, readable and explainable.