I've been searching these forums for a definition of the 6 story states and their triggers. Here's what I know: 0 - Welcome to Hommlet. 1 - Moathouse located. 2 - Moathouse cleared. 3 - Nulb located. 4 - Temple located. 5 - ? 6 - ? Can someone fill in the blanks? Thank you.
Game.story_state == 5 is set when you speak to one of the temple elemental faction clerics. Game.story_state == 6 IIRC is set when you are told by Hedrack or Whitman about Zugtmoy still being alive albeit trapped.