Basically I want the shopkeeper to grumble about 'Window shoppers.'
if you access the shop and don't buy anything.
Put the party's amount of gold into a variable before and after.
What if the person buys and sells stuff and ends up with the same amount of gold? You could run checks on the inventory but that could be cumbersome. You would likely need some kind of script to keep track of how much is spent and sold at a ship.
But, if you bought and sold enough to make the gold even... Why wouldn't the shopkeeper complain about "Window Shoppers" as well? After all, he didn't make a profit at all, and you basically got crap you needed without giving him much of anything worth selling if he didn't make a profit.
Makes sense to me, at least.
In a way he did make a profit though, because he bought your stuff at half price and can now turn around and sell it for full price to the next player.
That's only assuming there are other people who buy weapons/armor in the game. Most RPGs I've played? Yeah, nobody buys anything in the games except the players. NPCs typically browse without buying, and the only adventurers in the world are in your party.
I would probably rethink my career then if the only person who would buy my stuff is a once-in-a-lifetime hero. I would hate to live in a world where a hero only comes along once a century.