[Development] Custom Bows & Crossbows Client Source (1.03K)

Page 1 of 4 1234 LastLast
Results 1 to 15 of 50
  1. #1
    Darkness Member Kiosani is offline
    MemberRank
    Oct 2007 Join Date
    ArgentinaLocation
    1,276Posts

    [Development] Custom Bows & Crossbows Client Source (1.03K)

    Hi for all, I leave here Custom Shooting Effect, Inventory Position, Player Back Dimmension, etc Sources to added Bows to Client Side (Only).. is necessary fix server side too. Offsets to: 1.03.11 (JPN)

    Screens:







    Sources:

    Code:
    // Bows Offsets
    #define iBowAddSkillEffect            0x00699410
    #define iBowAddInventoryPos            0x0059F774
    #define iBowAddPlayerDimension        0x004E9A0B
    #define iCrossAddSkillEffect        0x006990DD


    Code:
    DWORD IsBowItem        = 0;
    DWORD IsCrossItem    = 0;
    DWORD BowValue        = 0x09C;
    DWORD MaxBoneCount    = 0x108;
    DWORD WorldPosition = 0x0FC;
    DWORD oCreateEffect    = 0x00650FF0;
    DWORD ReturnBowCode = 0x00699416;
    DWORD BowPosition    = 0x0059F77C;
    DWORD NextBowPosition = 0x0059F7BB;
    DWORD ReturnCrossCode = 0x006990E3;
    
    
    void __declspec(naked) cBowAddSkillEffect()
    {
        _asm
        {
            mov edx,dword ptr ss:[ebp-0x8]
            mov dword ptr ss:[ebp-0x14],edx
            mov IsBowItem,edx
        }
        // ---
        if( IsBowItem == ObjectId(4, 25) )    // Lightning Bow
        {
            _asm
            {
                push -1
                push 0
                push 0
                mov dx,word ptr ss:[ebp+0x18]
                push edx
                mov ax,word ptr ss:[ebp+0x14]
                push eax
                mov ecx,dword ptr ss:[ebp+0x0C]
                mov dx,word ptr ds:[ecx+0x2C]
                push edx
                mov eax,dword ptr ss:[ebp+0x0C]
                push eax
                mov ecx,dword ptr ss:[ebp-0x0C]
                push ecx
                mov edx,dword ptr ss:[ebp+0x0C]
                add edx, BowValue
                push edx
                mov eax,dword ptr ss:[ebp+0x0C]
                add eax, MaxBoneCount
                push eax
                mov ecx,dword ptr ss:[ebp+0x0C]
                add ecx, WorldPosition
                push ecx
                push 324
                call oCreateEffect
            }
        }
        else if( IsBowItem == ObjectId(4, 26) )    // Divinity Bow
        {
            _asm
            {
                push -1
                push 0
                push 0
                mov dx,word ptr ss:[ebp+0x18]
                push edx
                mov ax,word ptr ss:[ebp+0x14]
                push eax
                mov ecx,dword ptr ss:[ebp+0x0C]
                mov dx,word ptr ds:[ecx+0x2C]
                push edx
                mov eax,dword ptr ss:[ebp+0x0C]
                push eax
                mov ecx,dword ptr ss:[ebp-0x0C]
                push ecx
                mov edx,dword ptr ss:[ebp+0x0C]
                add edx, BowValue
                push edx
                mov eax,dword ptr ss:[ebp+0x0C]
                add eax, MaxBoneCount
                push eax
                mov ecx,dword ptr ss:[ebp+0x0C]
                add ecx, WorldPosition
                push ecx
                push 321
                call oCreateEffect
            }
        }
        else if( IsBowItem == ObjectId(4, 27) )    // Angelic Bow
        {
            _asm
            {
                push -1
                push 0
                push 0
                mov dx,word ptr ss:[ebp+0x18]
                push edx
                mov ax,word ptr ss:[ebp+0x14]
                push eax
                mov ecx,dword ptr ss:[ebp+0x0C]
                mov dx,word ptr ds:[ecx+0x2C]
                push edx
                mov eax,dword ptr ss:[ebp+0x0C]
                push eax
                mov ecx,dword ptr ss:[ebp-0x0C]
                push ecx
                mov edx,dword ptr ss:[ebp+0x0C]
                add edx, BowValue
                push edx
                mov eax,dword ptr ss:[ebp+0x0C]
                add eax, MaxBoneCount
                push eax
                mov ecx,dword ptr ss:[ebp+0x0C]
                add ecx, WorldPosition
                push ecx
                push 297
                call oCreateEffect
            }
        }
        else if( IsBowItem == ObjectId(4, 28) )    // Thunder Bow
        {
            _asm
            {
                push -1
                push 0
                push 0
                mov dx,word ptr ss:[ebp+0x18]
                push edx
                mov ax,word ptr ss:[ebp+0x14]
                push eax
                mov ecx,dword ptr ss:[ebp+0x0C]
                mov dx,word ptr ds:[ecx+0x2C]
                push edx
                mov eax,dword ptr ss:[ebp+0x0C]
                push eax
                mov ecx,dword ptr ss:[ebp-0x0C]
                push ecx
                mov edx,dword ptr ss:[ebp+0x0C]
                add edx, BowValue
                push edx
                mov eax,dword ptr ss:[ebp+0x0C]
                add eax, MaxBoneCount
                push eax
                mov ecx,dword ptr ss:[ebp+0x0C]
                add ecx, WorldPosition
                push ecx
                push 266
                call oCreateEffect
            }
        }
        _asm
        {
            jmp ReturnBowCode
        }
    }
    
    
    void __declspec(naked) cCrossAddSkillEffect()
    {
        _asm
        {
            mov edx,dword ptr ss:[ebp-0x4]
            mov dword ptr ss:[ebp-0x10],edx
            mov IsCrossItem,edx
        }
        // ---
        if(IsCrossItem == ObjectId(4,129)) // Devil Crossbow
        {
            _asm
            {
                push -1
                push 0
                push 0
                mov ax,word ptr ss:[ebp+0x18]
                push eax
                mov cx,word ptr ss:[ebp+0x14]
                push ecx
                mov edx,dword ptr ss:[ebp+0x0C]
                mov ax,word ptr ds:[edx+0x2C]
                push eax
                mov ecx,dword ptr ss:[ebp+0x10]
                push ecx
                push 0
                mov edx,dword ptr ss:[ebp+0x0C]
                add edx,BowValue
                push edx
                mov eax,dword ptr ss:[ebp+0x0C]
                add eax,MaxBoneCount
                push eax
                mov ecx,dword ptr ss:[ebp+0x0C]
                add ecx,WorldPosition
                push ecx
                push 321
                call oCreateEffect
            }
        }
        // ---
        _asm
        {
            jmp ReturnCrossCode
        }
    }
    
    
    void __declspec(naked) cBowAddInventoryPos()
    {
        _asm
        {
            mov IsBowItem, esi
        }
        // ---
        if(IsBowItem == 0x0B5A)
        {
            _asm{jmp BowPosition}
        }
        else if(IsBowItem == ObjectId(4,25))
        {
            _asm{jmp BowPosition}
        }
        else if(IsBowItem == ObjectId(4,26))
        {
            _asm{jmp BowPosition}
        }
        else if(IsBowItem == ObjectId(4,27))
        {
            _asm{jmp BowPosition}
        }
        else if(IsBowItem == ObjectId(4,28))
        {
            _asm{jmp BowPosition}
        }
        else
        {
            _asm{jmp NextBowPosition}
        }
    }
    
    
    DWORD BowAddPlayerDimension_Offset = 0x004E9A12;
    
    
    void __declspec(naked) cBowAddPlayerDimension()
    {
        _asm
        {
            CMP DWORD PTR SS:[EBP+0x1C],0x0B56
            JE ReturnLoad
            CMP DWORD PTR SS:[EBP+0x1C],ObjectId(4,24)
            JE ReturnLoad
            CMP DWORD PTR SS:[EBP+0x1C],ObjectId(4,25)
            JE ReturnLoad
            CMP DWORD PTR SS:[EBP+0x1C],ObjectId(4,26)
            JE ReturnLoad
            CMP DWORD PTR SS:[EBP+0x1C],ObjectId(4,27)
            JE ReturnLoad
            CMP DWORD PTR SS:[EBP+0x1C],ObjectId(4,28)
            JE ReturnLoad
            // ---
            ReturnLoad:
            // ---
            JMP BowAddPlayerDimension_Offset
        }
    }
    
    
    void InitBows()
    {
        Utils.SetRange((LPVOID)iBowAddSkillEffect, 6, ASM::NOP);
        Utils.SetJmp((LPVOID)iBowAddSkillEffect, cBowAddSkillEffect);
        // ----
        Utils.SetRange((LPVOID)iBowAddInventoryPos, 6, ASM::NOP);
        Utils.SetJmp((LPVOID)iBowAddInventoryPos, cBowAddInventoryPos);
        // ----
        Utils.SetRange((LPVOID)iBowAddPlayerDimension, 7, ASM::NOP);
        Utils.SetJmp((LPVOID)iBowAddPlayerDimension, cBowAddPlayerDimension);
        // ----
        Utils.SetRange((LPVOID)iCrossAddSkillEffect, 6, ASM::NOP);
        Utils.SetJmp((LPVOID)iCrossAddSkillEffect, cCrossAddSkillEffect);
    }


    Credits:

    Webzen
    Nemesis


    Last edited by Kiosani; 04-10-15 at 07:25 PM.


  2. #2
    Evolution Team Th3AnG3L is offline
    MemberRank
    Apr 2014 Join Date
    634Posts

    re: [Development] Custom Bows & Crossbows Client Source (1.03K)

    can you add also the .bmd files of items
    and .h file
    Last edited by Th3AnG3L; 01-10-15 at 11:17 PM.

  3. #3
    Proficient Member Van_Bom is offline
    MemberRank
    May 2009 Join Date
    194Posts

    re: [Development] Custom Bows & Crossbows Client Source (1.03K)

    thank to mauro07, but don't have .h file

    I can't built this file to dll.....

  4. #4
    Account Upgraded | Title Enabled! phgkhh is offline
    MemberRank
    Dec 2009 Join Date
    395Posts

    re: [Development] Custom Bows & Crossbows Client Source (1.03K)

    Can we have offset for 1.04D of Season 6, it would be great! :)

  5. #5
    Evolution Team Th3AnG3L is offline
    MemberRank
    Apr 2014 Join Date
    634Posts

    re: [Development] Custom Bows & Crossbows Client Source (1.03K)

    Quote Originally Posted by eddydn View Post
    You can define .h file by yourself , Mr Bờm ! :) or pm me on Facebook :D
    define .h file is not a problem its missing offsets
    Code:
    void InitBows()
    {
        Utils.SetRange((LPVOID)iBowAddSkillEffect, 6, ASM::NOP);
        Utils.SetJmp((LPVOID)iBowAddSkillEffect, cBowAddSkillEffect);
        // ----
        Utils.SetRange((LPVOID)iBowAddInventoryPos, 6, ASM::NOP);
        Utils.SetJmp((LPVOID)iBowAddInventoryPos, cBowAddInventoryPos);
        // ----
        Utils.SetRange((LPVOID)iBowAddPlayerDimension, 7, ASM::NOP);
        Utils.SetJmp((LPVOID)iBowAddPlayerDimension, cBowAddPlayerDimension);
        // ----
        Utils.SetRange((LPVOID)iCrossAddSkillEffect, 6, ASM::NOP);
        Utils.SetJmp((LPVOID)iCrossAddSkillEffect, cCrossAddSkillEffect);
    }

  6. #6
    Darkness Member Kiosani is offline
    MemberRank
    Oct 2007 Join Date
    ArgentinaLocation
    1,276Posts

    re: [Development] Custom Bows & Crossbows Client Source (1.03K)

    Quote Originally Posted by Th3AnG3L View Post
    define .h file is not a problem its missing offsets
    Code:
    void InitBows()
    {
        Utils.SetRange((LPVOID)iBowAddSkillEffect, 6, ASM::NOP);
        Utils.SetJmp((LPVOID)iBowAddSkillEffect, cBowAddSkillEffect);
        // ----
        Utils.SetRange((LPVOID)iBowAddInventoryPos, 6, ASM::NOP);
        Utils.SetJmp((LPVOID)iBowAddInventoryPos, cBowAddInventoryPos);
        // ----
        Utils.SetRange((LPVOID)iBowAddPlayerDimension, 7, ASM::NOP);
        Utils.SetJmp((LPVOID)iBowAddPlayerDimension, cBowAddPlayerDimension);
        // ----
        Utils.SetRange((LPVOID)iCrossAddSkillEffect, 6, ASM::NOP);
        Utils.SetJmp((LPVOID)iCrossAddSkillEffect, cCrossAddSkillEffect);
    }
    I leave in the first post.. all hook offsets.. sorry I forgot this.. :P

  7. #7

    re: [Development] Custom Bows & Crossbows Client Source (1.03K)

    Great custom stuff, would've been awesome in season 2.4 or season 2 [1.02c]

  8. #8
    Member ATJIAHT is offline
    MemberRank
    Jul 2008 Join Date
    65Posts

    re: [Development] Custom Bows & Crossbows Client Source (1.03K)

    mauro can you help create code cBowAddInventoryPos() for 1.04D ENG (6.3) main?
    I search offsets
    DWORD BowPosition = 0x005CC8ED; // 1.04D ENG
    DWORD NextBowPosition = 0x005CC92E; // 1.04D ENG
    #define iBowAddInventoryPos 0x005CC92E // 1.04D ENG

    Already fixed.
    Code:
    DWORD oCreateEffect = 0x006D8F20; // 1.04D ENG
    DWORD ReturnBowCode = 0x00749FDE; // 1.04D ENG
    DWORD BowPosition     = 0x005CC8ED; // 1.04D ENG
    DWORD NextBowPosition = 0x005CC92E; // 1.04D ENG
    
    #define iBowAddSkillEffect          0x00749FD8 // 1.04D ENG
    #define iBowAddInventoryPos         0x005CC8E4 // 1.04D ENG
    #define iBowAddPlayerDimension      0x00566178 // 1.04D ENG
    
    DWORD BowAddPlayerDimension_Offset = 0x0056617F; // 1.04D ENG
    Code:
    void __declspec(naked) cBowAddSkillEffect()
    {
        _asm
        {
            mov ecx,dword ptr ss:[ebp-0x4]
            mov dword ptr ss:[ebp-0x14],ecx
            mov IsBowItem,ecx
        }
        // ---
        if( IsBowItem == ITEM2(4, 28) )    // Thunder Bow
        {
            _asm
            {
                push -1
                push 0
                push 0
    			movzx ecx,word ptr ss:[ebp+0x18]
    			push ecx
    			movzx edx,word ptr ss:[ebp+0x14]
    			push edx
    			mov eax,dword ptr ss:[ebp+0x0c]
    			movzx ecx,word ptr ds:[eax+0x2c]
    			push ecx
    			mov edx,dword ptr ss:[ebp+0x0c]
    			push edx
    			mov eax,dword ptr ss:[ebp-0x8]
    			push eax
    			mov ecx,dword ptr ss:[ebp+0x0c]
    			add ecx,BowValue
    			push ecx
    			mov edx,dword ptr ss:[ebp+0x0c]
    			add edx,MaxBoneCount
    			push edx
    			mov eax,dword ptr ss:[ebp+0x0c]
    			add eax,WorldPosition
    			push eax
                push 266
                call oCreateEffect
            }
        }
        _asm
        {
            jmp ReturnBowCode
        }
    }
    void __declspec(naked) cBowAddInventoryPos()
    {
        _asm
        {
    
            mov ecx,dword ptr ss:[ebp+0x8]
            mov dword ptr ss:[ebp+0x8],ecx
            mov IsBowItem,ecx
        }
        // ---
        if(IsBowItem == 0x0CAB)
        {
            _asm{jmp BowPosition}
        }
        else if(IsBowItem == ITEM2(4,28))
        {
            _asm{jmp BowPosition}
        }
        else
        {
            _asm{jmp NextBowPosition}
        }
    }
    void __declspec(naked) cBowAddPlayerDimension()
    {
        _asm
        {
            cmp dword ptr ss:[ebp+0x1c],0x0cA7
            je ReturnLoad
            cmp dword ptr ss:[ebp+0x1c],ITEM2(4,28)
            je ReturnLoad
            // ---
            ReturnLoad:
            // ---
            jmp BowAddPlayerDimension_Offset
        }
    }
    But have 1 trouble, auto load Arrows from inventory don't work :)
    Last edited by ATJIAHT; 10-10-15 at 12:39 PM.

  9. #9
    Apprentice loveoggy is offline
    MemberRank
    Jun 2015 Join Date
    22Posts

    re: [Development] Custom Bows & Crossbows Client Source (1.03K)

    can you share code crossbow ?

  10. #10
    Account Upgraded | Title Enabled! phgkhh is offline
    MemberRank
    Dec 2009 Join Date
    395Posts

    re: [Development] Custom Bows & Crossbows Client Source (1.03K)

    Quote Originally Posted by Th3AnG3L View Post
    define .h file is not a problem its missing offsets
    Code:
    void InitBows()
    {
        Utils.SetRange((LPVOID)iBowAddSkillEffect, 6, ASM::NOP);
        Utils.SetJmp((LPVOID)iBowAddSkillEffect, cBowAddSkillEffect);
        // ----
        Utils.SetRange((LPVOID)iBowAddInventoryPos, 6, ASM::NOP);
        Utils.SetJmp((LPVOID)iBowAddInventoryPos, cBowAddInventoryPos);
        // ----
        Utils.SetRange((LPVOID)iBowAddPlayerDimension, 7, ASM::NOP);
        Utils.SetJmp((LPVOID)iBowAddPlayerDimension, cBowAddPlayerDimension);
        // ----
        Utils.SetRange((LPVOID)iCrossAddSkillEffect, 6, ASM::NOP);
        Utils.SetJmp((LPVOID)iCrossAddSkillEffect, cCrossAddSkillEffect);
    }
    I can't compile this one, system say: ItemAsm.cpp(266): error C2065: 'Utils' : undeclared identifier

  11. #11
    Evolution Team Th3AnG3L is offline
    MemberRank
    Apr 2014 Join Date
    634Posts

    re: [Development] Custom Bows & Crossbows Client Source (1.03K)

    if you dont have Utils (tools) just remove it if you use directly SetRange
    In simply words so you can understand it:

    Utils.SetRange - you got underline because you dont have Utils
    change it to SetRange only , but you still need the function to have

  12. #12
    Darkness Member Kiosani is offline
    MemberRank
    Oct 2007 Join Date
    ArgentinaLocation
    1,276Posts

    re: [Development] Custom Bows & Crossbows Client Source (1.03K)

    Utils is my custom virtual class to every one of the functions of: Hook to the main.exe, I think that this is good to code performance in general.

    Is more easy include all needed functions to your code on only: 1 virtual class.. then later you can invoke on easy way from differents files: .cpp on all project.. and this allows polimorphisms.

    Utils.SetByte, Utils.SetNop, and etc... then you can combine: Assembler Inline from your: main.exe code.. with another natives from: C++ functions, with less work and better order.
    Last edited by Kiosani; 26-10-15 at 08:08 PM.

  13. #13
    Member ATJIAHT is offline
    MemberRank
    Jul 2008 Join Date
    65Posts

    re: [Development] Custom Bows & Crossbows Client Source (1.03K)

    Quote Originally Posted by loveoggy View Post
    can you share code crossbow ?
    When i Adding CrossBow i share code, a few day maybe.

  14. #14
    Account Upgraded | Title Enabled! phgkhh is offline
    MemberRank
    Dec 2009 Join Date
    395Posts

    re: [Development] Custom Bows & Crossbows Client Source (1.03K)

    Quote Originally Posted by mauro07 View Post
    Utils is my custom virtual class to every one of the functions of: Hook to the main.exe, I think that this is good to code performance in general.

    Is more easy include all needed functions to your code on only: 1 virtual class.. then later you can invoke on easy way from differents files: .cpp on all project.. and this allows polimorphisms.

    Utils.SetByte, Utils.SetNop, and etc... then you can combine: Assembler Inline from your: main.exe code.. with another natives from: C++ functions, with less work and better order.
    Thank you Th3AnG3L and mauro07 for your explanation, here below is the code I try to use in zTeam S6E3 server for Angelic Bow but not work, I don't know where is wrong:

    In ItemAsm.h

    #define iBowAddSkillEffect 0x00749FD8 // 1.04D ENG
    #define iBowAddInventoryPos 0x005CC8E4 // 1.04D ENG
    #define iBowAddPlayerDimension 0x00566178 // 1.04D ENG


    In ItemAsm.cpp

    DWORD IsBowItem = 0;
    DWORD IsCrossItem = 0;
    DWORD BowValue = 0x09C;
    DWORD MaxBoneCount = 0x108;
    DWORD WorldPosition = 0x0FC;

    DWORD oCreateEffect = 0x006D8F20; // 1.04D ENG
    DWORD ReturnBowCode = 0x00749FDE; // 1.04D ENG
    DWORD BowPosition = 0x005CC8ED; // 1.04D ENG
    DWORD NextBowPosition = 0x005CC92E; // 1.04D ENG
    DWORD BowAddPlayerDimension_Offset = 0x0056617F; // 1.04D ENG

    void __declspec(naked) cBowAddSkillEffect()
    {
    _asm
    {
    mov ecx,dword ptr ss:[ebp-0x4]
    mov dword ptr ss:[ebp-0x14],ecx
    mov IsBowItem,ecx
    }
    // ---
    if( IsBowItem == ObjectId(4, 25) ) // Angelic Bow
    {
    _asm
    {
    push -1
    push 0
    push 0
    mov dx,word ptr ss:[ebp+0x18]
    push edx
    mov ax,word ptr ss:[ebp+0x14]
    push eax
    mov ecx,dword ptr ss:[ebp+0x0C]
    mov dx,word ptr ds:[ecx+0x2C]
    push edx
    mov eax,dword ptr ss:[ebp+0x0C]
    push eax
    mov ecx,dword ptr ss:[ebp-0x0C]
    push ecx
    mov edx,dword ptr ss:[ebp+0x0C]
    add edx, BowValue
    push edx
    mov eax,dword ptr ss:[ebp+0x0C]
    add eax, MaxBoneCount
    push eax
    mov ecx,dword ptr ss:[ebp+0x0C]
    add ecx, WorldPosition
    push ecx
    push 297
    call oCreateEffect
    }
    }
    _asm
    {
    jmp ReturnBowCode
    }
    }

    void __declspec(naked) cBowAddInventoryPos()
    {
    _asm
    {

    mov ecx,dword ptr ss:[ebp+0x8]
    mov dword ptr ss:[ebp+0x8],ecx
    mov IsBowItem,ecx
    }
    // ---
    if(IsBowItem == 0x0CAB)
    {
    _asm{jmp BowPosition}
    }
    else if(IsBowItem == ITEM2(4,25))
    {
    _asm{jmp BowPosition}
    }
    else
    {
    _asm{jmp NextBowPosition}
    }
    }

    void __declspec(naked) cBowAddPlayerDimension()
    {
    _asm
    {
    cmp dword ptr ss:[ebp+0x1c],0x0CA7
    je ReturnLoad
    cmp dword ptr ss:[ebp+0x1c],ITEM2(4,25)
    je ReturnLoad
    // ---
    ReturnLoad:
    // ---
    jmp BowAddPlayerDimension_Offset
    }
    }

    void InitBows()
    {
    SetRange((LPVOID)iBowAddSkillEffect, 6, ASM::NOP);
    SetJmp((LPVOID)iBowAddSkillEffect, cBowAddSkillEffect);
    // ----
    SetRange((LPVOID)iBowAddInventoryPos, 6, ASM::NOP);
    SetJmp((LPVOID)iBowAddInventoryPos, cBowAddInventoryPos);
    // ----
    SetRange((LPVOID)iBowAddPlayerDimension, 7, ASM::NOP);
    SetJmp((LPVOID)iBowAddPlayerDimension, cBowAddPlayerDimension);
    // ----
    }


    with:
    DWORD SetJmp(const LPVOID dwEnterFunction, const LPVOID dwJMPAddress);
    in TMemory.h

  15. #15
    Apprentice loveoggy is offline
    MemberRank
    Jun 2015 Join Date
    22Posts

    re: [Development] Custom Bows & Crossbows Client Source (1.03K)

    mauro07 . how find offset effectskill bow ? i used Main 1.04D GMO

    Last edited by loveoggy; 27-10-15 at 10:56 AM.



Page 1 of 4 1234 LastLast

Advertisement