void AdjustNPCReputation(string sTagNPC1, string sTagNPC2)
{
    object oNPC1 = GetNearestObjectByTag(sTagNPC1);
    object oNPC2 = GetNearestObjectByTag(sTagNPC2);

    if(GetIsObjectValid(oNPC1) && GetIsObjectValid(oNPC2))
    {
        // Adjust reputation to make them hostile towards each other
        AdjustReputation(oNPC1, oNPC2, -100);
        AdjustReputation(oNPC2, oNPC1, -100);

        // Command each NPC to attack the other
        AssignCommand(oNPC1, ActionAttack(oNPC2));
        AssignCommand(oNPC2, ActionAttack(oNPC1));
    }

    // Schedule this function to be called again in 12 seconds
    DelayCommand(12.0, AdjustNPCReputation(sTagNPC1, sTagNPC2));
}


void main()
{
    // Get the waypoints
    object oWaypointBlack = GetWaypointByTag("SPAWN_MOB_BLACK");
    object oWaypointRed = GetWaypointByTag("SPAWN_MOB_RED");

    // Check if waypoints are valid
    if(GetIsObjectValid(oWaypointBlack) && GetIsObjectValid(oWaypointRed))
    {
        // Spawn the NPCs
        object oNPCBlack = CreateObject(OBJECT_TYPE_CREATURE, "CAS_ARENABLACK", GetLocation(oWaypointBlack));
        object oNPCRed = CreateObject(OBJECT_TYPE_CREATURE, "CAS_ARENARED", GetLocation(oWaypointRed));

        // Delay 90 seconds, then adjust their reputation and make them attack each other
        AdjustNPCReputation("CAS_ARENABLACK", "CAS_ARENARED");
    }
}
