Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- term.setBackgroundColor(colors.lightGray)
- term.setTextColor( colors.lime )
- term.clear()
- local material1
- local material2
- local material3
- local delaytime
- local dropam1
- local dropam2
- local product
- term.setCursorPos(1,1)
- print("by Colhaydutu")
- term.setCursorPos(1,2)
- print("Place an Energizing Orb under the turtle")
- print("Place a Chest above the turtle")
- print("Put items in the turtle's inventory")
- term.setCursorPos(1,6)
- print("Select an item for orb")
- print("z - Energized Steel")
- print("x - Blazing Crystal")
- print("c - Niotic Crystal")
- print("v - Spirited Crystal")
- print("b - Nitro Crystal")
- print("n - Dry ice")
- print("m - Certus Quartz")
- local event, key, isHeld = os.pullEvent("key")
- if key == keys.z then
- term.clear()
- term.setCursorPos(1,1)
- print("Selected item is Energized Steel")
- material1 = "minecraft:gold_ingot"
- material2 = "minecraft:iron_ingot"
- product = "powah:steel_energized"
- dropam1 = 1
- print("Type delay time for craft (second) ")
- delaytime = read()
- elseif key == keys.x then
- term.clear()
- term.setCursorPos(1,1)
- print("Selected item is Blazing Crystal")
- material1 = "minecraft:blaze_rod"
- material2 = "minecraft:air"
- dropam1 = 1
- product = "powah:crystal_blazing"
- print("Type delay time for craft (second) ")
- delaytime = read()
- elseif key == keys.c then
- term.clear()
- term.setCursorPos(1,1)
- print("Selected item is Niotic Crystal")
- material1 = "minecraft:diamond"
- material2 = "minecraft:air"
- product = "powah:crystal_niotic"
- dropam1 = 1
- print("Type delay time for craft (second) ")
- delaytime = read()
- elseif key == keys.v then
- term.clear()
- term.setCursorPos(1,1)
- print("Selected item is Spirited Crystal")
- material1 = "minecraft:emerald"
- material2 = "minecraft:air"
- product = "powah:crystal_spirited"
- dropam1 = 1
- print("Type delay time for craft (second) ")
- delaytime = read()
- elseif key == keys.b then
- term.clear()
- term.setCursorPos(1,1)
- print("Selected item is Nitro Crystal")
- material3 = "minecraft:redstone_block"
- material2 = "minecraft:nether_star"
- material1 = "powah:blazing_crystal_block"
- product = "powah:crystal_nitro"
- dropam2 = 2
- dropam1 = 1
- print("Type delay time for craft (second) ")
- delaytime = read()
- elseif key == keys.n then
- term.clear()
- term.setCursorPos(1,1)
- print("Selected the dry ice")
- material3 = "minecraft:blue_ice"
- material2 = "minecraft:air"
- material1 = "minecraft:air"
- product = "powah:dry_ice"
- dropam2 = 2
- print("Type delay time for craft (second) ")
- delaytime = read()
- elseif key == keys.m then
- term.clear()
- term.setCursorPos(1,1)
- print("Selected the charged certus")
- material1 = "ae2:certus_quartz_crystal"
- material2 = "minecraft:air"
- material3 = "minecraft:air"
- product = "ae2:charged_certus_quartz_crystal"
- dropam1 = 1
- print("Type delay time for craft (second) ")
- delaytime = read()
- else
- shell.run("startup.lua")
- term.clear()
- end
- print("Starting...")
- sleep(1)
- term.clear()
- sleep(1)
- term.setCursorPos(1,1)
- print("working...")
- print("Break the turtle for stop")
- while true do
- for slot = 1, 16 do
- local itemDetail = turtle.getItemDetail(slot)
- if itemDetail and itemDetail.name == material1 then
- turtle.select(slot)
- turtle.dropDown(1)
- break
- end
- end
- for slot = 1, 16 do
- local itemDetail = turtle.getItemDetail(slot)
- if itemDetail and itemDetail.name == material2 then
- turtle.select(slot)
- turtle.dropDown(1)
- break
- end
- end
- for slot = 1, 16 do
- local itemDetail = turtle.getItemDetail(slot)
- if itemDetail and itemDetail.name == material3 then
- turtle.select(slot)
- turtle.dropDown(2)
- break
- end
- end
- sleep(tonumber(delaytime))
- turtle.suckDown()
- for slot = 1, 16 do
- local itemDetail = turtle.getItemDetail(slot)
- if itemDetail and itemDetail.name == product then
- turtle.select(slot)
- turtle.dropUp()
- break
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement