Log in

View Full Version : weather timer in source code


louis1016
04-15-2011, 07:38 PM
I want to change the eqemu source code and recompile a server to include a different weather timer. I found :

weatherTime = (MakeRandomInt(1800, 7200) + 30) * 2000;

in the code, if i edit this would I be able to set the weather timer to much shorter?

Caryatis
04-15-2011, 07:59 PM
Is there something stopping you from changing it and testing it?

louis1016
04-15-2011, 08:05 PM
no haha, i just changed and tested it and it seems to work, but the only thing i dont quite understand is how that makerandomint command works, i couldnt find anything about it anywhere, im not sure why there was a +30 added and then it looks like the whole thing is multiplied by 2000? oh well it shouldnt be that hard to figure out but if anyone has some insight it would be awesome, thanks

Caryatis
04-15-2011, 08:11 PM
MakeRandomInt makes a random int between two values(in this case 1800 and 7200). No idea why they add 30. The * 2000 is most likely because the calculation is in milliseconds or seconds.

louis1016
04-15-2011, 08:21 PM
ahh i see, thanks a lot