• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

globalevents interval in milliseconds [TFS 0.3.6]

Erexo

Kage
Premium User
Joined
Mar 27, 2010
Messages
743
Solutions
5
Reaction score
200
Location
Pr0land
GitHub
Erexo
Hello there,
Could someone help me with changing inverval in globalevents from seconds to milliseconds?
I know its done in newer versions but sadly I need it on that old, rusty one.
Any advices?
 
first we can know why?? its in 0.4
If you ask why I need it in milliseconds, its becouse I need wider range of options (for ex I have paralyze system and the margin of error is 1s, if I set paralyze spell for 2s, you can be paralyzed for 1,01s to 2s and thats not nice).
And why Im using 0.3.6? Becouse Im using it for about 4 years and Im bounded to this rev, and also my src is so modyfied that It will be huge pain to move to something else).
Yea I know that was done In 0.4, thats why Im asking if someone could help me to rip it off
 
you can either do it with source edits, or you can do it with custom conditions and exhaust system using os.mtime() instead of os.time()
for example paralyze is hard coded in source to only be checked for removal on next onThink which is every 1s
 
Yea, Im not in need for this anymore. Did some methods with addEvent and its working.
I was going to say try using addEvent. Another way this can be done is applying osTime to your global event, but you'd need to setup so it will check if your global storage still counting or if it's finished (0.)

But honestly, modified or not, I had the same task as you once, just upgrade your distro. You will have more work, but at the same time, so much more done that you didn't even have to code.
 
I was going to say try using addEvent. Another way this can be done is applying osTime to your global event, but you'd need to setup so it will check if your global storage still counting or if it's finished (0.)
problem is os.time only returns whole seconds, so youd have to use os.mtime
 
Back
Top