#include "nw_i0_plot"
int CanAffordIt()
{
    int nCost = 50;
    // * remove the gold from the player
    // * I'm having the player remove it from himself
    // * but since I'm also destroying it, this will work
    if (GetGold(GetPCSpeaker()) >= nCost)
    {
        TakeGold(nCost, GetPCSpeaker());
        return TRUE;
    }
    return FALSE;
}
void main()
{
   CanAffordIt();
   location lLoc = GetLocalLocation(GetPCSpeaker(), "NW_L_LOC_RECALL");
   DelayCommand(2.0,ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_IMP_UNSUMMON), lLoc));
   AssignCommand(GetPCSpeaker(), JumpToLocation(lLoc));
}

