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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Indie
Beginner


Joined: 14 Mar 2010
Posts: 11

PostPosted: Fri Mar 26, 2010 8:45 pm   

Roundtime gauge
 
I'm sorry for asking this, and I know it's been asked. In fact, I know I've found one that works well in a mud that uses the Gemstone wizard, but for the life of me I can't find it again.

Can someone please point me to a good roundtime gauge script?
Reply with quote
Indie
Beginner


Joined: 14 Mar 2010
Posts: 11

PostPosted: Fri Mar 26, 2010 8:47 pm   
 
I should say, I tried using the one for Gemstone II for Cmud, but it doesn't seem to work. I can't enter a trigger q after Q, even when case-sensitive is checked, because the program tells me there is already a trigger q.
Reply with quote
hogarius
Adept


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

PostPosted: Fri Mar 26, 2010 9:49 pm   
 
I'm not at my computer right now, but sometime in the next day or two, I can post my roundtime triggers for Modus Operandi.
Reply with quote
Indie
Beginner


Joined: 14 Mar 2010
Posts: 11

PostPosted: Fri Mar 26, 2010 10:31 pm   
 
Thank you, that would be great.
Reply with quote
hogarius
Adept


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

PostPosted: Sat Mar 27, 2010 6:42 pm   
 
This is the gauge that I use for counting down roundtime. You should be able to start a new button, then cut and paste the text below into the XML tab of the button.
Code:
<button name="Roundtime" type="Gauge" autosize="false" width="200" height="24" iconleft="false" color="maroon" textcolor="fuchsia" priority="993" id="84">
  <caption>R.T.: @roundtime</caption>
  <expr>@roundtime</expr>
  <gaugemax>@roundmax</gaugemax>
  <gaugelow>0</gaugelow>
</button>


This is the trigger that sets the variables for the gauge based on GSL(Q) and GSL(q). You should be able to create a new trigger, then paste this into the XML tab of the trigger.
Code:
<trigger type="GSL" priority="1158" case="true" id="54">
  <pattern>Q</pattern>
  <trigger type="GSL" case="true" newline="false" prompt="true">
    <pattern>q</pattern>
    <value>roundmax=%gsl(Q)-%gsl(q);roundtime=@roundmax;#T+ ClockTrigger</value>
  </trigger>
</trigger>


This alarm trigger is what actually makes the gauge count down.
Code:
<trigger name="ClockTrigger" type="Alarm" priority="1153" newline="false" enabled="false" id="49">
  <pattern>1</pattern>
  <value>roundtime=(@roundtime-1);#if (@roundtime=0) {#T- ClockTrigger}</value>
</trigger>


This expression trigger makes sure the gauge "turns off" when 0 seconds remain.
Code:
<trigger type="Expression" priority="1152" newline="false" id="48">
  <pattern>@roundtime<0</pattern>
  <value>roundtime=0;#T- ClockTrigger</value>
</trigger>


This trigger "fixes" the roundtime when the word "Roundtime" is displayed. Sometimes, GSL(Q) and GSL(q) produce a @roundmax that is off by one second; this trigger adjusts for that.
Code:
<trigger priority="976" id="74">
  <pattern>^Roundtime: %d{roundmax} sec</pattern>
</trigger>


This trigger adjusts the gauge if you try to do something before the roundtime is complete. The roundtime gauge is fairly accurate, but not perfectly so; this trigger resets the number of seconds remaining on the gauge when Modus says, "...wait XX seconds".
Code:
<trigger priority="973" id="67">
  <pattern>^...wait &amp;%d{roundtime} sec</pattern>
</trigger>


This trigger deals with "Investigations" in Modus. When one takes a fingerprint sample, for example, there is a roundtime, but Modus doesn't use the GSL(Q) and GSL(q) protocol for that situation. I don't know if GemStone has any similar roundtime situations, but here it is just in case.
Code:
<trigger name="InvestigationTime" priority="1154" id="50">
  <pattern>It takes you &amp;%d{InvestTime} seconds to complete your work.</pattern>
  <value>roundmax=@InvestTime;roundtime=@roundmax;#T+ ClockTrigger</value>
</trigger>


You'll probably need to do a fair amount of tweaking to get these to work in Gemstone.

I hope this helps. Let me know if you have any questions.
Reply with quote
hogarius
Adept


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

PostPosted: Sat Mar 27, 2010 6:44 pm   
 
Also, regarding the message, "You already have a trigger named "q": If you need to make another trigger that responds to the GSL(q) pattern, simply give the trigger a unique name in the "ID" field of the trigger at the bottom of the trigger creation screen.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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