Initial commit

Adding all of the current content for Anphillia Unlimited.
This commit is contained in:
Jaysyn904
2024-01-04 07:49:38 -05:00
parent df18cd54c8
commit 28cdb617b3
12943 changed files with 9727121 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
#include "faction_inc"
void main()
{
object oArea = OBJECT_SELF;
string sOldScript = GetLocalString(oArea, "AREA_HEARTBEAT_SCRIPT");
int nPlayerCount = GetLocalInt(oArea, "AREA_PLAYER_COUNT");
if (nPlayerCount == 0)
{
int nHB = GetLocalInt(oArea, "AREA_HEARTBEAT_COUNT");
if (nHB >= 50) // 5 minutes till depop
{
SetEventScript(oArea, EVENT_SCRIPT_AREA_ON_HEARTBEAT, sOldScript);
object oCreature = GetFirstObjectInArea(oArea);
while (oCreature != OBJECT_INVALID)
{
if (GetIsEncounterCreature(oCreature) && !GetIsDMPossessed(oCreature) && !GetPlotFlag(oCreature))
{
if ((GetStandardFactionReputation(STANDARD_FACTION_HOSTILE, oCreature) >= 90) ||
fctn_GetFaction(oCreature) == ANPH_FACTION_NONE)
{
DestroyObject(oCreature);
}
else
{
SetLocalInt(oArea, "AREA_AI_LOWERED", 1);
SetAILevel(oCreature, AI_LEVEL_VERY_LOW);
}
}
oCreature = GetNextObjectInArea(oArea);
}
}
else
{
SetLocalInt(oArea, "AREA_HEARTBEAT_COUNT", nHB+1);
}
}
else
{
SetLocalInt(oArea, "AREA_HEARTBEAT_COUNT", 0);
SetEventScript(oArea, EVENT_SCRIPT_AREA_ON_HEARTBEAT, sOldScript);
}
ExecuteScript(sOldScript, oArea);
}