[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Problem with an Alias system...
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Problem with an Alias system...

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Tatewaki2365   (34 posts)  [Biography] 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...
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] 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 &quot;tracking&quot;, 1</send>
  </alias>
  <alias
   match="untrack"
   enabled="y"
   echo_alias="y"
   send_to="12"
   ignore_case="y"
   sequence="100"
  >
  <send>enabletrigger &quot;tracking&quot;, 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.
[Go to top] top

Posted by Tatewaki2365   (34 posts)  [Biography] 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?
[Go to top] top

Posted by Shadowfyr   USA  (1,783 posts)  [Biography] 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.
[Go to top] top

Posted by Tatewaki2365   (34 posts)  [Biography] 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]'.
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] 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.
[Go to top] 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.


3,376 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]