|
Tragedy.in.progress Newbie
Joined: 15 Dec 2004 Posts: 8
|
Posted: Thu Dec 01, 2005 10:52 pm
Ignore a certain name from a request |
Before I ask, I would like to say, I did a search, and I found some threads for ignoring certain text, but I'm pretty much a newbie to zmud triggers and I didn't really understand any of what was being said. That being said.. I THINK my request is simple, I just want to ignore certain names from a request like..
Bob wants to open a trade session with you.
I want to ignore the name Bob, for lots of reasons, mainly if someone is not being very nice with their trade requests.
Thanks in advance for any help. |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Thu Dec 01, 2005 11:12 pm |
Two ideas come to head. One where you manually trust people for the trigger, the other where you keep track of those you do not wish the trigger to happen for.
1) Manually trusting people
#TRIGGER {^({@GoodList}) wants to open a trade session with you.} {#NOOP Do something here like auto open a trade session.}
#ALIAS addGoodList {#ADDITEM GoodList %upper("%-1");#VAR GoodList %replace(@GoodList,"||","|");#SH GoodList now: @GoodList}
#ALIAS delGoodList {#DELITEM GoodList %upper("%-1");#VAR GoodList %replace(@GoodList,"||","|");#SH GoodList now: @GoodList}
Usage:
addgoodlist Mary
delgoodlist Bob
2) Automatically trust people and keep track of a bad list.
#TRIGGER {^(%w) wants to open a trade session with you.} {#IF (%ismember(%upper(%1),@BadList) == 0) {#NOOP Do something here like auto open a trade session.} {#NOOP %1 on BadList: @BadList}}
#ALIAS addBadList {#ADDITEM BadList %upper("%-1");#VAR BadList %replace(@BadList,"||","|");#SH BadList now: @BadList}
#ALIAS delBadList {#DELITEM BadList %upper("%-1");#VAR BadList %replace(@BadList,"||","|");#SH BadList now: @BadList}
Usage:
addbadlist bob
delbadlist Mary |
|
|
|
Tragedy.in.progress Newbie
Joined: 15 Dec 2004 Posts: 8
|
Posted: Thu Dec 01, 2005 11:35 pm |
I suppose I should have said I wanted to manually be able to ignore them, anyways, thanks, I'll try this.
|
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Fri Dec 02, 2005 12:09 am |
Manually being able to ignore them would be 2)
|
|
|
|
Tragedy.in.progress Newbie
Joined: 15 Dec 2004 Posts: 8
|
Posted: Fri Dec 02, 2005 12:11 am |
Okay, a few questions concering this part:
Quote: |
#TRIGGER {^({@GoodList}) wants to open a trade session with you.} {#NOOP Do something here like auto open a trade session.}
#ALIAS addGoodList {#ADDITEM GoodList %upper("%-1");#VAR GoodList %replace(@GoodList,"||","|");#SH GoodList now: @GoodList}
#ALIAS delGoodList {#DELITEM GoodList %upper("%-1");#VAR GoodList %replace(@GoodList,"||","|");#SH GoodList now: @GoodList} |
As I said I'm a total newb when it comes to triggers, so I was wondering how I would go about making it execute multiple commands like, I would want it to do something like this:
trade %1
show %1
That's obviously after the I've decided the person is okay to trade with.. err.. not added to the badlist.. I think that makes sense? It's probably obvious and simple I know, but I gotta learn somehow.
Thanks again |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Fri Dec 02, 2005 12:28 am |
From 2)
#TRIGGER {^(%w) wants to open a trade session with you.} {#IF (%ismember(%upper(%1),@BadList) == 0) {trade %1;show %1} {#NOOP %1 on BadList: @BadList}}
This will auto trade/show everyone that is not on your bad list.
It checks to see if the person is not a member of the bad list then executes your automatic trade/show.
#NOOP does nothing and acts as a comment. |
|
|
|
Tragedy.in.progress Newbie
Joined: 15 Dec 2004 Posts: 8
|
Posted: Fri Dec 02, 2005 3:15 am |
Well, it's working in part.. I don't know if I have them set up properly or what. It's just still letting the people trade that I have added to the badlist. How was I supposed to use these triggers, were 1 and 2 supposed to be used together or what? Because I've tried several different things that I could think of and I can make it either not trade with anyone at all, or trade with everyone, the way it is currently. And it does not matter if I add them to the goodlist or badlist using the alias's.
This is what the triggers look like in the zmud settings:
1)
^({@GoodList}) wants to open a trade session with you.
#NOOP
trade %1
show %1
2)
^(%w) wants to open a trade session with you.
#IF (%ismember( %upper( %1), @BadList) == 0) {
trade %1
show %1
} {#NOOP %1 on BadList: @BadList}
Thanks again, I really appreciate the help |
|
|
|
Slaem Apprentice
Joined: 20 Sep 2005 Posts: 135
|
Posted: Fri Dec 02, 2005 4:46 am |
Not to be nosy, but you said you want to manually ignore. So, delete trigger 1 and only use trigger 2. See Ton's original code (modified):
Quote: |
2) Automatically trust people and keep track of a bad list.
#TRIGGER {^(%w) wants to open a trade session with you.} {#IF (%ismember(%upper(%1),@BadList) == 0) {trade %1;show %1} {#ECHO No trade. %1 on BadList.}}
#ALIAS addBadList {#ADDITEM BadList %upper("%-1");#VAR BadList %replace(@BadList,"||","|");#SH BadList now: @BadList}
#ALIAS delBadList {#DELITEM BadList %upper("%-1");#VAR BadList %replace(@BadList,"||","|");#SH BadList now: @BadList} |
Check your BadList variable (#ECHO @BadList) and make sure each entry is in ALLCAPS. Any that aren't will not match your trigger and need to be deleted via "#DELI BadList name" and reentered via your addBadList alias. (replace "name" with the actual name you want to delete)
Q: Do any of the names have numbers or symbols in them, like "Bob13" or "Bob_IsBad"? |
|
|
|
Tragedy.in.progress Newbie
Joined: 15 Dec 2004 Posts: 8
|
Posted: Fri Dec 02, 2005 11:49 am |
Slaem wrote: |
Not to be nosy, but you said you want to manually ignore. So, delete trigger 1 and only use trigger 2. See Ton's original code (modified):
Quote: |
2) Automatically trust people and keep track of a bad list.
#TRIGGER {^(%w) wants to open a trade session with you.} {#IF (%ismember(%upper(%1),@BadList) == 0) {trade %1;show %1} {#ECHO No trade. %1 on BadList.}}
#ALIAS addBadList {#ADDITEM BadList %upper("%-1");#VAR BadList %replace(@BadList,"||","|");#SH BadList now: @BadList}
#ALIAS delBadList {#DELITEM BadList %upper("%-1");#VAR BadList %replace(@BadList,"||","|");#SH BadList now: @BadList} |
Check your BadList variable (#ECHO @BadList) and make sure each entry is in ALLCAPS. Any that aren't will not match your trigger and need to be deleted via "#DELI BadList name" and reentered via your addBadList alias. (replace "name" with the actual name you want to delete)
Q: Do any of the names have numbers or symbols in them, like "Bob13" or "Bob_IsBad"? |
Nope, just regular one word names with no extra weird characters in them. And as for the rest, it is still behaving the same way, opening trade with anyone that requests it. I made sure the names were in all caps, and everything, but maybe there is something I am missing, I didn't have much time to play with it last night. |
|
|
|
Slaem Apprentice
Joined: 20 Sep 2005 Posts: 135
|
Posted: Fri Dec 02, 2005 4:05 pm |
I'm gonna defer back to Ton since it's his code. I tested it, and it only auto-traded for me when the name was not on the BadList. If it was on the BadList then it echoed no trade. You mentioned you tried "several different things". I'd make sure all those "different things" have been deleted so they aren't conflicting with Ton's good script.
|
|
|
|
|
|