Patch 104D GMO - with customs itens

4FUNer,

I dont know why appears this message for you... For me doesnt appear it... :(
I use OllyDbg v.1.10

===================================
ScriptKid,

Sorry.... Edit the itemtooltip.bmd is a hard work... I only sell my job... Not share this...
 
So if i want, that all thees items are added, i need to add them by myself in main.exe?
 
hey chris , this will be work at season 6 ep 3 ? or anyone can give me the files of custom jewel's at season 6 ep 3 please :D ty !
 
edelis,

Yes... If you client has the file ItemToolTip.bmd, you need add all items customs...
============================
Sinkaw140,

These patch work in Season 6 Ep3. But you can add the items in other version (remember: some versions have different item.bmd).
============================
 
@chris05 just a question. i don't understand the guide for ollydbg. maybe you can atleast give us a main that is compatible with these files
 
Last edited:
hmm @chris05, i have downloaded the files you have uploaded. but its not apearing on my server, maybe you can release an edited main.exe for the custom items. that would be appreciated a lot
 
Here my source code for load new items with offsets for: 1.04.03 English Protocol.

Code:
[url=http://www.4shared.com/rar/JEljs79D/Items_104c_SOURCE.html?]Items 1.04c SOURCE.rar - 4shared.com - обмен, хранение, загрузка файлов - Nemesis Nemesis[/url]

Good Luck! and Good Bye!
 
Source can be modified easily. (Take the older source)
Since i dont really have time these days to work with it, here u go the 1.04D offsets to load jewels.
Code:
#define OpenTexture  0x00614710
#define BMDModelLoad 0x00614D10
#define ReturnOffset 0x006194F6
#define LoadModel    0x006194DD
#define JewelTry     0x00838755
#define JewelFalse   0x008382C1
#define PathJewels   0x00838250
The rest u can figure out.
 
what is wrong on This, I think i have corrects offsets but main close

Items.cpp
#include "StdAfx.h"
#include "Items.h"
#include "ItemDir.h"
#include "Utils.h"

int UseMaxWeapons = GetPrivateProfileIntA("Items","UseMaxWeapons",0,"./Items.ini");
int UseMaxSets = GetPrivateProfileIntA("Items","UseMaxSets",0,"./Items.ini");
int GlowMod = GetPrivateProfileIntA("Items","UseGlowMod",0,"./Items.ini");

extern "C" _declspec(dllexport) void Items()
{
DWORD OldProtect;

if (VirtualProtect(LPVOID(0x401000), 0x0087751F, PAGE_EXECUTE_READWRITE, &OldProtect))
{
InitItems();
}
else
{
MessageBoxA(NULL, "Cannot load Items.dll", "Error", MB_OK);
ExitProcess(0);
}
}

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()
{
if(UseMaxWeapons == 1)
{
for (i = 5; i < 512; i++)
{
if(i > 35)//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);
}
}
_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()
{
if(UseMaxSets == 1)
{
for (i = 5; i < 512; i++)
{
if(i > 74)//helms
{
sprintf_s(Sets, "HelmMale%d", i+1);
InitSets(LOAD_ITEM(7, i), Sets, PlayerFolder, PlayerDir);
}
if(i > 74)//armors
{
sprintf_s(Sets, "ArmorMale%d", i+1);
InitSets(LOAD_ITEM(8, i), Sets, PlayerFolder, PlayerDir);
}
if(i > 74)//pants
{
sprintf_s(Sets, "PantMale%d", i+1);
InitSets(LOAD_ITEM(9, i), Sets, PlayerFolder, PlayerDir);
}
if(i > 74)//gloves
{
sprintf_s(Sets, "GloveMale%d", i+1);
InitSets(LOAD_ITEM(10, i), Sets, PlayerFolder, PlayerDir);
}
if(i > 74)//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()
{
if(GlowMod == 1)
{
LoadLibraryA(".\\Glow.dll");
}
//Patch new model in game
PatchJMP g_ModelPatch;
SetNop(LoadModel, 25);

g_ModelPatch.Command = 0xE9;
g_ModelPatch.Pointer = (DWORD)&PatchNewModel;

memcpy((int*)LoadModel, &g_ModelPatch, sizeof(g_ModelPatch));
HookThis((DWORD)&PatchNewModel, LoadModel);

//Patch new sets in game
PatchJMP g_SetsPatch;
SetNop(LoadSetModel, 25);

g_SetsPatch.Command = 0xE9;
g_SetsPatch.Pointer = (DWORD)&PatchNewSets;

memcpy((int*)LoadSetModel, &g_SetsPatch, sizeof(g_SetsPatch));
HookThis((DWORD)&PatchNewSets, LoadSetModel);
}

Items.h
#pragma once

#include "Windows.h"

//1.04D (GMO) Offsets
#define LoadModel 0x006194DD //
#define LoadSetModel 0x00615DB4 //
#define BMDModelLoad 0x00614D10 //
#define ReturnOffset 0x006194F6 //
#define ReturnSetOffset 0x00615DCD //
#define OpenTexture 0x00614710 //

struct PatchJMP
{
BYTE Command;
DWORD Pointer;
};

#define ItemAdder 1171
#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();
 
Back