Well, I made 1 form of hooking main.exe glColor3f proc's call for create Unique colors on Items Name text on the Map Floor, this can be used for make new Items states on client side (like excellent, divine, socket, ancient, etc)... well I like share with Rz Comunity.
all offsets are for 1.03.15 eng main.exe
Item.cpp:
Code:#include "Stdafx.h" #include "Utils.h" #include "Item.h" void __declspec(naked) gObjItemNameColor3f() { _asm { CMP EAX,ITEM2(12, 60) //Seed (Fire) JL Exit CMP EAX,ITEM2(12, 65) //Seed (Earth) JLE Set_Socket CMP EAX,ITEM2(12, 70) //Sphere (Mono) JL Exit CMP EAX,ITEM2(12, 74) //Sphere (Penta) JLE Set_Socket CMP EAX,ITEM2(12, 100) //Seed Sphere (Fire) [Level: 1] JL Exit CMP EAX,ITEM2(12, 129) //Seed Sphere (Earth) [Level: 5] JLE Set_Socket // --- CMP EAX,ITEM2(14, 170) //Crystal Feather (this is added by me, but you can put any item of: 12, 13 and 14 types) JE Set_Add_New Set_Socket: PUSH 0x3F800000 PUSH 0x3ECCCCCD PUSH 0x3F333333 CALL DWORD PTR DS:[0x88D3C0] // CALL DWORD PTR DS:[<&OPENGL32.glColor3f>] MOV EAX,DWORD PTR DS:[ESI+0x30] SUB EAX,0x341 LEA ECX,[EAX*0x8] SUB ECX,EAX LEA EDX,[ECX+ECX*0x2] MOV ItemColorNameFloor_Buff, 0x0059D4AD JMP ItemColorNameFloor_Buff Set_Add_New: PUSH 0x3F308312 //Blue PUSH 0x3F1E147B //Green PUSH 0x3F733333 //Red CALL DWORD PTR DS:[0x88D3C0] // CALL DWORD PTR DS:[<&OPENGL32.glColor3f>] MOV EAX,DWORD PTR DS:[ESI+0x30] SUB EAX,0x341 LEA ECX,[EAX*0x8] SUB ECX,EAX LEA EDX,[ECX+ECX*0x2] MOV ItemColorNameFloor_Buff, 0x0059D4AD JMP ItemColorNameFloor_Buff Exit: MOV ItemColorNameFloor_Buff, 0x0059D4DE //return case of switch JMP ItemColorNameFloor_Buff } } void cItemNameColor3f() { Utils.SetRange((LPVOID)0x0059D45D, 29, ASM::NOP); Utils.SetJmp((LPVOID)0x0059D45D, gObjItemNameColor3f); } BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved) { switch(dwReason) { case DLL_PROCESS_ATTACH: { cItemNameColor3f(); } break; case DLL_PROCESS_DETACH: { } break; } return true; }Screenshots of my tests with this:
Complete Source Code Download:
http://www.mediafire.com/download/gm...989v0/Item.rar
Credits:
Webzen (for create main.exe xD)
SmallHabit (for teach me a good form to re-write asm parts of code of main.exe)
-=DarkSim=- (for teach me a good form to make hooks in some important functions)
Brain (for his Item Smoke Effect info about convertion FLOAT -> 16-decimal number)
mauro07 (for research in main.exe the function and correctly re-write in asm)







Reply With Quote

(asm re-write main.exe code is more easy, that decompile with ida and re-construct code xD for me).

(for 1.03.15 eng)

