Install the given JavaScript AND the CSS, and you can do a lot of things with this set of macros--replace text depending on the number of times a passage has been visited, for instance, or reveal text based on something a user has clicked.
You find a ring. Do you want to wear it?
<<replace>>Yes<<becomes>>You put it on your finger.<<endreplace>>
<<replace>>No<<becomes>>You put it in your backpack.<<endreplace>>
This isn't a complete solution, but it gives you an idea of what's possible.
Note that the Glorious Trainwrecks <<replace>> macro works with Sugarcane and Jonah story formats. With some tweaking, I'm sure they'd work with Sugarcube, too. I'm investigating how.