ScriptUO

Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: J4bber on May 28, 2022, 02:08:15 PM

Title: Countdown timer w/ menu
Post by: J4bber on May 28, 2022, 02:08:15 PM
Before I even attempt to write this, someone surely (don't call me surely  :P ) has this already.  I need a countdown display.  So lets say I do something, then want to display a countdown timer until the next instance.   

Example:  I donate something and I can't do it again for 10 minutes.  I want to display a countdown timer in a simple menu until the 10 minutes are up, updated roughly every second...

Anyone already have this, or at least the counter logic?

Thanks
-J4
Title: Re: Countdown timer w/ menu
Post by: Gaderian on May 28, 2022, 10:28:29 PM
What would work really well is a separate script that keeps track of the timer based on namespace global variables. Use that to display the value in a menu.
This allows your script to set the by changing into the namespace, set the value, and exit the namespace. This is easy to implement into a script without affecting its other logic.

Gaderian
Title: Re: Countdown timer w/ menu
Post by: J4bber on May 29, 2022, 03:57:55 AM
Oh, good idea.  why didn't I think of that :)