Initial Commit
Initial Commit [v1.32PRC8]
This commit is contained in:
33
_module/nss/oc_enter.nss
Normal file
33
_module/nss/oc_enter.nss
Normal file
@@ -0,0 +1,33 @@
|
||||
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,"WSNPC1")==0 && GetHitDice(oPC)>5)
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF,"WSNPC1",1);
|
||||
iRnd=Random(3)+1;
|
||||
switch (iRnd)
|
||||
{
|
||||
case 1: sTag = "ws_Andy"; break;
|
||||
case 2: sTag = "en3_qapprentice"; break;
|
||||
case 3: sTag = "en3_Fino"; break;
|
||||
}
|
||||
|
||||
oLoc = GetLocation(GetObjectByTag("ws_npc1"));
|
||||
CreateObject(OBJECT_TYPE_CREATURE,sTag,oLoc);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user