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
- term.setCursorPos(1,1)
- print("/ps colhaydutu /ps ETvd")
- term.setCursorPos(1,2)
- print("Place a hopper opposite to turtle (the turtle will drop the items)")
- print("Put items in the turtle's inventory")
- term.setCursorPos(1,6)
- print("Select a block for orb")
- print("z - Block of Energized Steel")
- print("x - Block of Blazing Crystal")
- print("c - Block of Niotic Crystal")
- print("v - Block of Spirited Crystal")
- print("b - Block of Nitro Crystal")
- print("n - Dry ice")
- local event, key, isHeld = os.pullEvent("key")
- if key == keys.z then
- term.clear()
- term.setCursorPos(1,1)
- print("Selected block is Energized Steel")
- material1 = "minecraft:gold_block"
- material2 = "minecraft:iron_block"
- dropam1 = 1
- print("Type delay time for craft (second) ")
- delaytime = read()
- elseif key == keys.x then
- term.clear()
- term.setCursorPos(1,1)
- print("Selected block is Blazing Crystal")
- material1 = "botania:blaze_block"
- material2 = "minecraft:air"
- dropam1 = 1
- print("Type delay time for craft (second) ")
- delaytime = read()
- elseif key == keys.c then
- term.clear()
- term.setCursorPos(1,1)
- print("Selected block is Niotic Crystal")
- material1 = "minecraft:diamond_block"
- material2 = "minecraft:air"
- dropam1 = 1
- print("Type delay time for craft (second) ")
- delaytime = read()
- elseif key == keys.v then
- term.clear()
- term.setCursorPos(1,1)
- print("Selected block is Spirited Crystal")
- material1 = "minecraft:emerald_block"
- material2 = "minecraft:air"
- dropam1 = 1
- print("Type delay time for craft (second) ")
- delaytime = read()
- elseif key == keys.b then
- term.clear()
- term.setCursorPos(1,1)
- print("Selected block is Nitro Crystal")
- material3 = "minecraft:redstone_block"
- material2 = "minecraft:nether_star"
- material1 = "powah:blazing_crystal_block"
- 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"
- dropam2 = 2
- 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.drop(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.drop(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.drop(2)
- break
- end
- end
- sleep(tonumber(delaytime))
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement