- Joined
- Oct 29, 2007
- Messages
- 1,290
- Reaction score
- 1,311
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:
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 [B][COLOR=#ff8c00](this is added by me, but you can put any item of: 12, 13 and 14 types)[/COLOR][/B]
JE Set_Add_New
Set_Socket:
PUSH 0x[COLOR=#3366ff]3F800000[/COLOR]
PUSH 0x[COLOR=#00cc00]3ECCCCCD[/COLOR]
PUSH 0x[COLOR=#ff0000]3F333333[/COLOR]
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:
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)
Complete Source Code Download:
You must be registered to see links
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)
Attachments
You must be registered for see attachments list
Last edited: