Getting a specific Input

Sometimes in a game the interpreter asks Questions like YES or NO, or maybe Enter a number

How do I program that?

There are various ways you can approach this, depending on how exactly you want the question to work. My suspicion, though, is that the extension Questions by Michael Callaghan will cover most what you’re after. (It’s not perfect; it doesn’t handle asking multiple questions in immediate succession very well.)

If you want to make something a bit more crafted for your particular needs, the manual example Down in Oodville shows how to interpret numbered options as commands. (Also, if you want to make things really simple, Inform includes the actions ‘saying yes’ and ‘saying no’ by default; you can change them, like any other action, to produce special behaviour under very specific circumstances.)

For the basics, you can use the simple phrase ‘if the player consents’, as per section 11.5:

Check kissing the Queen:
	say "Are you quite sure you want to kiss the Queen? "; 
	if the player consents:
		continue the action;
		say "You abstain, surmising that such a display of affection might be contrary to decorum";
		stop the action.