I have started working on a gun that has a battery that recharges. But there are some parts that are just too hard for me. Right now i need following thing: Gadget that turns switches off starting from right one and has a SPRK output. If first switch is unavalible, it will attemt to turn off next. If no switches are avalible, it won't output SPRK. There's the base: