|
Kaputchnik Beginner
Joined: 06 Jan 2002 Posts: 28 Location: Sweden
|
Posted: Tue Mar 26, 2002 3:13 pm
ANSI triggers |
I've made triggers to parse the people online on the mud into a targetlist this worked perfectly. And so I though I could one that parses the wholist during CTFs, in which the names are colored in the teamcolor. Wouldn't be much of a problem I though after reading ansi triggers, and I started working. But somehow my triggers doesn't even fire at all. I will present some raw output(with ansitags saved) and my triggers and you can take a look:
[1;31mRed[0;37m the female gnome
[33mYellow[37m the male elf
[1;36mBlue[0;37m the male human
Trigger:
%e[1;31m(%w)%e[0;37m the {male|female}
Pattern:
#if %ismember( %1, @redteam) {} {#additem redteam %1}
Trigger:
%e[33m(%w)%e[0;37m the {male|female}
Pattern:
#if %ismember( %1, @yellowteam) {} {#additem yellowteam %1}
Trigger:
%e[1;36m(%w)%e[0;37m the {male|female}
Pattern:
#if %ismember( %1, @blueteam) {} {#additem blueteam %1}
And then I try to simulete it from the zMUD prompt using:
#show {%e[1;31mRed%e[0;37m the female gnome}
It does output it so the trigger would fire, but the triggers don't fire at all. Been scracthing my head alot over this. Would appreciate if someone could clear things up. I've got the ANSI trigger option checked on triggers, and the trigger on trigger.
Cheers,
Kaputchnik |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Tue Mar 26, 2002 11:33 pm |
Since you are having problems I am going to say go to a single generic trigger.
I typed this up and tested it with manual shows. It correctly added to each team. This copy came from the class script and should give you no problems from the command line.
#TRIGGER {* the {male|female}} {TempPlayer=%word(%replace(%trigger,%char(27)," "),1);TempTeam=%copy(@TempPlayer, %eval(%pos("m",@TempPlayer)-2),2);TempPlayer=%copy(@TempPlayer, %eval(%pos("m",@TempPlayer)+1),255);#IF (@TempTeam=31) { #ADDITEM RedTeam @TempPlayer} { #IF (@TempTeam=33) { #ADDITEM YellowTeam @TempPlayer} { #IF (@TempTeam=36) { #ADDITEM BlueTeam @TempPlayer}}}} "" {color} |
|
|
|
|
|
|
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
|
|