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

Results 1 to 6 of 6
  1. #1
    Darkness Member Kiosani is offline
    True MemberRank
    Oct 2007 Join Date
    ArgentinaLocation
    1,260Posts

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

    Simple way to hook 'Wizardry Dmg %d rise' Option to Show on Added Swords
    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:







    .cpp file

    Code:
    WORD wItem = 0;
    DWORD ReturnOffset = 0x0059685C;
    DWORD AllowTextOffset = 0x00596866;
    
    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 !



  2. #2
    Account Upgraded | Title Enabled! walter29 is offline
    True MemberRank
    Dec 2007 Join Date
    309Posts

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

    .h file not need to put anything in it not?

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

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

    Quote Originally Posted by walter29 View Post
    .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

  4. #4
    Hardcore Member DevScript is offline
    MemberRank
    Jan 2013 Join Date
    116Posts

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

    +1 Your the best Sir @mauro07

  5. #5
    Registered Weell is offline
    MemberRank
    May 2012 Join Date
    12Posts

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

    No entiendo muy bien lo que este código hace?

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

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

    Quote Originally Posted by Weell View Post
    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.



Advertisement