|
merinov Newbie
Joined: 19 Nov 2003 Posts: 5 Location: USA
|
Posted: Wed Nov 19, 2003 4:43 am
%additem/%ismember in triggers |
I'm trying to make lists in Zmud 6.62 of people in my race, guild, and org using the respective channel, it works, but there's a problem...
First a sample of the Mud Output:
Code: |
[Alchemist] Kylun nods.
[Alchemist] Dorach : Greetings sylvan
[Alchemist] Sylvan : heya
[Alchemist] Draco : Hello Sylvan
[Alchemist] Dinah : heya Sylvan
|
My trigger is:
%1 = channel name
%2 = Player name I want to store
now I have other triggers that capture tells and all channel outputs, but only when the variable @capture_channels is 1, I've incorporated it here:
Code: |
#if (@capture_channels) {
#if (%1=@org_name) {
#var Name %proper( 2)
#if !%ismember( @Name, @org_list) {
#var org_list %additem( %proper( %2), @org_list)
}
#unv Name
}
#if (%1=@race_name) {
#var Name %proper( 2)
#if !%ismember( @Name, @race_list) {
#var race_list %additem( %proper( %2), @race_list)
}
#unv Name
}
#if (%1=@guild_name) {
#var Name %proper( 2)
#if !%ismember( @Name, @guild_list) {
#var guild_list %additem( %proper( %2), @guild_list)
}
#unv Name
}
}
|
The @guild_name, @org_name, and @race_name are variables that store the name of the channel, and help sort the names into their proper place. Logically, this should only put a single name in any one list (for ease of removal at a later date) PROBLEM: Everytime the pattern triggers, it adds it to the proper list regardless if the player is there or not.
THOUGHT: Should I put the !%ismember line within ()? |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Nov 19, 2003 4:48 am |
Use #ADDITEM to prevent duplicate entries.
|
|
|
|
merinov Newbie
Joined: 19 Nov 2003 Posts: 5 Location: USA
|
Posted: Wed Nov 19, 2003 5:25 am |
Thanks for the quick responce...I'll try that suggestion now.
|
|
|
|
merinov Newbie
Joined: 19 Nov 2003 Posts: 5 Location: USA
|
Posted: Wed Nov 19, 2003 6:25 am |
Aye, it works like a charm...thanks!
|
|
|
|
|
|
|
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
|
|