|
Laura Kris Newbie
Joined: 19 Oct 2002 Posts: 1 Location: USA
|
Posted: Sat Oct 19, 2002 4:56 pm
Alias Issue (Attempting to enter text in a field) |
In the MUD I play, titled Typasia - one has to invoke powers of a certain symbol to create a certain effect. However, the syntax is very complex (I do not know why). I have to do preliminary commands first, then type in a certain code.
Basically, if I want to invoke the symbol of a bird, I would have to type this:
open ark
get bird from ark
invoke 'bird' 'Season, God, Life, Power, Honor, Cherish, Sleep, Dream, Life'
put bird in ark
kick ark
I hate those '' that I have to type in.
I want to be able to create an alias that is something like: invoke bird season, god, life, power, honor, etc. The words after bird can be anywhere from 1 word to 150 - depending on how cool the fireworks are going to be. :) The alias would do all the preliminary commands, and then the invoke string - then the closing commands.
Any ideas?
Thanks,
Laura |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Oct 19, 2002 6:01 pm |
quote:
In the MUD I play, titled Typasia - one has to invoke powers of a certain symbol to create a certain effect. However, the syntax is very complex (I do not know why). I have to do preliminary commands first, then type in a certain code.
Basically, if I want to invoke the symbol of a bird, I would have to type this:
open ark
get bird from ark
invoke 'bird' 'Season, God, Life, Power, Honor, Cherish, Sleep, Dream, Life'
put bird in ark
kick ark
I hate those '' that I have to type in.
I want to be able to create an alias that is something like: invoke bird season, god, life, power, honor, etc. The words after bird can be anywhere from 1 word to 150 - depending on how cool the fireworks are going to be. :) The alias would do all the preliminary commands, and then the invoke string - then the closing commands.
Any ideas?
Thanks,
Laura
You have everything there already, except for a couple of minor things.
1)replace bird with %1
2)change the list of effects from 'blah, blah, blah' to '%-2'
NOTE: I do not know how a comma will affect alias arguments, so if the above doesn't work, eliminate the commas from your arguments list and try this:
'%replace(%-2," ", ", ")'
3)surround the entire list from the open command to the kick command with #ALIAS {}
The resulting code should look like this:
#ALIAS {
open ark
get %1 from ark
invoke '%1' '%-2'
put %1 in ark
kick ark
}
li'l shmoe of Dragon's Gate MUD |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sat Oct 19, 2002 6:02 pm |
Sounds like a good idea. Just create an alias named something and put all the commands in there.
|
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|