Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = 1
- y = 1
- z = 3
- local nTime = os.time()
- t = textutils.formatTime(nTime, true)
- while true do
- term.clear()
- term.setCursorPos(1,2)
- print("--------------------------------------------------")
- print("--------------------------------------------------")
- term.setCursorPos(3,4)
- print("Ground Floor")
- term.setCursorPos(44,4)
- print(t)
- term.setCursorPos(1,8)
- print(" 0 Server Room")
- print(" 1 1st Floor")
- print(" 2 2nd Floor")
- print(" 3 3rd Floor")
- print(" 4 4th Floor")
- print(" 5 5th Floor")
- print(" 6 6th Floor")
- print(" 7 7th Floor")
- print(" 8 8th Floor")
- print(" 9 9th Floor")
- print("10 10th Floor")
- print("11 11th Floor")
- print("12 12th Floor")
- print("13 13th Floor")
- print("14 14th Floor")
- print("15 15th Floor")
- print("16 16th Floor")
- print("17 17th Floor")
- print("18 18th Floor")
- term.setCursorPos(x,y)
- print("[")
- term.setCursorPos(z,y)
- print("]")
- event, key = os.pullEvent()
- if key == 208 and y < 40 then
- y = y+1
- elseif key == 208 and y == 40 then
- y = 40
- elseif key == 200 and y > 1 then
- y = y-1
- elseif key == 200 and y == 8 then
- y = 8
- elseif key == 28 then
- if y == 1 then
- shell.run("down1")
- elseif y == 2 then
- shell.run("up1")
- elseif y == 3 then
- shell.run("up2")
- elseif y == 4 then
- shell.run("up3")
- elseif y == 5 then
- shell.run("up4")
- elseif y == 6 then
- shell.run("up5")
- elseif y == 7 then
- shell.run("up6")
- elseif y == 8 then
- shell.run("up7")
- elseif y == 9 then
- shell.run("up8")
- elseif y == 10 then
- shell.run("up9")
- elseif y == 11 then
- shell.run("up10")
- elseif y == 12 then
- shell.run("up11")
- elseif y == 13 then
- shell.run("up12")
- elseif y == 14 then
- shell.run("up13")
- elseif y == 15 then
- shell.run("up14")
- elseif y == 16 then
- shell.run("up15")
- elseif y == 17 then
- shell.run("up16")
- elseif y == 18 then
- shell.run("up17")
- else
- term.setCursorPos(1,11)
- print("system error")
- sleep(2)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment