Page 1 of 1

Stuck with aliases

Posted: Tue Jul 12, 2016 6:23 pm
by Gumm
Hello,

my first experience with kildclient had been really great, but now i am stuck with aliases. I simply want to create an alias like

Code: Select all

^tt (.*)$
which should be evaluated (without actually sending something to the mud) to

Code: Select all

$target = $1
But whatever i do, i always get warnings about uninitialized values, and the whole thing simply doesnt work. Any examples or suggestions what to do here?
In a second alias later i want to expant "kk" to "kill $target"....

Re: Stuck with aliases

Posted: Mon Jul 18, 2016 7:51 pm
by ekalin
First, the alias must start with / so that it is executed as a Perl command. Otherwise you'll be sending text to the MUD server.

You also need to escape the $ in $target, otherwise the value of the $target variable will be replaced - generating the warnings about unitialized values.

Lastly, Perl syntax requires quotes around the string value to be assigned to $target. So the replacement should be

Code: Select all

/\$target = "$1"
As for the kk aliases, this one is more straightforward as you're just sending text to the server.

If you want, you can import the attached file to load the aliases in your world.

Re: Stuck with aliases

Posted: Tue Jul 19, 2016 8:36 pm
by Gumm
works great! Thanks a lot