mob
NPC
name = "Teacher"
icon = 'Teacher.dmi'
verb
Talk()
set src in oview(2)
set category ="Teacher"
switch(input("Ready for school?", text) in list ("Yes","No"))
if("No")
world << "[usr] doesnt wanna do school!!"
if("Yes")
switch(input("What grade am I teaching, again?", text) in list ("8th","9th"))
if("8th")
world << "Alright! [usr] is about to start doing 8th grade work!"
sleep(10)
world << "Okay, today is going to be expressions! It's really very simple.."
sleep(10)
world << " Say you have the problem 9x. We'll let x=2."
sleep(10)
world << "All you would do is plug 2 in for x so the problem becomes 9(2)"
sleep(20)
world << "As you may already know 9(2) is same as 9x2. So the answer is 18!"
sleep(10)
world << "Okay time to test you out!"
sleep(10)
world << "Be sure to have scrap paper handy! We're gonna check your work!!!!"
sleep(10)
switch(input("24 Divided by M...Let M = 3", text) in list ("24", "3","12","8"))
if("24")
src.Point-=1
world << "Sorry, that was wrong. The correct answer is 8"
if("3")
src.Point-=1
world << "Sorry, that was wrong. The correct answer is 8"
if("12")
src.Point-=1
world << "Sorry, that was wrong. The correct answer is 8"
if("8")
src.Point += 1
world << "Thats correct! A point has been added to your score!"
Problem description:
I have two problems. When they pick the correct answer the points do not go up by 1, and when they pick the incorrect answer they do not go down by 1, they just dont move at all. Still shows Points: 0. The code im using to show that though is Points: [Point] if that matters. Also, how can I make it so that even if they pick the incorrect answer it moves on to the next question? The only way I know how is to set up a whole exam through each answer, including the incorrect ones, which would be a whole lot of work, anyone know how I can do it easier? Thanks a bunch guys for the help guys! If you dont wanna help, no bashing please.
You could make them move on to the next question by making each question a proc, and when someone talks to the teacher it calls the Question1 proc, and at the end of that one it calls the Question2 proc, etc.
This would also allow you to save what last question they were on, so that when they talk to the teacher it can check and take them to whichever question they were on instead of starting from the beginning.