It's a script that works as a calculator chatting
You can substitute the names of commands to your liking
The syntax of the command is:
!command first number second number
!plus 2 3
Bot response is= 2 + 3 = 5
<?xml version="1.0" standalone="no">
<config> //CALCULATOR By Lúca000
//PLUS
<command type="script" flood="2">
<in>!plus %PARAMETER%</in>
<out type="push" extdata="param_somma"><operator type="strfind" lvalue="%PARAM%" rvalue=" "/></out>
<out type="push" extdata="addendo_left"><operator type="strleft" lvalue="%PARAM%" rvalue="$param_somma$"/></out>
<out type="push" extdata="param_somma2"><operator type="strfind" lvalue="%PARAM%" rvalue=" "/></out>
<out type="push" extdata="addendo_right"><operator type="strright" lvalue="%PARAM%" rvalue="$param_somma2$"/></out>
<out type="push" extdata="addizionati"> <operator type="+" lvalue="$addendo_left$" rvalue="$addendo_right$"/> </out>
<out>#c10#$addendo_left$ #c2#+#c10#$addendo_right$ #c2#= #c8#$addizionati$</out>
</command>
//SUBTRACT
<command type="script" flood="2">
<in>!subtract %PARAMETER%</in>
<out type="push" extdata="param_sottr"><operator type="strfind" lvalue="%PARAM%" rvalue=" "/></out>
<out type="push" extdata="sottraendo_left"><operator type="strleft" lvalue="%PARAM%" rvalue="$param_sottr$"/></out>
<out type="push" extdata="param_sottr2"><operator type="strfind" lvalue="%PARAM%" rvalue=" "/></out>
<out type="push" extdata="sottraendo_right"><operator type="strright" lvalue="%PARAM%" rvalue="$param_sottr2$"/></out>
<out type="push" extdata="sottratti"> <operator type="-" lvalue="$sottraendo_left$" rvalue="$sottraendo_right$"/> </out>
<out>#c10#$sottraendo_left$ #c2#-#c10#$sottraendo_right$ #c2#= #c8#$sottratti$</out>
</command>
//MULTIPLIES
<command type="script" flood="2">
<in>!multiplies %PARAMETER%</in>
<out type="push" extdata="param_moltiplica"><operator type="strfind" lvalue="%PARAM%" rvalue=" "/></out>
<out type="push" extdata="moltiplicando_left"><operator type="strleft" lvalue="%PARAM%" rvalue="$param_moltiplica$"/></out>
<out type="push" extdata="param_moltiplica2"><operator type="strfind" lvalue="%PARAM%" rvalue=" "/></out>
<out type="push" extdata="moltiplicando_right"><operator type="strright" lvalue="%PARAM%" rvalue="$param_moltiplica2$"/></out>
<out type="push" extdata="moltiplicati"> <operator type="*" lvalue="$moltiplicando_left$" rvalue="$moltiplicando_right$"/> </out>
<out>#c10#$moltiplicando_left$ #c2#x #c10#$moltiplicando_right$ #c2#= #c8#$moltiplicati$</out>
</command>
//DIVIDE
<command type="script" flood="2">
<in>!divide %PARAMETER%</in>
<out type="push" extdata="param_divisione"><operator type="strfind" lvalue="%PARAM%" rvalue=" "/></out>
<out type="push" extdata="dividendo_left"><operator type="strleft" lvalue="%PARAM%" rvalue="$param_divisione$"/></out>
<out type="push" extdata="param_divisione2"><operator type="strfind" lvalue="%PARAM%" rvalue=" "/></out>
<out type="push" extdata="dividendo_right"><operator type="strright" lvalue="%PARAM%" rvalue="$param_divisione2$"/></out>
<out type="push" extdata="divisi"> <operator type="/" lvalue="$dividendo_left$" rvalue="$dividendo_right$"/> </out>
<out>#c10#$dividendo_left$ #c2#: #c10#$dividendo_right$ #c2#= #c8#$divisi$</out>
</command>
</config>
If you add this command in a XML file, include it into file MXC.
Excuse my imperfect English