Jump to content

Recommended Posts

Version of Files : XXX

Hi,

I'm trying to call some api functions from player module, like character position.

 

PyObject* obj = PyImport_ImportModule(const char *"player");
std::cout << obj.GetMainCharacterPosition() << std::endl;

I would appreciate any hint to to call python api in C.

 

  • Good 1
Link to comment
https://metin2.dev/topic/24295-calling-python-api-with-c/
Share on other sites

  • Forum Moderator

Is not that easy as you think and also you need to make individual code for each function, if they've arguments and more.

Here's my method, i tested it and works fine.

This is the hidden content, please

 

Edited by VegaS™
  • Metin2 Dev 11
  • Good 15
  • Love 11
Link to comment
https://metin2.dev/topic/24295-calling-python-api-with-c/#findComment-130257
Share on other sites

On 7/9/2020 at 9:02 PM, VegaS™ said:

Is not that easy as you think and also you need to make individual code for each function, if they've arguments and more.

Here's my method, i tested it and works fine.

Looks fine to me :) To make it working I need to inject it as the dll first hmm ? 

Edited by VegaS™
Link to comment
https://metin2.dev/topic/24295-calling-python-api-with-c/#findComment-130258
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.