I came up with this, which may be only part of what you're looking for. You'd have to tinker with it to get a good range of "You have ... but you need..." messages, but at least it shows only what you
haven't picked up in the basement. I found trying to do too much with Squiffy's If/Else when it comes to setting / displaying attributes to be very problematic.
@start start
[[start]]:
@set tube = 0
@set bracket = 0
@set fitting = 0
[[ Start it up! ]](Basement)
[[Basement]]:
@clear
There's a lot of stuff here in the basement.
{if tube=0:You see a [tube] here.}
{if bracket=0:There is a [bracket] here.}
A tube and bracket might go together to make a [[fitting]].
[tube]:
@set tube = 1
You pick up the tube. It's about two feet long, and should work as part of a [[fitting]].
[[continue . . .]](Basement)
[bracket]:
@set bracket = 2
You take a sturdy steel bracket. It could form part of a [[fitting]].
[[continue . . .]](Basement)
[[fitting]]:
var Txt = "";
if (get("tube") == 1) {Txt = Txt +"You have a tube.";}
if (get("bracket") == 2) {Txt = Txt +" You have a bracket.";}
if ((get("tube") == 1) && (get("bracket") == 2)) { Txt = Txt + " You have both parts needed, so you now have a fitting."; }
set("Gtxt", Txt);
Tube: {tube}
Bracket: {bracket}
{Gtxt}
[[continue . . .]](Basement)