ledi12 2 Posted July 13, 2020 Share Posted July 13, 2020 (edited) 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 July 13, 2020 by ledi12 typo 1 1 Link to comment Share on other sites More sharing options...
Contributor TMP4 10998 Posted July 13, 2020 Contributor Share Posted July 13, 2020 (edited) 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. Edited July 13, 2020 by TMP4 1 Link to comment Share on other sites More sharing options...
ledi12 2 Posted July 13, 2020 Author Share Posted July 13, 2020 Ok I see now GetCharacterDistance() returns None if argument passed is not the visible vid. I should;ve figured it out. Thanks ! Link to comment Share on other sites More sharing options...
Contributor TMP4 10998 Posted July 13, 2020 Contributor Share Posted July 13, 2020 (edited) 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 July 13, 2020 by TMP4 Link to comment Share on other sites More sharing options...
ledi12 2 Posted July 13, 2020 Author Share Posted July 13, 2020 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 comment Share on other sites More sharing options...
Contributor TMP4 10998 Posted July 13, 2020 Contributor Share Posted July 13, 2020 (edited) 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 July 13, 2020 by TMP4 Link to comment Share on other sites More sharing options...
ledi12 2 Posted July 13, 2020 Author Share Posted July 13, 2020 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 comment Share on other sites More sharing options...
Contributor TMP4 10998 Posted July 13, 2020 Contributor Share Posted July 13, 2020 Ah okey, now understand, you're working outside of the binary That's beyond my knowledge so i cannot help more. Link to comment Share on other sites More sharing options...
ledi12 2 Posted July 13, 2020 Author Share Posted July 13, 2020 Just now, TMP4 said: Ah okey, now understand, you're working outside of the binary 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 comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now