|
Malken Newbie
Joined: 27 Feb 2002 Posts: 1
|
Posted: Wed Feb 27, 2002 3:29 am
Trigger question from a newbie |
How would I do a trigger that would replace someone's description by it's name, and keeping the description?
Example: Replace A blue-eyed, short woman is here. by A blue-eyed, short woman (Aliena) is here. ?
Thanks :) |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Wed Feb 27, 2002 3:41 am |
I essentially to do that you can use the substitute command:
#TRIGGER {a blue-eyed, short woman} {#SUB {a blue-eyed, short woman (Aliena)}}
The problem with that is that you could find many people with the same description.
You might might want to consider this with your lp mud as you only name people once
so you can take your time to do it or you run away and do it when you are safe from
your logs:
Syntax: do_name woman Aliena a blue-eyed, short woman
#ALIAS do_name {name %1 as %2;#VAR V_%1 "%-3";#ECHO @{V_%1} has been named as %2}
You can get fancier later on with a database of file storing of that kind of knowledge.
TonDiening
Beta Upgrading to 6.26 |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Feb 27, 2002 3:41 am |
I am going to guess you are receiving a description in response to the mud command "look". I am also guessing you issue this command by entering "l ali" in the case of your example. Next I am going to guess that there is no previous line sent by the mud after the look command, to provide the players name. So what you want can not exactly be done without more info, but I can come close.
#AL l {#T+ Looking;LookAT="%-1";look %-1;#ALARM {+5} {#T- Looking}}
#CLASS Looking
#TRIGGER {^A (*), (%w) ({man|woman}) is here.} {#SUB {A %1, %2, %3 ~(@LookAT~) is here.};#T- Looking}
#VAR LookAT {}
#CLASS 0 |
|
|
|
|
|