Scriptwriters returned to work today and top television shows prepared new episodes after West Coast writers overwhelmingly approved an $84 million, three-year contract with producers.

Union leaders accepted the vote, but not all were pleased, especially with the results on a key issue -- videocassette revenue sharing.

"Am I happy? No, I'm not happy," Writers Guild president Ernest Lehman said after announcing the contract vote.

The contract was ratified by 71.6 percent of the 2,897 writers who voted Monday night at the Hollywood Palladium. The vote was 2,075 to 822 in favor of the pact offered by the Alliance of Motion Picture and Television Producers.

"The membership has spoken. We posed the possibility of a six-month strike, and they simply said 'no,' " Lehman said.

When asked whether he considered the contract's videocassette provisions a defeat for guild members, Lehman said, "Absolutely. I don't want to pretend this was some great victory. I'm happy the writers went back to work. I'm not happy at what we gave away."

Writers accepted an offer to withdraw from arbitration on the key issue of videocassette sales percentages in exchange for a contribution from producers of $1.25 million to the guild's health and benefit fund. The formula is based on the producers' gross on videocassettes recorded from 1973 until Feb. 28, instead of the much larger distributors' gross that had been sought in the arbitration.

Producers' association president J. Nicholas Counter said, "We believe the settlement is good for the industry, and, even more importantly, good for our relationship with the guild."

East Coast writers had accepted the contract in a vote last week, but the strike continued another week after a West Coast union meeting to cast the ballots turned into a shouting match.

Writers reported back to work today on such shows as "The Tonight Show" and "Late Night With David Letterman."

"We are back today. We have a live show tonight," said Joe Bleedon, a "Tonight" publicist. "Johnny Carson knows about it, and he'll be here to host it."

"Late Night" will return with a new show Thursday, and "Saturday Night Live" will return with a live broadcast on March 30, said NBC vice president Curt Block in New York City.

Two scripts for "Hill Street Blues" also will be taped, Block said.

He said five scripts would be completed for the NBC series "Sara," but only two of the three unfinished scripts for the top-rated "The Cosby Show," would be completed.

Scriptwriters accepted a 6 percent wage and benefit increase for each year of the contract.

Writers previously had received $14,782 for a half-hour prime-time series episode and $44,566 per two-hour made-for-TV movie, including residuals for one rerun.

For videocassette sales, writers will receive 1.5 percent of the first $1 million in producers' gross, and 1.8 percent thereafter. In its arbitration, the union had originally sought a percentage of the much larger distributors' gross. The Directors Guild of America accepted the same formula from producers last July.

Lehman estimated that the writers would lose $40 million they might have won had they rejected management's contract offer and triumphed in the videocassette arbitration. The new pact, retroactive to March 1, expires on Feb. 29, 1988.