Recently, I've been doing nothing... :v
Till somebody reminded me of a thing, I really wanted to do in the past... Live item giving! Very interesting, isn't it?
No more "please return to get your reward", but "you've received a reward! hahaha?".
Introduction Video | |
|
How can we find that? First thing you might think of can be arena, yeah, that's what I thought of at the beginning too.
Looking for arena reward giving ends up here,
After debugging, you'll find out that, it is a virtual function at 004EE370.
The function is a part of a class object, "CGObjPC". Every client has a "CGObjPC" as for the game server, how can we get a pointer to the "CGObjPC" of the character we want?!
Well, there's a lot of possibilities, the most one making sense is that there's a function that gets the pointer to it by character name, how can we find it?
Oh! Fortress war item reward! It gets the character name of the guild masters, then rewards them! Yes...
You'll end up here,
That's pretty much all you need to find, if you want to reward a specific character, you can parse the "CGObjPC" and GiveItem function arguments, it should contain magic opts, stats, optlevel, count, code..etc
I'll share my chathandler with it, so you can test it like in the video above.
Note: Any addresses you see here are on vsro 1.88, you can find it easily on other files too.
Note 2: std::string here is treated as 28 bytes, as it was compiled by VC80. So, if you're using new compilers, you must edit offsets at OnChatHook, otherwise you'll be disconnected.
Note 3: To dodge disconnecting issues, check if the pointer to CGObjPC is not null then do your GiveItem func.
Special thanks to: sarkolata for giving ideas and ofc florian0
Good luck and have fun.