pretty sure var links are put in chat in the format <varlink:variable:value>, replace variable with the variable to be set, and value with the value to set the variable to
for example
<varlink:clicked:1>
will set clicked to 1
i'm not sure how it appears in chat, it might just display the variable name
so "blub <varlink:bluh:5> blob"
might appear as "blub bluh blob"