Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local inS = "right"
- local otS = "left"
- term.clear()
- term.setCursorPos(1,1)
- print("Elevator Program Running...")
- while true do
- if rs.getBundledInput(inS) == 1 then
- shell.run("call-bottom")
- elseif rs.getBundledInput(inS) == 2 then
- shell.run("F4-F3")
- elseif rs.getBundledInput(inS) == 4 then
- shell.run("F4-F2")
- elseif rs.getBundledInput(inS) == 8 then
- shell.run("F4-F1")
- elseif rs.getBundledInput(inS) == 16 then
- shell.run("call-floor3")
- elseif rs.getBundledInput(inS) == 32 then
- shell.run("F3-F4")
- elseif rs.getBundledInput(inS) == 64 then
- shell.run("F3-F2")
- elseif rs.getBundledInput(inS) == 128 then
- shell.run("F3-F1")
- elseif rs.getBundledInput(inS) == 256 then
- shell.run("call-floor2")
- elseif rs.getBundledInput(inS) == 512 then
- shell.run("F2-F4")
- elseif rs.getBundledInput(inS) == 1024 then
- shell.run("F2-F3")
- elseif rs.getBundledInput(inS) == 2048 then
- shell.run("F2-F1")
- elseif rs.getBundledInput(inS) == 4096 then
- shell.run("call-floor1")
- elseif rs.getBundledInput(inS) == 8192 then
- shell.run("F1-F4")
- elseif rs.getBundledInput(inS) == 16384 then
- shell.run("F1-F3")
- elseif rs.getBundledInput(inS) == 32768 then
- shell.run("F1-F2")
- else
- sleep(0)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement