55 lines
1.3 KiB
Plaintext
55 lines
1.3 KiB
Plaintext
//#include "rd_spawnzones"
|
|
#include "rd_questinc"
|
|
|
|
void main()
|
|
{
|
|
int iLevel;
|
|
string sTag;
|
|
location lLoc;
|
|
object oGuard;
|
|
object oPC;
|
|
int iMinLevel;
|
|
int iMaxLevel;
|
|
|
|
oPC = GetEnteringObject();
|
|
|
|
//CreateItemOnObject("NW_IT_MPOTION008",GetEnteringObject());
|
|
|
|
if (GetIsPC(oPC))
|
|
{
|
|
if (GetLocalInt(OBJECT_SELF,"EN4_SetupZone") == 0 && GetLocalInt(OBJECT_SELF,"AdventureZone") > 0)
|
|
SetupZone(oPC);
|
|
|
|
CheckZone(oPC);
|
|
|
|
if (GetLocalInt(OBJECT_SELF,"Spawned") == 0)
|
|
{
|
|
iLevel = GetHitDice(oPC);
|
|
iLevel = ZoneLevel(OBJECT_SELF,iLevel);
|
|
|
|
RespawnCampsAE(GetEnteringObject(),0, iLevel);
|
|
RespawnMobsAE(GetEnteringObject(),0, iLevel);
|
|
|
|
oGuard = GetObjectByTag("RP1_cguard1_S");
|
|
if (!GetIsObjectValid(oGuard))
|
|
{
|
|
lLoc = GetLocation(GetObjectByTag("RP1_cguard1"));
|
|
CreateObject(OBJECT_TYPE_CREATURE,"en4_cityguard",lLoc,FALSE,"RP1_cguard1_S");
|
|
}
|
|
|
|
oGuard = GetObjectByTag("RP1_cguard2_S");
|
|
if (!GetIsObjectValid(oGuard))
|
|
{
|
|
lLoc = GetLocation(GetObjectByTag("RP1_cguard2"));
|
|
CreateObject(OBJECT_TYPE_CREATURE,"en4_cityguard",lLoc,FALSE,"RP1_cguard2_S");
|
|
}
|
|
|
|
SetLocalInt(OBJECT_SELF,"Spawned",1);
|
|
SetLocalInt(OBJECT_SELF,"RandomEncounter",1);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|