35 lines
873 B
Plaintext
35 lines
873 B
Plaintext
int fnLevel(object oPC)
|
|
{
|
|
int nRet=GetLevelByPosition(1,oPC);
|
|
nRet=nRet+GetLevelByPosition(2,oPC);
|
|
nRet=nRet+GetLevelByPosition(2,oPC);
|
|
return nRet;
|
|
} // fnLevel()
|
|
|
|
int fnLowestLevel()
|
|
{
|
|
int nRet=41;
|
|
object oPC=GetFirstPC();
|
|
while(oPC!=OBJECT_INVALID)
|
|
{
|
|
if (GetLocalString(oPC,"sTeamID")!=""&&fnLevel(oPC)<nRet&&GetIsDM(oPC)==FALSE&&oPC!=GetPCSpeaker()) nRet=fnLevel(oPC);
|
|
oPC=GetNextPC();
|
|
}
|
|
return nRet;
|
|
} // fnLowestLevel()
|
|
|
|
int StartingConditional()
|
|
{
|
|
object oMod=GetModule();
|
|
object oPC=GetPCSpeaker();
|
|
int nMyLevel=fnLevel(oPC);
|
|
int nLowest=fnLowestLevel();
|
|
int nStartLevel=GetLocalInt(oMod,"nGSStartingLevel");
|
|
if (GetLocalInt(oMod,"bNOLEVELUP")!=TRUE)
|
|
{ // level up allowed
|
|
if (nMyLevel<(nLowest-1)&&nStartLevel<(nLowest-1)) return TRUE;
|
|
return FALSE;
|
|
} // level up allowed
|
|
return FALSE;
|
|
}
|