mIRC Home    About    Download    Register    News    Help

Print Thread
#23253 08/05/03 09:04 PM
Joined: Feb 2003
Posts: 13
A
Arrow Offline OP
Pikka bird
OP Offline
Pikka bird
A
Joined: Feb 2003
Posts: 13
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. ^_^

Last edited by Arrow; 08/05/03 09:05 PM.
#23254 08/05/03 09:23 PM
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031
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

Last edited by RoCk; 08/05/03 09:26 PM.
#23255 08/05/03 10:32 PM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
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


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#23256 09/05/03 03:50 AM
Joined: Feb 2003
Posts: 13
A
Arrow Offline OP
Pikka bird
OP Offline
Pikka bird
A
Joined: Feb 2003
Posts: 13
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.

#23257 10/05/03 06:35 PM
Joined: Dec 2002
Posts: 44
P
Ameglian cow
Offline
Ameglian cow
P
Joined: Dec 2002
Posts: 44
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.


Suck it, lick it, milk it then put it away.

Link Copied to Clipboard