Limit items main.exe 1.03.25 JPN

Results 1 to 7 of 7
  1. #1
    O_o psychedelic is offline
    MemberRank
    Nov 2013 Join Date
    LatviaLocation
    270Posts

    Limit items main.exe 1.03.25 JPN

    Hey. I try to remove item limits in main with this code, and it not works=\ (offsets 100% for 1.03Y)
    Code:
    extern "C" _declspec(dllexport) void Items(){
        
        DWORD OldProtect;
        if(VirtualProtect(LPVOID(0x401000),4310016,PAGE_EXECUTE_READWRITE,&OldProtect))
        {
            // Items
            *(BYTE*)(0x005F43A4+3)        = 0x7F; // Helms
            *(BYTE*)(0x005F43EE+3)        = 0x7F; // Armor, Pants, Glowes, Boots
            *(BYTE*)(0x005F58F5+3)        = 0x7F; // Swords
            *(BYTE*)(0x005F59C8+3)        = 0x7F; // Axes
            *(BYTE*)(0x005F5A05+3)        = 0x7F; // Maces 1
            *(BYTE*)(0x005F5A5B+3)        = 0x7F; // Maces 2
            *(BYTE*)(0x005F5AB1+3)        = 0x7F; // Spears
            *(BYTE*)(0x005F5B07+3)        = 0x7F; // Shields
            *(BYTE*)(0x005F5B76+3)        = 0x7F; // Staffs
            *(BYTE*)(0x005F5BFE+3)        = 0x7F; // Sticks
            *(BYTE*)(0x005F5C3B+3)        = 0x7F; // Bow
            *(BYTE*)(0x005F5C78+3)        = 0x7F; // Crossbow
    
    
            // Textures
            *(BYTE*)(0x005F57D6+3)        = 0x7F; // Helms
            *(BYTE*)(0x005F5821+3)        = 0x7F; // Armor, Pants, Glowes, Boots
            *(BYTE*)(0x005F820E+3)        = 0x7F; // Swords
            *(BYTE*)(0x005F83AC+3)        = 0x7F; // Axes
            *(BYTE*)(0x005F83E9+3)        = 0x7F; // Maces
            *(BYTE*)(0x005F8426+3)        = 0x7F; // Maces 2
            *(BYTE*)(0x005F8462+3)        = 0x7F; // Spears
            *(BYTE*)(0x005F84BD+3)        = 0x7F; // Shields
            *(BYTE*)(0x005F84FA+3)        = 0x7F; // Staffs
            *(BYTE*)(0x005F8626+3)        = 0x7F; // Sticks
            *(BYTE*)(0x005F878F+3)        = 0x7F; // Bow
            *(BYTE*)(0x005F87CC+3)        = 0x7F; // Crossbow
        }
    }
    Then i found Nemesis GE 1.4.0.0 source, and there i fount another code to remove limits, but i cant research all offsets..

    .cpp
    Code:
    void InitModel(int ItemID, char* ModelName, char* Folder, char* Form)
    {
        _asm
        {
            PUSH -1
            PUSH ModelName                       
            PUSH Form
            PUSH ItemID
            mov eax,BMDModelLoad 
            CALL eax  
    
    
            PUSH 1
            PUSH 0x2600
            PUSH 0x2901
            PUSH Folder
            PUSH ItemID
            mov eax,OpenTexture
            CALL eax
        }
    }
    
    
    void InitSets(int ItemID, char* ModelName, char* Folder, char* Form)
    {
        _asm
        {
            PUSH -1
            PUSH ModelName                       
            PUSH Form
            PUSH ItemID
            mov eax,BMDModelLoad 
            CALL eax  
    
    
            PUSH 1
            PUSH 0x2600
            PUSH 0x2901
            PUSH Folder
            PUSH ItemID
            mov eax,OpenTexture
            CALL eax
        }
    }
    
    
    __declspec(naked) void PatchNewModel()
    {
        for (i = 5; i <    512; i++)
        {
            if(i > 28 && i < 31 || i > 35 && i < 256)//swords
            {
                sprintf_s(Item, "Sword%d", i+1);
                InitModel(LOAD_ITEM(0, i), Item, ItemFolder, ItemDir);      
            }
            if(i > 8)//axes
            {
                sprintf_s(Item, "Axe%d", i+1);
                InitModel(LOAD_ITEM(1, i), Item, ItemFolder, ItemDir);
            }
            if(i > 18)//maces
            {
                sprintf_s(Item, "Mace%d", i+1);
                InitModel(LOAD_ITEM(2, i), Item, ItemFolder, ItemDir);
            }
            if(i > 11)//spears
            {
                sprintf_s(Item, "Spear%d", i+1);
                InitModel(LOAD_ITEM(3, i), Item, ItemFolder, ItemDir);
            }
            if(i > 24 && i < 210)//bow
            {
                sprintf_s(Item, "Bow%d", i+1);
                InitModel(LOAD_ITEM(4, i), Item, ItemFolder, ItemDir);
            }
            if(i > 209 && i < 511)//crossbow
            {
                sprintf_s(Item, "Crossbow%d", i+1);
                InitModel(LOAD_ITEM(4, i), Item, ItemFolder, ItemDir);
            }
            if(i > 36)//staff
            {
                sprintf_s(Item, "Staff%d", i+1);
                InitModel(LOAD_ITEM(5, i), Item, ItemFolder, ItemDir);
            }
            if(i > 21)//shield
            {
                sprintf_s(Item, "Shield%d", i+1);
                InitModel(LOAD_ITEM(6, i), Item, ItemFolder, ItemDir);
            }
            if(i > 199 && i < 255)//jewels (extend custom jewels load models)
            {
                sprintf_s(Item, "Jewel%d", i+1);
                InitModel(LOAD_ITEM(14, i), Item, ItemFolder, ItemDir);
            }
            if(i > 199 && i < 255)//wings (fix mini wings)
            {
                sprintf_s(Item, "Wing%d", i+1);
                InitModel(LOAD_ITEM(12, i), Item, ItemFolder, ItemDir);
            }
        }
        _asm
        {
            PUSH -1
            PUSH 0x00D2F7C4
            PUSH 0x00D2F7CC
            PUSH 0x20B2
            mov eax,BMDModelLoad
            CALL eax
            ADD ESP,0x10
            mov eax,ReturnOffset
            JMP eax
        }
    }
    
    
    __declspec(naked) void PatchNewSets()
    {
        for (i = 5; i < 512; i++)
        {
            if(i > 73)//helms
            {
                sprintf_s(Sets, "HelmMale%d", i+1);
                InitSets(LOAD_ITEM(7, i), Sets, PlayerFolder, PlayerDir);
            }
            if(i > 73)//armors
            {
                sprintf_s(Sets, "ArmorMale%d", i+1);
                InitSets(LOAD_ITEM(8, i), Sets, PlayerFolder, PlayerDir);
            }
            if(i > 72)//pants (fix Phoenix soul pants)
            {
                sprintf_s(Sets, "PantMale%d", i+1);
                InitSets(LOAD_ITEM(9, i), Sets, PlayerFolder, PlayerDir);
            }
            if(i > 73)//gloves
            {
                sprintf_s(Sets, "GloveMale%d", i+1);
                InitSets(LOAD_ITEM(10, i), Sets, PlayerFolder, PlayerDir);
            }
            if(i > 73)//boots
            {
                sprintf_s(Sets, "BootMale%d", i+1);
                InitSets(LOAD_ITEM(11, i), Sets, PlayerFolder, PlayerDir);
            }
        }
        _asm
        {
            PUSH -1
            PUSH 0x00D2D790
            PUSH 0x00D2D79C
            PUSH 0x14DC
            mov eax,BMDModelLoad
            CALL eax
            ADD ESP,0x10
            mov eax,ReturnSetOffset
            JMP eax
        }
    }
    
    
    void InitItems()
    {
        //Patch new model in game
        PatchJMP g_ModelPatch;
        ToolKit.SetNop(LoadModel, 25);
        g_ModelPatch.Command = 0xE9;
        g_ModelPatch.Pointer = (DWORD)&PatchNewModel;
        memcpy((int*)LoadModel, &g_ModelPatch, sizeof(g_ModelPatch));
        ToolKit.HookThis((DWORD)&PatchNewModel, LoadModel);
    }
    
    
    void InitSets()
    {    
        //Patch new sets in game
        PatchJMP g_SetsPatch;
        ToolKit.SetNop(LoadSetModel, 25);
        g_SetsPatch.Command    = 0xE9;
        g_SetsPatch.Pointer    = (DWORD)&PatchNewSets;
        memcpy((int*)LoadSetModel, &g_SetsPatch, sizeof(g_SetsPatch));
        ToolKit.HookThis((DWORD)&PatchNewSets, LoadSetModel);
    }
    .h
    Code:
    char *ItemDir       = "Data\\Item\\";
    char *ItemFolder   = "Item\\";
    char *PlayerDir       = "Data\\Player\\";
    char *PlayerFolder = "Player\\";
    char Item[15];
    char Sets[30];
    int i;
    
    
    
    // 1.04D GMO
    #define LoadModel    0x006194DD //1.03Y -> 0x005F34C3
    #define OpenTexture    0x00614710 //1.03Y -> 0x005F2E10
    #define LoadSetModel    0x00615DB4 //1.03Y -> ??
    #define BMDModelLoad    0x00614D10 //1.03Y -> 0x005F34C3
    #define ReturnOffset    0x006194F6 //1.03Y -> 0x005F6CCD
    #define ReturnSetOffset    0x00615DE6 //1.03Y -> ??
    
    
    #define ItemAdder 1171
    #define ITEM(x, y) ((x * 512) + y)
    #define ITEM2(x, y) ((x * 512) + y + ItemAdder)
    #define LOAD_ITEM(x, y) ((x) * 512 + (y) + ItemAdder)
    void InitModel(int ItemID, char* ModelName, char* Folder, char* Form);
    void InitSets(int ItemID, char* ModelName, char* Folder, char* Form);
    void PatchNewModel();
    void PatchNewSets();
    void InitItems();
    void InitSets();
    So i need some help with research this offsets fon Nemesis code.


  2. #2
    O_o psychedelic is offline
    MemberRank
    Nov 2013 Join Date
    LatviaLocation
    270Posts

    Re: Limit items main.exe 1.03.25 JPN

    up..
    please some help with remove item & textures limit =\

    P.S. in Hybrid guide images dead=\

  3. #3

    Re: Limit items main.exe 1.03.25 JPN

    Give me your main.exe i could try something later on.
    Peace

  4. #4
    O_o psychedelic is offline
    MemberRank
    Nov 2013 Join Date
    LatviaLocation
    270Posts

    Re: Limit items main.exe 1.03.25 JPN

    Quote Originally Posted by KarLi View Post
    Give me your main.exe i could try something later on.
    Peace
    https://mega.co.nz/#!kFlwGZiY!Wx0RD3...TCSt8QpXBydDbc

    Thanks=)

  5. #5

    Re: Limit items main.exe 1.03.25 JPN


  6. #6
    O_o psychedelic is offline
    MemberRank
    Nov 2013 Join Date
    LatviaLocation
    270Posts

    Re: Limit items main.exe 1.03.25 JPN

    still not work=\
    http://prntscr.com/3zllae

  7. #7

    Re: Limit items main.exe 1.03.25 JPN

    Sounds weird , because the problem is not the limit , its something with the texture i guess .



Advertisement