It may not have clicked with you but souppilouliouma did have the right idea.
You haven’t explained how you’re doing these visits within the pet store, but you simply need to increment a counter when the player visits a specific pet, then check that counter within the other location.
NOTE: I’m going to use whitespace within some of the folk examples for the sake of clarity.
For example, in your StoryInit
special passage initialize your pet visit counters to 0
(zero, no visits):
<<set $bunnyVisits to 0>>
<<set $ferretVisits to 0>>
<<set $goldfishVisits to 0>>
<<set $kittenVisits to 0>>
<<set $puppyVisits to 0>>
<<set $turtleVisits to 0>>
Â
Then, in the pet store, increment the specific visit counter for whichever pet gets visited:
<<linkreplace "Visit puppy">>
<<set $puppyVisits to $puppyVisits + 1>>
You play with the puppy for a while.
<</linkreplace>>
I used <<linkreplace>>
for this example. However you’re doing the visits, just make the increment of the counters dependent upon doing the specific visits, not simply entering the passage—though you could do that if you were doing a unique visit passage for each pet.
Finally, in the other location, you check the value of the pet visit counters and deliver unique content based upon that:
<<if $puppyVisits is 0>>
No puppy visits. You may not need this case.
<<elseif $puppyVisits is 1>>
One puppy visit.
<<elseif $puppyVisits gte 2 and $puppyVisits lte 4>>
Two to four puppy visits.
<<elseif $puppyVisits gte 5 and $puppyVisits lte 8>>
Five to eight puppy visits.
<<elseif $puppyVisits gte 9>>
Nine or more puppy visits.
<</if>>
You can, of course, also include non-unique content, just outside of the control logic—meaning the <<if>>
.