void main()
{
    object oPC = GetPCSpeaker();
    string sTitle = GetLocalString(oPC, "I_SAID");

    object oLoveNote = GetItemPossessedBy(oPC, "I_CAS_LOVENOTE");
    if (!GetIsObjectValid(oLoveNote))
    {
        SendMessageToPC(oPC, "You don't have a Love Note in your inventory.");
        return;
    }

    // ?? 1. Set the title
    SetName(oLoveNote, sTitle);

    // ? 2. Set author/player ID
    int nPCId = PLAYER_GetId(oPC); // Replace with your actual function
    SetLocalInt(oLoveNote, "NBOARD_NOTICE_AUTHOR", nPCId);

    // ? 3. Remove all item properties (including Unique Power: Self)
    itemproperty ip = GetFirstItemProperty(oLoveNote);
    while (GetIsItemPropertyValid(ip))
    {
        RemoveItemProperty(oLoveNote, ip);
        ip = GetNextItemProperty(oLoveNote);
    }

    // ? 4. Unregister any custom variable events (e.g., on-use logic)
    UnregisterVariableEvent(oLoveNote, "EVENT_USE", "nboard_ev_usenot");

    // ? Optional: Finalization flag for your systems
    SetLocalInt(oLoveNote, "bFinalized", TRUE);

    // ? Confirmation
    SendMessageToPC(oPC, "Your Love Note has been finalized with the title: \"" + sTitle + "\".");
}
