After the post Rez Object Rotations, Eloise Pasteur response in the SLED listserv suggested that “It’s faster and neater in your code, whenever you can, to enter the quaternion directly”, and I do have to agree. Isa’s Quaternion Rotation utility is a small tool that will provide this rotation for your scripts.
To find a particular quaternion rotation set the utility to the required X, Y and Z rotations in the Build window then touch it. The rotation will be displayed in both the floating text and in main chat for copying and pasting into your code.
This utility is available from my Second Life Workshop (see Virtually Related links). It has been set to allow anyone to copy so right click and select Take Copy to receive it in your Inventory.