 |
romciom Beginner
Joined: 15 Oct 2002 Posts: 10 Location: Poland
|
Posted: Wed May 21, 2003 2:25 pm
Trigger 2 times in a line |
Hello,
The trigger I have works just great when there is only one pattern which fires it in line. It looks like that:
pattern:
(%x %x {male|female} {human|elf|dwarf|hobbit|kender|gnome|minotaur|goblin})
script:
#IF %ismember("%1",@desclist) {#SUB {%1 "["%item(@namelist,%ismember("%1",@desclist))"]"}}
It fires when a player description shows on the screen and then adds that player's name after the description, for example:
blue-eyed black-haired male elf
changes to
blue-eyed black-haired male elf [Thardriel]
Desclist and namelist are string variables with descriptions and names in a proper order.
The problem is that when two descriptions show in one line, it works well only with the first one, and shows strange things in place of a second description.
blue-eyed black-haired male elf and tall muscular male goblin
changes to
blue-eyed black-haired male elf [Thardriel] and 150 {#SUB {tall muscular male goblin [Burk]}}
The number in red changes to a number that is a position of a name/desc in the list.
Does anybody have any clue how to change it?
Thanks in advance. |
|
|
 |
Vijilante SubAdmin

Joined: 18 Nov 2001 Posts: 5187
|
Posted: Thu May 22, 2003 12:18 am |
Putting paranthesis around the #IF expression should help, but may not fix it.
#IF (%ismember("%1",@desclist)) {#SUB {%1 "["%item(@namelist,%ismember("%1",@desclist))"]"}} |
|
|
 |
romciom Beginner
Joined: 15 Oct 2002 Posts: 10 Location: Poland
|
Posted: Thu May 22, 2003 8:33 am |
Thanks, but it doesn't work. The only change is that now there is paranthesis around the number...
blue-eyed black-haired male elf [Thardriel] and (150) {#SUB {tall muscular male goblin [Burk]}}
Any more ideas? |
|
|
 |
Dumas Enchanter
Joined: 11 Feb 2003 Posts: 511 Location: USA
|
Posted: Thu May 22, 2003 10:44 am |
Hmm...try going to the options tab on the settings editor for this trigger and make sure Trigger on Trigger is off on the bottom left.
|
|
|
 |
Kjata GURU

Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Thu May 22, 2003 11:34 am |
What version are you using?
Try changing the command of the trigger to:
#IF (%ismember("%1", @desclist)) {#SUB {%concat("%1", "[", %item(@namelist, %ismember("%1", @desclist)), "]")}}
If it doesn't work, then I think this is a bug with #SUB. I've sometimes seen #SUB work strangely when it is not the only command.
Kjata |
|
|
 |
Vijilante SubAdmin

Joined: 18 Nov 2001 Posts: 5187
|
Posted: Thu May 22, 2003 10:11 pm |
You can also change the trigger pattern to:
({@desclist})
This will allow you to eliminate the #IF check. |
|
|
 |
romciom Beginner
Joined: 15 Oct 2002 Posts: 10 Location: Poland
|
Posted: Fri May 23, 2003 3:58 pm |
Changing the pattern to ({@desclist}) and deleting the #IF part worked!
Thanks a lot everyone! |
|
|
 |
|
|