Using conditional branch to detect a purchase from a shop keep

I'm trying to get a shop keep to give me certain replies after shop processing has finished based on:

A: Party having no gold
B: A purchase has been made
C: Party has gold but no purchase made

Example replies would be like:

A: "A little short today are we?"
B: "Thank you, come again!"
C: "Something wrong with my prices??"

I've been trying to use conditional branching but I don't think I'm anywhere near the ballpark I'm meant to be in. Could someone point me in the right direction?
A quick summary of some applicable options:
  1. You can check party gold against a fixed value using Conditional Branch -> Gold.

  2. Shops can be set to "Purchase only", allowing you to check for a purchase simply by checking if gold after is less than gold before.

  3. You can store current gold in a variable using Control Variables -> Game Data -> Gold. That can be used to calculate the gold spent, e.g.

    ◆Comment:Store current gold ◆Control Variables:#0001 Check = Gold ◆Shop Processing:Short Sword : :Long Sword ◆Comment:Subtract current gold from stored value ◆Control Variables:#0001 Check -= Gold ◆If:Check > 0 ◆Text:None, None, Window, Bottom : :You spent \v[1]\G! ◆ :Else ◆Text:None, None, Window, Bottom : :Nothing catch your eye? ◆ :End

  4. You can put Conditional Branches inside one another, e.g. to check both "is gold > 20" and "was gold spent?".
to slightly adjust Caethyril solution:

you can start with:

if player gold < 99 (is base gold is 100 or higher , gold must be higher than 99.
text: to low on gold are we
else
(the solution by Caethyril) in here
end

so you have the entire shop setup as you like too 🙂
Thanks so much both of you. That worked a treat.

Is there anything I could do better here or does that look ok?

Screenshot 2022-12-19 212404.png
Thanks so much both of you. That worked a treat.

Is there anything I could do better here or does that look ok?

View attachment 248498
There is a scenario where this won't work: the player buys something and then sells something that sells for exactly the amount the item cost them.
it works best on a "buy only shop", and I would personally place the
the gold less than x on the top before buying anything.

99 = just a sample, if you lowest cost of item is 300, place < 299.
but you can set the variable on top, if you just want to shop, and
cancel out, than check if the gold is lower, than the other wont
executed too 🙂

but there are some advanced ways you can pull the stuff nicely around.
but it seems ok.

as Trihan said, it doesn't really work if you can also sell items, which
break the system, so you can make a seperate "sell only shop".

Original thread: https://forums.rpgmakerweb.com/threads/using-conditional-branch-to-detect-a-purchase-from-a-shop-keep.153393/