How do I check whether a battle is currently going on?

So I'm thinking about ideas for an RPG, and I've come across a problem.  What I want to do is have multiple actions for items.  The way I'm doing this is simply giving every item a common event that allows the player to choose what they do with the item.  For example, I'll have a packed lunch with options like "Eat", or "Drop", or whatever.  But I also want items to have different options in battle, such as "Give", so you might be able to give your lunch to a dog to prevent the dog from fighting you.


So here's my question, how do I check whether or not the player is currently in a battle using a common event?  I could probably just set a switch at the beginning of each battle and use the switch to check if the player's in a battle, but I would prefer to use an event or script to make things easier.
I've moved this thread to RPG Maker VX Ace . Please be sure to post your threads in the correct forum next time. Thank you.
Code:
Conditional Branch: Script: $game_party.in_battle
  ... do stuff if in battle
Else
  ... do stuff if not in battle
End
In a conditional use the advanced script call feature with $game_party.in_battle


This will return true when the party is in battle and false otherwise.

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-check-whether-a-battle-is-currently-going-on.63183/