// Conditional script to check if any player in the area is in the arena

int StartingConditional()
{
    object oNPC = OBJECT_SELF; // The NPC involved in the conversation
    object oArea = GetArea(oNPC); // Get the area where the NPC is located

    object oPC = GetFirstPC(); // Get the first player character in the game

    while (GetIsObjectValid(oPC))
    {
        // Check only players in the same area as the NPC
        if (GetArea(oPC) == oArea)
        {
            if (GetLocalInt(oPC, "iAmInArena") == 1)
            {
                // A player in the arena is found, so prevent access to the fight-starting dialogue option
                return FALSE;
            }
        }

        oPC = GetNextPC(); // Check the next player character
    }

    // No players in the arena were found in the area, so allow access to the dialogue option
    return TRUE;
}
