quizHelper.lua utility file - VanaDev/Vana GitHub Wiki
Category: Utility Lua-Based Scripts
Type: number
Notes: Used as a return value from the askQuizQuestion function to indicate the player has answered incorrectly.
Type: number
Notes: Used as a return value from the askQuizQuestion function to indicate the player has answered correctly.
Return(s):
- quizQuestion: table
- question: string
- correctAnswerIndex: number
- answers: table
Usage:
makeQuizQuestion("Which of these items does the Flaming Raccoon NOT drop?", 2, {"Raccoon Firewood ", "Solid Horn ", "Red Brick "}),
Return(s):
- answerResultCode: number
- questions: array table
- Optional - prefix: string
Usage:
for i = 1, 5 do if askQuizQuestion(questions, "Question no." .. i .. ": ") == answer_incorrect then addText("Hmmm...all humans make mistakes anyway! "); sendNext(); return; end end