Jump to content

Recommended Posts

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
  • Metin2 Dev 1
  • Dislove 1
Link to comment
https://metin2.dev/topic/24315-module-responsible-for-mob-list/
Share on other sites

  • Contributor

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
  • Love 1
  • Contributor

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

  • Contributor

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

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 ?

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.