Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void main()
- {
- object oOrigin = GetFirstObjectInArea(OBJECT_SELF);
- object oArea = GetArea(OBJECT_SELF);
- object oPC = GetFirstPC();
- int iCount = 0;
- int iCheck = 0;
- //Check for players and DM avatars.
- while(oPC != OBJECT_INVALID)
- {
- if(GetArea(oPC) == oArea)
- {
- iCheck = 1;
- break;
- }
- oPC = GetNextPC();
- }
- //Check if any creatures are possessed by a DM.
- object oCreature = GetNearestCreature(4, 1, oOrigin, iCount);
- while(oCreature != OBJECT_INVALID)
- {
- if(GetIsDMPossessed(oCreature))
- {
- iCheck = 1;
- break;
- }
- oCreature = GetNearestCreature(4, 1, oOrigin, ++iCount);
- }
- //If iCheck isn't set due to empty area, destroy all creatures.
- if(iCheck != 1)
- {
- iCount = 0;
- oCreature = GetNearestCreature(4, 1, oOrigin, ++iCount);
- while(oCreature != OBJECT_INVALID)
- {
- DestroyObject(oCreature);
- oCreature = GetNearestCreature(-1, -1, oOrigin, ++iCount);
- /*
- eDam = EffectDamage(iDamage, DAMAGE_TYPE_ACID);
- SetLootable(oTarget, FALSE);
- ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
- */
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement