Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ID = 240
- term.clear()
- term.setCursorPos(1,1)
- rednet.open("left") -- only need to open once, not each loop
- while true do
- local event, player = os.pullEventRaw('player') -- wait here for a player... reduces lag... using pullEventRaw means the program cannot be terminated
- if player == 'Plazter' or 'AlternateLogic' then
- rednet.send(ID, player)
- print("Player: "..player.." entered!")
- rs.setOutput("bottom", false)
- os.startTimer(2) -- the following 2 lines is a way to sleep without allowing program termination
- os.pullEventRaw('timer')
- rs.setOutput("bottom", true)
- else
- rednet.send(ID, "Unauthorized")
- print(player.." tryed to enter the plazter cave!!")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment