Initial Commit
Initial Commit [v1.32PRC8]
This commit is contained in:
42
_module/nss/mod_caveenter.nss
Normal file
42
_module/nss/mod_caveenter.nss
Normal file
@@ -0,0 +1,42 @@
|
||||
#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);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user