Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
PrestoPimp
Apprentice


Joined: 18 Sep 2001
Posts: 175
Location: USA

PostPosted: 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

Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: 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
Reply with quote
PrestoPimp
Apprentice


Joined: 18 Sep 2001
Posts: 175
Location: USA

PostPosted: 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

Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: 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
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: 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
Reply with quote
PrestoPimp
Apprentice


Joined: 18 Sep 2001
Posts: 175
Location: USA

PostPosted: 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

Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net