You would use a simple global variable and an if statement.
in main.sc, define in your local segment:
(local
...
talkedToMan = FALSE
)
then in the room script, have something like this:
(if(Said("talk/man"))
(if(talkedToMan)
Print("You already talked to him.")
)(else
= talkedToMan TRUE
Print("Hello there.")
)
)