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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
shibbidy joe
Wanderer


Joined: 02 Nov 2002
Posts: 76
Location: Tuvalu

PostPosted: Sun Feb 09, 2003 7:26 am   

Gemstone III Roundtime Gauge [updated]
 
[Script updated for aesthetics. 2.11.03]
Personally, I think this one's more stable than the other RT calculators in this section. Probably just conflict of interest. Anyway:

#CLASS {Roundtime}
#VAR rt {0}
#VAR maxrt {3}
#VAR roundTime {1044808646}
#VAR worldtime {1044808643}
#TRIGGER "rtTrig" {Q} {#var roundTime {%gsl( Q)}} "" {gsl}
#COND "rtTrig" {q} {#var worldtime {%gsl(q)};#var rt {%eval(@roundtime-@worldtime)};#var maxrt {@rt}} {gsl}
#COND "rtTrig" {} {#add rt (-1);#if (@rt>0) {#state rtTrig (2)} {#state rtTrig (0)}} {wait|param=1000}
#BUTTON 21 {@rt} {} {} {} {@rt} {} {} {Size} {66} {13} {Pos} {0} {20} {32832} {} {Gauge||12|@maxrt||15} {} "" {Explore|Inset} {} {}
#BUTTON 34 {RT} {} {} {} {} {} {} {Size} {19} {13} {Pos} {0} {0} {} {} {Separ} {} "" {} {} {}
#CLASS 0

-Shib
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Sun Feb 23, 2003 11:41 pm   
 
if you have an event that gives you rt while you still have rt it seems to not add to the current roundtime

Shalimar

AIM: shalimarwildcat
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Feb 24, 2003 1:20 am   
 
This is due to 2 factors. First expansion is preformed on the caption of button 21 during creation. Replacement line:
#BUTTON 21 "@rt" {} {} {} {@rt} {} {} {Size} {66} {13} {Pos} {0} {20} {32832} {} {Gauge||12|@maxrt||15} {} "" {Explore|Inset} {} {}

EDIT:
Second the script has a subtle design flaw. Since only one state can be active at any time the second #COND need to be moved to an independent alarm. Thanks to kilthan for pointing this out.

#CLASS {Roundtime}
#VAR rt {0}
#VAR maxrt {3}
#VAR roundTime {1044808646}
#VAR worldtime {1044808643}
#TRIGGER "rtTrig" {Q} {#var roundTime {%gsl( Q)}} "" {gsl}
#COND "rtTrig" {q} {#var worldtime {%gsl(q)};#var rt {%eval(@roundtime-@worldtime)};#var maxrt {@rt};#T+ rtAlarm} {gsl}
#ALARM "rtAlarm" {-1} {#add rt (-1);#if (@rt<1) {#T- rtAlarm}} "" {disable}
#BUTTON 21 "@rt" {} {} {} {@rt} {} {} {Size} {66} {13} {Pos} {0} {20} {32832} {} {Gauge||12|@maxrt||15} {} "" {Explore|Inset} {} {}
#BUTTON 34 {RT} {} {} {} {} {} {} {Size} {19} {13} {Pos} {0} {0} {} {} {Separ} {} "" {} {} {}
#CLASS 0
Reply with quote
kilthan
Wanderer


Joined: 21 Jan 2003
Posts: 76

PostPosted: Mon Feb 24, 2003 10:30 am   
 
{@rt} is fine it doesn't need to be "@rt". The problem is that when there is roundtime it stays in the second #COND, so it doesn't trigger on the Q tag while in roundtime. Make the countdown a separate trigger and it will work.
Reply with quote
Calbrenar
Beginner


Joined: 18 Nov 2003
Posts: 11

PostPosted: Wed Nov 19, 2003 2:52 pm   
 
I'm an extreme newbie with zmud so what exactly do I do with this to get it to work?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Thu Nov 20, 2003 4:09 am   
 
There is a propblem with this in v6.65a:
The rtAlarm keeps going even when the class is disabled.
Also the rt gauge seems to reset itself in midstream for no reason, it will be counting down from 20 or so the meter dwindling along when suddenlt the meter refreshes to a new length of the current rt of 8 or so, makes it jumpy as it happens alot.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Sun Nov 23, 2003 3:43 am   
 
i seem to have fixed the problem, just needed to pretest the value i guess

#TRIGGER "rtTrig" {Q} {#VAR roundTime {%gsl( Q)}} "" {gsl}
#COND {q} {
#VAR worldtime {%gsl( q)}
#IF (%eval( @roundtime-@worldtime)>0) {
#VAR rt {%eval( @roundtime-@worldtime)}
#VAR maxrt {@rt}
#T+ rtAlarm
#TS (@rt+1)
}
} {gsl}
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts 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