43 lines
969 B
Plaintext
43 lines
969 B
Plaintext
#include "rd_spawnzones"
|
|
//#include "rd_questinc"
|
|
|
|
void main()
|
|
{
|
|
object oPC;
|
|
location lLoc;
|
|
int iEvil;
|
|
int iGoodEvil;
|
|
|
|
oPC = GetEnteringObject();
|
|
if (GetIsPC(oPC))
|
|
{
|
|
if (GetLocalInt(OBJECT_SELF,"EvilSpawn")==0)
|
|
{
|
|
SetLocalInt(OBJECT_SELF,"EvilSpawn",1);
|
|
iEvil = FALSE;
|
|
iGoodEvil = GetGoodEvilValue(oPC);
|
|
|
|
if (iGoodEvil > 40 && iGoodEvil < 60)
|
|
if (Random(3)==0)
|
|
iEvil = TRUE;
|
|
if (iGoodEvil < 40)
|
|
iEvil = TRUE;
|
|
|
|
if (iEvil==TRUE)
|
|
{
|
|
lLoc = GetLocation(GetObjectByTag("OC_Evil"));
|
|
CreateObject(OBJECT_TYPE_CREATURE,"en3_dmessenger",lLoc);
|
|
}
|
|
}
|
|
|
|
if (GetLocalInt(OBJECT_SELF,"Spawned") == 0)
|
|
{
|
|
RespawnCampsAE(GetEnteringObject());
|
|
RespawnMobsAE(GetEnteringObject());
|
|
SetLocalInt(OBJECT_SELF,"Spawned",1);
|
|
SetLocalInt(OBJECT_SELF,"RandomEncounter",1);
|
|
|
|
}
|
|
}
|
|
}
|