Quote:
Originally Posted by unknownone
I'm still not sure what the problem is, your post is a bit ambiguous about what you're trying to do...
From what I gather, you're wish to make some kind of function that will grab a player ID, given a player name, yeah?
You shouldn't need scan memory for a particular player id, instead, identify the code that creates or reads/writes to the collection of players that the client keeps. The collection could be anything like a simple array, a vector, list, map, or more complex hashtable. I doub't they use anything further than the C++ STL though. To find the code that accesses the collection, try searching for a known id/name pair to find the location of the current context, and set a memory breakpoint. Then, either introduce a new player to the screen, or remove the existing player and see if the code breaks. Alternatively, you might wanna use TSearch's autohack function which may do some of the work for you.
An alternative solution might be to identify the code that fetches a playerid/name pair from the network, mainly the 0x3f6 packet. Hooking that code can avoid alot of effort because you can maintain your own collection of players. It still has the same problems as any hook though, being version specific. You need to repeat the process every time TQ update the client, unless you're smart enough to program some heuristics that will automate it.
IMO, it would be better to use a network based hook or proxy, because they would only need updating as TQ make changes to the protocol, which only happens after tens of patches, and the changes are usually minor.
|
You're right i want to make some kind of function that identifies the ID with the given name, The name is 48 bytes behind the ID but the location of the ID changes each person except for your own ID that 1 is static for some reason.
I tried to change the code to instead of reading the ID to read the name but to no avail "Wrong Target!".
And I tried to break into it to see where the ID is set but putting a breakpoint is not going to do the trick as other code also accesses that location, But I will try that again.
This is the bigger picture if i for example type in my textbox fobos to stig, it should find the ID because the ID is needed for the attack function theres no other reason i need the ID.
My code then needs to push that ID along with another push for the skill ID and then call the attack function.
I already got the skill done and i call the attack function correctly so im getting somewhere.
Also the ID is set in a call before the call to the attack function.
and after that call EAX holds the ID, now ofcourse i went in the call to see where eax is set wich is a loop, it somehow recognises all ID's that are near you, so if your in a map with 3 other people it will loop 3 times.
Now i thought of a way to do the trick i can call the function in my dll and move the name i entered in the textbox to a free mem location and compare it to the register that will hold the ID + the 48 offset where the name is located, if the name equals the name at that offset my attack function gets called.
In theory that should do it I hope.
(BTW im writing this as i go along with it so i prolly barely make sense lol)
Btw on a side note there's 3 attack functions for magic skills its pretty funny see if i execute my stig with another attack function i just need coordinates, works like a charm bad thing is it skips the "hand movement" so its noticable thats the reason i wont use that 1 but the original.