runelite / runelite

Open source Old School RuneScape client
https://runelite.net
BSD 2-Clause "Simplified" License
4.8k stars 5.24k forks source link

[NPC Agression Timer] Level filter breaks ammonite crabs #8966

Open josephverburg opened 5 years ago

josephverburg commented 5 years ago

When killing Ammonite crabs with the "NPC Aggression Timer" plugin enabled it does not work. This is because they aggro even when you have a "too high" combat level (playerLevel > 2 * npcLevel). The line that causes this: https://github.com/runelite/runelite/blob/master/runelite-client/src/main/java/net/runelite/client/plugins/npcunaggroarea/NpcAggroAreaPlugin.java#L266

Steps to reproduce the behavior:

  1. Enable "NPC Agression Timer"
  2. Add "Ammonite" to NPC names
  3. Does not trigger when going near Ammonite crabs on fossil island

Expected behavior Triggers on Ammonite crabs always when "Ammonite" is in "NPC names"

Fix Add toggle to disable this check. (i could not find aggro information in the NPC api) If you are fixing this: might as well add description to npc names field to show that it is comma separated, similar to ground items: https://github.com/runelite/runelite/blob/master/runelite-client/src/main/java/net/runelite/client/plugins/grounditems/GroundItemsConfig.java#L43

Environment (please complete the following information):

Enriath commented 5 years ago

Most NPCs follow that formula to see if they're aggressive to the player; crabs are an exception to that. If you want to use crabs at the moment, add the rock form. Since that has no combat level, it is considered always aggressive

josephverburg commented 5 years ago

That seems like a workaround, adding a toggle to enable/disable this behavior shouldn't be to difficult.