Please don't be in such a hurry to report a topic for closing. It hasn't even been 24 hours since you posted, and I haven't seen this thread until now.
Do you allow escape, or do you use events for your battles and have the 'continue when losing' option? If no to either of those, you can simply turn on a switch at the start of your battle. If you win, the switch will be on after the battle ends. If you lose, you'll have to load a saved game which will have the switch off.
RM stops processing troop events when the last enemy is killed, so any events that are triggered by an enemy's HP being <= 0 will not run for the last enemy. If you allow escape or continue when losing, you will need to modify the scripts or use a plugin. I have already written one to turn on switches based on battle outcome win/lose/escape/abort, but really if you only want it turned on when you win, it's a one-line addition, and a plugin is probably overkill since you have the skills to do it yourself.
Closing at OP's request