For the first part would you anchor your finger on the 12th fret of the e and b strings? Loads of songs have that style of lick and I just wondered how others would play it.
Yes, you would anchor yore hand on the e and b strings. You also might want to release tension on the e string so it doesn't ring out and clash with the B (you don't have to).
Quote by Diamond Dave

Things that restored my faith in humanity this year: 26
Things that removed all faith in humanity this year: 1,563,745,234 (estimated)

so that's a result of -1,563,745,208 faith points in humanity lost, which is actually up from last year!
I would barre the 12 fret, then move up and just place the middle finger on the 17. The right hand I would upstroke the first note, pull off and then downstroke, and repeat.