The Pakistani government has the right to shoot down US drones if Washington ignores warnings to halt its illegal aerial attacks, a Pakistani court has ruled.