#include "rd_spawnzones" void main() { object oPC; vector vPC; vector vNew; location lLoc; int iRndX; int iRndY; int iLevel; string sTag; oPC = GetEnteringObject(); if (GetIsPC(oPC)) { if (Random(20) == 0) { if (GetLocalInt(GetArea(OBJECT_SELF),"SpecialTrig") == 0) { SetLocalInt(GetArea(OBJECT_SELF),"SpecialTrig",1); SendMessageToPC(oPC,"You hear the flapping of wings..."); iLevel = GetHitDice(oPC); iLevel = ZoneLevel(GetArea(oPC),iLevel); vPC = GetPosition(oPC); iRndX = Random(6) + 4; iRndY = Random(6) + 4; if (Random(2) == 1) iRndX=iRndX * -1; if (Random(2) == 1) iRndY=iRndY * -1; vNew = vPC + Vector( iRndX/1.0, iRndY/1.0, 0.0 ); lLoc = Location(GetArea(oPC), vNew, VectorToAngle( -1.0 * vNew ) ); CreateObject(OBJECT_TYPE_CREATURE,"en3_stirge",lLoc); CreateObject(OBJECT_TYPE_CREATURE,"en3_stirge",lLoc); vPC = GetPosition(oPC); iRndX = Random(6) + 4; iRndY = Random(6) + 4; if (Random(2) == 1) iRndX=iRndX * -1; if (Random(2) == 1) iRndY=iRndY * -1; vNew = vPC + Vector( iRndX/1.0, iRndY/1.0, 0.0 ); lLoc = Location(GetArea(oPC), vNew, VectorToAngle( -1.0 * vNew ) ); CreateObject(OBJECT_TYPE_CREATURE,"en3_stirge",lLoc); CreateObject(OBJECT_TYPE_CREATURE,"en3_stirge",lLoc); } else { SetLocalInt(GetArea(OBJECT_SELF),"SpecialTrig",0); } } } }