Initial Commit
Initial Commit [v1.32PRC8]
This commit is contained in:
38
_module/nss/rd_houseexit.nss
Normal file
38
_module/nss/rd_houseexit.nss
Normal file
@@ -0,0 +1,38 @@
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user