Ok I'm posting the links to the .h and .m files below. Just a quick usage guide:
You initialize the lightning with a strike point, it will draw lightning from its position to this strike point:
Lightning *lightning = [Lightning lightningWithStrikePoint:ccp(100,0)];
lightning.position = ccp(200,320);
[self addChild:lightning];
Once you've set it up, you can have it strike by calling a few different methods:
-(void) strikeRandom; //Strike with a random seed
-(void) strikeWithSeed(unsigned long)seed; //strike with a given seed
-(void) strike; //Strike with last given seed
Seed just defines the nature of the lightning, can be any number.
Also you can have the lightning split into two, but you need to define the second strikePoint. (With a little modification you could have it split multiple times).
lightning.split = YES;
lightning.strikePoint2 = ccp(300,0);
Theres a few other properties such as the displacement values (they have default values), and I think I hardcoded the fadeout to .5 seconds.
Feel free to ask any questions about it.
http://mobile-bros.com/source/Lightning/