eniac
Member
- Joined
- Jul 22, 2010
- Messages
- 107
Hey I have made a plugin that will automatically activate and deactivate stealth while gathering. Stealthy
But I just now realised that it will not only use stealth on hostile mobs, but on every mob. Even neutral ones.
Does anyone have an idea how to sort out hostile mobs ?
I'm currently using:
But I just now realised that it will not only use stealth on hostile mobs, but on every mob. Even neutral ones.
Does anyone have an idea how to sort out hostile mobs ?
I'm currently using:
Code:
GameObjectManager.GetObjectsOfType<BattleCharacter>().Where((u, i) => u.Type == GameObjectType.BattleNpc &&
u.Location.Distance(Core.Player.Location) < 30 &&
u.CanAttack &&
u.IsVisible).FirstOrDefault() != null