I'm aware that you can use an action in combat in order to ready a specific response to be performed as a reaction when a certain event triggers it.
But what if I'm in a situation where combat hasn't begun, and want to ready an action?
Take this situation for example
I approach bandits in a tavern (No combat yet)
I confront them and sense that things are about to get violent
So I ready a firebolt spell (Before Initiative Rolls) and set it to trigger as my reaction when I see one of them draw their weapon
But since combat hasn't started yet, and I'm in no position to ambush, can I get a head start by readying an action before SHTF.
And if so can I set it to trigger as a reaction to them drawing their swords to begin combat, and fire at one of the bandits before they can react
What happens? Does it count as some sort of opportunity attack, or does it trigger as an bonus/extra attack/reaction/action on my first turn. or is it something else entirely?
In other words, do I have to be in combat in order to take the "ready" action, or can I do so before initiative has been rolled and still gain its benefits.
If I can take the action it before initiative is rolled, does my readied action trigger immediately after the bandit draws his weapon (as described above) or what?