Whisky's explanation is accurate.
You can:
Code:
set var value
remote var %actor.id%
To create a variable and save the value of it to the player.
You can then check whether the player has such a variable saved to them with:
Code:
if %actor.varexists(var)%
Similarly the value of the variable saved to them can be accessed with %actor.var%.
The meat of the script is fairly standard fare, the main reason I decided to post it was the changes I made to its firing conditions because that's not something I've seen other people do for the most part.
As an example.
It is common to check if 'a' is inside of 'b'.
ie. When seeking an abbreviation of a one word argument and wanting to allow abbreviations of either ridley or secret so they can type ask ri, or ask sec, etc.
This is super simple.
Most people will do it like this though:
This is wrong.
will work
will also work.
This is because idle is inside of ridley.
If you want to make sure the pattern matching begins at the start of the word then either of the following solutions are superior.
Code:
if 'ridley /= '%arg%
or
Code:
set ridley 'ridley
if %ridley.contains('%arg%)%
The reason these solutions are superior is because they use ' as a delimiter at the start of the terms forcing the matching to be at the beginning of the terms. ie. While idle is inside of Ridley, 'idle is not inside of 'Ridley.
What's far more complicated is to require vara to have multiple abbreviations inside of it.
You need each term in vara to be prefaced with a delimiter character like ', and then to check if each word in vara is an abbreviation of one of the required terms, and to ensure that all of the abbreviations are found.