Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ dartmud improves
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Humiliation
(12 posts) Bio
|
Date
| Fri 28 Apr 2006 11:54 PM (UTC) |
Message
| 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? | Top |
|
Posted by
| Flelm
(15 posts) Bio
|
Date
| Reply #1 on Sat 29 Apr 2006 06:05 PM (UTC) |
Message
| <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. | Top |
|
Posted by
| Humiliation
(12 posts) Bio
|
Date
| Reply #2 on Sun 30 Apr 2006 01:30 AM (UTC) |
Message
| when i load the scrip an error comes up saying
[string "Script file"]:1: unexpected symbol near `<' | Top |
|
Posted by
| Flelm
(15 posts) Bio
|
Date
| Reply #3 on Sun 30 Apr 2006 02:27 AM (UTC) |
Message
| |
Posted by
| Humiliation
(12 posts) Bio
|
Date
| Reply #4 on Sun 30 Apr 2006 03:16 AM (UTC) |
Message
| now when i improve is says
Send-to-script cannot execute because scripting is not enabled. | Top |
|
Posted by
| Flelm
(15 posts) Bio
|
Date
| Reply #5 on Sun 30 Apr 2006 03:18 AM (UTC) |
Message
| 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. | Top |
|
Posted by
| Humiliation
(12 posts) Bio
|
Date
| Reply #6 on Sun 30 Apr 2006 03:45 AM (UTC) |
Message
| all good. thanks for your help | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
20,968 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top