Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function refuel()
- for i = 1, 16 do -- loop through the slots
- turtle.select(i) -- change to the slot
- turtle.refuel()
- end
- end
- function fillSand()
- local spaceSand = turtle.getItemSpace(1)
- SandC=peripheral.wrap("right")
- SandC.condenseItems()
- SandC.pushItemIntoSlot("south", 1, spaceSand, 1)
- end
- function fillSkull()
- local spaceSkull = turtle.getItemSpace(2)
- SkullC=peripheral.wrap("back")
- SkullC.condenseItems()
- SkullC.pushItemIntoSlot("west", 1, spaceSkull, 2)
- end
- function fillFuel()
- local spaceFuel = turtle.getItemSpace(3)
- FuelC=peripheral.wrap("bottom")
- FuelC.condenseItems()
- FuelC.pushItemIntoSlot("up", 1, spaceFuel, 3)
- end
- function getSand()
- turtle.select(1)
- end
- function getSkull()
- turtle.select(2)
- end
- function findSignal()
- local signalChest = peripheral.wrap("front")
- if signalChest.getStackInSlot(1) ~= nil then
- print ("got signal, time to work")
- return true
- else
- print("no signal, keep looking")
- return false
- end
- end
- function readySetGo()
- local signal = redstone.getInput("left")
- if signal ~= true and findSignal() then
- print ("lets go!")
- buildWither()
- else
- print ("wither already spawned")
- end
- end
- function buildWither()
- fillSand()
- fillSkull()
- fillFuel()
- refuel()
- getSand()
- turtle.up()
- turtle.up()
- turtle.up()
- turtle.up()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.down()
- turtle.down()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.placeDown()
- turtle.turnLeft()
- turtle.place()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.place()
- turtle.up()
- turtle.placeDown()
- getSkull()
- turtle.place()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.place()
- turtle.up()
- turtle.placeDown()
- turtle.turnLeft()
- turtle.forward()
- turtle.down()
- turtle.down()
- turtle.forward()
- turtle.forward()
- turtle.up()
- turtle.up()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.down()
- turtle.down()
- turtle.down()
- turtle.down()
- print ("wither done")
- os.sleep(10)
- end
- while true do
- readySetGo()
- os.sleep(5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement