The Ultimate Duelist (3.5e Optimized Character Build)
From D&D Wiki
I started by making this build for a level 12 game with standard starting wealth. It turned out to work pretty well. As a perk, it uses no prestige classes, although at later levels, they could certainly be an option. It was build for a relatively low magic world as far as how common spellcasters are.
PHB, Complete Warrior
 Game Rule Components
It uses some standard feats that supply a number of different fighting styles. i.e. combat expertise, power attack, Improved Feint.
For a 12th level character, the standard wealth is 88,000. I chose these items: Ring of protection +2, Amulet of Natural Armor +2, +2 Collision rapier (magic item compendium), +4 Studded Leather, +4 Buckler, Healing Belt (magic item compendium), Ring of Mystic Healing (magic item compendium), Weapon Crystal - shocking (magic item compendium) and thats pretty much what I went with. However there are quite a bit of variations obviously, so to each his/her own.
<- Str:14 Dex:15 Con:14 Int:16 Wis:8 Cha:8 ->
Race: I chose Elf, mainly due to the campeign, but it works well with the build.
Starting Racial Traits: Low-light vision, Dex +2, Con -2
|Saving Throws||Feats|| Class
|1st||Fighter||+ 1||+ 2||+ 0||+0||Combat Expertise, Weapon Focus(Rapier)|
|2nd||Fighter||+ 2||+ 3||+ 0||+ 0||Power Attack|
|3rd||Swashbuckler||+ 3||+ 5||+ 0||+ 0||Dodge||Weapon Finesse|
|4th||Swashbuckler||+ 4||+ 6||+ 0||+ 0||Grace +1||+1 Dex|
|5th||Fighter||+ 5||+ 6||+ 1||+ 1|
|6th||Figther||+ 6/+ 1||+ 7||+ 1||+ 1||Weapon Specialization(Rapier), Daring Warrior, Improved Feint||Dodge Bonus +1|
|7th||Rogue||+ 6/+ 1||+ 7||+ 3||+ 1||Sneak Attack 1d6, trapfinding|
|8th||Rogue||+ 7/+ 2||+ 7||+ 4||+ 1||Evasion||+1 Dex|
|9th||Rogue||+ 8/+ 3||+ 8||+ 3||+ 2||Daring Outlaw||Sneak Attack 3d6, trap sense +1|
|10th||Swashbuckler||+ 9/+ 4||+ 9||+ 4||+ 3||Insightful Strike, Dodge Bonus +2|
|11th||Swashbuckler||+ 10/+ 5||+ 10||+ 4||+ 3||Improved Critical(Rapier)||Grace Bonus +2, Sneak Attack 4d6|
|12th||Rogue||+ 11/+ 6/+ 1||+ 10||+ 5||+ 3||Telling Blow||Uncanny dodge||+1 Dex|
 Other Components
<- anything not covered by the previous sections ->
With the items as they are, the AC is as follows: Dex: +5, Armor: +7, Ring: +2, Amulet: +2, Shield: +5. This comes out to an ac of 31 without the use of combat expertise or the dodge bonuses. The swashbuckler dodge bonus of 2 and the feat stack. They can also be split between two enemies. Against one opponent, the ac with full use of combat expertise and dodge, will be a 39. Try hitting that!
As far as the attack bonus goes, it comes out to a +19/+14/+9 with damage being 1d6+14+1d6 shocking with a crit range of 15-20x2 also adding your sneak attack damage onto crits due to the telling blow feat. You also have the ability to use power attack and the improved feint bluff ability.
The HP is also very good as you only have 4 levels of a class that doesn't have a d10 as a hit die with a con of 12.
The ending stats are: Str: 14 Dex: 20 Con: 12 Int: 16 Wis: 8 Cha: 8
The only downfalls here are that you take a penalty on your bluff skill for the feinting, but enemies -usually- dont have sense motive as a skill, so you should be fine there. If they do, then you just allocate that dodge bonus and you dont ever have to worry about getting hit. If you do, you've got the belt and the ring to heal yourself back up.
 Munchkin-Size Me
I'm sure there would be a perfect prestige class to go into untill 20 for this build but I'm really not sure what it would be. Perhaps a weapon master of some kind. You'd probably just want to keep taking swashbuckler, or you could take more rogue to get the 10th level ability. So 6 more rogue and 2 more swashbuckler as there is no point to taking fighter after level 4 with this build anyway. Unless you really wanted the extra weapon focus. I's say just take the swashbuckler. The rogue may not be a bad idea as you're only losing a total of 3 ab at level 20 and you get the 10th level ability. So yeah. I'd take the rogue and get crippling strike of improved evasion or opportunist. Thats a good one for this build.
outsider note: cant you just trie duelist?
 Side Notes
<- overview of additional info about this build ->
There really arent any situation where this build won't work. Spell casters would have an advantage over it due to saves, but thats nothing you can't fix via a cloak of resistance or something similar. Its touch ac is great, as is its flat-footed ac.
 DM Counters
The dm can't really counter this build in melee. Spell casters are an easy way of getting around it however lest you invest in increasing your saves. If they try to compensate for its ac, ab, or damage, then the rest of the party will be at an enormouse disadvantage.
One should also consider throwing in monsters that enjoy grapples. If you can get a hold of the duelist, then you can laugh as his class abilities suffocate. Even with a reasonable BAB, the duelist probably won't have the strength or feats to counter it.
You can, potentially, invest levels of Duelist from the DMG for this build at higher levels. At level 7 you're getting an additional +7 to AC from duelist levels while fighting defensively. On top of that, get some Bracers of Armor +8 and you get plate armor bonuses and none of the drawbacks. You can easily take AC to 45 or better if done right.