Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cableSide = "right"
- modemSide = "top"
- function main()
- rednet.open("top")
- id, message = rednet.receive()
- if message == "DebugUp" then
- Up()
- main()
- elseif message == "DebugDown" then
- Down()
- main()
- elseif message > 0 then
- for i = 1, message do
- UpFloor()
- end
- main()
- else
- for i = 1, math.abs(message) do
- DownFloor()
- end
- main()
- end
- main()
- end
- function UpFloor()
- for f = 1, 10 do
- Up()
- end
- end
- function DownFloor()
- for f = 1, 10 do
- Down()
- end
- end
- function Up()
- redstone.setBundledOutput(cableSide, 1)
- os.sleep(1.05)
- redstone.setBundledOutput(cableSide, 0)
- end
- function Down()
- redstone.setBundledOutput(cableSide, 2)
- os.sleep(1.05)
- redstone.setBundledOutput(cableSide, 0)
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement