HoS_PRC8/_mod/_module/nss/oe_randomhouse.nss
Jaysyn904 04165202c0 Initial upload
Initial upload
2024-11-25 19:36:07 -05:00

34 lines
1.0 KiB
Plaintext

// OnEnter - The spawn routine for random houses
void fnSpawnHouse(object oDoor,string sID);
/////////////////////////////////////////////////////////////// MAIN
void main()
{
object oPC=GetEnteringObject();
object oDoor;
string sID;
if (GetIsPC(oPC)==TRUE)
{ // is PC
oDoor=GetNearestObject(OBJECT_TYPE_DOOR,oPC,1);
if (GetStringLeft(GetTag(oDoor),10)!="INSIDEDOOR")
oDoor=GetNearestObject(OBJECT_TYPE_DOOR,oPC,2);
if (GetStringLeft(GetTag(oDoor),10)=="INSIDEDOOR")
{ // valid door
sID=GetStringRight(GetTag(oDoor),2);
if (GetLocalInt(oDoor,"nActivated")!=TRUE)
{ // spawn this house
SetLocalInt(oDoor,"nActivated",TRUE);
fnSpawnHouse(oDoor,sID);
} // spawn this house
} // valid door
} // is PC
}
//////////////////////////////////////////////////////////////// MAIN
//////////////////////////
// FUNCTIONS
//////////////////////////
void fnSpawnHouse(object oDoor,string sID)
{ // populate the house
} // fnSpawnHouse()