

ledi12
Member-
Content Count
13 -
Joined
-
Last visited
Community Reputation
0 NeutralAbout ledi12

-
Rank
Neutral
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
ledi12 started following Calling python api with C ?, cpp module responsible for mob creation and locating on map?, PyObject crashing the game and 1 other
-
open cpp module responsible for mob creation and locating on map?
ledi12 posted a question in Questions & Answers
Version of Files : XXX Hi, Just downloaded the source code. I wonder whichc cpp module is responsible for creating the mobs and then locating them on map (number of mobs, vid etc.). Appreciate for help -
Variable is optimized away and not available this is the main problem
-
Exception thrown at 0x1E0AF9E0 (python27.dll) in Soria2.pl.exe: 0xC0000005: Access violation reading location 0x00000045. occurred
-
This is my current code which works if the loop isn;t that long (max 10k) std::vector<int> mobList() { std::vector<int> list; PyObject* mod = PyObject_GetAttrString(PyImport_AddModule("player"), "GetCharacterDistance"); PyObject* mod2 = PyObject_GetAttrString(PyImport_AddModule("chr"), "GetInstanceType"); PyObject* args = PyTuple_New(1); std::vector<int> mobs; for (int i = 0; i < 100000; i++) { PyTuple_SetItem(args, 0, PyInt_FromLong(i)); PyObject* mob = PyObject_CallObject(mod, args); if (!mob) { Py_DECREF(m
-
Version of Files : XXX Hey yo, I'm injecting python modules via c++ api and after executing it my games crashes (client shuts down). My VS uses python 2.7 libs int GetInstanceType(long vid) { PyObject* args = PyTuple_New(1); PyTuple_SetItem(args, 0, PyInt_FromLong(vid)); PyObject* ret = PyObject_Call(PyObject_GetAttrString(PyImport_ImportModule("chr"), "GetInstanceType"), args, NULL); int result = PyInt_AsLong(ret); Py_DECREF(ret); Py_XDECREF(args); return result; }
-
Yeah I've been working in low memory since very beginning I know about python api from one guy and was curious how does it work. It contains many useful features like mentioned above, but unforunately I can't see any functions responisbile for sending attack packets ?
-
I'm working on simple waithack. I've got written function to send battle packets to the given target (circled). I wanted to extend it to attack mobs around. I need now to run python api in my c++ code or either find address of GetCharacterDistance() n function and modify it to build mob list on c++ behalf.
-
Cool thanks I need to find address of GetCharacterDistance() address as I wrote SendBattleAttackPacket type thing in c++. As far as I know python api doesn't have it.
-
Ok I see now GetCharacterDistance() returns None if argument passed is not the visible vid. I should;ve figured it out. Thanks !
-
Version of Files : XXX Hi, Is there any module in python's api responsible for mob list ? player.GetTargetVID returns id of circled monster. Is there any equaivalent of this what returns for example array/list of all mobs nearby ?
-
Looks fine to me To make it working I need to inject it as the dll first hmm ?
-
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.