Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- row = 1;
- args = {...}
- maxRows = 15
- state = "ropedown" -- can be ropedown, ropeup and shift
- finishing = false
- looping = true
- firstLoop = true
- function retract()
- print("RESET")
- finishing = true
- rs.setOutput("front", true)
- sleep(0.2)
- rs.setOutput("back", true)
- rs.setOutput("right", true)
- sleep(15)
- rs.setOutput("back", false)
- rs.setOutput("right", false)
- rs.setOutput("front", false)
- looping = false
- end
- function ropedown()
- rs.setOutput("left", true)
- print("Rope Down")
- state = "ropeup"
- sleep(1)
- end
- function ropeup()
- rs.setOutput("left", false)
- print("Rope Up")
- state = "shift"
- sleep(1)
- end
- function shift()
- print("Moviendolo hacia alante")
- rs.setOutput("front",true)
- sleep(0.2)
- rs.setOutput("right", true)
- sleep(0.5)
- state = "ropedown"
- row = row + 1
- rs.setOutput("right", false)
- sleep(1.5)
- rs.setOutput("front", false)
- end
- while looping do
- if (firstLoop) then
- firstLoop = false
- ropedown()
- end
- os.pullEvent("redstone")
- if (rs.getInput("bottom") and not finishing) then
- if row == maxRows and state == "shift" then
- retract()
- break
- end
- if (state == "ropedown") then
- ropedown()
- elseif (state == "ropeup") then
- ropeup()
- elseif (state == "shift") then
- shift()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment