SRL Archive - OSR Help

Adding Xp/h to a script.


fluffy22

2013-03-29 12:40:40

Hi,

I am wanting to add xp/h in combat stats to one of my autofighters. Just finished adding looting which I am pretty proud of. :D

This is my first script I am working on.

Anyone give me some tips or snippets?

Sjoe

2013-03-29 12:51:00

For eoc or oldschool?

U can use xpbar in eoc. XPGain := CurrentXP - GetXPBarTotal

fluffy22

2013-03-29 13:01:15

From: Sjoekeloe
For eoc or oldschool?

U can use xpbar in eoc. XPGain := CurrentXP - GetXPBarTotal


Old school.

Sjoe

2013-03-29 13:03:39

Only way I see it is getting xp of the monster and use Inc(KillXP)

rj

2013-03-29 16:48:15

Here is my xp/hr and ores/hr procedure for mining:

procedure WriteProgress;
begin
Seconds := (1 + ((Getsystemtime - StartTime) / 1000));
XpPerHour := (3600 * XPGained) / (Seconds);
OresPerHour := (3600 * OresMined) / Seconds;
ClearDebug;
Writeln('*****************************');
Writeln('Status:' + Status + '');
writeln('Mining XP: ' + IntToStr(XPGained));
writeLn('Mining XP/H: ' + IntToStr(XpPerHour));
writeLn('Ores Mined: ' + IntToStr(OresMined));
writeLn('Ores Per Hour: ' + IntToStr(OresPerHour));
Writeln('*****************************');
end;

Hope that helps