First of - I don't think you know what you're doing
You aren't resolving any part of the whole pointer chain - you need to add your prior value to the new offset - that will be the chain. Your code just overwrites each value.
Base + 1C + 34 + 638 + 0
Then - I think you where thinking the right way, but kind of messed up Yes, Widestring is two bytes, so you need to read two bytes of memory - but this x length!
A better/much simpler way of doing this would be the following ( 1:1 copy from my bot) :
Code:
function THostchar.Name: String;
var
eax, written, Base: cardinal;
TName : array [0..49] of widechar;
begin
ReadProcessMemory(Self.Handle, ptr(self.Offsets.Addresses_base_Address), @eax, 4, written);
ReadProcessMemory(Self.Handle, ptr(eax + $1C), @eax, 4, written);
ReadProcessMemory(Self.Handle, ptr(eax + self.Offsets.Structural_Character), @eax, 4, written);
ReadProcessMemory(Self.Handle, ptr(eax + self.Offsets.Character_Name), @eax, 4, written);
ReadProcessMemory(Self.Handle, ptr(eax), @Tname, 100, written);
Result := WideCharToString(TName);
end;
And even 50 characters is overkill, but 256!? Who has that long of a name
So, copy 100 bytes of data into an array of WideChar(you where correct there), then just cast this into a string - quite simple, you where thinking too complex I think
First of - I don't think you know what you're doing
You aren't resolving any part of the whole pointer chain - you need to add your prior value to the new offset - that will be the chain. Your code just overwrites each value.
Base + 1C + 34 + 638 + 0
Then - I think you where thinking the right way, but kind of messed up Yes, Widestring is two bytes, so you need to read two bytes of memory - but this x length!
A better/much simpler way of doing this would be the following ( 1:1 copy from my bot) :
Code:
function THostchar.Name: String;
var
eax, written, Base: cardinal;
TName : array [0..49] of widechar;
begin
ReadProcessMemory(Self.Handle, ptr(self.Offsets.Addresses_base_Address), @eax, 4, written);
ReadProcessMemory(Self.Handle, ptr(eax + $1C), @eax, 4, written);
ReadProcessMemory(Self.Handle, ptr(eax + self.Offsets.Structural_Character), @eax, 4, written);
ReadProcessMemory(Self.Handle, ptr(eax + self.Offsets.Character_Name), @eax, 4, written);
ReadProcessMemory(Self.Handle, ptr(eax), @Tname, 100, written);
Result := WideCharToString(TName);
end;
And even 50 characters is overkill, but 256!? Who has that long of a name
So, copy 100 bytes of data into an array of WideChar(you where correct there), then just cast this into a string - quite simple, you where thinking too complex I think
The process of reading game's memory is language independant - offset chains need to be traversed anyways.
And about your script :
$CHAR_DATA_BASE needs to be populated somewhere to, hm? So there's your other two (three if you use "real" base) memory reads.
As far as I know the player pointer should remain constant at least until you log out. So it is possible to save on some memory reading there. It's prolly not really much improvement, but in theory it could be. I personally don't bother with it since it's all premature optimization, but some find great pleasure in optimizing stuff like that
Yeah, that's stuff which people won't even notice if you optimize. Some people don't stop bot while switching characters, for whatever reason, so this is the safest way to go in my opinion.
Yepp, we all know somebody who is a crazy optimizator.
Read monster array, get WID of closest named monster, and target that. Sorry, no source this time, others will need to decide about posting theirs - I still want to sell stuff
WTB - All Characters 101+ [READ] 06/30/2011 - Silkroad Online Trading - 27 Replies Hello everyone, I'm glad to make this thread containing my need of a few characters level 101+
I don't care about what server
I don't care about what build
It MUST have a decent set & wep.
MUST come with gold (300M Minimum)
MUST be ISRO
------------------------------------------------- ----------------------------
Leave your offer's below, or add me to msn, or send a PM to me on Elitepvpers!
[Gracia] WTS High Lvl Characters + Infinity in Kark [READ] 08/19/2010 - Archlord Trading - 2 Replies Hi everyone, Im quitting the game so im selling everything!!!! Ive played for a very long time but I guess I just got bored of everything and definately spent wayyyyyy to much money. Selling all for Paypal Money Transfer Only! That means no tradeing characters or anything... Also Must be verified. So here it goes...
:rolleyes: ALL CHARACTERS ARE ON SEPERATE ACCOUNTS:rolleyes:
Infinity in Kark I refuse to spend anymore money on this game so you must have...
Selling Account with 50+ Characters on it, +++++Read for info+++++ 12/10/2008 - Trading - 8 Replies Hi,
I would sell these to [email protected] but he doesnt want them right now, so, decided to sell here for only 5$ USD for 1 lvl 50.. any char, u name it, pm me your msn adress..
68 Segita *Sold
57 Segita
63 Segita *Sold
61 Segnale *Sold
69 Segnale *Sold
63 Segnale *Sold
Names with foreign characters 03/08/2008 - Cabal Online - 2 Replies Is it possible to use CE to make my character's name with foreign characters? If so, how do i do it?