When you find yourself trying to remember a show (or any works) that's on the tip of your tongue but just out of reach, come here - the collective brain of the TVTropes community can probably help. Post all the details you can remember (examples help). If you're looking for a trope, head over to Trope Finder. Have general questions about tropes? Visit Ask The Tropers!
It sounds a lot like "The Wild Bunch" to me. Had it on my old Sinclair Spectrum
https://en.wikipedia.org/wiki/The_Wild_Bunch_(video_game)
You had to track down the members of the Wild Bunch gang, whilst being pursued yourself by a Pinkerton agent.
The game I'm thinking of didn't have the text adventure elements. Thank you for your reply, though!
The Town with No Name takes place in the Old West, has a beer-grabbing minigame and gunfights, and TV Tropes says it was on the "Commodore Amiga CDTV platform". I don't know if that's the same thing as Commodore 64.
Edited by KD
OK, this one is pretty obscure.
I remember playing a game on the Commodore 64 that took place in the Old West. The game was actually a compilation of mini-games. Three I remember:
1. Your cowboy character is walking through the desert and has to use a whip to fend off various dangers (scorpions, tumbleweeds, etc.)
2. A game set in a saloon where you need to grab the beers the bartender slings at you. If you missed one, it would crash into a tough guy's table, angering him.
3. A gunfight game against a series of opponents.
Ring any bells?