mob
var
list/cds = list()
proc
setCD(cooldown, delay=0, time=0)
if(delay)
time = world.time + delay
cds[cooldown] = time
return time
getCD(cooldown)
if(cooldown in cds)
cdc = cds[cooldown] - world.time
return cds[cooldown] - world.time
else
return 0
Using Ter's because it was pretty easy. I made a variable called cdc which gets the cooldown so it can be used to check and see if its larger than what it should be. Problem now is that the cooldown is never constant. If I set a CD to 600 (6 minutes) it will never be always 600. Sometimes 700 even. Why does it vary? Is there any way to efficiently do this?
http://www.byond.com/developer/Zecronious/Timer
As long as you're saving the player the Timer object inside the player will be saved too. No world.time at all.