Czar, I feel that you were too ambitious with this script and maybe bit off more than you could chew. Maybe a rewrite with it doing merely the basics is a good way to start.
It's been a great script at times, but generally inconsistent the majority of the time.