Well, you could always just do basic calculations using the expr() command, so let's say our chatbot is named Bob
Here's how something like that would look: (User interactions in
bold)
BOB, CALCULATE 5+2*3
5+2*3 = 11
THANKS
YOU ARE WELCOME!
That would look something like this: (although this is really messy and not optimized or tested, this is just an idea of what it could look like)
Code: While 1 //repeat forever
"BOB, CALCULATE -> Str2 //"BOB, CALCULATE" with the actual command that you decide to add
length(Str2 -> A
Input "",Str1
If length(Str1) >= A
Then
If Str2 = sub(Str1, 1, A
Then
sub(Str1, A, length(Str1) - A) -> Str3
//this is your response
Disp Str3 + " = " toString(expr(Str3
End
End
//here's the second command, I just copied the code for the first and changed some things
"THANKS -> Str2 //"THANKS" with the actual command that you decide to add
length(Str2 -> A
Input "",Str1
If length(Str1) >= A
Then
If Str2 = "THANKS" or Str2 = "THANK YOU" //You can let multiple inputs be the same command, as long as the test for length is of the shorter one
Then
Disp "YOU ARE WELCOME!
End
End
End
I should have probably tested that, there's going to be at least a hundred major errors with that (i.e. it doesn't run)
I hope this helps...