Another dumb question: How to prevent shop keepers & selected NPCs from getting attacked?

Im sure this must be easy, but I dont want the players to be able to battle shop keepers and NPCs, preferably if I assign them a custom class... Any suggestions?
I'm a little confused on what exactly you're asking.

In my mind, you should never be able to randomly fight any NPC's or shopkeepers if you don't include the coding.

So...just...don't code it to where you are able to fight the shop keeper/NPC's?

It should be pretty easy to not create enemies/battles with NPC's by accident, but I'm not sure what exactly you're coming from here.
I think what they meant is when the NPC/Shopkeeper joins the player party temporary, correct?
Definitely going to need you to clarify your question a little. Are you using an ABS plugin or something? As PoptartPresident stated, by default, there's not even remotely any reason why your shop keepers should be at risk of being randomly attacked by you, so you've likely got some non-default stuff going on that you would need to fill us in about before we could even hope to answer your question.
basically, events (no matter which) can't be attacked in default at all.
So if they can be attacked in your game, then you changed something to allow them to be attacked.

and the simplest solution would be to change that back to the default.

if you want to hear something else, you need to tell us what you changed to enable that attack on events.
I'm a little confused on what exactly you're asking.

In my mind, you should never be able to randomly fight any NPC's or shopkeepers if you don't include the coding.

So...just...don't code it to where you are able to fight the shop keeper/NPC's?

It should be pretty easy to not create enemies/battles with NPC's by accident, but I'm not sure what exactly you're coming from here.
d'oh! Should have thought that LOL

Original thread: https://forums.rpgmakerweb.com/threads/another-dumb-question-how-to-prevent-shop-keepers-selected-npcs-from-getting-attacked.148718/