Could I do it with visit_url and contains_text? That is, could I use those functions to see if the character has a) been to the altar and b) is in chat?
EDIT: It'd be easy to check the quest log to determine the character's literacy status, so I guess the real question is, as Veracity said, to...