void ApplyFireDamage(object oTarget, object oPlaceable)
{
    // Stop if the placeable no longer exists or iAmOnFire is not set to 1
    if (!GetIsObjectValid(oPlaceable) || GetLocalInt(oPlaceable, "iAmOnFire") != 1)
    {
        return;
    }

    // Apply 10 points of fire damage
    effect eFireDamage = EffectDamage(10, DAMAGE_TYPE_FIRE);
    ApplyEffectToObject(DURATION_TYPE_INSTANT, eFireDamage, oTarget);

    // Schedule to apply fire damage again after 6 seconds
    DelayCommand(6.0, ApplyFireDamage(oTarget, oPlaceable));
}

void main()
{
    // The entering object
    object oEnter = GetEnteringObject();

    // Only proceed if the entering object is a PC
    if (GetIsPC(oEnter))
    {
        // Check for the existence of a placeable with the tag 'I_CAS_FLOOR'
        object oPlaceable = GetNearestObjectByTag("I_CAS_FLOOR");

        // Start applying fire damage if conditions are met
        ApplyFireDamage(oEnter, oPlaceable);
    }
}
