Mark
The S-Type can be problematical, as can most Jaguars. I would advise you read through the section reserved for S-Types and gain as much knowledge of them as you can. A lot of problems can stem from battery drain, particularly with S-Types. Even new batteries need regular charging to keep on top of many problem/codes.
With the car having been off the road and no more information given about service records, maintenance and usage I would be very careful that oils, levels, gearbox oil/filter replacements have been done. If the car has been stood for three years without being run at all I feel it is safe to say that the battery will need replacing. A battery charger/re-conditioner is an almost essential piece of equipment to keep a S-Type running well. I and most other users on this Forum will use and recommend a CTEK MS 7 or MS 8 as the reliable kit to use.
Rust to sills, behind the plastic covers, is a well known problem which cannot always be obvious without removal of plastic covers. Sub frame and mounting are rust/rot can also be another costly problem.
If the car has been stood for the three years it would be best to treat as any car you would that had not been used for that time. I.E. Recommissioning procedure/s would be the safest bet.
Welcome to the Forum/Club and to the intriguing world of Jaguar ownership. You will always find someone or other on this forum that will have suggested repair to any problem you come across. There are some well versed, helpful and experienced people on this forum.
Best Wishes and Regards, John