Avalon correctly fixed this I believe as he made it on its own thread running at the tick of rs. Might help you out by taking a look at how andreas did it
|
Turmoil uses 5 prayer points per second.
On runescape when turned on, after 0.6 seconds 3 prayer points are removed, after another 0.6 seconds 2 prayer points are removed.
With this:
Where the value of drainRate[][turmoil] = 0.2 (1 second devided by 5)Code:for(int i = 0; i < drainRates[curses ? 1 : 0].length; i++) { if(isPrayerActive) { removal += (1 / drainRates[curses ? 1 : 0][i]) * 1000; } } removal *= 0.6; //because rs processes per tick not per second
with the modifier
this results in 3 prayer points being removed EVERY SECOND instead of 3, then 2, then 3, etc...Code:removal *= 0.6;
even using double opposed to integer, removal *= 0.6, is an exact number therefore fractions aren't used..
Avalon correctly fixed this I believe as he made it on its own thread running at the tick of rs. Might help you out by taking a look at how andreas did it
I looked at how Avalon did it and I'm pretty sure they've done it incorrectly, they're modifying the ticks with the drainRate and not the actual points to be removed, and Avalon has so much spaghetti code it's like solving a maze every time you goto...
besides i'm sure there's a very easy way to control this, it's just going straight over my head
Update: I guess a valid conclusion would be that 0.2 is incorrect, because Runescape wiki shows prayer drain via seconds and not ticks...
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |