How can you check for spark if it doesn't crank? What is the symptom? If the starter doesn't crank the engine, do you hear a single, rather loud clunk from the starter each time you turn the ignition switch to "crank"? Do you hear the starter relay click. What happens the other 10 percent of the time? Which engine do you have? Automatic or manual transmission? What are we supposed to make of "some wiring problems"? Burned up and melted? Corroded? Cut? Which ones? We can't see what you see.
Do the head lights work? If so, what happens to their brightness when you try to crank the engine? Have you measured the battery voltage? If you did, what is it?