mIRC Homepage
Posted By: Arrow Decimal Timers - 08/05/03 09:04 PM
I think decimal timers would be a nice addition to mIRC. One of my scripts, which is the beginnings of an MMORPG (hopefully) has a different time and calendar system than the Gregorian one most of us use; 12 months with 28 days and a 13th with 29 (30 on a leap year), our roughly 86,400 second days split into 100 cycles (which can be split into 100 subcycles a piece). Math novices should be able to work their way down from that to figure out that one subcycle in my system is 8.64 seconds.

So the easiest way to implement something such as that would simply be to set a timer to increase a variable by one every 8.64 seconds, but timers aren't exactly set up to do portions of seconds in the current versions of mIRC. Rather than try and do some sort of runaround (which will only make the transition jerky), I'm prepared to wait however long it takes to see such an addition to mIRC, provided it's a feasible and possible addition. I understand that such an addition probably wouldn't see much usage, but hey! It'd be there for people to fool around with at any rate. ^_^
Posted By: RoCk Re: Decimal Timers - 08/05/03 09:23 PM
Use milliseconds

/timer -m 1 500 echo -a test
that would trigger in 1/2 of a second

[b]/timer -m 1 100 echo -a test[/b]
that would trigger in 1/10 of a second

Edit: 1000 milliseconds = 1 second
Posted By: Raccoon Re: Decimal Timers - 08/05/03 10:32 PM
Why even use a /timer? Just define your MMORPG's Year 0 against some spedific $ctime value, and create a function to do the math and convert current $ctime on demand. No timers, just using existing events like On SOCKREAD or On CHAT... however your script works.

- Raccoon
Posted By: Arrow Re: Decimal Timers - 09/05/03 03:50 AM
Wow, I'm lame.

As for why using timers, it's because I wanted to make a tiny window that updates time in realtime. The MMORPG isn't even out of the devlopment stage yet; it's just pure mIRC battle script right now, so sockets are unnecessary.
Posted By: ppslim Re: Decimal Timers - 10/05/03 06:35 PM
Your still gonna need a function to work out the time based on our calender

%variables don't increase while a computer isn't in use.
© mIRC Discussion Forums