Here are two basic templates that should handle the job (well, two and a half); you just need to replace the stuff in quotes with the correct information, and repeat stuff as needed. The first checks if a container has the crystal you want:

You would attach this to a dialogue node... I'd do it as a player node; have the computer say "select the crystal you would like to modify" and then you choose one from the list it gives you, conditional script attached to each node. Then the next node gives you the list of which ones you can blend it with, in a similar fashion.

Now, for K1 you would have to create a different conditional script for every crystal. It would just be copy/paste work, put in a different tag. With K2 you wouldn't have to do this, though; you could create a universal script:

It could be converted to delete three, four, and so on; just duplicate the string sTag, object oCrystal, and ActionTakeItem lines, and adjust the information as required.

Now, I have a conundrum of my own. I was working on a script and I thought an efficient way to do it would be to use a switch for the string parameter. However, I wasn't sure if this is possible. I believe I've seen it done before, but I couldn't find anything by searching. I eventually did it with if trees instead... it was probably easier with ifs, actually. But I'm still curious. I believe it should look something like:

Code:

case "whatever":

...but you know how the engine is. Anyway, just curious... not a big deal. If any of you remember seeing something like this, just let me know.