wwf (now wwe) storylines are the only things scripted, ie. drama leading to a match and who will win the match. during the match iiself, all moves are done on the fly. watch closely and you will see wrestlers whisper what move they are going to do, and how to "sell" the move. also notice the ref always has an earpiece. they are fed instructions from the crew backstage on when to count the pin depending on match value (reaction from the crowd), or if the match is close to time limit. refs also sometimes relay info from one wrestler to another.