There are two common bass lines used for the B chord licks. Example 23 is based upon the basic B Seventh chord and Example 24 is using the B Major Root Five bar chord.
The melody notes used in both examples are notes from the B Major and B Blues scale.
Example Twenty Three uses the basic B Seventh shape with extra notes from the first and second strings.
Example Twenty Four is based around the B Seventh bar chord. Note the hammer on the second string.