Yes, I've made another function as you say Sketchy, taking name from window title:
Code:
function TfrmMain.GetCharName():string;
var
liLength : Integer;
lpChar : PChar;
name : string;
begin
liLength := GetWindowTextLength(TibiaH) + 1;
lpChar := StrAlloc(liLength);
Try
GetWindowText(TibiaH, lpChar, liLength);
Result:=fGen.MidStr(lpChar,9,Length(lpChar)-8);
Finally
StrDispose(lpChar);
End;
end;
Originally Posted by
Blood
Using cheat engine, search "charlist selected index" and "charlist names"...
With a few calculations you can retrieve the character name...
Code:
const
LoginList_Selected = $????????; // index
LoginList_Address = $????????; // start of charlist structure
LoginList_Length = $????????; // char count
LoginList_Dist = 84; // distance in memory between each char in charlist
LoginList_DistName = 0;
LoginList_DistWorld = 30;
function getName:string;
var
pointer, selected:Integer;
begin
pointer := ReadMemInt( LoginList_Address );
selected := ReadMemInt( LoginList_Selected );
pointer := pointer + ( selected * LoginList_Dist );
Result := ReadMemStr( pointer + LoginList_DistName );
end;
function getWorld:string;
var
pointer, selected:Integer;
begin
pointer := ReadMemInt( LoginList_Address );
selected := ReadMemInt( LoginList_Selected );
pointer := pointer + ( selected * LoginList_Dist );
Result := ReadMemStr( pointer + LoginList_DistWorld );
end;
Ps.: This is for older versions... In the newest I think you need to calculate base address + xor and fix address and offsets...
Thank you Blood.