A lot of replies but I have had this happen before and pretty much like you described it. Ended up a very easy fix. The battery cables were loose. See if you can move the cables on top of the battery. If you just bought it and the previous owner happened to swap out the battery, chances are they did not tighten them down. You had current which turned on the lights but as soon as there was a heavy draw, trying to start, there was a break in the connection. It does happen a good bit. The fact that you plugged in and thing worked is because they weren't working off the battery.
If the cable connection on top of the battery are tight already then check the ground wire to the chassis and then the power wire to the starter, both coming off the battery (thick wires).
Just my 2 cents as this is easily checked and at no cost and has been the culprit many times in my life.
Al & Ellen
No longer 'New To Us' 1999 HR Vacationer
Hanging on for the ride!