Jump to content

ledi12

Inactive Member
  • Posts

    13
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by ledi12

  1. 3 minutes ago, Chyuae said:

    Attach logs.

    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(mob);
                Py_XDECREF(args);
            }
            else {
                PyObject* enemy = PyObject_CallObject(mod2, args);
                if (!enemy) {
                    Py_DECREF(enemy);
                    Py_XDECREF(args);
                }
                else {
                    if (PyInt_AsLong(mob) > 0 && PyInt_AsLong(mob) < 1000 && PyInt_AsLong(enemy) == 0) {
                        mobs.push_back(i);
                    }
                }
            } 
        }
        return mobs;
    }

    100k still crashes it ? I've found out that 0xC0000409 causes it. My client simply closes and I do not receive any logs except CrashDumps.

  2. 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;
    }

     

     

  3. Just now, TMP4 said:

    Ah okey, now understand, you're working outside of the binary :D

    That's beyond my knowledge so i cannot help more.

    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 ?

  4. 1 minute ago, TMP4 said:

    Ah forget the 32k that was just because of map1. But 100k probably enough.

     

    What do you mean by "address of GetCharacterDistance()"?

    It give back the distance from the mob.

    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.

  5. Just now, TMP4 said:

    If you want to collect every mob even the farest you can delete that:

    
           dys = player.GetCharacterDistance(i)
                if dys > 0 and dys < 7500:

    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. 

×
×
  • 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.