ALotOfPosts is correct.
Every time that you make a selection, or press next on an NPC etc. the action method is called again, with mode, type and selection.
In the case of selcting option 7, it would call the action method with mode = 1, selection = 7
In your script, if mode = 1, status is...