Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CURRENT_FLOOR = 1
- SECRET = 'first'
- rednet.open('back')
- while true do
- print('Which floor do you need?')
- write('Enter the number: ')
- floor = read()
- floor = tonumber(floor)
- if floor == CURRENT_FLOOR then
- print('You are already at this floor')
- elseif floor == nil or floor < 0 or floor > 3 then
- print('Wrong input, try again')
- else
- print('Activating teleporter...')
- rednet.broadcast(floor, SECRET)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement