Script: merit_award_ftr

// merit_award_ftr — Reply action: award a Feature Implementation merit to selected player.
#include "merit_db"
void main()
{
    object oDM    = GetPCSpeaker();
    string sCdKey = GetLocalString(oDM, "merit_sel_cdkey");
    string sName  = GetLocalString(oDM, "merit_sel_name");

    Merit_AwardFeature(sCdKey);

    SendMessageToPC(oDM, "[Merit] Awarded Feature Implementation (+2) to " + sName + ".");

    object oTarget = GetFirstPC();
    while (GetIsObjectValid(oTarget))
    {
        if (GetPCPublicCDKey(oTarget) == sCdKey)
        {
            SendMessageToPC(oTarget,
                "[Merit] A DM has logged your feature contribution. Thank you!");
            break;
        }
        oTarget = GetNextPC();
    }

    SetCustomToken(5011, sName);
}