|
Darrant Beginner
Joined: 21 Jun 2003 Posts: 11 Location: USA
|
Posted: Sat Jun 21, 2003 7:16 am
Expression Triggers and Pattern Triggers |
I finally figured out why some of my scripts kept going crazy... I have expression triggers that run commands for me like a bot, but if I have a pattern trigger running with a variable in it even a simple #ad trigger it will freak out and screw up. Any advice that can be given to me on this matter would be greatly appreciated
|
|
|
|
Darrant Beginner
Joined: 21 Jun 2003 Posts: 11 Location: USA
|
Posted: Sun Jun 22, 2003 3:32 am |
I guess what I can do is show you guys what I have...
Here are my expression triggers:
#TRIGGER (@elvenbot = 1) {w;kill elves} "bots|elvenbot" {notrig}
#TRIGGER (@elvenbot = 2) {w;kill elves} "bots|elvenbot" {notrig}
#TRIGGER (@elvenbot = 3) {w;kill elves} "bots|elvenbot" {notrig}
#TRIGGER (@elvenbot = 4) {w;kill elves} "bots|elvenbot" {notrig}
#TRIGGER (@elvenbot = 5) {w;kill elves} "bots|elvenbot" {notrig}
#TRIGGER (@elvenbot = 6) {w;kill elves} "bots|elvenbot" {notrig}
#TRIGGER (@elvenbot = 7) {s;kill elves} "bots|elvenbot" {notrig}
#TRIGGER (@elvenbot = 8) {s;kill elves} "bots|elvenbot" {notrig}
#TRIGGER (@elvenbot = 9) {e;kill elves} "bots|elvenbot" {notrig}
#TRIGGER (@elvenbot = 10) {s;kill elves} "bots|elvenbot" {notrig}
#TRIGGER (@elvenbot = 11) {n;w;kill elves} "bots|elvenbot" {notrig}
#TRIGGER (@elvenbot = 12) {s;kill elves} "bots|elvenbot" {notrig}
#TRIGGER (@elvenbot = 13) {w;kill elves} "bots|elvenbot" {notrig}
#TRIGGER (@elvenbot = 14) {w;kill elves} "bots|elvenbot" {notrig}
#TRIGGER (@elvenbot = 15) {n;kill elves} "bots|elvenbot" {notrig}
#TRIGGER (@elvenbot = 16) {s;e;e;kill elves} "bots|elvenbot" {notrig}
#TRIGGER (@elvenbot = 17) {s;kill elves} "bots|elvenbot" {notrig}
#TRIGGER (@elvenbot = 18) {s;kill elves} "bots|elvenbot" {notrig}
#TRIGGER (@elvenbot = 19) {w;kill elves} "bots|elvenbot" {notrig}
#TRIGGER (@elvenbot = 20) {s;kill elves} "bots|elvenbot" {notrig}
#TRIGGER (@elvenbot = 21) {e;kill elves} "bots|elvenbot" {notrig}
Now the pattern trigger that messes it up is this.
Command: Snake mace gives an elven heart to you.
Pattern #ad ahearts 1
-or-
Pattern #math ahearts (@ahearts+1) |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Jun 26, 2003 7:15 am |
Type Category for detailed descriptions see: Trigger Types
exp expression trigger (expression is tested whenever a variable is changed)
Trigger Types
Expression triggers evaluate the expression stored in the Pattern field whenever a (variable) is changed and execute the commands if the pattern expression is true.
If you have another trigger changing ANY variable, you should expect ALL your expression triggers to be checked and (if the expression is true) executed.
My best advice is don't use expression triggers for this. There are many other methods you could use that would allow your counting trigger (the one that changes @elvenbot) to control the action directly. Some possibilities are #IF, %if, #CASE, %case, %item. |
|
|
|
|
|