How to make an Enemy to autoequip an item to actor upon defeat

Im making a mod, inside a RPGMV game, and i want to make, certain enemies equip to actors, an item that puts debuffs, and its unequibable (im working on a quest for that).
Im really new programming, and i dont know how to do it, so any help is really appreciated
I think you are asking for too many tasks in one step. E.g., enemies cannot be equipped by default. So I think you are not asking for a few tips, but rather for a full plugin request. So, maybe extend your idea a bit with some details, screenshots, mock-ups, etc.
I think you are asking for too many tasks in one step. E.g., enemies cannot be equipped by default. So I think you are not asking for a few tips, but rather for a full plugin request. So, maybe extend your idea a bit with some details, screenshots, mock-ups, etc.
I dont want enemies to be equipped, i just want to know how to make, that when you lose against certain enemies, you will be equiped with an item, that has debufs.
I think it should be like an event or smt, but im very new and i dont really now how to do it
Ah, okay, then I got you wrong.

Usually, it is a good idea to start is to use http://www.yanfly.moe/wiki/Skills_and_States_Core_VisuStella_MZ (MZ) or http://www.yanfly.moe/wiki/Buffs_&_States_Core_(YEP) (MV) and then add a Notetag to the Death State that runs a Common Event. In this Common Event, you can do anything you like.

I used this Notetag in the Knockout State to run a Common Event:
Code:
<Custom Apply Effect>
$gameTemp.reserveCommonEvent(1);
</Custom Apply Effect>

Replace 1 with your Common Event Id
Ah, okay, then I got you wrong.

Usually, it is a good idea to start is to use http://www.yanfly.moe/wiki/Skills_and_States_Core_VisuStella_MZ (MZ) or http://www.yanfly.moe/wiki/Buffs_&_States_Core_(YEP) (MV) and then add a Notetag to the Death State that runs a Common Event. In this Common Event, you can do anything you like.

I used this Notetag in the Knockout State to run a Common Event:
Code:
<Custom Apply Effect>
$gameTemp.reserveCommonEvent(1);
</Custom Apply Effect>

Replace 1 with your Common Event Id
Also, i have to add, that in this game when you get defeated, certain enemies capture you, and you have to escape from their base, will this conflict if i made an event like this?

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-an-enemy-to-autoequip-an-item-to-actor-upon-defeat.161042/