Ross
2015-05-02 23:46:39
Hi, just sharing what I use for progress reports. You can put this into any OGL script and it tracks XP extremely well, plus has the benefits of being really pretty.
IDs (thank you @Justin):
program progressReport;
var
startXp: integer;
xpIcon: glTextureArray;
xpBox: TBox;
procedure setupScript;
begin
xpIcon:= ogl.getTextures({put the skill texture ID here});
if (not xpIcon.isEmpty()) then
begin
xpBox:=intToBox(xpIcon[0].bounds.x1 - 150, xpIcon[0].bounds.y1, xpIcon[0].bounds.x2, xpIcon[0].bounds.y2);
startXp := explode('+', ogl.getChars(xpBox).toString())[0].parseInt();
end
else
begin
writeln('Enable your XP counter!');
terminateScript;
end;
end;
procedure progressReport();
var
currentXp: uint32;
paintXp, xpHour :integer;
begin
currentXp := explode('+', ogl.getChars(xpBox).toString())[0].parseInt();
paintXp := currentXp - startXp;
xpHour := round(paintXp * (3600.0 / (getTimeRunning / 1000.0)));
smart.__graphics.clear;
smart.__graphics.DrawText(toStr(paintXp) + ' xp gained', 'smallChars', point(11, 11), 1);
smart.__graphics.DrawText(toStr(paintXp) + ' xp gained', 'smallChars', point(10, 10), clWhite);
smart.__graphics.DrawText(toStr(xpHour) + ' xp/hr', 'smallChars', point(11, 29), 1);
smart.__graphics.DrawText(toStr(xpHour) + ' xp/hr', 'smallChars', point(10, 28), clWhite);
end;IDs (thank you @Justin):
- Attack: 16918
- Strength: 39319
- Defence: 41952
- Range: 20999
- Magic: 51211
- Hitpoints: 38262
- Thieving: 25506
- Crafting: 33559
- Fletching: 19315
- Mining: 16653
- Smithing: 31773
- Fishing: 54626
- Runecrafting: 33877
- Slayer: 54733
- Farming: 34536
- Construction: 54189
- Hunter: 30306
- Summoning: 37582
- Prayer: 23912
- Agility: 29580
- Herblore: 54427
- Cooking: 47376
- Firemaking: 46008
- Woodcutting: 44243
- Dungeoneering: 58390
- Divination: 22933
- All Combat: 31110
- Overall: 48705