For a righting line all you need is comfortable rope probably only about 8 to 10 long. Most attach to the mast base and coil it up on deck. When the boat is on its side, throw the line over the upper hull, grab it and lean back at about 45 degrees. It helps if you can get the bow almost into the wind, allowing the wind to get under the sail and help right the boat.
You might want to check to see if there is water in the mast. Sounds like it. If so, very hard to right