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

33 lines
703 B
Plaintext

void main()
{
int iRnd;
int iLevel;
string sTag;
location oLoc;
object oPC;
oPC = GetEnteringObject();
iLevel = GetLevelByPosition(1,oPC) +
GetLevelByPosition(2,oPC) +
GetLevelByPosition(3,oPC);
if (GetIsPC(oPC))
{
SetLocalInt(oPC,"PCRandomMonster",0);
if (GetLocalInt(OBJECT_SELF,"MHCNPC1")==0 && GetHitDice(oPC)>2)
{
SetLocalInt(OBJECT_SELF,"MHCNPC1",1);
iRnd=Random(2)+1;
switch (iRnd)
{
case 1: sTag = "en3_Perick"; break;
case 2: sTag = "en3_Meram"; break;
}
oLoc = GetLocation(GetObjectByTag("MHCNPC1"));
CreateObject(OBJECT_TYPE_CREATURE,sTag,oLoc);
}
}
}