Skip to content

Problem With Radius

Featured Replies

hello all and happy new year.

i have a problem with radius npc. i have make a code for use some effect etc

 

doorman npc hit alter of wind is only a effect but in a radius doorman can't see target

 

here is code

public class L2SpecialEffects implements Runnable
{
		
	private L2MonsterInstance isNpc;
	
	public L2SpecialEffects(L2MonsterInstance GetNpc)
	{
		this.isNpc = GetNpc;
	}

	
		@Override
		public void run()
		{
			if (isNpc.isDead())
				return;

			for (final L2Object o : isNpc.getKnownList().getKnownCharactersInRadius(20000))
            {
				if(o instanceof L2MonsterInstance)
				{
					L2MonsterInstance mob = (L2MonsterInstance) o;
					
					if(mob.isDead() || mob.isInCombat())
					{
						continue;
					}
					
					if(mob.getNpcId() == 300)
					{
						isNpc.broadcastPacket(new MagicSkillUser(mob, mob, 3157, 1, 800, 0));
					}
				}
            }
		}
	}

i need tell me where is the problem tnx

 

image.jpg

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.