Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

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

Joined
Oct 29, 2007
Messages
1,267
Reaction score
1,284
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:

Kiosani - [Development] Custom Bows & Crossbows Client Source (1.03K) - RaGEZONE Forums


Kiosani - [Development] Custom Bows & Crossbows Client Source (1.03K) - RaGEZONE Forums


Kiosani - [Development] Custom Bows & Crossbows Client Source (1.03K) - RaGEZONE Forums


Sources:

Code:
[B][COLOR=#ff0000]// Bows Offsets
[/COLOR][/B][B][COLOR=#ff0000]#define iBowAddSkillEffect            0x00699410[/COLOR][/B]
[B][COLOR=#ff0000]#define iBowAddInventoryPos            0x0059F774[/COLOR][/B]
[B][COLOR=#ff0000]#define iBowAddPlayerDimension        0x004E9A0B[/COLOR][/B]
[B][COLOR=#ff0000]#define iCrossAddSkillEffect        0x006990DD[/COLOR][/B]


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:
Evolution Team
Joined
Apr 26, 2014
Messages
634
Reaction score
382
re: [Development] Custom Bows & Crossbows Client Source (1.03K)

can you add also the .bmd files of items
and .h file
 
Last edited:
Junior Spellweaver
Joined
May 1, 2009
Messages
192
Reaction score
17
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.....
 
Skilled Illusionist
Joined
Dec 9, 2009
Messages
373
Reaction score
42
re: [Development] Custom Bows & Crossbows Client Source (1.03K)

Can we have offset for 1.04D of Season 6, it would be great! :)
 
Evolution Team
Joined
Apr 26, 2014
Messages
634
Reaction score
382
re: [Development] Custom Bows & Crossbows Client Source (1.03K)

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);
}
 
Joined
Oct 29, 2007
Messages
1,267
Reaction score
1,284
re: [Development] Custom Bows & Crossbows Client Source (1.03K)

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
 
Newbie Spellweaver
Joined
Jul 30, 2008
Messages
44
Reaction score
14
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:
Newbie Spellweaver
Joined
Jun 30, 2015
Messages
22
Reaction score
0
re: [Development] Custom Bows & Crossbows Client Source (1.03K)

can you share code crossbow ?
 
Skilled Illusionist
Joined
Dec 9, 2009
Messages
373
Reaction score
42
re: [Development] Custom Bows & Crossbows Client Source (1.03K)

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
 
Evolution Team
Joined
Apr 26, 2014
Messages
634
Reaction score
382
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
 
Joined
Oct 29, 2007
Messages
1,267
Reaction score
1,284
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:
Skilled Illusionist
Joined
Dec 9, 2009
Messages
373
Reaction score
42
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.

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
 
Newbie Spellweaver
Joined
Jun 30, 2015
Messages
22
Reaction score
0
re: [Development] Custom Bows & Crossbows Client Source (1.03K)

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

Kiosani - [Development] Custom Bows & Crossbows Client Source (1.03K) - RaGEZONE Forums
 
Last edited:
Junior Spellweaver
Joined
Aug 11, 2013
Messages
112
Reaction score
64
re: [Development] Custom Bows & Crossbows Client Source (1.03K)

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

add In ItemAsm.h

void InitBows();

add in dllmain.cpp

InitBows();
 
Newbie Spellweaver
Joined
Dec 12, 2008
Messages
89
Reaction score
6
re: [Development] Custom Bows & Crossbows Client Source (1.03K)

Thank MaxVoll it work but arrow in inventory is not decreased
 
Skilled Illusionist
Joined
Dec 9, 2009
Messages
373
Reaction score
42
re: [Development] Custom Bows & Crossbows Client Source (1.03K)

add In ItemAsm.h

void InitBows();

add in dllmain.cpp

InitBows();

Thank you but why we need to add InitBows(); into dllmain.cpp? What is that for? how can I add that because when I add, it show error.

Updated: Thank you, it works now, but same like tuantep said above, the arrow is not decreasing when shooting, you know how to fix it? Thanks man!
 
Last edited:
Junior Spellweaver
Joined
Aug 11, 2013
Messages
112
Reaction score
64
re: [Development] Custom Bows & Crossbows Client Source (1.03K)

Thank you but why we need to add InitBows(); into dllmain.cpp? What is that for? how can I add that because when I add, it show error.

add in dllmain

#include "ItemAsm.h"

and in this area

extern "C" __declspec(dllexport)void Init()
{

InitBows();
 
Last edited:
Newbie Spellweaver
Joined
Dec 12, 2008
Messages
89
Reaction score
6
re: [Development] Custom Bows & Crossbows Client Source (1.03K)

add InitBows(); in void Item::Load() that ok too!
 
Back
Top