28 lines
628 B
Plaintext
28 lines
628 B
Plaintext
|
void main()
|
||
|
{
|
||
|
int iNPCHelpers;
|
||
|
int iIndex;
|
||
|
int iFlag;
|
||
|
string sNPC;
|
||
|
string sNPCTag;
|
||
|
object oNPC;
|
||
|
location lLoc;
|
||
|
|
||
|
iNPCHelpers = GetLocalInt(GetModule(),"QuestNPCHelpers");
|
||
|
iIndex = 0;
|
||
|
iFlag = 0;
|
||
|
|
||
|
while (iIndex < iNPCHelpers)
|
||
|
{
|
||
|
iIndex++;
|
||
|
sNPC = "QuestNPCHelper" + IntToString(iIndex);
|
||
|
sNPCTag = GetLocalString(GetModule(),sNPC);
|
||
|
if (!GetIsObjectValid(GetObjectByTag(sNPCTag)))
|
||
|
{
|
||
|
lLoc = GetLocation(GetObjectByTag("POST_" + sNPCTag));
|
||
|
oNPC = CreateObject(OBJECT_TYPE_CREATURE,sNPCTag,lLoc);
|
||
|
SendMessageToPC(GetPCSpeaker(),GetName(oNPC) + " has been restored.");
|
||
|
}
|
||
|
}
|
||
|
}
|