EN4_PRC8/_module/nss/tt2_areaenter.nss
Jaysyn904 b464d8da05 Initial Commit
Initial Commit [v1.32PRC8]
2025-04-03 13:38:45 -04:00

46 lines
1.1 KiB
Plaintext

//#include "rd_spawnzones"
#include "rd_questinc"
//#include "rd_treasure"
void main()
{
int iLevel;
string sTag;
location lLoc;
object oBoss;
object oPC;
int iMinLevel;
int iMaxLevel;
oPC = GetEnteringObject();
if (GetIsPC(oPC))
{
if (GetLocalInt(OBJECT_SELF,"EN4_DoOnce") == 0)
{
SetLocalInt(OBJECT_SELF,"EN4_DoOnce",1);
SpawnQuestCamp("TT2",1,40,0,"portal");
oBoss = CreateObject(OBJECT_TYPE_CREATURE,"en3_LOLTH",GetLocation(GetObjectByTag("TT2_Lolth")));
GetArtifact(oBoss);
}
if (GetLocalInt(OBJECT_SELF,"EN4_SetupZone") == 0 && GetLocalInt(OBJECT_SELF,"AdventureZone") > 0)
SetupZone(oPC);
if (GetLocalInt(OBJECT_SELF,"Spawned") == 0)
{
iLevel = GetHitDice(oPC);
iLevel = ZoneLevel(OBJECT_SELF,iLevel);
RespawnCampsAE(GetEnteringObject(),0, iLevel);
RespawnMobsAE(GetEnteringObject(),0, iLevel);
SetTrapsAndDoors(GetEnteringObject());
SetLocalInt(OBJECT_SELF,"Spawned",1);
SetLocalInt(OBJECT_SELF,"RandomEncounter",1);
}
}
}