ff_c_cnd_journal

TRUE if the speaking PC has reached a journal state for a quest.

Parameters

QUEST: (string) Tag of the journal category. Required.

JOURNAL_ID: (int) Journal entry ID, at least 1. Required. The condition is TRUE if the PC’s state for the quest is at least this value.

Scripts

TextAppearsWhen: ff_c_cnd_journal

Source code

// @code

#include "ff_i_core"


// =============================================================================

int StartingConditional()
{
  string sQuest = GetScriptParam("QUEST");
  if (sQuest == "")
  {
    LogError(__FILE__ + ": called with invalid 'QUEST' value");
    return FALSE;
  }

  int nState = StringToInt(GetScriptParam("JOURNAL_ID"));
  if (nState == 0)
  {
    LogError(__FILE__ + ": called with invalid 'JOURNAL_ID' value. Must be at least 1.");
    return FALSE;
  }
  return GetJournalQuestState(sQuest, GetPCSpeaker()) >= nState;
}