answering questions

is there a way of a npc asking three questions and depending on the amount of correct answers depends on what information is given as a prize?

for example if they get one question correct they are allowed to pass, if they get two questions correct then they get a hint about the game, if they get three questions right then they are told which items to pick up

How do you want to do it? choosing answers from a menu or input the answers?

inputing answers

It should be something like this:

 msg("first question:")
answer= GetInput()
if (answer="....") {
counter=counter+1
}
msg("secondquestion:")
answer= GetInput()
if (answer="....") {
counter=counter+1
}
msg("thirdquestion:")
answer= GetInput()

if (answer="....") {
counter=counter+1
}
if (counter=1) {
...
} else if (counter=2) {
...
} else if (counter=3) {
...
}