If the guild leader isn't active in the game for two weeks and their status changes to "sleeping," the most active co-leader becomes the main leader automatically. If the co-leaders are also inactive ("sleeping" players), then the most active player of the guild becomes the leader.