[Release] Fix Custom RF Gloves (Season 9)

Results 1 to 14 of 14
  1. #1
    Account Upgraded | Title Enabled! solarismu is offline
    MemberRank
    May 2017 Join Date
    219Posts

    [Release] Fix Custom RF Gloves (Season 9)

    Credits:
    Me
    WZ

    Quote Originally Posted by muonlinegr2 View Post
    @solarismu hello friend share source rf gloves :)
    Note : Custom Gloves Effects are not included in this released. I use a different Custom Effect System in S9, not time to release it now:P
    So, missing visual effect is expected. You may need to code custom effects by yourself. Cheer!

    DllMain Hook
    Code:
        HookThis((DWORD)&VicRFGloves_4, HOOK_RF_GLOVES_4);
        HookThis((DWORD)&VicRFGloves_3, HOOK_RF_GLOVES_3);
        HookThis((DWORD)&VicRFGloves_2, HOOK_RF_GLOVES_2);
        HookThis((DWORD)&VicRFGloves_1, HOOK_RF_GLOVES_1);
    CustomRFWeaponsFix
    Code:
    //-------------------------------------------
    //Fix Added Custom RF Weapons
    //By Vic
    //-------------------------------------------
    
    #define HOOK_RF_GLOVES_1 0x005999CA
    #define JMPBACK_RF_GLOVES_1 0x005999D2
    #define HOOK_RF_GLOVES_2 0x00521C96
    #define JMPBACK_RF_GLOVES_2 0x00521C9C
    #define HOOK_RF_GLOVES_3 0x00586BDA
    #define JMPBACK_RF_GLOVES_3 0x00586BE0
    #define HOOK_RF_GLOVES_4 0x00612D02
    #define JMPBACK_RF_GLOVES_4 0x00612D08
    
    #define CUSTOM_RF_WEAPONS_MAX 4
    #define CUSTOM_RF_WEAPONS_LR_GAP 100
    DWORD VIC_CUSTOM_RF_WEAPONS[CUSTOM_RF_WEAPONS_MAX] = { 46,52,53,56 };
    DWORD VIC_CUSTOM_RF_WEAPONS_R[CUSTOM_RF_WEAPONS_MAX] = { 146,152,153,156 };
    DWORD VIC_CUSTOM_RF_WEAPONS_L[CUSTOM_RF_WEAPONS_MAX] = { 246,252,253,256 };
    
    BOOL VicIsCustomRFWeapons(DWORD idx)
    {
        if (idx > 1272)
            idx -= 1272;
        for (int i = 0; i < CUSTOM_RF_WEAPONS_MAX; i++)
            if (VIC_CUSTOM_RF_WEAPONS[i] == idx)
                return TRUE;
        return FALSE;
    }
    
    BOOL VicIsCustomRFWeapons2(DWORD idx)
    {
        if (idx > 1272)
            idx -= 1272;
        for (int i = 0; i < CUSTOM_RF_WEAPONS_MAX; i++)
            if (VIC_CUSTOM_RF_WEAPONS_L[i] == idx || VIC_CUSTOM_RF_WEAPONS_R[i] == idx)
                return TRUE;
        return FALSE;
    }
    
    DWORD vRFTemp1;
    void __declspec(naked) VicRFGloves_1()
    {
        _asm
        {
            mov eax, [ebp - 0x1C];
            mov vRFTemp1, eax;
        }
        
        if (VicIsCustomRFWeapons(vRFTemp1))
        {
            _asm
            {
                mov edx, 0x005999DE;
                jmp edx;
            }
        }
    
        _asm
        {
            push[ebp - 0x1C];
            mov ecx, 0x012767A0;
            mov edx, JMPBACK_RF_GLOVES_1;
            jmp edx;
        }
    }
    
    void __declspec(naked) VicRFGloves_2(DWORD a1, DWORD mIdx, DWORD slot)
    {
        if (slot == 0 || slot == 1)
        {
            if (VicIsCustomRFWeapons(mIdx))
            {
                mIdx += CUSTOM_RF_WEAPONS_GAP*(slot+1);
            }
        }
            
        _asm
        {
            push slot;
            push mIdx;
            mov edx, JMPBACK_RF_GLOVES_2;
            jmp edx;
        }
    }
    
    DWORD vRFTemp3;
    void __declspec(naked) VicRFGloves_3()
    {
        _asm
        {
            mov vRFTemp3, eax;
        }
        
        if (VicIsCustomRFWeapons(vRFTemp3))
        {
            _asm
            {
                mov edx, 0x00586BEC;
                jmp edx;
            }
        }
        
        _asm
        {
            mov eax, [ebp - 0x00000348];
            movsx eax, word ptr[eax];
            push eax;
            mov ecx, 0x012767A0;
            mov edx, JMPBACK_RF_GLOVES_3;
            jmp edx;
        }
    }
    
    void __declspec(naked) VicRFGloves_4(DWORD a1, DWORD mIdx)
    {
        if (VicIsCustomRFWeapons2(mIdx))
        {
            _asm
            {
                mov edx, 0x00612D19;
                jmp edx; 
            }
        }
        _asm
        {
            push mIdx;
            push a1;
            mov edx, JMPBACK_RF_GLOVES_4;
            jmp edx;
        }
    }
    Remember to add L/R RF Gloves bmd in item.bmd



  2. #2
    Valued Member tangyi90 is offline
    MemberRank
    Oct 2014 Join Date
    128Posts

    re: [Release] Fix Custom RF Gloves (Season 9)

    CUSTOM_RF_WEAPONS_GAP What is this definition?

  3. #3
    Account Upgraded | Title Enabled! solarismu is offline
    MemberRank
    May 2017 Join Date
    219Posts

    re: [Release] Fix Custom RF Gloves (Season 9)

    Quote Originally Posted by tangyi90 View Post
    CUSTOM_RF_WEAPONS_GAP What is this definition?
    CUSTOM_RF_WEAPONS_GAP = 100 = 246 - 146 = 146 - 46 = gap between normal/L/R RF weapon indexes in item.bmd

  4. #4
    Valued Member tangyi90 is offline
    MemberRank
    Oct 2014 Join Date
    128Posts
    LoadItemTexture(GET_ITEM_MODEL ( 0, 41 ),"Custom\\Item\\RFGloves","Sword41",-1);
    LoadItemTexture(0x610,"Custom\\Item\\RFGloves","Sword41L",-1);
    LoadItemTexture(0x611,"Custom\\Item\\RFGloves","Sword41R",-1);

    Why not write L/R to the code? like this


    Written into the item file is very troublesome


    Update....

    No one replies?
    Last edited by allexander; 19-10-18 at 11:44 AM.

  5. #5
    Member Crowley is offline
    MemberRank
    Sep 2015 Join Date
    98Posts

    Re: [Release] Fix Custom RF Gloves (Season 9)

    bow please? ^_^

  6. #6
    Valued Member tangyi90 is offline
    MemberRank
    Oct 2014 Join Date
    128Posts

    Re: [Release] Fix Custom RF Gloves (Season 9)

    Invalid test code

  7. #7
    Account Upgraded | Title Enabled! Lazerhack is offline
    MemberRank
    Feb 2012 Join Date
    311Posts

    Re: [Release] Fix Custom RF Gloves (Season 9)

    Can you explain how to fix custom gloves in 1.04D, i mean zteam files?

  8. #8
    Valued Member tangyi90 is offline
    MemberRank
    Oct 2014 Join Date
    128Posts

    Re: [Release] Fix Custom RF Gloves (Season 9)



    Invalid test code

  9. #9
    Member Crowley is offline
    MemberRank
    Sep 2015 Join Date
    98Posts

    Re: [Release] Fix Custom RF Gloves (Season 9)

    bow please? up

  10. #10
    Apprentice ciren6 is offline
    MemberRank
    Apr 2020 Join Date
    20Posts

    Re: [Release] Fix Custom RF Gloves (Season 9)

    Can you share how to fix the effects, there are no effects for custom Gloves weapons

  11. #11
    C++ Developer zipper20032 is offline
    MemberRank
    Oct 2006 Join Date
    0x198837ADLocation
    665Posts

    Re: [Release] Fix Custom RF Gloves (Season 9)

    Quote Originally Posted by ciren6 View Post
    Can you share how to fix the effects, there are no effects for custom Gloves weapons
    You need the source codes and some C++ knowledge and some ASM knowledge when needed.

  12. #12
    Apprentice ciren6 is offline
    MemberRank
    Apr 2020 Join Date
    20Posts

    Re: [Release] Fix Custom RF Gloves (Season 9)

    Quote Originally Posted by zipper20032 View Post
    You need the source codes and some C++ knowledge and some ASM knowledge when needed.
    Yes, his code works well, I know how to use it, is there any code to fix the gloves texture effects?

  13. #13
    C++ Developer zipper20032 is offline
    MemberRank
    Oct 2006 Join Date
    0x198837ADLocation
    665Posts

    Re: [Release] Fix Custom RF Gloves (Season 9)

    I'm not sure what are you looking for but you are looking at the source code to fix Custom RF Gloves effect.
    I don't know what client files are you using, but if your client is supporting CustomEffect configs, then you should try to use it.

    Effects are .OZJ files usually in Mu. Don't get confused by the Item Model with texture (.bmd) and Effect (.ozj). An effect is applied on the model usually because it needs the BMD's bones to apply correctly the effect. If you have a complex item with 40 bones, each bone should have an effect defined with effect values, effect sizes, RGB colors or otherwise it will show the effect only on those bones you defined or not at all. (Usually, if you client supports CustomEffect config files, then you should start working on there).

    Anyway, KarLi posted this in 2016. Hope it helps.

    https://youtu.be/J6okf38dkPE
    http://forum.ragezone.com/f197/libra...items-1112341/
    http://forum.ragezone.com/f508/item-...effect-868154/
    http://forum.ragezone.com/f508/addin...-easy-1010221/
    http://forum.ragezone.com/f508/effects-items-939169/
    https://forum.ragezone.com/f196/guid...t-kit-1018057/

    If the source code from above you are saying it's working, then you are looking for something else.

  14. #14
    Apprentice ciren6 is offline
    MemberRank
    Apr 2020 Join Date
    20Posts

    Re: [Release] Fix Custom RF Gloves (Season 9)

    Quote Originally Posted by zipper20032 View Post
    I'm not sure what are you looking for but you are looking at the source code to fix Custom RF Gloves effect.
    I don't know what client files are you using, but if your client is supporting CustomEffect configs, then you should try to use it.

    Effects are .OZJ files usually in Mu. Don't get confused by the Item Model with texture (.bmd) and Effect (.ozj). An effect is applied on the model usually because it needs the BMD's bones to apply correctly the effect. If you have a complex item with 40 bones, each bone should have an effect defined with effect values, effect sizes, RGB colors or otherwise it will show the effect only on those bones you defined or not at all. (Usually, if you client supports CustomEffect config files, then you should start working on there).

    Anyway, KarLi posted this in 2016. Hope it helps.

    https://youtu.be/J6okf38dkPE
    http://forum.ragezone.com/f197/libra...items-1112341/
    http://forum.ragezone.com/f508/item-...effect-868154/
    http://forum.ragezone.com/f508/addin...-easy-1010221/
    http://forum.ragezone.com/f508/effects-items-939169/
    https://forum.ragezone.com/f196/guid...t-kit-1018057/

    If the source code from above you are saying it's working, then you are looking for something else.
    Thank you for these tutorials, I want to fix the effect of custom RF gloves, and I am learning how to make effects. These tutorials may help me



Advertisement