After either William III or Mary II died, the other was to continue to rule. The person who would become the monarch after them would be any of their children. After the children would be Mary's sister Anne and her children. Last of all would be any children William III might have had from any marriage after that.