Hi castonguayh.
try replacing that code with this one, you will have to add lots of more case responses so you will have better randomness in responses.
Rem Type=Plugin
Rem Name=Pop Quiz
Rem Author=ONTHECUTTINGEDGE2005
Rem Host=All
'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
'Test Variable
lblPlugin(0).Caption = "This plugin will allow HAL to ask topic type questions on the first response and give the answer on the second response."
lblPlugin(0).Move 120, 10, 3300, 1000
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub
Rem PLUGIN: PLUGINAREA7
'Here is our random Question Quizer Function.
PopQuiz = Questions()
'Here we see if the user is wanting a question from HAL about our sun as a type of Quiz.
If InStr(1, OriginalSentence, "give us a question about our sun", vbTextCompare) > 0 Then
GetResponse = PopQuiz
End If
Rem PLUGIN: FUNCTIONS
Function Questions()
'This is where we can write pop quiz questions about our own Sun.
Select Case Int(Rnd * 4)
Case 1
Quiz = "What type of star is our sun? <topic> Our Sun is a G2V class Star. </topic>"
Case 2
Quiz = "Can anyone tell me how many light years our Sun is from the center of the Milky Way Galaxy? <topic> The Sun orbits the center of the Milky Way galaxy at a distance of approximately 26,000 light-years from the galactic center, completing one revolution in about 225–250 million years. </topic>"
Case 3
Quiz = "What is the difference between a pioneer and climax community? <topic> A pioneer community has little biodiversity, while a climax community has a high biodiversity. </topic>"
Case 4
Quiz = "what is the law of conservation of matter? <topic> Matter cannot be created or destroyed under ordinary circumstances, but it can be rearranged. </topic>"
End Select
Questions = Quiz
End Function
Jerry[8D]