//:://////////////////////////////////////////////////
//:: Filename: mhk_hire_chk
//:: Created By: MacLir (maclir@hotmail.com)
//:://////////////////////////////////////////////////
/*
     Handles the hiring/payment of a henchman.
*/
//:://////////////////////////////////////////////////
//:: Created On: August 12, 2004
//:://////////////////////////////////////////////////

#include "x0_i0_henchman"
#include "inc_prc_ecl"

void main(){
    object oPC = GetPCSpeaker();
    int iCost = GetECL(oPC) * GetLocalInt(OBJECT_SELF, "Cost");

    //Ensure plot/immortal flags has been turned off
    SetPlotFlag(OBJECT_SELF, FALSE);
    SetImmortal(OBJECT_SELF, FALSE);

    if (GetGold(oPC) > iCost){
        AssignCommand(OBJECT_SELF, TakeGoldFromCreature(iCost, oPC, TRUE));
        HireHenchman(oPC, OBJECT_SELF, TRUE);
    }
    else{
        SpeakString("It would seem as though you cannot afford me after all...", TALKVOLUME_TALK);
    }
}
