When I first started reading Terry Pratchett and researching his books online, I found that a major influence on the early Discworld books was Fritz Leiber, creator of the loveable rogues Fafhrd and the Gray Mouser. I read a volume that collected the stories from Swords and Deviltry and Swords Against Death years ago, but didn’t get around to reading any more Leiber until this year. Influenced somewhat by the pulp fantasy of his day that introduced such fantastic heroes as Robert E. Howard’s Conan, Leiber strove to make his heroes somewhat more human, and introduced a heavier amount of humor into his tales. Fafhrd is the requisite giant barbarian from the northern wastes, and the Mouser a former wizard’s apprentice turned thief and fighter for hire. They blunder into a series of heroic quests, often tempted by the promise of treasure (which they always end up losing) or manipulated by attractive women. Their adventures take them under the sea, to the tops of high mountains, underground, and even into the sky; but the main recurring location is the seedy city of Lankhmar. From what I’ve read, the earliest stories starring these two heroes were actually set on Earth, but Leiber later moved them to his fantastic world of Nehwon.
Some of the stories set in the remnants of Alexander the Great’s empire would appear in Swords in the Mist, with the explanation that Fafhrd and the Mouser’s patron magicians had sent them to Earth to mess with them. There are other connections between our world and Nehwon, including a German professor who collects specimens for a zoo of time and space, and Odin and Loki wandering in to initiate a mass sacrifice on Rime Isle. Leiber was a pioneer in sword-and-sorcery fiction, so some of his tales come across as a bit generic by modern standards, but some of his plots were much weirder and more amusing than is typical of the genre. One has rats trying to take over Lankhmar with help from a sorcerer and his beautiful daughter, and the Mouser turning into a rat to battle them. In another, the gods curse the heroes by making them obsessive-compulsive.
The influence on early Discworld can be seen pretty early on, with Ankh-Morpork being quite similar to Lankhmar (although I believe Pratchett said it wasn’t consciously based on Leiber’s city); and both featuring autocratic overlords who tend toward insanity, meetings between squabbling gods, and Death as a recurring character.
Leiber also introduced the idea of trade guilds for thieves and assassins, which were intended to be funny but later became standard fantasy fare. Pratchett would go on to explain how such organizations might actually work. I guess they’re not too much different from the Mafia, albeit much less secretive. The Colour of Magic even has a brief appearance by slightly altered versions of Leiber’s heroes, there called Bravd and the Weasel.