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); } } }