Sabzi
2009-08-16 14:46:43
GetMMLevels returns 0 and no color if we got 100 energy/hp/prayer.
I have tested this with energy because I don't have 100 hp or prayer :P
The fix: Change max spacing in GetTextAtEx to 0. So it would be:
ConvertXpToLvl is a mistype I think because it's pretty obvious. It's not really used so nobody noticed it but why leave it broken?
Fix: Change line 20 in FindXP.scar to:
I tested both of the fixes and they should work. In theory this should fix RunEnergy and RestUntil too so no more resting when we got 100 energy but I haven't tested those though.
I have tested this with energy because I don't have 100 hp or prayer :P
program New;
{.include SRL/SRL.scar}
var
c: string;
begin
ActivateClient;
SetupSRL;
ClearDebug;
WriteLn('Run: ' + IntToStr(GetMMLevels('run', c)));
WriteLn(c);
WriteLn('');
WriteLn('Prayer: ' + IntToStr(GetMMLevels('prayer', c)));
WriteLn(c);
WriteLn('');
WriteLn('Hp: ' + IntToStr(GetMMLevels('hp', c)));
WriteLn(c);
WriteLn('');
end.The fix: Change max spacing in GetTextAtEx to 0. So it would be:
GetTextAtEx(B.X1 - 1 , B.Y1 - 1, 0, statChars,
False, False, 0, 0, Colors[I], 20, False, tr_Digits)), -1);
ConvertXpToLvl is a mistype I think because it's pretty obvious. It's not really used so nobody noticed it but why leave it broken?
Fix: Change line 20 in FindXP.scar to:
exp := exp + Trunc(level + 300 * Pow(2, level / 7)); Like in ConvertLvlToXp.I tested both of the fixes and they should work. In theory this should fix RunEnergy and RestUntil too so no more resting when we got 100 energy but I haven't tested those though.