Jack up the rafters by giving one inch space between them this will allow the roof to move with it without cracking.
Jacking up roof rafters.
While some of the issues can be fixed easily by adding struts jacking up some loose rafters or replacing shingles and sheathing other problems will require a much more serious solution which will require an experienced expert to work on it.
Straighten rafters can be done easily by jacking them one over the other.
Jack up until level the frame a wall 16 on center between the 2x4 s that will serve as the top and bottom plate.
Move the jack in increments of one inch to allow for the roof to be able to move with it without cracking.
Use the link below for wall framing instructions.
I can jack against the ceiling joists over a bearing wall below.
I am tempted to install the new rafters with the crown down to reduce the jacking required.
However this should be done very slowly and carefully.
It may take several weeks for the rafters come back in their original position.
Now take your jack and jack up the ridge.
However the trick to this process is to do it very slowly so it may take a few weeks before you get the rafter into a position where it is straight again.
The easiest way to straighten rafters is to jack them into position.
You may do this 1 per day and roof rafters can handle more stress.