I really need help with events

Okay so, I have created an event where you speak to a guard and it opens a yes or no option for ship departure orders, if you say yes and have the orders it will spawn a ship, and if you say no he will tell you to speak for the king, however the problem is if I say yes without having the key item and try to hit escape to cancel it the event it will play out as if you had the key item and spawn the ship, I dont k ow how to cancel the even after I said yes.
'Tech Support' is for when you cannot run the engine at all.

"How do I...?" questions belong in the Support forum for the engine you are using.

Moderator note: Moving this to RPGMaker VX Ace

Please give us screen shots of your event pages. Do not crop anything, as we need to see the conditions on the left side as well as the commands themselves. When taking a screen shot please use Alt+PrtSc. This takes a screen shot of the active window (i.e. your event) and not your whole desktop, making it much easier to read your commands.
basically you need to add a conditional branch checking for the item in the choice branch of the yes option.
for better help we need the screenshot mentioned above to see what you have so far.
If you want to be able to hit Cancel, then you need to set the correct action for Cancel in the Show Choices command. It is probably set to play the Yes choice on Cancel. You can change it to not allow cancel at all, or to play the No choice.

It shouldn't be up to the player to remember whether they have the key item and cancel out. You should do a conditional branch, as Andar says, either before offering the choice at all, or after the Yes choice, and if the item isn't there, show another message and exit the processing.

Original thread: https://forums.rpgmakerweb.com/threads/i-really-need-help-with-events.96176/