|
You last visited: Today at 16:05
Advertisement
How to use GetStatus
Discussion on How to use GetStatus within the Metin2 forum part of the Popular Games category.
04/29/2021, 22:15
|
#1
|
elite*gold: 0
Join Date: Apr 2021
Posts: 74
Received Thanks: 6
|
How to use GetStatus
.................
|
|
|
04/29/2021, 22:52
|
#2
|
elite*gold: 0
Join Date: Dec 2020
Posts: 47
Received Thanks: 25
|
you have to use the same return value as the original function, also its not needed to manually return the value, just calling the function should be enough
int GetStatus(...
{
DWORD ..
DWORD ..
__asm {
mov ecx, ..
push ...
call ..
}
}
|
|
|
04/29/2021, 23:29
|
#3
|
elite*gold: 0
Join Date: Apr 2021
Posts: 74
Received Thanks: 6
|
Edit : Fixed
|
|
|
04/29/2021, 23:32
|
#4
|
elite*gold: 0
Join Date: Dec 2020
Posts: 47
Received Thanks: 25
|
yes
|
|
|
04/29/2021, 23:48
|
#5
|
elite*gold: 0
Join Date: Apr 2021
Posts: 74
Received Thanks: 6
|
.................
|
|
|
04/30/2021, 00:24
|
#6
|
elite*gold: 0
Join Date: Dec 2020
Posts: 47
Received Thanks: 25
|
set a breakpoint with cheat engine at that function in the client, check if its being triggered if you run your function. if the breakpoint does get triggered, step through the function and check where the error is coming from. alternatively, you can also debug your dll through visual studio, just google how to do it. there are a few other forums that have a ton of informations on these basics. just google "debug game hack dll" - maybe you will find a *guide* or some *unknown* resources
|
|
|
04/30/2021, 10:27
|
#7
|
elite*gold: 0
Join Date: Apr 2021
Posts: 74
Received Thanks: 6
|
Quote:
Originally Posted by ones-and-zer0es.mpeg
set a breakpoint with cheat engine at that function in the client, check if its being triggered if you run your function. if the breakpoint does get triggered, step through the function and check where the error is coming from. alternatively, you can also debug your dll through visual studio, just google how to do it. there are a few other forums that have a ton of informations on these basics. just google "debug game hack dll" - maybe you will find a *guide* or some *unknown* resources 
|
Although the correct data is gone, it does not return and returns the same error
|
|
|
04/30/2021, 11:11
|
#8
|
elite*gold: 0
Join Date: Dec 2020
Posts: 47
Received Thanks: 25
|
Quote:
Originally Posted by macnn50
Although the correct data is gone, it does not return and returns the same error
|
is the CPythonPlayer Pointer correct? compare it to a native call -> set the breakpoint again, call it natively through the metin2 client somehow, write down all the register values. let the code run through and call the function manually through your hack and compare the register values
|
|
|
04/30/2021, 11:40
|
#9
|
elite*gold: 0
Join Date: Apr 2021
Posts: 74
Received Thanks: 6
|
Quote:
Originally Posted by ones-and-zer0es.mpeg
is the CPythonPlayer Pointer correct? compare it to a native call -> set the breakpoint again, call it natively through the metin2 client somehow, write down all the register values. let the code run through and call the function manually through your hack and compare the register values
|
CPythonPlayer is right, I use it in many places GetNameByVID, GetTargetVID etc. but I tried a lot for get status and none of them worked. never made an example of this before,
|
|
|
04/30/2021, 12:08
|
#10
|
elite*gold: 0
Join Date: Dec 2020
Posts: 47
Received Thanks: 25
|
Quote:
Originally Posted by macnn50
CPythonPlayer is right, I use it in many places GetNameByVID, GetTargetVID etc. but I tried a lot for get status and none of them worked. never made an example of this before,
|
did you debug your dll like i told you to? at which instruction is it crashing?
|
|
|
04/30/2021, 13:21
|
#11
|
elite*gold: 0
Join Date: Dec 2014
Posts: 442
Received Thanks: 211
|
here is a much simpler approach without hassling with inline assembler, function pointers or addresses (except for the hook  ) in the first place:
1. hook a function that is periodically called from within the mainthread of metin2 (OnUpdate, OnRender, etc.). go for OnUpdate since you probably want to run your cheat in the background.
2. use the python c api to retrieve the GetStatus function like so (untested code):
Code:
// import the player module first
#ifdef GAMEFORGE
player_module_ = PyImport_ImportModule("playerm2g2");
#else
player_module_ = PyImport_ImportModule("player");
#endif
long GetStatus(std::uint32_t type)
{
auto* args = PyTuple_New(1);
PyTuple_SetItem(args, 0, PyInt_FromLong(type));
auto* fun = PyObject_Call(
PyObject_GetAttrString(player_module_, "GetStatus"), args, nullptr);
auto const res = PyInt_AsLong(fun);
Py_DECREF(fun);
Py_XDECREF(args);
return res;
}
Refer to  for the documentation.
3. now call all of the metin2 game functions from within the mainthread hook (OnUpdate). if you disregard this - like many other poorly written cheats - you will encounter many runtime errors. this is due to the fact that metin2 is not thread-safe by itself and you need to ensure that all external function calls that yield to game functions are only executed from within the same thread in which the gameloop is running.
4. ???
5. profit.
|
|
|
04/30/2021, 13:35
|
#12
|
elite*gold: 0
Join Date: Dec 2020
Posts: 47
Received Thanks: 25
|
Quote:
Originally Posted by _asm
here is a much simpler approach without hassling with inline assembler, function pointers or addresses (except for the hook  ) in the first place:
1. hook a function that is periodically called from within the mainthread of metin2 (OnUpdate, OnRender, etc.). go for OnUpdate since you probably want to run your cheat in the background.
2. use the python c api to retrieve the GetStatus function like so (untested code):
Code:
// import the player module first
#ifdef GAMEFORGE
player_module_ = PyImport_ImportModule("playerm2g2");
#else
player_module_ = PyImport_ImportModule("player");
#endif
long GetStatus(std::uint32_t type)
{
auto* args = PyTuple_New(1);
PyTuple_SetItem(args, 0, PyInt_FromLong(type));
auto* fun = PyObject_Call(
PyObject_GetAttrString(player_module_, "GetStatus"), args, nullptr);
auto const res = PyInt_AsLong(fun);
Py_DECREF(fun);
Py_XDECREF(args);
return res;
}
Refer to  for the documentation.
3. now call all of the metin2 game functions from within the mainthread hook (OnUpdate). if you disregard this - like many other poorly written cheats - you will encounter many runtime errors. this is due to the fact that metin2 is not thread-safe by itself and you need to ensure that all external function calls that yield to game functions are only executed from within the same thread in which the gameloop is running.
4. ???
5. profit.
|
11/10, the by far best approach if the knowledge is there
|
|
|
05/01/2021, 02:44
|
#13
|
elite*gold: 0
Join Date: Apr 2021
Posts: 74
Received Thanks: 6
|
Quote:
Originally Posted by _asm
here is a much simpler approach without hassling with inline assembler, function pointers or addresses (except for the hook  ) in the first place:
1. hook a function that is periodically called from within the mainthread of metin2 (OnUpdate, OnRender, etc.). go for OnUpdate since you probably want to run your cheat in the background.
2. use the python c api to retrieve the GetStatus function like so (untested code):
Code:
// import the player module first
#ifdef GAMEFORGE
player_module_ = PyImport_ImportModule("playerm2g2");
#else
player_module_ = PyImport_ImportModule("player");
#endif
long GetStatus(std::uint32_t type)
{
auto* args = PyTuple_New(1);
PyTuple_SetItem(args, 0, PyInt_FromLong(type));
auto* fun = PyObject_Call(
PyObject_GetAttrString(player_module_, "GetStatus"), args, nullptr);
auto const res = PyInt_AsLong(fun);
Py_DECREF(fun);
Py_XDECREF(args);
return res;
}
Refer to  for the documentation.
3. now call all of the metin2 game functions from within the mainthread hook (OnUpdate). if you disregard this - like many other poorly written cheats - you will encounter many runtime errors. this is due to the fact that metin2 is not thread-safe by itself and you need to ensure that all external function calls that yield to game functions are only executed from within the same thread in which the gameloop is running.
4. ???
5. profit.
|
This probably works, but the server I use has python disabled and I am using radstudio. i want to do this with asm
|
|
|
05/01/2021, 03:39
|
#14
|
elite*gold: 0
Join Date: Jun 2011
Posts: 17
Received Thanks: 3
|
Post a screenshot of the entire function and the function that calls "metin2client.exe+174b80", if there is any (dissect the code using cheat engine and it will automatically show you this info above the start of the function)
|
|
|
05/04/2021, 21:17
|
#15
|
elite*gold: 0
Join Date: Apr 2021
Posts: 74
Received Thanks: 6
|
still not working :S
|
|
|
 |
|
Similar Threads
|
player.GetStatus Liste
07/12/2016 - Metin2 Private Server - 0 Replies
Ich suche eine Liste mit allen player.GetStatus
z.b. was ist dann player.GetStatus(69)?
Woher sehe ich, welche Value welchen Boni hat?
|
player.GetStatus Liste
06/24/2016 - Metin2 Private Server - 2 Replies
Ich suche eine liste mit allen player.GetStatus
|
player.getstatus
04/13/2012 - Metin2 Private Server - 0 Replies
hallo zusammen
hat einer zufällig die liste der get.playerstatus
oder kann mir einer sagen wie ich die state zu lesen haben vom index her ?
|
[Help] void GetStatus
08/08/2009 - CO2 Private Server - 0 Replies
http://i783.photobucket.com/albums/yy117/archangel co08/untitled.jpg
i got that error when i online both char at a time. Anyone can help how to fix it? Thanks.
|
How to use Artmoney and use it to scam
05/29/2009 - SRO Hacks, Bots, Cheats & Exploits - 46 Replies
First of all you can download art money at http://www.artmoney.ru second i am only telling you how this program works. YOU CANT trade with a trade window. YOU CANT just buy everything in sight, trust me ive tried the money you see is just for show. ok if you follow these directions very carefully
1) Scan the program to make sure it is an ok file (NEVER trust files until scanned)
2) Install the program
3) Open your co client
4) Open moneyart
5) Accept terms of use and press ok
6) Press...
|
All times are GMT +1. The time now is 16:08.
|
|