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
Sabin
Beginner


Joined: 02 Jul 2003
Posts: 11

PostPosted: Wed Jul 02, 2003 2:55 am   

Making a status window/bar/whatever
 
Okay...What I want to do is make a wtatus thing, of sorts.
The MUD sends out something like this:
#$#McBlah Argle 50 seconds
Or...Like this...
#$#McBlah Argle 1 minute 30 seconds
How would I go about making it display, somewhere, instead of #$#McBlah Argle 50 seconds
have it display "50 seconds"? Preferrably not spamming the output window or similar.
EDIT: And, 1-2 seconds after there being no report, it would say <None> or similar, if possible.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Jul 02, 2003 3:32 am   
 
One way (simply replaces the line where it appears):
#trigger {~#~$~#McBlah Argle (*)} {#sub {%1}}

Another way (removes the line from the mud output window and places the time in the status bar):
#trigger {~#~$~#McBlah Argle (*)} {#var time {%1};#gag}
#status @time
Reply with quote
Sabin
Beginner


Joined: 02 Jul 2003
Posts: 11

PostPosted: Wed Jul 02, 2003 3:53 am   
 
Alright, that works well, but I'd like to clear it after 1-2 seconds of no data being sent (As it's counting down.) which I'd think would be a bit more complex.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Jul 03, 2003 3:26 pm   
 
If anyone had an answer for you, they'd probably have replied already. There's no reason to keep bumping this, your question isn't any more important than the ones you're bumping it over.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Jul 03, 2003 11:42 pm   
 
This new trigger is highly untested, so it's likely it doesn't work.

should figure out the time delay, set up the initial Status Bar text, and enable the countdown timer before removing the line
#trigger {~#~$~#McBlah Argle (*) seconds)} {#if ({%1} ~= "(%d) minute[s] (%d)") {#math Time ((%%1 * 60) + %%2)} {#variable Time %1};#var StatusText {@Time seconds};#T+ tPromptTimer;#gag}

should decrement the time value by one each second until equals zero, at which time the status bar is cleared and the alarm turned off
#alarm "tPromptTimer" *1 {#if (@Time > 0) {#add Time -1} {#variable StatusText "";#T- tPromptTimer}}

this is your status bar
#status @StatusText
Reply with quote
Sabin
Beginner


Joined: 02 Jul 2003
Posts: 11

PostPosted: Fri Jul 04, 2003 2:05 am   
 
Hrmn. Alright. It works mostly okay, except it still doesn't clear. This is alright, though, because I can deal with this one little flaw, I guess. Also, it'd have an innate problem, as Argle can be decreased by outside means... Though, wouldn't setting an alarm or some such to 1 second after it says "1 second" after #$#McBlah Argle to clear the variable work? Though, I suck at scripting such, so I can handle said bug. Shrug. Or something.
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