Hi, I'd like to add a word in the output line.
I tried this way:
trigger: XXX YYY Dwarf
send: %1 XXX YYY Dwarf (Dramli) %2
ignore case - checked
omit from output checked
send to output
it works but:
1)if there is more than one person that i'd like to recognise i can see only one - only one trigger works ok
2)the colour different from normal output color - i can't change it
3)problem in creating a new line in output...example
>location: yyy dwarf, zzz human, aaa elf, bbb dwarf,www human
(text in two lines)
when i add a trigger first line is longer and goes down but the second line goes down too.
like that:
>location: yyy dwarf (Dramli), zzz human, aaa elf, bbb dwarf,www
human
Sorry i'm not good at english ...at scripting either :)
Can you help and show me (in a simple way) how to solve my problem?
Sayjak
made mistake with example...i cannot edit
should be that way:
>location: yyy dwarf, zzz human, aaa elf, bbb dwarf,www human
(text in two lines)
when i add a trigger first line is longer and goes down but the second line goes down too.
like that:
>location: yyy dwarf (Dramli), zzz human, aaa elf,
>bbb dwarf,www
>human
You can match on multiple things with a regular expression, eg.
(.*) XXX YYY (Dwarf|Goblin|Kobold) (.*)
You can have multiple lines in the trigger response, I'm not sure what the problem is there.
The colour is the world "note" colour - see the scripting configuration page to change that, also you can change it inside a script routine.
Thanks for respond Nick.
I'll try to explain what i mean. I cannot scripting so i'll show what i want to do.
message from mud:
> You are in the local shop. Here you can sell and buy stuff.
You can also use value or list commands, 'list armours',
'list weapons', 'list <name>' and 'list' works too.
There is also a small sign to read with more instructions.
West there is a bridge to the inn.
There are three obvious exits: down, west, north.
A broken dull knife.
A weathered muscular human, a blue-eyed friendly gnome and a fork-bearded bald human.
ok. Now i know that the blue-eyed friendly gnome name is Tuath.
so i'd like to change the mud text to:
> You are in the local shop. Here you can sell and buy stuff.
You can also use value or list commands, 'list armours',
'list weapons', 'list <name>' and 'list' works too.
There is also a small sign to read with more instructions.
West there is a bridge to the inn.
There are three obvious exits: down, west, north.
A broken dull knife.
A weathered muscular human, a blue-eyed friendly gnome(Tuath) and a fork-bearded bald human.
I'll do this the way i presented in firt note...but if i know 2 or more persons and when i put their name - the trigg doesn't work.
example: if i know that the blue-eyed friendly gnome name is Tuath and the a weathered muscular human is Nicolas i would like to have this:
> You are in the local shop. Here you can sell and buy stuff.
You can also use value or list commands, 'list armours',
'list weapons', 'list <name>' and 'list' works too.
There is also a small sign to read with more instructions.
West there is a bridge to the inn.
There are three obvious exits: down, west, north.
A broken dull knife.
A weathered muscular human(Nicolas), a blue-eyed friendly gnome(Tuath) and a fork-bearded bald human.
Maybe its very simple question but if you could help me with it...?
Thanx
Sayjak
The simple answer is that you really can't do what you are trying with triggers. "However", the more complex answer is that you can use a trigger to match on any 'single' instance and then use scripting to parse the rest of the line and look for other matches.
As for maintaining the original colors.. I wouldn't mind eventually seeing an option for 'preserve color' and the ability for world.note to re-output the formated ansi line. World.colourtell and world.colournote are useful only if you already know what the line looked like and can reformat the entire thing using the same colors.
Or.. Another option would be to have such an option pass an extra array/varient, something like:
(ansi1:1),(ansi3:5),(ansi1:7)
where () is a single array element, the first item in each element is the color and the second is the character it starts at. Then a person can just split the line up in appropriate bits and use the existing colorizing tell and note commands to output the correct format. There are definite limitations to color triggers and not being able to do a 'replace this with that' sort of thing in them is a definite limitation sometimes. ;)