What year/engine to start with? If the ECU got wet it may not start; depends on how wet you're talking about. Lots of things can cause a misfire/rough idle so start with basics:
fuel
air
spark
compression
corroded grounds
loose battery terminals
truck is dirty
AFM operation
fuel filter/pressure regulator
plug wires/plugs
Then there's the sensors... AFM, TPS, IAT and so on.