How to make enemy stop attacking when a items used

So in my game i had a dog miniboss and a cat boss but i wamted to know is there a way to make it so that when you use the item which is a bone and a fish they just thank you basically and you can not fight them
At the beginning of battle, turn on a switch assigned to each miniboss. Make their attack condition that switch being on. Have the items call a common event that turns their respective switch off.
At the beginning of battle, turn on a switch assigned to each miniboss. Make their attack condition that switch being on. Have the items call a common event that turns their respective switch off.
Do yk where i can find a tutorial for this cause its hard to figure this out from text
You can make the item add a state to the target. Like when you give a bone to a dog, he gets the state "tame" or "friendly". This state can be set to "Can't move" which basically means "can't attack or do any other skill"

You can make it last for the rest of the battle, or just a few turns, till the bone is consumed.
Do yk where i can find a tutorial for this
that depends on what kind of tutorial you are looking for.

if you are looking for a tutorial specifically on your question in this topic then no, that doesn't exist.

But in the core that problem would be classified as "basic eventing" or "basic database use", and for those are tutorials available - they are just bigger, answer a lot more question that only your specific one and will take a few weeks to work through before they allow you to answer the specific question about the enemy.
You can make the item add a state to the target. Like when you give a bone to a dog, he gets the state "tame" or "friendly". This state can be set to "Can't move" which basically means "can't attack or do any other skill"

You can make it last for the rest of the battle, or just a few turns, till the bone is consumed.
This won't prevent you from attacking the dog/cat though.
This won't prevent you from attacking the dog/cat though.
So is there a way so when i give them the item they just say smthn like thanks and lets you get past them
Is the boss battle triggered by approaching / interacting with the event(s)?

If so you could do this with conditional branches, depending on what key items are in your inventory before the battle starts.

For example, if you have bone and fish in inventory, trigger text thank you, and event(s) walk off screen (movement route)
If only have bone - dog event walks off screen, cat stays and you fight cat
If only have fish - cat event walks off and you fight dog.
If you do not have items, battle starts and you fight both.
So is there a way so when i give them the item they just say smthn like thanks and lets you get past them
All the answer above (with the exception of the one directly above that was ninja'd in while I was writing) were based on the assumption that you are already in battle with them.
because you never specified if you want to use the item in battle or outside battle.

however if you want to use it outside of battle to prevent that battle, then the answer is the same as it was already given to you in previous questions:

The answer is the same: make an event with multiple pages that reacts to conditions given.

What you need to think about is the follwing:
You have no dog or cat or snowman on your maps at all.
you have events that pretend to be a dog or a snowman or whatever.
they may look different to the player, but to you as the developer they will always be events, nothing else.
and events always handle the same, no matter what they pretend to be.
So is there a way so when i give them the item they just say smthn like thanks and lets you get past them
Yes there is. But you choose the wrong person to ask. I am leaving this place.
If you want my help personally, you can contact me trough one of the buttons in my signature.
↓↓↓​

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-enemy-stop-attacking-when-a-items-used.145802/