Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function offRs()
- rs.setOutput("back",false)
- rs.setOutput("front",false)
- rs.setOutput("left",false)
- rs.setOutput("right",false)
- end
- function fillone()
- chest.pushItem("up", 1, 1, 1)
- chest.pushItem("up", 2, 1, 1)
- end
- function filltwo()
- chest.pushItem("up", 1, 1, 2)
- chest.pushItem("up", 2, 1, 2)
- end
- function fillIt()
- for i = 1,4 do
- fillone()
- end
- for i = 1,3 do
- filltwo()
- end
- end
- function checkIt()
- if turtle.getItemCount(1) <= 4 then
- count = count + 1
- end
- if turtle.getItemCount(2) <= 3 then
- count = count + 1
- end
- end
- function goLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- end
- function goRight()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- end
- function place1()
- turtle.select(1)
- turtle.place()
- end
- function place2()
- turtle.select(2)
- turtle.place()
- end
- function summon()
- turtle.up()
- turtle.up()
- turtle.up()
- turtle.up()
- turtle.forward()
- turtle.forward()
- place1()
- turtle.up()
- place1()
- goLeft()
- place1()
- goRight()
- goRight()
- place1()
- turtle.up()
- place2()
- goLeft()
- place2()
- goLeft()
- place2()
- goRight()
- turtle.down()
- turtle.down()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.down()
- turtle.down()
- turtle.down()
- turtle.down()
- turtle.turnRight()
- turtle.turnRight()
- end
- function rsClock()
- rs.setOutput("left", true)
- sleep(5)
- rs.setOutput("left", false)
- end
- chest = peripheral.wrap("bottom")
- count = 0
- while true do
- offRs()
- term.clear()
- term.setCursorPos(1,1)
- if rs.getInput("front", true) then
- print("Initializing.")
- textutils.slowPrint("}}}}}}}}}}}}}}}}}}}}")
- print(" ")
- print("Loading Materials.")
- textutils.slowPrint("}}}}}}}}}}}}}}}}}}}}")
- do fillIt()
- sleep(1)
- print(" ")
- print("Checking Materials.")
- do checkIt()
- sleep(1)
- textutils.slowPrint("}}}}}}}}}}}}}}}}}}}}")
- print(" ")
- end
- if count == 0 then
- rs.setOutput("right", true)
- end
- if rs.getInput("back", true) then
- print("Summoning Wither.")
- sleep(1)
- summon()
- sleep(180)
- else sleep(1)
- end
- if count ~= 0 then
- print("Missing Materials.")
- print(" ")
- rsClock()
- sleep(1)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment