39 lines
893 B
Plaintext
39 lines
893 B
Plaintext
|
void main()
|
||
|
{
|
||
|
object oPC;
|
||
|
object oSpawnPoint;
|
||
|
object oArea;
|
||
|
object oMob;
|
||
|
int iHouse;
|
||
|
|
||
|
oPC = GetEnteringObject();
|
||
|
|
||
|
oSpawnPoint = GetObjectByTag(GetLocalString(oPC,"EN4Return"));
|
||
|
if (!GetIsObjectValid(oSpawnPoint))
|
||
|
oSpawnPoint=GetObjectByTag("EN4_Respawn");
|
||
|
|
||
|
AssignCommand(oPC,JumpToLocation(GetLocation(oSpawnPoint)));
|
||
|
|
||
|
iHouse=GetLocalInt(oPC,"EN4House");
|
||
|
if (iHouse == 1)
|
||
|
SetLocalInt(GetModule(),"House1InUse",0);
|
||
|
if (iHouse == 2)
|
||
|
SetLocalInt(GetModule(),"House2InUse",0);
|
||
|
if (iHouse == 3)
|
||
|
SetLocalInt(GetModule(),"House3InUse",0);
|
||
|
SetLocalInt(oPC,"EN4House",0);
|
||
|
|
||
|
oArea=GetArea(oPC);
|
||
|
oMob = GetFirstObjectInArea(oArea);
|
||
|
while (GetIsObjectValid(oMob))
|
||
|
{
|
||
|
if (GetObjectType(oMob) == OBJECT_TYPE_CREATURE && !GetIsPC(oMob) && !GetIsPC(GetMaster(oMob)))
|
||
|
{
|
||
|
AssignCommand(oMob,ClearAllActions(TRUE));
|
||
|
}
|
||
|
|
||
|
oMob = GetNextObjectInArea(oArea);
|
||
|
}
|
||
|
|
||
|
}
|