Initial Commit
Initial Commit
This commit is contained in:
28
_module/nss/hench_canthire2.nss
Normal file
28
_module/nss/hench_canthire2.nss
Normal file
@@ -0,0 +1,28 @@
|
||||
// 69_hench_canwork
|
||||
// Text appears if NPC can work for PC
|
||||
// Created: 69MEH69 July 2004
|
||||
|
||||
#include "x4_inc_functions"
|
||||
#include "69_hench_lib"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
int iResult;
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
//count current henchmen
|
||||
int nHenchs = 0;
|
||||
object oAssociate = GetAssociate(ASSOCIATE_TYPE_HENCHMAN, oPC, 1);
|
||||
int i;
|
||||
for (i = 2; GetIsObjectValid(oAssociate); i++)
|
||||
{
|
||||
if (GetLocalInt(oAssociate, "HenchPosition") > 0) nHenchs++;
|
||||
oAssociate = GetAssociate(ASSOCIATE_TYPE_HENCHMAN, oPC, i);
|
||||
}
|
||||
|
||||
iResult = GetCanWork69(oPC, OBJECT_SELF);
|
||||
int nHenchNumber = GetCampaignInt(CharacterDB(oPC), "HENCH_NUMBER");
|
||||
if(iResult == FALSE) return TRUE;
|
||||
if (nHenchNumber == nHenchs) return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
Reference in New Issue
Block a user