|
Eyeless Wanderer
Joined: 02 Dec 2001 Posts: 80 Location: Canada
|
Posted: Sat May 01, 2004 4:35 am
Help with GSL codes |
I'm trying to build a trigger off a gsl code, I was wondering how they work and how they update.:
#TRIGGER "haha" {Q} {
#IF (%gsl( Q)> %gsl( q)) {
#T+ Blah
#T- haha
#T+ hehe
} {}
} "" {gsl}
#CLASS {Blah} {disable}
#TRIGGER "hehe" {q} {
#IF (%gsl( q)> %gsl( Q)) {
#T- hehe
#T- Blah
#T+ haha
juggle ham
} {}
} "" {gsl|disable}
#CLASS 0
as you can see most of this is just test information... the triggers work. My problem is: it takes until some mud output is received before it updates (changing the trigger status.) Any ideas on how to get around this?
(Q is round time, q is real time. If Q is greater than q, you cannot do certain actions) What I want is: the second Q is less than q, triggers like these fire. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat May 01, 2004 6:45 pm |
It should be self-evident that gsl triggers are only evaluated (and therefore only fire) when text is received from the MUD. Actually, they are probably only evaluated when a gsl string is received.
To get around this set an alarm, which doesn't depend on receiving text. You can either calculate the time difference and use that to set a one-time alarm, or calculate the actual time (based on your computer's clock) that Q expires and use that to set a real-time alarm. If you choose the second, the final command in the alarm should probably be an #UNTRIGGER to remove it.
I'm not a Simutronics patron, so I can only provide concepts. You'll have to find the details yourself. |
|
|
|
|
|
|
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
|
|