Guitar is my main instrument but about 8 months ago my friends bands bass player had to leave the band so i agreed to replace him because although i didnt like the music i thought that it would help with my rhythym, which it has. and i just wanted to be in a band

In the 8 months that i have been in the band, we have only completed about 8 songs and we don't play covers. In the last 2-3 months i have vastly improved my song writing on the guitar and have finished writing the guitar parts for 10 songs (an entire album) and i feel that the quality of my songs are much better than what the band is doing.

I also feel that i am constantly improving as a guitarist and although the lead guitarist in the band has been playing for 3 times as long as me i feel im a 10x better player. Because of this it's very annoying to be praticing with them and having to listen to the guitarist create riffs and lead lines that i know i could do much better.

Some gigs are being lined up soon (2-3 weeks) and i feel it's time for me to make a decision whether i should quit the band or not. I don't know whether to stay and play the giigs or quit now. I havn't even learnt the songs because to be completely honest, i can't tell the difference between one song and another.

Im very good friends with these guys and would like to remain friends with them but i feel that i have too much potential as a guitarist to waste 3 hours a week playing bass and paying money to practice as well. Money that could be spent on guitar lessons.

My only fear is that i won't be able to find a band oncve i've quit this one. Iv'e put a lot of ads on the internet and the newspaper but ive had no luck so far.

Do you think i should quit ? and if so do you think i should quit before the gig or do you think that i should only quit once i've found another band?
Don't leave them high and dry at those gigs. Stay for the gigs. You can quit afterwards, but you have to be a gentleman. Play the gigs, then take your ball and go back home.
Definitely stick around to play the gigs, you'll struggle to stay friends with the other guys if you drop them in the shit by quitting before them.

Tell them you're thinking about trying to find another band.

Personally I'd come to an agreement with them that you'll stick around until they find a replacement. Unless you don't have enough free time there's no reason why you couldn't start with another band while you're still covering for the current one.
Gibson LP Traditional, LP GT, LP Studio, SG Standard x2
Barber Tone Press > EHX Worm >TC Polytune > MXR Custom Badass 78 > EXH Glove > EHX East River Drive > Zoom G3 > TC Spark Mini Booster
Laney VC30
Marshall TSL602
Jet City JCA22H
My SoundCloud
Tell the guys how you feel and that you think about quitting, but offer to stay until they've at least tracked down another bassist.