-- #################################
-- auto_melee_trap
-- version 0.1a
-- http://hevohevo.hatenablog.com/
-- The turtle suspends the operation during the redstone ON.
-- #################################
Side = "back"
turtle.select(1)
while true do
if not rs.getInput(Side) then --redstone OFF
turtle.attack()
turtle.suck()
turtle.dropDown()
else -- redstone ON
-- wait for the inputted signal to change OFF
print("suspend")
os.pullEvent("redstone")
print("attack")
end
end