You need to think a little about how if/else works. The else you have will happen if the last if isn't true. If you want it to only happen if all of the other checks fail you need to use if/elsif/else all the way through.
Another thing that might be easier to debug would be to group some things together. Like if($text=~/hail/i) and then check all the qglobal values inside that if. You could also group some together, like if($globals{"hateblade"} >= 5 && $globals{"hateblade"} <= 7), etc.
If you're seeing more than one response, add some debugging to the script. Print out what the qglobal is set to and it will help you determine where things are going wrong.
|