Please be aware of the Forum Rules of Conduct.
This is getting very good!One more thing I spotted: You can't give gold or XP on failure, only on success.