Help with basic python hacking(attacking/getting mob VID) for auto thief's glove

      Help with basic python hacking(attacking/getting mob VID) for auto thief's glove

      can somebody help me with a python func dumper for gameforge RO server?
      also how do I get VID of a mob around me?
      + how do I attack a mob with python?
      I used

      Source Code

      1. net.SendOnClickPacket(mobvid)
      2. player.SetAttackKeyState(true)

      and none worked

      I want to do an auto thief glove equiper to check when metin has below 3k hp and move to a place so it stops attacking and I can equip the glove and go back to attacking the metin

      Source Code

      1. net.SendOnClickPacket(mobvid)


      SendOnClickPacket cant attack mobs.

      Source Code

      1. SetAttackKeyState


      There is no "SetAttackKeyState" function anymore.


      • You can scan vids with For loop (this is not a good option btw);

      Source Code

      1. try:
      2. import playerm2g2 as player
      3. except:
      4. import player
      5. try:
      6. import chatm2g as chat
      7. except:
      8. import chat
      9. import chr
      10. def ScanMobs():
      11. o=player.GetMainCharacterIndex()
      12. mobvid=-1
      13. for vid in xrange(o-250000,o+250000):
      14. if chr.IsEnemy(vid):# and player.GetCharacterDistance(vid)<2000: (optional distance limit)
      15. mobvid=vid
      16. break
      17. return mobvid
      18. def AttackMob():
      19. mob=ScanMobs()
      20. if mob<>-1:
      21. player.SetTarget(mob)
      22. player.RequestUseLocalQuickSlot(0)
      23. chat.AppendChat(7,'#### Target: '+str(chr.GetNameByVID(mob)))
      24. AttackMob()


      • And put your AutoAttack skill to first skill slot;

      Post was edited 1 time, last by “unXpected” ().

      thanks for replying @unXpected so I tried to use your code first with copy paste so then I can change it but it doesn't work at all (chat.AppendChat(7,'#### Target: '+str(chr.GetNameByVID(mob))) even this didn't get in chat).Did some debugging and player.RequestUseLocalQuickSlot(0) didn't work while having only imports.

      GoreTEX wrote:

      thanks for replying @unXpected so I tried to use your code first with copy paste so then I can change it but it doesn't work at all (chat.AppendChat(7,'#### Target: '+str(chr.GetNameByVID(mob))) even this didn't get in chat).Did some debugging and player.RequestUseLocalQuickSlot(0) didn't work while having only imports.


      Then you should increase xrange distance ;
      • xrange(o-250000,o+250000) -> %60 chance to find mobs
      • xrange(o-400000,o+400000) -> %70 chance to find mobs
      • xrange(o-500000,o+500000) -> %80 chance to find mobs etc... [TESTED ON M2-DE]

      Post was edited 1 time, last by “unXpected” ().