Hi there,
These should do what you're after. Not exactly the best code, though.
Conditional script ("TextAppearsWhen" option in conversation editor):
int StartingConditional()
{
object oPC = GetPCSpeaker();
int nRats = GetLocalInt(oPC, "DeadRats");
if (nRats >= 10)
return TRUE;
else
return FALSE;
}
Rat OnDeath script addition:
void main()
{
object oPC = GetLastKiller();
int nRats = GetLocalInt(oPC, "DeadRats");
SetLocalInt(oPC, "DeadRats", nRats+1);
if (nRats = 10)
{
// AddJournalQuestEntry("DeadRats", 1, oPC);
// - This one requires a bit more manual setup to your journal.
}
else
{
}
}