Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Playerlist:")
- print("")
- pid=1
- while fs.exists("player"..pid) do
- file=fs.open("player"..pid,"r")
- name=file.readLine()
- file.close()
- side="back"
- t=0
- loop=1
- online=1
- pidx=pid
- while loop > 0 do
- if pidx > 0 and pidx <= 1 then
- online=rs.testBundledInput(side, colors.white)
- elseif pidx > 1 and pidx <= 2 then
- online=rs.testBundledInput(side, colors.orange)
- elseif pidx > 2 and pidx <= 3 then
- online=rs.testBundledInput(side, colors.magenta)
- elseif pidx > 3 and pidx <= 4 then
- online=rs.testBundledInput(side, colors.lightBlue)
- elseif pidx > 4 and pidx <= 5 then
- online=rs.testBundledInput(side, colors.yellow)
- elseif pidx > 5 and pidx <= 6 then
- online=rs.testBundledInput(side, colors.lime)
- elseif pidx > 6 and pidx <= 7 then
- online=rs.testBundledInput(side, colors.pink)
- elseif pidx > 7 and pidx <= 8 then
- online=rs.testBundledInput(side, colors.gray)
- elseif pidx > 8 and pidx <= 9 then
- online=rs.testBundledInput(side, colors.lightGray)
- elseif pidx > 9 and pidx <= 10 then
- online=rs.testBundledInput(side, colors.cyan)
- elseif pidx > 10 and pidx <= 11 then
- online=rs.testBundledInput(side, colors.purple)
- elseif pidx > 11 and pidx <= 12 then
- online=rs.testBundledInput(side, colors.blue)
- elseif pidx > 12 and pidx <= 13 then
- online=rs.testBundledInput(side, colors.brown)
- elseif pidx > 13 and pidx <= 14 then
- online=rs.testBundledInput(side, colors.green)
- elseif pidx > 14 and pidx <= 15 then
- online=rs.testBundledInput(side, colors.red)
- elseif pidx > 15 and pidx <= 16 then
- online=rs.testBundledInput(side, colors.black)
- elseif pidx > 16 then
- side="bottom"
- if pidx > 32 then
- side="right"
- pidx=pidx-16
- end
- pidx=pidx-16
- end
- t=t+1
- if t > 2 then
- online=false
- print("Bundled cable not connected")
- end
- if online == true then
- loop=0
- elseif online == false then
- loop=0
- else
- loop=1
- end
- end
- if not fs.exists(name) then
- file=fs.open(name,"w")
- last=1
- file.writeLine(last)
- file.close()
- end
- if online == true then
- file=fs.open(name,"w")
- last=0
- file.writeLine(last)
- file.close()
- end
- if online == false then
- file=fs.open(name,"r")
- last=file.readLine()
- file.close()
- last=last+1
- file=fs.open(name,"w")
- file.writeLine(last)
- file.close()
- seconds=last
- minutes=0
- hours=0
- days=0
- while seconds > 60 do
- minutes=minutes+1
- seconds=seconds-60
- end
- while minutes > 60 do
- hours=hours+1
- minutes=minutes-60
- end
- while hours > 24 do
- days=days+1
- hours=hours-24
- end
- end
- if online == true then
- pid=pid+2
- term.setCursorPos( 1,pid )
- print(name)
- term.setCursorPos( 30,pid )
- print("Online")
- pid=pid-2
- else
- pid=pid+2
- term.setCursorPos( 1,pid )
- print(name)
- term.setCursorPos( 30,pid )
- print(days.."d "..hours.."h "..minutes.."min "..seconds.."sec. ago")
- pid=pid-2
- end
- pid=pid+1
- end
- pid=pid-1
- print("")
- print("Players: "..pid)
Add Comment
Please, Sign In to add comment