From 42da759407fef9dcf5ecb634bbb05f90385e78c6 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Thu, 15 May 2025 15:44:22 +0100 Subject: [PATCH] tamed npc/animal wont attack players unless provoked --- api.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api.lua b/api.lua index d5cccc7..4f0e35b 100644 --- a/api.lua +++ b/api.lua @@ -1693,7 +1693,8 @@ function mob_class:general_attack() -- remove from list if invisible or unable to attack if not damage_enabled or self.attack_players == false or self.owner == objs[n]:get_player_name() --- or (self.owner and self.type ~= "monster") + -- npcs and animals that are tamed will not attack players unless provoked + or (self.type ~= "monster" and self.tamed) or is_invisible(self, objs[n]:get_player_name()) or (self.specific_attack and not check_for("player", self.specific_attack)) then objs[n] = nil