Announcement

Collapse
No announcement yet.

[Help] How to make enemy attack enemy code?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Help] How to make enemy attack enemy code?

    How does someone make an enemy attack enemy code?

    It might have to do with branches or some other ways.
    But what are the techniques to narrow it down to a specific area or function?
    Last edited by lijian1; 03-06-2015, 11:41:27 PM.

  • #2
    There will usually be one or many checks for enemies either in or right after the hit routine. In most games the hit will be calculated (passes several previous tests), then it will proceed to check exactly what "type" of object was hit. This kind of code can usually be created by finding the checks for enemies, then nullifying them with a NOP or by other means.

    Collision Checks (Including NPC Check As Seen In Debugger):



    Notice that the attacker (eax+00000688) is loaded into edx, then edx is compared to the player being attacked (ecx+00000688). If the value at that offset is equal (both are NPCs), it skips returning true (Hit) and xors the value which returns false (No Hit). Successfully NOPing the check would always return true, thus making NPCs able to hit each other.

    NPCs Hit Each Other Example (PC - Cheat Engine Script):

    Code:
    [COLOR="#0000FF"]//|******** Author: Abystus *********|
    //|********** Game: BoneTown ********|
    //|********* Build: 1.1.1.0 *********|[/COLOR]
    
    [B][COLOR="#008000"][ENABLE][/COLOR][/B]
    [COLOR="#0000FF"]//Scan to find location for modifications[/COLOR]
    aobscanmodule(NPCsCanHitEachOther, BoneTown.exe, 74 05 B0 01 C2 04 00 32 C0 C2 04 00 17 52 53 00 CD 51 53 00 00 00 00 00 00)
    
    [COLOR="#0000FF"]//Register symbol for location[/COLOR]
    registersymbol(NPCsCanHitEachOther)
    
    [COLOR="#0000FF"]//Nop JE (NPC Check)[/COLOR]
    NPCsCanHitEachOther:
    [COLOR="#800080"][B]db 90 90[/B][/COLOR]
     
    [COLOR="#FF0000"][B][DISABLE][/B][/COLOR]
    [COLOR="#0000FF"]//Restore JE (NPC Check)[/COLOR]
    NPCsCanHitEachOther:
    [COLOR="#800080"][B]db 74 05[/B][/COLOR]
    
    [COLOR="#0000FF"]//Unregister symbol[/COLOR]
    unregistersymbol(NPCsCanHitEachOther)
    Not taking any requests at this time.

    Bored? Watch some of my hacks here.

    Comment

    Working...
    X