About Us
Products
Purchase
Downloads
Support
Forums
Contact Us
Site
 Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
hogarius
Adept


Joined: 29 Jan 2003
Posts: 221
Location: islands.genesismuds.org

PostPosted: Wed Sep 05, 2007 2:26 am   

[2.02] %gsl(Q) works only one time
 
I play Simutronics' Modus Operandi. I have a roundtime trigger that fires when the game sends gsl(Q). However, the trigger is only firing the first time after I log into the game. Subsequent roundtimes do not fire the %gsl(Q) trigger. If I log out and log back into the game, the first roundtime will cause the trigger to fire, but CMUD does not detect gsl(Q) after the first time. This trigger worked in CMUD 1.34 and stopped working in CMUD 2.01.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Sep 05, 2007 2:41 am   
 
What's the trigger? It's working great for me, so I assume it's your code or something MO specifically is sending you.
_________________
EDIT: I didn't like my old signature
Reply with quote
hogarius
Adept


Joined: 29 Jan 2003
Posts: 221
Location: islands.genesismuds.org

PostPosted: Wed Sep 05, 2007 3:44 am   
 
I've done some fiddling with the triggers, and with the gauge that counts down the roundtime.

Pattern: Q
Type: GSL
Script: QQ=%gsl(Q)
Checkboxes: Case Sensitive, Trigger on Trigger, Trigger on Prompt, are marked.

State #1 to trigger above:
Pattern: q
Type: GSL
Script: qqq=%gsl(q);roundmax=(@QQ-@qqq);roundtime=@roundmax;#T+ ClockTrigger
Checkboxes: Case Sensitive, Trigger on Trigger, Trigger on Prompt, are marked.

Trigger ID: ClockTrigger
Pattern: 1
Type: Alarm
Script: roundtime=(@roundtime-1);#if (@roundtime<0) {roundtime=0;#T- ClockTrigger}

Button ID: Roundtime
Caption: "R.T.: "@roundtime
Type: Gauge
Tool tip: round time
Value: @roundtime
Max: @roundmax
Low: 0

All triggers and the gauge are enabled.
Reply with quote
hogarius
Adept


Joined: 29 Jan 2003
Posts: 221
Location: islands.genesismuds.org

PostPosted: Thu Sep 06, 2007 1:22 am   
 
This is strange. I changed the scripts for the triggers as follows...

GSL(Q): #show "Q"
GSL(q): #show "q";#show "qq";roundmax=%gsl( Q )-%gsl( q );roundtime=@roundmax;#T+ ClockTrigger
ClockTrigger: #show @roundtime;roundtime=(@roundtime-1);#show @roundtime;#if (@roundtime<0) {roundtime=0}

Below is what the mud window shows when I send the "focus self" command to generate a roundtime. (The two lines after "Q" are the game's response to the "focus self" command.)

>focus self
Q
You attempt to focus within yourself and find peace, but only find failure.
Roundtime: 12 seconds.
qq
q

ClockTrigger doesn't seem to fire. Also, note that the order of "qq" and "q" are reversed.
Reply with quote
tomcat025
Wanderer


Joined: 30 Dec 2001
Posts: 66
Location: USA

PostPosted: Thu Sep 06, 2007 4:03 am   
 
Here's my RT setup.

TRIGGER 1

Trigger Type: gsl
Pattern: Q
Script is empty

Second trigger state for above trigger
Trigger type: gsl
Pattern: q
Script: roundtime = %eval(%gsl(Q)-%gsl(q));#T+ tRTAlarm

TRIGGER 2
Trigger Type: Alarm
Pattern: *1
Script: #if (@RoundTime) {#add RoundTime -1} {#T- tRTAlarm}

GAUGE
Name: RT
Script: %ansi("Bold") RT: %ansi("Red")@roundtime %ansi("Bold,black") Left: %ansi("bold,cyan")@lhand %ansi("Bold,black") Right: %ansi("bold,cyan")@rhand


This is in Cmud 2.01 and it works great for me. I even have a trigger that I use to add a second or two to a roundtime for latency purposes. I will include it below.


Trigger Type: Pattern
Trigger Pattern: Roundtime~:[%s](%d) {sec.|seconds.}
Script: #var rtime %1+1

Using the above variable @rtime I can pretty much go without getting that annoying "...wait x seconds" message when scripting things like scraping, foraging, or whatever.


Hope that helps.
_________________
You can pick your nose. You can pick your friends... but you can't pick your friends nose.

~Arwin Hochhauser
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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