I find that lots of people new to AJAX can't get the grips because they don't understand the XMLHttpRequest, below is a help to that - this will handle the request, all that you have to fill in is the Commands to be executed when the content is got. You also have to add in where to get the content from, but it is explained in comments :-)
Again, the idea here was to keep it compact. The script randomly picks one type for itself and then uses math(s) to determine who the winner is. I've been seeing a number of Rock,Paper,Scissors games around and decided to make one for myself. Script is prompted by !RockPaperScissors <your choice of Rock,Paper,Scissors> . The math(s) works simply that the way it is worked out, whichever wins,..