|
Sabin Beginner
Joined: 02 Jul 2003 Posts: 11
|
Posted: 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. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
|
Sabin Beginner
Joined: 02 Jul 2003 Posts: 11
|
Posted: 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.
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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.
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
|
Sabin Beginner
Joined: 02 Jul 2003 Posts: 11
|
Posted: 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.
|
|
|
|
|
|