void main()
{
    object oGM = GetPCSpeaker();
    object oTrap = GetObjectByTag("CAS_PLC_VFXTRAP");

    // Ensure the trap is valid and in the same area as the speaker
    while (GetIsObjectValid(oTrap))
    {
        if (GetArea(oTrap) == GetArea(oGM))
        {
            // Found the trap in the same area, proceed with the script
            int nDC = GetLocalInt(oTrap, "nDC");
            string sDamage = GetLocalString(oTrap, "sDamage");
            int nDamageType = GetLocalInt(oTrap, "nDamageType");
            float fFrequency = GetLocalFloat(oTrap, "fFrequency");

            string sMessage = "Current Hazard Settings:\n" +
                              "DC: " + IntToString(nDC) + "\n" +
                              "Damage: " + sDamage + "\n" +
                              "Damage Type: " + IntToString(nDamageType) + "\n" +
                              "Rate: Every " + FloatToString(fFrequency) + " seconds.";

            SendMessageToPC(oGM, sMessage);
            return;
        }

        // Try to find the next instance of the trap
        oTrap = GetObjectByTag("CAS_PLC_VFXTRAP", GetObjectByTagNext(oTrap));
    }

    // If no trap was found in the same area
    SendMessageToPC(oGM, "No hazard found in this area.");
}
