Admiral Kirk arrives aboard the Enterprise for an inspection of the training crew. While inspecting the crew as they stand in line. He comes to Scotty and says the following.
From The Script
(continuing to Scotty)
Mr. Scott, you old space dog. You're
I had me a wee bout -- but Dr. McCoy
pulled me through.
Oh? A wee bout of what, Mr. Scott?
Uncomfortable, Scotty exchanges a glance with Bones --
Shore leave, Admiral.
I've have seen this film a number of times, and always wondered. What was wrong with Scotty. It's clear that he went to Dr. McCoy for treatment of something, but that it was a personal thing so McCoy says "Shore leave" to the Admiral.
I don't remember anything happening to Scotty in the first Star Trek film that could be related.