|
PrestoPimp Apprentice
Joined: 18 Sep 2001 Posts: 175 Location: USA
|
Posted: Mon Mar 03, 2003 5:56 pm
Trigger firing in disabled class |
Hello, I have an ascii trigger for someone giving me gold to initiate a transaction as follows:
#TR {%e[1;33m(%w) gives you 100 coins} {#VAR transguy %1;dotrans}
The dotrans alias is as follows
#AL dotrans {#T+ getmoney}
And the getmoney class has this trigger in it, which fires off of the first gold giving trigger and I don't know why.
#TR {%e[1;33m@transguy gives you (%n) coins} {#VAR transgold %1;next}
I've tried making the "dotrans" alias wait and then enable the "getmoney" class.. but the 100 coin trigger makes the trigger in "getmoney" fire nomatter what.
Any ideas?
Thanks
-Prestopimp |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Mon Mar 03, 2003 8:13 pm |
Yes, this happens because zMUD checks all triggers in a class enabled by another trigger agaisnt the line that fired the first trigger.
You can solve this easily by turning the set of triggers into one state trigger. If you don't want to use state triggers, then you could kludge it by making the trigger only execute its commands the second time it is fired.
Kjata |
|
|
|
PrestoPimp Apprentice
Joined: 18 Sep 2001 Posts: 175 Location: USA
|
Posted: Mon Mar 03, 2003 8:32 pm |
quote: You can solve this easily by turning the set of triggers into one state trigger. If you don't want to use state triggers, then you could kludge it by making the trigger only execute its commands the second time it is fired.
How would I go about doing something like that?
-Prestopimp |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Mon Mar 03, 2003 10:29 pm |
Also depends how critical this trigger is.
What happens if 5 people spam you "give 100 coins". State triggers
might lose a few of the transactions.
Ton Diening |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Mon Mar 03, 2003 11:57 pm |
Which one are you talking about? You quoted both solutions?
State triggers might loose a few of the lines, but counting the times the second trigger has fired might also loose a few lines. Thinking about it more, I think that a better solution is to create a temporary trigger each time the first one fires. You have to take car, though, that the variable in the pattern is expanded and not left as it is.
Kjata |
|
|
|
PrestoPimp Apprentice
Joined: 18 Sep 2001 Posts: 175 Location: USA
|
Posted: Tue Mar 04, 2003 12:11 am |
I guess I will just have to have a character gold checking trigger setup, if you find out a way to do it by ansi, let me know. Thank you for your help.
-Prestopimp |
|
|
|
|
|