Guest User

Untitled

a guest
Oct 16th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.76 KB | None | 0 0
  1. void __declspec(naked) _stdcall AutoHPASM()
  2. {
  3.    __asm
  4.         {
  5.                 push eax
  6. LoopStart:
  7.                 mov eax,[0x00e16da4] // StatBase // 8B 0D ? ? ? ? 52 6A 12 56
  8.                 mov eax,[eax]
  9.                 add eax,[0x1858] //HP Offset // 89 86 ? ? ? ? 89 86 ? ? ? ? FF 15 ? ? ? ? 8D
  10.                 mov eax,[eax]
  11.                
  12.                 cmp eax,0x0 //compare '0' to setted value - (aka HPLimit), 0 = if char is dead
  13.                 je DoSleep //do nothing
  14.  
  15.                 //this code will be activated if char is alive, because we didnt jumped to 'DontUseHPPot'
  16.                 cmp eax,[HPLimit] //compare red value to setted value (aka HPLimit)
  17.                 jle DoAutoHP //jump if less or equal
  18.                 jmp DoSleep
  19.  
  20. DoAutoHP:
  21.                 call ClickHPButton
  22.                 push 200
  23.                 call Sleep
  24.  
  25. DoSleep:
  26.                 jmp LoopStart
  27.                 push 200
  28.                 call Sleep
  29.                
  30. End: // infinite loop atm, won't get here
  31.            pop eax
  32.         }
  33. }
  34.  
  35.  
  36.  
  37. void __declspec(naked) _stdcall AutoMPASM()
  38. {
  39.    __asm
  40.         {
  41.                 push eax
  42. LoopStart:
  43.                 mov eax,[0x00e16da4] // StatBase // 8B 0D ? ? ? ? 52 6A 12 56
  44.                 mov eax,[eax]
  45.                 add eax,[0x1858 + 4] //MP Offset = HP Offset + 4 // **or if u really want** // 89 86 ? ? ? ? FF 15 ? ? ? ? 8D 8E ? ? ? ? 89
  46.                 mov eax,[eax]
  47.                
  48.                 cmp eax,[MPLimit] //compare red value to setted value (aka MPLimit)
  49.                 jle DoAutoMP
  50.                 jmp DoSleep
  51.  
  52. DoAutoMP:
  53.                 call ClickMPButton
  54.                 push 200
  55.                 call Sleep
  56.  
  57. DoSleep:
  58.                 jmp LoopStart
  59.                 push 200
  60.                 call Sleep
  61.                
  62. End: // infinite loop atm, won't get here
  63.            pop eax
  64.         }
  65. }
Add Comment
Please, Sign In to add comment