does anyone know how to make a script that triggers on
* You think your (wildcard) skill has improved. *
and counts every time it happens for each particular skill that comes up?
<triggers>
<trigger
enabled="y"
match="\* You think your (.*) skill has improved\. \*"
regexp="y"
send_to="12"
sequence="100"
>
<send>SetVariable("%1" .. "_skill", (GetVariable("%1" .. "_skill") or 0) + 1)</send>
</trigger>
</triggers>
This should work as long as you set your language to Lua. You'll be able to get the current number from <skill>_skill.
e.g.
* You think your posting skill has improved. *
will set the variable posting_skill to posting_skill + 1, or 1 if it didn't exist already.
when i load the scrip an error comes up saying
[string "Script file"]:1: unexpected symbol near `<'
now when i improve is says
Send-to-script cannot execute because scripting is not enabled.
You need to open up the scripting window (Shift+Ctrl+6) and enable scripting, and set the language to Lua.
To be honest, you could probably do this without scripting, but I guess I'm a sucker for Lua.
all good. thanks for your help