Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Starting Patrick Builder")
- while true do
- print("Waiting for event")
- os.pullEvent("turtle_inventory")
- os.sleep(1) -- wait for items to fill
- local conc = {
- gc = "minecraft:green_concrete",
- gp = "minecraft:green_concrete_powder",
- pc = "minecraft:pink_concrete",
- pp = "minecraft:pink_concrete_powder",
- mp = "minecraft:magenta_concrete_powder",
- mc = "minecraft:magenta_concrete",
- lc = "minecraft:lime_concrete"
- }
- local pos = {}
- for i = 1,7,1
- do
- pos[turtle.getItemDetail(i).name] = i
- print(turtle.getItemDetail(i).name)
- print(I)
- end
- local build_rules = {
- {"pc", 2},
- {"pp", 1},
- {"mc", 1},
- {"pc", 3},
- {"mp", 1},
- {"pp", 1},
- {"mc", 1},
- {"pc", 3},
- {"mc", 1},
- {"pp", 1},
- {"mp", 1},
- {"pp", 1},
- {"mp", 3},
- {"pp", 1},
- {"mc", 3},
- {"mp", 3},
- {"pc", 1},
- {"mc", 1},
- {"gp", 1},
- {"gc", 3},
- {"gp", 2},
- {"lc", 1},
- {"gp", 1},
- {"gc", 1},
- {"gp", 1},
- {"lc", 1},
- {"gp", 1},
- {"pc", 1},
- {"gp", 1},
- {"gc", 4},
- {"gp", 1},
- {"pc", 1},
- {"mc", 6},
- }
- for _, build_tuple in ipairs(build_rules) do
- turtle.select(pos[conc[build_tuple[1]]])
- turtle.drop(build_tuple[2])
- end
- print("Now building Patrick, enjoy!")
- os.sleep(3) -- reset the app
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement