Register forum user name Search FAQ

Gammon Forum

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.
 Entire forum ➜ MUSHclient ➜ General ➜ Alias...

Alias...

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


Posted by Zeno   USA  (2,871 posts)  Bio
Date Wed 06 Nov 2002 11:58 PM (UTC)
Message
I have to make an example to show want I want...
Alias-water
Sends-cast 'create water'

But when you need to specify a target like so-
cast 'create water' jug
but when I do-
water jug
it says huh?
Someone wanna help?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Guest1   USA  (256 posts)
Date Reply #1 on Thu 07 Nov 2002 12:20 AM (UTC)
Message
2 ways around it. Either:

A)
alias - water
send - cast 'create water' jug

B)
alias - water *
send - cast 'create water' %1
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #2 on Thu 07 Nov 2002 12:30 AM (UTC)
Message
water jug
cast 'create water'
What should the spell be cast upon?

Second doesn't work...

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Vaejor   (120 posts)  Bio
Date Reply #3 on Thu 07 Nov 2002 02:16 AM (UTC)
Message
try

alias: water( .*)?
send: cast 'create water'%1

check the 'regular expression' box
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #4 on Thu 07 Nov 2002 03:00 AM (UTC)
Message
Quote:

Second doesn't work...


The second one should work.

You make the alias:


<aliases>
  <alias
   match="water *"
   enabled="y"
  >
  <send>cast 'create water' %1</send>
  </alias>
</aliases>


(Copy the above and paste into the alias window).

Then type: water jug

It works, I tried it.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #5 on Fri 08 Nov 2002 11:10 PM (UTC)

Amended on Fri 08 Nov 2002 11:11 PM (UTC) by Zeno

Message
I got it to work, but now...

water
Huh?

water jug
cast 'create water' jug
A water jug is filled.

help?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #6 on Fri 08 Nov 2002 11:19 PM (UTC)
Message
In that case, Vaejor's suggestion will work:


<aliases>
  <alias
   match="^water(.*?)$"
   enabled="y"
   regexp="y"
  >
  <send>cast 'create water'%1</send>
  </alias>
</aliases>

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #7 on Fri 08 Nov 2002 11:35 PM (UTC)
Message
Yeah, I tried that but when I...

compare armor
(It cast the spell)

More help? Heh

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #8 on Fri 08 Nov 2002 11:46 PM (UTC)
Message
I don't understand what you are doing here. "compare armor"?

What has that to do with the water spell?

Can you copy the alias in question, and paste it here, then copy and paste what you are typing, and what you expect it to do.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #9 on Fri 08 Nov 2002 11:52 PM (UTC)
Message
Hehe, oops. My bad. I also have a spell just like water, armor.

armor *-
cast 'armor' %1

Then-
compare armor
(Casts spell)

ok?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #10 on Sat 09 Nov 2002 01:35 AM (UTC)
Message
Sounds like you are mixing things up a bit here.

My earlier suggestion had some important things in it, namely the "^" and "$". These say "match start of line", "match end of line". Without them any line with "armor" in it will match. I suggest copying the working one I did, and amending it slightly to replace "water" with "armor", like this:



<aliases>
  <alias
   match="^armor(.*?)$"
   enabled="y"
   regexp="y"
  >
  <send>cast 'armor'%1</send>
  </alias>
</aliases>

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Guest1   USA  (256 posts)
Date Reply #11 on Sat 09 Nov 2002 05:42 AM (UTC)
Message
going back to the water thing, sounds like you want 2 different aliases maybe.
IF your drink container is ALWAYS going to be a jug, then just do this

<aliases>
<alias match="water"
enabled="y"
<send>cast 'water' jug</send>
</alias>
</aliases>

So if you type 'water' it will cast water on a jug always. Typing 'water keg' or something like that will not do anything.
IF you want the option to have your water container vary so it's not always going to be a jug, then do this alias

<aliases>
<alias match="water *"
enabled="y"
<send>cast 'water' %1</send>
</alias>
</aliases>

BUT if you only have this alias above, typing 'water' will do nothing, you will always have to type 'water jug' or 'water keg' or whatever.
The best thing to do is create both the aliases above, so you can just type 'water' to cast water on your jug, but you can still type 'water <item>' to cast water on an item other than your jug.
Is that what you wanted?
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.


27,925 views.

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

Go to topic:           Search the forum


[Go to top] top

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