SRL Archive - OSR Help

Progress Report Prayer


pkownage135

2012-03-22 15:54:23

i need a progress report for the xp/hour for gilded altar prayer script

NKN

2012-03-23 13:30:32

procedure XPPerHour;
Begin
XPPH := Round((XP * 3600) / (GetTimeRunning / 1000));
end;
Remember to add something to add to your XP variable, I forgot to do that mysrlf.

putonajonny

2012-03-23 14:54:49

function XPPerHour : integer;
Begin
Result := Round((XP * 3600) / (GetTimeRunning / 1000));
end;

This would be better, no need for the variable then


Then just something like:

WriteLn('--------------------------------')
WriteLn('| My Script ')
WriteLn('--------------------------------')
WriteLn('XP Per Hour: '+IntToStr(XPPerHour))

eska

2012-03-23 20:49:53

From: putonajonny
function XPPerHour : integer;
Begin
Result := Round((XP * 3600) / (GetTimeRunning / 1000));
end;

This would be better, no need for the variable then


Then just something like:

WriteLn('--------------------------------')
WriteLn('| My Script ')
WriteLn('--------------------------------')
WriteLn('XP Per Hour: '+IntToStr(XPPerHour))



This will overflow with only 596k XP. So after a few hour your XP/hour will be broken and display negative values.

Instead do this:

function XPPerHour : integer;
Begin
Result:= Round((XP / (GetTimeRunning / 1000)) * 3600);
end;

pkownage135

2012-03-24 12:49:52

how i do the var?
sorry im learning this stuff :)

NKN

2012-03-24 14:03:10


var
XPhour:Integer;

Abu

2012-03-24 14:14:08

Check my guide here

That should explain everything.