DemiseScythe
07-26-2013, 08:55 PM
I updated the functions and they are now 100% accurate and effective. This method works regardless of screen position.
function GLXLoggedIn: Boolean;
begin
Result := Length(glGetTextures(63697, 3220517, 5));
end;
function GLXGetHP: Integer;
var
H: glTextureArray;
F: glCharArray;
S: glTextArray;
T: TStringArray
begin
if not GLXLoggedIn then
Exit;
H := glGetTextures(63697, 3220517, 5);
F := glGetChars(IntToBox(H[0].X+30, H[0].Y-15, H[0].X+115, H[0].Y+15));
S := glCharsToTextAdv(F);
ExplodeWrap('/', S[0].Text[0], T);
Result := StrToInt(T[0]);
end;
function GLXGetHPPercent: Integer;
var
H: glTextureArray;
F: glCharArray;
S: glTextArray;
T: TStringArray
begin
if not GLXLoggedIn then
Exit;
H := glGetTextures(63697, 3220517, 5);
F := glGetChars(IntToBox(H[0].X+30, H[0].Y-15, H[0].X+115, H[0].Y+15));
S := glCharsToTextAdv(F);
ExplodeWrap('/', S[0].Text[0], T);
Result := Round((StrToInt(T[0])*100) div StrToInt(T[1]));
end;
I will record and upload an updated video tomorrow. This works regardless of the position of the Stat bar on the screen as long as it is horizontal(either the long or the fat version). Summoning and Prayer are just a matter of changing one integer. To show this I'll code both of the above functions for prayer in a second or two.
function GLXGetPrayer: Integer;
var
H: glTextureArray;
F: glCharArray;
S: glTextArray;
T: TStringArray
begin
if not GLXLoggedIn then
Exit;
H := glGetTextures(63697, 3025729, 5);
F := glGetChars(IntToBox(H[0].X+30, H[0].Y-15, H[0].X+115, H[0].Y+15));
S := glCharsToTextAdv(F);
ExplodeWrap('/', S[0].Text[0], T);
Result := StrToInt(T[0]);
end;
function GLXGetPrayerPercent: Integer;
var
H: glTextureArray;
F: glCharArray;
S: glTextArray;
T: TStringArray
begin
if not GLXLoggedIn then
Exit;
H := glGetTextures(63697, 3025729, 5);
F := glGetChars(IntToBox(H[0].X+30, H[0].Y-15, H[0].X+115, H[0].Y+15));
S := glCharsToTextAdv(F);
ExplodeWrap('/', S[0].Text[0], T);
Result := Round((StrToInt(T[0])*100) div StrToInt(T[1]));
end;
http://www.youtube.com/watch?v=wGnrkV16Fog
It is a bit annoying how the new function rounds to the nearest 10% but it still works. Shame it will not be used in any of the includes.
This shouldn't be too hard to convert into color.
function GLXLoggedIn: Boolean;
begin
Result := Length(glGetTextures(63697, 3220517, 5));
end;
function GLXGetHP: Integer;
var
H: glTextureArray;
F: glCharArray;
S: glTextArray;
T: TStringArray
begin
if not GLXLoggedIn then
Exit;
H := glGetTextures(63697, 3220517, 5);
F := glGetChars(IntToBox(H[0].X+30, H[0].Y-15, H[0].X+115, H[0].Y+15));
S := glCharsToTextAdv(F);
ExplodeWrap('/', S[0].Text[0], T);
Result := StrToInt(T[0]);
end;
function GLXGetHPPercent: Integer;
var
H: glTextureArray;
F: glCharArray;
S: glTextArray;
T: TStringArray
begin
if not GLXLoggedIn then
Exit;
H := glGetTextures(63697, 3220517, 5);
F := glGetChars(IntToBox(H[0].X+30, H[0].Y-15, H[0].X+115, H[0].Y+15));
S := glCharsToTextAdv(F);
ExplodeWrap('/', S[0].Text[0], T);
Result := Round((StrToInt(T[0])*100) div StrToInt(T[1]));
end;
I will record and upload an updated video tomorrow. This works regardless of the position of the Stat bar on the screen as long as it is horizontal(either the long or the fat version). Summoning and Prayer are just a matter of changing one integer. To show this I'll code both of the above functions for prayer in a second or two.
function GLXGetPrayer: Integer;
var
H: glTextureArray;
F: glCharArray;
S: glTextArray;
T: TStringArray
begin
if not GLXLoggedIn then
Exit;
H := glGetTextures(63697, 3025729, 5);
F := glGetChars(IntToBox(H[0].X+30, H[0].Y-15, H[0].X+115, H[0].Y+15));
S := glCharsToTextAdv(F);
ExplodeWrap('/', S[0].Text[0], T);
Result := StrToInt(T[0]);
end;
function GLXGetPrayerPercent: Integer;
var
H: glTextureArray;
F: glCharArray;
S: glTextArray;
T: TStringArray
begin
if not GLXLoggedIn then
Exit;
H := glGetTextures(63697, 3025729, 5);
F := glGetChars(IntToBox(H[0].X+30, H[0].Y-15, H[0].X+115, H[0].Y+15));
S := glCharsToTextAdv(F);
ExplodeWrap('/', S[0].Text[0], T);
Result := Round((StrToInt(T[0])*100) div StrToInt(T[1]));
end;
http://www.youtube.com/watch?v=wGnrkV16Fog
It is a bit annoying how the new function rounds to the nearest 10% but it still works. Shame it will not be used in any of the includes.
This shouldn't be too hard to convert into color.