#W# Initial Commit: Avatars Conquest

This commit is contained in:
WarrentyExpired 2026-07-04 10:35:30 -04:00
commit 5df497787a
7510 changed files with 416048 additions and 0 deletions

View file

@ -0,0 +1,30 @@
using System;
using Server;
using Server.Items;
using Server.Mobiles;
namespace Server.Misc
{
class QuestFunctions
{
public static bool MonstersNearby( Mobile m )
{
bool inCombat = ( m.Combatant != null && m.InRange( m.Combatant.Location, 20 ) && m.Combatant.InLOS( m ) );
int monsters = 0;
foreach ( Mobile monster in m.GetMobilesInRange( 8 ) )
{
if ( monster is BaseCreature && !(((BaseCreature)monster).GetMaster() is PlayerMobile) )
monsters++;
}
if ( monsters > 0 || inCombat )
{
m.SendMessage( "You cannot do that with enemies nearby!" );
return true;
}
return false;
}
}
}