void main()
{
    object oPC = GetPCSpeaker();
    object oItem = GetLocalObject(oPC, "MODIFY_ITEM");

    int iValue = GetGoldPieceValue(oItem);
    int iGold = GetGold(oPC);

    CopyObject(oItem, GetLocation(oPC), oPC);
    TakeGoldFromCreature(iValue, oPC, TRUE);
}
