In Return of the Jedi, Luke eventually rescues Han from Jabba's clutches. Leia also attempts to save him but is captured.
The sequence of events is:
Luke sends the droids in and gifts them to Jabba in exchange for Han. Jabba refuses but keeps the droids anyway. R2 is presumably carrying Luke's light sabre at this point.
Leia and Lando sneak in. Leia frees Han but is immediately captured.
Luke enters using a Jedi mind trick. He tries to use the same thing on Jabba but it doesn't work. Plan B is apparently to shoot Jabba in the face and then somehow escape.
Luke survives the Rankor and is taken out on the barge to be executed, where he signals his friends and escapes with them. It's not clear if this is just an indication that he is about to make a move or a signal to enact some pre-determined plan.
On the face of it this doesn't seem like a plan. Surely endangering the droids and allowing Leia to be enslaved couldn't have been by design.
What was Luke's plan? Were Leia and Lando part of it?