Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local side = "front"
- local pSSDelay = 12 --PLACE SOUL SAND
- local pWSDelay = 3 --PLACE WITHER SKULLS
- local dWSDelay = 60 --DESTROY WITHER SKULLS
- local oDBDelay = 10 --OPEN DRAWBRIDEGES
- local function reset()
- print("Resetting")
- rs.setOutput(side, false)
- redstone.setBundledOutput(side, 0)
- end
- local function pow(n)
- if n == 0 then
- return 1
- elseif n == 1 then
- return 2
- else
- return 2 * pow(n - 1)
- end
- end
- local function placeSoulSand()
- print("Placing Soul Sand")
- rs.setBundledOutput(side, pow(0))
- sleep(pSSDelay)
- reset()
- end
- local function placeWitherSkulls()
- print("Placing Wither Skulls")
- rs.setBundledOutput(side , pow(1))
- sleep(pWSDelay)
- reset()
- end
- local function destroyWitherSkulls()
- print("Destroying Wither Skulls")
- rs.setBundledOutput(side , pow(2))
- sleep(dWSDelay)
- reset()
- end
- local function openDrawbridges() --REMEBER NOT GATE!!!
- print("Opening Floor")
- rs.setBundledOutput(side , pow(3))
- sleep(oDBDelay)
- reset()
- end
- --MAIN
- while true do
- reset()
- sleep(2)
- print("Ready")
- local event = os.pullEvent("redstone")
- placeSoulSand()
- placeWitherSkulls()
- destroyWitherSkulls()
- openDrawbridges()
- print("Waiting 60 seconds")
- sleep(58)
- end
Advertisement
Add Comment
Please, Sign In to add comment