//////////////////////////////////////////////////////////////////////////////// // uc_t_ok - Okay to create at least 1 of this unit? // By Deva B. Winblood. December 21st, 2008 //////////////////////////////////////////////////////////////////////////////// #include "uc_h" int StartingConditional() { object oPC=GetPCSpeaker(); int nBase=GetLocalInt(oPC,"nUCBase"); string sID=GetLocalString(oPC,"sTeamID"); int nMax=GetLocalInt(GetModule(),sID+"_UNITS"); int nUnit=GetLocalInt(oPC,"nUCRun"); int nNumber=nBase+nUnit; string sDescription; SetLocalInt(oPC,"nUCRun",nUnit+1); if (!GetCanBeCreated(sID,nNumber)) return FALSE; sDescription=GetUnitDescription(sID,nNumber,1,-1,oPC); SetCustomToken(1001+nUnit,sDescription); return TRUE; }