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

Gammon Software Solutions 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?
(New message)
Subject: Problem with an Alias system...
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Sun 19 Sep 2004 05:58 AM (UTC)  quote  ]

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

Posted by Tatewaki2365   (34 posts)  [Biography] bio
Date Sun 19 Sep 2004 01:29 AM (UTC)  quote  ]
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 Shadowfyr   USA  (1,774 posts)  [Biography] bio
Date Sat 18 Sep 2004 10:33 PM (UTC)  quote  ]
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.

main {
__if (Schrodinger_Cat is Alive or version >= "XP"){
____if version = "Vista" then Performance /= Number_of_Cores;
____call Functional_Code();}
__else
____call Crash_Windows();}
[Go to top] top

Posted by Tatewaki2365   (34 posts)  [Biography] bio
Date Sat 18 Sep 2004 10:10 PM (UTC)  quote  ]
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 Flannel   USA  (1,230 posts)  [Biography] bio
Date Sat 18 Sep 2004 04:41 AM (UTC)  quote  ]
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 Sat 18 Sep 2004 02:40 AM (UTC)  quote  ]
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

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.


1,376 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

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

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]