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!

Simple way to hook 'Wizardry Dmg %d rise' Option to Show on Added Swords

Joined
Oct 29, 2007
Messages
1,267
Reaction score
1,284
Nothing super special.. this is a simple work (very ugly code) made by me on assembler inline, but maybe some person like use, not problems with stack because I don't touch none register from main on this code. This is the most correct way to use assembler inline with the main.exe (Offsets for 1.03.13 JPN).

Some screenshots:

GeqLLyr - Simple way to hook 'Wizardry Dmg %d rise' Option to Show on Added Swords - RaGEZONE Forums


YDLV1Bl - Simple way to hook 'Wizardry Dmg %d rise' Option to Show on Added Swords - RaGEZONE Forums


echEMT5 - Simple way to hook 'Wizardry Dmg %d rise' Option to Show on Added Swords - RaGEZONE Forums


.cpp file

Code:
WORD wItem = 0;[COLOR=#000000]
[/COLOR]DWORD ReturnOffset = 0x0059685C;
DWORD AllowTextOffset = 0x00596866;
[COLOR=#000000]
[/COLOR]void __declspec(naked) BladesWizardryDmg()
{
    _asm
    {
        MOV wItem, CX
        // ---
        CMP wItem, 0x15 // Dark Reign Blade
        JE AllowText
        CMP wItem, 0x1D // Rune Sacred Blade
        JE AllowText
        // ---
        JMP ReturnLoad
        // ---
        AllowText:
        JMP AllowTextOffset
        // ---
        ReturnLoad:
        JMP ReturnOffset
    }
}

void cSpecialItemsTextHook()
{
    Utils.SetRange((LPVOID)0x00596856, 6, ASM::NOP);
    Utils.SetJmp((LPVOID)0x00596856, BladesWizardryDmg);
}

PS: To make calc for every added sword you only must apply ItemId formula or more simple
for example for Sword custom with Index: 130 (in decimal) = 82 (in hexadecimal).

Then:

CMP wItem, 0x82 // Sword Index: 130

Very Simple !
:rolleyes:
 

Attachments

You must be registered for see attachments list
Evolution Team
Joined
Apr 26, 2014
Messages
634
Reaction score
382
.h file not need to put anything in it not?
.h
void __declspec(naked) BladesWizardryDmg();
void cSpecialItemsTextHook();

and remember you need this void cSpecialItemsTextHook() added in your main.cpp it calls the function
 
Newbie Spellweaver
Joined
May 22, 2012
Messages
12
Reaction score
1
No entiendo muy bien lo que este código hace?
 
Joined
Oct 29, 2007
Messages
1,267
Reaction score
1,284
No entiendo muy bien lo que este código hace?

Spanish:
Este código sirve para mostrar el texto: "Wizardry Dmg XX% rise" que solo se muestra en Espadas de Gladiador Mágico, que tienen el Power Slash Skill (en Espadas Custom o Agregadas que es lo mismo).

English:
This code is used to display the text: "Wizardry Dmg XX% rise" only shown in Magic Gladiator Class Swords or Blades, who have the Power Slash skill (in Custom Swords or Blades added that is the same).

PS: Sorry for my bad English.
 
Back
Top