Sentenced for shooting at troopers