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
➜ Problem with an Alias system...
|
Problem with an Alias system...
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Tatewaki2365
(34 posts) Bio
|
| Date
| Sat 18 Sep 2004 02:40 AM (UTC) |
| Message
| #alias track {#action $prey is here.} {murder $prey}
#alias untrack {#unaction $prey is here.}
Something along those lines... Basically, it's supposed to make it so when I type 'track' or 'untrack' it will autoattack the person set as the prey (With 'prey [person]') with the sent 'murder' command.
This was sent to me by a user of JMC, but I don't really like JMC, so I was wondering if the same sort of thing could be done with Mush... | | Top |
|
| Posted by
| Flannel
USA (1,230 posts) Bio
|
| Date
| Reply #1 on Sat 18 Sep 2004 04:41 AM (UTC) |
| Message
| Copy <aliases> to </aliases> and paste in alias menu, triggers to /triggers paste in trigger menu and variables /variables paste in the variable menu.
(click the paste button on the respective pages).
You need to have scripting enabled, and set to VBScript.
<aliases>
<alias
match="prey *"
enabled="y"
echo_alias="y"
variable="prey"
send_to="9"
ignore_case="y"
sequence="100"
>
<send>%1</send>
</alias>
<alias
match="track"
enabled="y"
echo_alias="y"
send_to="12"
ignore_case="y"
sequence="100"
>
<send>enabletrigger "tracking", 1</send>
</alias>
<alias
match="untrack"
enabled="y"
echo_alias="y"
send_to="12"
ignore_case="y"
sequence="100"
>
<send>enabletrigger "tracking", 0</send>
</alias>
</aliases>
<triggers>
<trigger
enabled="y"
expand_variables="y"
ignore_case="y"
match="@prey is here."
name="tracking"
sequence="100"
>
<send>murder @prey</send>
</trigger>
</triggers>
<variables>
<variable name="prey">target</variable>
</variables>
|
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | | Top |
|
| Posted by
| Tatewaki2365
(34 posts) Bio
|
| Date
| Reply #2 on Sat 18 Sep 2004 10:10 PM (UTC) |
| Message
| | Maybe (Obviously) I'm confused. When I try to paste from <aliases> to </aliases> in the Alias line (Above the send line), it says that it won't allow line breaks there. Am I pasting in the right area/pasting the right thing? | | Top |
|
| Posted by
| Shadowfyr
USA (1,792 posts) Bio
|
| Date
| Reply #3 on Sat 18 Sep 2004 10:33 PM (UTC) |
| Message
| | Don't use "Add" or "Edit" in the alias dialog. There should be a button labelled "Paste", which becomes active when you have copied XML code for aliases into the clipboard. Basically, this button lets you copy or paste an entire alias, as it would appear in a world file or plugin, directly from or into the client, instead of using 'Add' and having to enter each item seperately. | | Top |
|
| Posted by
| Tatewaki2365
(34 posts) Bio
|
| Date
| Reply #4 on Sun 19 Sep 2004 01:29 AM (UTC) |
| Message
| Okay, I have a request for a slight change;
I had it in the wrong format, and it won't lock onto [name] is here, because generally there's a class title there:
'[name] the Dragon Slayer is here.' so, what I need, is it to lock onto JUST the name. So, when it recognizes [name], it will do 'murder [name]'. | | Top |
|
| Posted by
| Flannel
USA (1,230 posts) Bio
|
| Date
| Reply #5 on Sun 19 Sep 2004 05:58 AM (UTC) Amended on Sun 19 Sep 2004 06:00 AM (UTC) by Flannel
|
| Message
| Change the alias to match on just the variable (thats the @ then the variable name, with expand variables checked) and then regexp (regular expression) checked.
Although, you will try and murder them whenever. And you might might easily get into a nice loop, which wouldnt be good. (It will match on the name, anywhere, in conversation, or if you get an echo about it, or whatever)
You MIGHT be better matching on ^@prey (regexp) which will match whenever the variable is at the beginning of the line. But of course, if you have a leading space or whatever, you wont match (you could account for that though).
What trigger is best for you depends on your situation, and how often you see it, and where, and whats around it. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | | 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.
18,974 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top