Jump to content
  • 0

Module responsible for mob list


ledi12

Question

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 ?

 

Edited by ledi12
typo (see edit history)
Link to post

8 answers to this question

Recommended Posts

  • 0

I think there's not.

You can use something like this like every python hack do for mob scanning:

        import player
        import chat 
        mobVIDList=[]
        for i in xrange(1, 100000):
            dys = player.GetCharacterDistance(i)
            if dys > 0 and dys < 7500:
                if chr.INSTANCE_TYPE_ENEMY == chr.GetInstanceType(i):
                    chat.AppendChat(chat.CHAT_TYPE_INFO, "There is a nearby mob: %d" % i)
                    mobVIDList.append(i)

Be aware that it can freeze the client for 1 sec. 

Afaik a VID cannot be higher then 100000 that's why i set that. Maybe it can lowered.

 

Edit: Tested it and it's not freezing the client.

133912Screenshot-1.png

Edited by TMP4 (see edit history)
  • Love 1
Link to post
  • 0

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

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

Also i edited my upper answer, you probably don't need to scan to 100k just 32k.

Edited by TMP4 (see edit history)
Link to post
  • 0
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. 

Link to post
  • 0

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 of the mob.

Edited by TMP4 (see edit history)
Link to post
  • 0
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.

Link to post
  • 0
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 ?

Link to post
Guest
This topic is now closed to further replies.


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