Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local start = false
- local respondSide = "right"
- --local lArm = "left"
- --local rArm = "right"
- --local feet = "bottom"
- local bodyParts = {"bottom", "left", "right"}
- local function respond()
- rs.setOutput(respondSide,true)
- sleep(0.1)
- rs.setOutput(respondSide,false)
- --sleep(1)
- end
- local function query(side)
- rs.setOutput(side,true)
- sleep(0.1)
- rs.setOutput(side,false)
- os.pullEvent("redstone")
- end
- while true do
- if not turtle.detect() then
- if not start then os.pullEvent("redstone")
- else
- for _,part in pairs(bodyParts) do query(part) end
- end
- turtle.select(1)
- while not turtle.place() do
- sleep(0.5)
- end
- end
- if not start then
- sleep(0.2)
- respond()
- else sleep(15) end
- end
Advertisement
Add Comment
Please, Sign In to add comment