Taking a level or two of fighter is a mark of desperation for feats.
Taking more just doesn’t make sense; a feat per level is weak, but if you desperately need feats it can be the right choice. A feat every other level is worthless.
I’m going to answer based on pure fighter, but only after the caveat that I’m taking this as an arbitrary restriction that I would never recommend holding to.
The Defender Role
This is a concept from 4e, where fighters and other Defender classes could meaningfully protect allies and punish enemies for ignoring them.
3.5 does not have any such concept. If you are big, hardy, impossible to hit, with tons of HP, enemies will ignore you and go straight for the real threats. You have almost no way of stopping them from doing it; only magic does that at all well. Tripping is the best bet you have, but it’s not great.
Alternate Class Features, Variant Classes, Substitution Levels
Alternate class features are the only hope here; otherwise, there really is nothing that the fighter has to offer. I suppose you’d get Weapon Supremacy just to say you had.
Dungeoncrasher
This ACF from Dungeonscape replaces your 2nd-level and 6th-level bonus feats with the ability to deal massive damage by slamming people into walls with Bull Rush.
Zhentarim Soldier
These substitution levels from the Champions of Valor web supplement gives you Skill Focus (intimidate) at Fighter 3, extends the duration of the demoralize effect of Intimidate at Fighter 5, and allows you to demoralize as a swift action at Fighter 9. This costs nothing (excepting that you have to keep taking fighter levels, which as discussed is actually a very high cost), and the 9th-level one is actually good.
Between these two, you can almost justify 9 levels of fighter, since the swift-action demoralize is a fairly solid ability. Or, would be if everything and its brother didn’t ignore Fear effects...
Tactics
Fighters have access to three good tricks, more or less. As a pure fighter, you might as well attempt to do all of them, and maybe toss in some other ideas.
Charging
Barbarians do it better, but it is what it is. Wants Power Attack, Shocktrooper (Complete Warrior), Leap Attack (Complete Adventurer), and Battle Jump (Unapproachable East). Really, really wants at least one level of barbarian and warblade, but whatever. Lance is the weapon of choice if you go mounted, otherwise any two-handed weapon is best. Using a lance kind of pigeonholes you into not tripping, so just going with the trip weapons is probably better.
Dungeoncrashing
Only available with the ACF, this mostly relies on Bull Rush, so Power Attack and Improved Bull Rush are necessary. Shocktrooper (Complete Warrior) is crucial for the directional Bull Rushes (you can angle people as you push them), while Knockback (Races of Stone) allows you to Bull Rush on every attack rather than as a standard action. Weapon doesn’t matter for Bull Rush.
Intimidating
Only viable with the Zhentarim Soldier levels, and even then, a disturbingly large selection of foes will outright ignore it. Wants Imperious Command (Drow of the Underdark), as well as the Never Outnumbered skill trick (Complete Scoundrel). Max ranks in Intimidate, don’t completely dump Charisma.
With the Fighter 9 replacement from Zhentarim Soldier, lets you spend a swift action on the first round to attempt to demoralize everyone you threaten, and if successful leaves them cowering for 1 round. Cowering opponents are extremely vulnerable, so this is a really good trick when it works. After the first round, you can continue to use swift actions to demoralize, but only against single targets.
Unfortunately, Imperious Command requires Cha 15. Unless you roll for stats, and roll absurdly well, that’s just not going to happen until very late in the game, because Cha is your least, or at best second-least, important ability score. The only thing it improves is your Intimidate check, which is mostly about your ranks and bonuses from other sources, not your Cha.
Also, Tome of Battle has a new mechanic for Intimidate, called Duel of Wills. It’s a thing you can just choose to do, for free, at the start of combat. Since you’re pumping Intimidate and most don’t, you get some free bonuses, though they are small and fleeting. Still, free.
Initiating
Martial Study and Martial Stance from Tome of Battle are fighter bonus feats. You’re limited to only three of the former, which sucks, but there are some great options.
Obviously, you would be massively better off just taking levels of crusader or warblade.
For maneuvers, shadow walk would be awesome, iron heart surge and white raven tactics are excellent, charging minotaur strike fits in well with dungeoncrashing, etc. Defensive rebuke is one of the very-few true aggro-drawing abilities in the game. There are more. For stances, thicket of blades makes it much harder to get around your attacks of opportunity, and that is really important, because your true purpose here is...
Tripping
The bread and butter of any lockdown build. Combat Expertise, Combat Reflexes, and Improved Trip are necessary; Knock-down and Stand Still are solid choices. You need a weapon with both reach and tripping ability: the guisarme or spiked chain are your best options.
This is how you really lock down a fight. Intimidate’s a nice trick when it works, but it often won’t, and charging and/or dungeoncrashing are usually much more about damage than they are controlling the battlefield.
Tripping means anyone who wants to get past you, has to do it very carefully. You can trip on your attacks of opportunity, which tends to prompt another attack of opportunity when they get up—the AoO happens before they actually get up, though, so trippping at that point has no effect and they still can get up afterwards.
Races
You want to be big and strong, but you don’t want to be stupid because you need that Int 13 for Combat Expertise. Two levels of barbarian would get you around that, and massively improve your life, but oh well. At least it ensures you’ll have skill points for Intimidate and Jump.
Also, when you’re taking levels in a class as weak as fighter, level adjustment may be worthwhile. It’s usually awful, but maybe LA +1 can get us something good...
Goliath
Oh yeah, it can. Goliaths are from Races of Stone, and have both LA +1 and the Powerful Build ability, treating them as a size category larger for a lot of purposes (mostly everything except space and reach, which is a shame but oh well). That means +4 on Bull Rush and Trip checks, and slightly higher damage. The +4 is the important bit.
They also get +4 Strength, −2 Dexterity, and +2 Constitution. The −2 Dexterity definitely does hurt, but it’s rare to make more than 2-3 attacks of opportunity in a round, so you can survive it. The +4 Strength and +2 Constitution are big helps, though the Constitution is misleading because you also have one fewer level to get HP from.
Mountain Movement, the ability to always count as running for jumps, is also useful to you. It will allow you to trigger Leap Attack much more easily. If you can get it, though you probably can’t without a warblade dip, sudden leap would also benefit.
Half-minotaur
From Dragon vol. 313, this LA +1 template makes you actually Large, which means you get space and reach, which are very, very good for improving your threatened area.
Ability scores are Strength +4, Constitution +2, and Intelligence −2. Again, the hit to Intelligence hurts, but probably even less than Dexterity: you just need to make 13. Even if you start with Int 14 and put your +1 there, you can probably work with it.
Since this is a template, it can be applied to any of your other good choices. Going LA +2 as a half-minotaur goliath is interesting, but probably a bad idea.
Dragonborn warforged
Dragonborn is an LA +0 template from Races of the Dragon, which is cool because, hey, no LA. It also replaces the majority of your racial features, with the exceptions of ability score changes, subtypes, and movement modes. The subtype thing is important.
The dragonborn applies +2 Constitution, −2 Dexterity. Again, the Dexterity hurts.
What do we get for it? A few random things, nothing too special, but we get to choose a Draconic Aspect. Heart and Mind are worthless (a weak breath weapon or minor bonuses to select Will saves), but the third option is Wings. This is the correct choice; a fighter tends to have really, really big problems getting into the air, and this straight-up solves that problem.
Meanwhile, the race you choose usually doesn’t matter that much, since you don’t get to keep much of it. The warforged race is an exception, because most of their racial features aren’t features of the race, but rather of their Living Construct subtype, which Dragonborn lets them keep. It’s cheesy as hell, but you’re a freaking single-classed fighter, it’s OK.
Warforged offer a smorgasbord of immunities (poison, sleep, paralysis, disease, nausea, sickened, fatigue, and exhaustion) that will make your life better. It also means you don’t have to eat, drink, or sleep, which is nice. And you get +2 Constitution, while losing on −2 Wisdom, −2 Charisma—two ability scores, but your two least important.
Combined, you’re looking at all those immunities, flight, −2 Dexterity, +4 Constitution, −2 Wisdom, −2 Charisma.
And you could throw half-minotaur on there for +4 Strength, −2 Dexterity, +6 Constitution, −2 Intelligence, −2 Wisdom, −2 Charisma, as well as Large size and some other minor benefits. This is probably your best choice.
Human
Just saying, it’s viable. Think you have more than enough feats? Guess again; you’re going to need everything you can get. True, though, things you can’t get from feats—like size and flight—are more useful.
Conclusion
Half-minotaur dragonborn warforged fighter 20, with the Dungeoncrasher ACF and Zhentarim Soldier substitution levels. The penalties to Dex and Int mean some awkward choices on ability scores; you may hold off on Combat Reflexes until later, when you can get some gloves of dexterity to make better use of it. Late game, even the 36,000 gp for the +6 version is quite affordable.
A 26 PB might be (base) 14 in each of Str, Dex, and Con, and then 15 in Int, while leaving 8 in Wis and Cha. Having −2 to Will saves (and Intimidate checks, but that matters less) is bad here, but you don’t have a lot of option. The solution I’m using will be Steadfast Determination from Player’s Handbook II, to switch Will to using Constitution. At 32 PB, I’d push Cha to 14, for something like this (after racial mods):
- Str 18
- Dex 12
- Con 20
- Int 13
- Wis 6
- Cha 12
Not exactly amazing for LA +1, but we have a lot of requirements. As it is, we’re going to have to stick 1 into Cha from levels, and get a amulet of charisma +2, before we can get Imperious Command.
Other ability score bonuses should go to Strength.
If you are literally stopping at 12th, it may be worthwhile to just dump either Dex or Cha and give up on either Combat Reflexes or Imperious Command. Dumping Cha is the better choice, though it makes less use of your few unique features.
Anyway, we are a Large Monstrous Humanoid, with lots of immunities, and from level 1 can glide. At level 6, that will become flight. The LA does not count towards that, sadly.
We get 3 skill points per level. Intimidate, Jump, and, I don’t know, Handle Animal can be our skills. Cross-class ranks in Balance, Tumble, or Use Magic Device might be better, maybe.
All of your tricks are weak at the beginning of the game; you only get one AoO, your Intimidate ranks are barely beating your penalty to Cha and you can’t get Imperious Command, and dungeoncrash doesn’t really shine until Fighter 6. Still, the Fighter 2 version of dungeoncrash is solid enough, so that’s probably where you start:
LA +1, Power Attack
Improved Bull Rush
Dungeoncrasher I
Skill Focus (Intimidate), Endurance—you are literally immune to everything the Endurance feat helps with. See if you can get the DM to waive it as a requirement for Steadfast Determination, it would help massively.
Combat Expertise
Extended Demoralize, Never Outnumbered (skill trick)
Dungeoncrasher II, Steadfast Determination
—
Improved Trip
Swift Demoralize, Imperious Command, absolute last level where fighter gets anything meaningful
Knockback
—
Shock Trooper, Combat Reflexes
—
Knock-down
Martial Study (foehammer)
Martial Stance (thicket of blades)
—
Leap Attack
—
Yes, you get nothing at 20th level. Sorry.
For equipment, I recommend:
+1 guisarme, 4,309 gp—it reaches, it trips, it’s everything you want without burning another feat on a spiked chain.
masterwork spiked gauntlet, 305 gp—just so you can attack inside your reach, if necessary.
+1 full plate, 3,650 gp—you have heavy armor proficiency and your Dex is meh. So you want this. Unfortunately, dragonborn flight doesn’t work in heavy armor. Hopefully between a literally-pointless Endurance feat and the tooth of Savnok (see below), your DM can see their way to ignoring that limitation, at least for you. If not, you have to go with a +1 chain shirt (a breastplate is garbage; lots of penalties for just +1 more armored AC—not worth it). Eventually, you will be able to afford +1 mithral full plate, solving the problem.
tooth of Savnok, 2,000 gp—eliminates the movement penalties from armor. You’re required to never take off any armor you wear, but with the Endurance feat, you never have to. Only relevant if you get wear medium or heavy armor, which really should only be full plate, which as noted you might not be able to use. (Tome of Magic)
amulet of charisma +2, 4,000 gp—to enable Imperious Command, sadly.
belt of battle, giant’s strength +2, 16,000 gp—extra actions. Also, bonuses to initiative and Strength. (Magic Item Compendium, both for belt of battle and the rules that allow it to also have +2 enhancement to Strength)
third eye clarity, 3,000 gp—prevent or remove a lot of nasty effects, including daze and stun. (Magic Item Compendium)
anklet of translocation, 1,400 gp—quick, cheap mobility. You need it. (Magic Item Compendium)
That’s about 35,000 gp. You have 36,000 gp for 9th-level WBL, so that works out pretty well. Other good options include a belt of healing or scout’s headband. The fearsome armor property from Drow of the Underdark is a bit wasted on you (you already have swift-action intimidate, so the move-action version isn’t that useful), but +5 to intimidate isn’t awful. Getting gloves of dexterity would be nice but you neither have the money nor the feats.
Also, be sure to keep abreast of the usual answers to the typical problems that your Living Construct subtype and/or wings don’t already cover.
Best Answer
I have 2 primary suggestions for you. I could name a lot, lot more, but it would mostly be in order to tell you why they’re not quite as good as these suggestions.
But first, a note up-front:
This is extremely problematic—Pathfinder’s gun rules are near-crippling for everyone who isn’t a gunslinger, which is a Pathfinder class you wouldn’t otherwise find in 3.5e. Even if it’s available, it’s not really a good class—all it really does is fix problems with the gun rules to make them workable. A gunslinger can eventually do a lot of very-reliable damage, but that is all a gunslinger can do, and other characters can do that, better, and do more besides.
You might consider asking to just reskin a hand crossbow. It has far more support, and simplifies a lot of concerns here.
Beguiler (Player’s Handbook II)
Without a doubt the most powerful suggestion here, beguiler is a spellcasting class that packs some mundane stealth skills to back up their magic. They are “full” spellcasters, meaning they go up to 9th-level spells, but rather than maintaining a spellbook and having to prepare spells every morning, or have to choose spells each level, they can simply cast any spell on their spell list that they have a spell slot for. This makes them much simpler to play, and since their spell list is very, very good, they remain quite strong.
Their spell list focuses on Enchantment and Illusion, giving them the magical skills to get in and get out. They also get a very large number of skill points (6+Int, for a class that casts Int-based spells), so they can also have the non-magical skills to get in and get out. They gain some decent weapon proficiencies, and can wear light armor without interfering with their spells.
Their physical combat skills are a bit lacking. They get some (weird) abilities with respect to feinting, which are okay but not amazing. You will likely want to enter a prestige class or two as you play and level up:
Mindbender from Complete Arcane is mostly awful, and you should never take more than 1 level of it. It won’t help with your physical combat skills. That said, a 5th-level beguiler qualifies for mindbender almost by default, and that 1st level gets you telepathy out to 100 feet without losing any spellcasting. That’s amazing for coordinating silently with your party, of course, but even better is that it qualifies you for the incredible Mindsight feat from Lords of Madness, which will let you sense any mind within the 100-foot range of your telepathy. This option is so good that there are some who joke that the 6th level of beguiler is mindbender 1st.
Unseen seer from Complete Mage is the magical espionage class, which is obviously appropriate. Useful because it has full spellcasting progression, better physical combat skills (¾ BAB instead of ½ BAB), just as many skill points, and you can pick up a few divinations you couldn’t otherwise cast—the ranger’s hunter’s eye is an excellent choice for getting some sneak attack (which, once you have it from elsewhere, unseen seer can also boost). Because it’s so easy to enter and costs you almost nothing, you should almost-certainly get at least a few levels of this. Note that the divination spell power ability penalizes your non-divination spells—if that bothers you, Practiced Spellcaster from Complete Arcane can fix that right up.
Abjurant champion from Complete Mage is a magical warrior class, and as the name implies, it’s kind of defensive. On the other hand, it’s the only class in the game with both full BAB and full spellcasting, which will go a long way to make up for the beguiler’s poor BAB. Easy to enter, easy to take levels of, abjurant champion is your choice for when you just want to be a little bit better with weapons. It’s also 5 levels long, so 5 levels of this, 5 levels of beguiler, and 10 levels of unseen seer works out pretty nicely. (In reality, though, you almost-certainly want a level of mindbender instead of one of those abjurant champion or unseen seer levels.)
Swiftblade, from this web enhancement that used to be on Wizards.com, is also a warrior class, but it’s a much more agile and dexterous one than abjurant champion. It does not have full spellcasting (missing spellcasting at 1st, 4th, 7th, and 10th), which is very painful, but it does make up for it with some incredible abilities focused around the haste spell, which the beguiler has. A beguiler 5th/mindbender 1st/swiftblade 10th is a very formidable assassin indeed... Anyway, because of the lost spellcasting, swiftblade is not nearly as easy to take as the above levels—easily skipped if you’re not feeling it. The feat requirements are really painful, too, and that’s a problem because your gun skills are going to need feats.
Swordsage (Tome of Battle)
For a vastly more traditional assassin, the swordsage is the way to go. The swordsage is the kind of monk-y, ninja-y master of the Sublime Way, also known as “blade magic.” The maneuvers from the Shadow Hand and Tiger Claw disciplines are likely to be right up your alley, and those from Diamond Mind are very appropriate, too.
Unfortunately, most sublime maneuvers are strikes, and most strikes are melee-only, which is going to limit you when it comes to firearms. You’ll end up with a lot of mobility and utility options (various Diamond Mind counters, Shadow Hand boosts and teleports, maybe some Setting Sun crowd-control?), but you can eventually get dancing mongoose and then raging mongoose for extra attacks (Tiger Claw), and time stands still (Diamond Mind) at the highest levels to become a one-person firing squad.
There is a fairly-well-regarded homebrew firearm discipline, Black Rain. It can go a massive way towards making swordsage a great answer instead of only an OK one. (Note that, because magic thoroughly dominates 3.5e, beguiler will still be stronger.)
There are fewer prestige classes that are especially notable for a swordsage, but on the other hand, a swordsage has a lot more flexibility than a spellcaster for taking other class levels. A few thoughts:
With some levels in cleric, ruby knight vindicator, also from Tome of Battle, becomes an interesting idea. Ruby knight vindicators are the special operations forces of Wee Jas, lawful-neutral goddess of death—seems pretty fitting for an assassin. Discipline choices are possibly even less ranged-attack friendly than the swordsage’s, though, and you’ll really miss both Diamond Mind and Tiger Claw.
With just a single level of cleric, to get some bonus feats, master of nine (Tome of Battle again) becomes a reasonable option, and it is a phenomenal prestige class. You may run out of non-melee maneuvers you can take, though.
Mixing in ardent from Complete Psionic is nice with swordsage, because both classes are so multiclass-friendly. Then you could take the aptly-named slayer class to go with master of nine: see the build at the bottom of this answer for some ideas (obviously, you’d skip the unarmed combat and call weaponry things).
You could potentially mix some of the beguiler ideas above with this through the jade phoenix mage prestige class in Tome of Battle. Great combat skills for the beguiler, though the sublime disciplines available (Desert Wind and Devoted Spirit) are poor for you. At that point, you’re really more of a beguiler build dipping swordsage than a swordsage build.
Dips
There are a number of classes that you wouldn’t want to devote more than a level or two to, but that can be very valuable with that level or two.
Gunslinger: if allowed, you want at least one level of the Pathfinder gunslinger class, because the gunsmith ability and the quick clear deed are basically mandatory for making Pathfinder firearms anything but worthless.
Fighter: you are going to desperately need feats; the first two levels of fighter are a reasonably efficient way to get them. Furthermore, the hit-and-run tactics option from Drow of the Underdark is very strong for you, allowing you to add your Dexterity bonus to damage rolls against flat-footed targets. Making targets flat-footed is going to be hard, but that’s still useful.
Psychic warrior: gets the same feats as fighter for the first two levels, and also gets some power points and psionic powers, which can be useful. Usually better, though hit-and-run tactics gives the fighter something the psychic warrior can’t replicate.
Cleric: cleric 1st is the best single level in the game, though as a ranged character you don’t need Travel Devotion nearly so badly. Can ease entry into master of nine, which is otherwise prohibitive. Can also get you all kinds of other neat things.
Rogue: you might have expected rogue as a primary contender here, but ultimately the rogue doesn’t get much beyond sneak attack and skill points—both of which we can get elsewhere. The main reason you’d consider rogue is for the Dungeonscape option of replacing evasion with penetrating strike—the ability to deal half your sneak attack damage against creatures that are otherwise immune to it. Immunity to sneak attack damage is very common, and one of the big reasons why we don’t want to focus on rogue, but if you are getting a bunch of sneak attack (as both beguiler and swordsage can), you may want to consider penetrating strike. Note the existence of golemstrike, gravestrike, and vinestrike, 1st-level spells which allow you to sneak attack constructs, undead, and plants, respectively. Constructs and undead are two of the most common foes immune to sneak attack, so golemstrike and gravestrike go a long way towards making penetrating strike unnecessary. On the other hand, neither beguiler nor swordsage has a great way to get those spells, or to activate wands of them. (If dipping cleric, consider the Magic domain in order to use such wands.)
Feats
You will probably need Rapid Reload for your guns. Dead Eye from Dragon Compendium will help a lot with your damage, allowing you to use Dexterity for that. (Note that its errata changed the BAB requirement to +1 rather than +14!) If you do use reskinned hand crossbows, Hand Crossbow Focus from Drow of the Underdark is a better option than Rapid Reload, and Crossbow Sniper from Player’s Handbook II adds ½ your Dexterity bonus to your damage (so with Dead Eye you’re up to 1½×Dex, which is pretty good).
As any ranged character must, you will need Point-Blank Shot, Precise Shot, and (probably) Rapid Shot. If you’re back-porting Pathfinder material, the Clustered Shots is also near-mandatory.
That is a lot of feats—this is going to be something of a problem. Hence possibly recommending dips in fighter, psychic warrior, and/or cleric.
Races
Considering your feat requirements, you are going to almost-certainly need to be human.
Some words of caution
Even beyond my concerns with Pathfinder guns, just so you’re aware:
Magic is incredibly dominant in D&D 3.5e. Those with magic trounce those who don’t, and among those who have magic, “has the higher-level spell” is very-nearly synonymous for “is stronger.” For a true “best” class, you’re almost-always talking about archivist, cleric, druid, or wizard no matter what you’re doing—those are the premier spellcasting classes that eventually get 9th-level spells. But while a cleric or wizard could be a nigh-unstoppable assassin, that answer doesn’t really capture the kind of character and narrative you’re going for. Beguiler hits the sweet spot much better.
Sneak attack—the signature rogue special feature that is, to many, the mark of being a stealth character—is very limited by its applicable targets, since many types of creatures (e.g. all constructs, elementals, oozes, plants, and undead) are completely immune to it. That’s a problem, and one which makes it recommended to diversify and not focus solely on sneak attack.
Feats are going to be a huge problem for you. Ranged attacks are incredibly feat-intensive, and if you want to dual-wield those firearms—and you probably do as a Dexterity-based character—that means you also need a ton of feats for that, too. And that’s not even getting into any problems that the firearms you’re using present—that’s probably gonna require at least Rapid Reload. This is a problem both because it leaves relatively little room for flexibility, and also because you just won’t actually have enough, which means you’ll be constantly fighting your lack of something important. Both bonus feats and ways to function without certain feats will be important.
None of these is necessarily damning. You can, and should, play the character you want. But you should also be aware going in that there are going to be these problems, and they may detract from your fun at the table (they also may not, depending on what you find fun).