re: [Development] Item Smoke Effect
Quote:
Originally Posted by
Fenix Dv
Main 1.04J
#define HDK_SET_ITEM_EFFECT 0x00528864 // 1.04j
#define HDK_SET_COLOR_EFFECT 0x005288BA // 1.04j
#define HDK_ITEM_EFFECT_ALLOW 0x0052887F // 1.04j
#define HDK_ITEM_EFFECT_NOT_ALLOW 0x00528EC6 // 1.04j
#define HDK_NEXT_ITEM_COLOR 0x005288E9 // 1.04j
Good luck...
main 1.05d please
re: [Development] Item Smoke Effect
up main pliz, find main s8 offsets
re: [Development] Item Smoke Effect
re: [Development] Item Smoke Effect
main 1.02.11
1.02k please
re: [Development] Item Smoke Effect
Quote:
Originally Posted by
figaro
Hi, I'm trying to add to main 1.05D (MuEmu S4)
and i think work but the color of effect is always white :( XD
http://i.imgur.com/4lMZXMK.jpg
anyone know why?
Thanks for source code!
EDIT------------------
Wow, already achieve !! hehe :DDDD
http://i.imgur.com/SbZ1ijn.jpg
Thanks you again for sharing Brain
how u edit it to red color
re: [Development] Item Smoke Effect
Quote:
Originally Posted by
brunohkbx
I adapted it to work in 1.02C main.
Feel free to use.
.h
Code:
#ifndef __CUSTOM_H__
#define __CUSTOM_H__
const int ITEM_ID = 0x246;
#define GET_ITEM(x, y) (x * 512 + y) + ITEM_ID
class cCustom
{
public:
void Init();
static __declspec() void SetItensColorEffect();
static __declspec() void AllowItemEffect();
//Set Effects
const int HDK_ALLOW_ITEM_EFFECT = 0x0052F106;
const int HDK_SET_COLOR_EFFECT = 0x0052F162;
const int HDK_ITEM_EFFECT_ALLOW = 0x0052F127;
const int HDK_ITEM_EFFECT_NOT_ALLOW = 0x0052F76D;
const int HDK_NEXT_ITEM_COLOR = 0x0052F191;
private:
const BYTE CustomEffects = 1;
};
extern cCustom gCustom;
#endif
.cpp
Code:
#include "StdAfx.h"
#include "Custom.h"
cCustom gCustom;
void cCustom::Init()
{
if (this->CustomEffects)
{
SetOp(reinterpret_cast<LPVOID>(gCustom.HDK_ALLOW_ITEM_EFFECT), reinterpret_cast<LPVOID>(this->AllowItemEffect), ASM::JMP);
SetNop(0x0052F10B, 28);
SetOp(reinterpret_cast<LPVOID>(gCustom.HDK_SET_COLOR_EFFECT), reinterpret_cast<LPVOID>(this->SetItensColorEffect), ASM::JMP);
SetNop(0x0052F167, 42);
}
}
__declspec(naked) void cCustom::AllowItemEffect()
{
DWORD pItemType;
_asm MOV pItemType, EAX;
switch (pItemType)
{
//Dark Phoenix
case GET_ITEM(11, 17):
{
__asm
{
MOV ESI, gCustom.HDK_ITEM_EFFECT_ALLOW;
JMP ESI;
}
break;
}
//Great Dragon
case GET_ITEM(11, 21):
{
__asm
{
MOV ESI, gCustom.HDK_ITEM_EFFECT_ALLOW;
JMP ESI;
}
break;
}
}
_asm
{
CMP EAX, 0x1863;
JL NOT_ALLOW;
CMP EAX, 0x1867;
JG NOT_ALLOW;
JMP ALLOW;
NOT_ALLOW:
MOV ESI, gCustom.HDK_ITEM_EFFECT_NOT_ALLOW;
JMP ESI;
ALLOW:
MOV ESI, gCustom.HDK_ITEM_EFFECT_ALLOW;
JMP ESI;
}
}
__declspec(naked) void cCustom::SetItensColorEffect()
{
DWORD pItemType;
_asm MOV pItemType, ECX;
switch (pItemType)
{
//Dragon Knight Original
case GET_ITEM(11, 29):
{
__asm
{
MOV EDX, DWORD PTR SS : [EBP + 0xC];
MOV DWORD PTR DS : [EDX + 0x128], 0x3F266666;
MOV EAX, DWORD PTR SS : [EBP + 0xC];
MOV DWORD PTR DS : [EAX + 0x12C], 0x3E99999A;
MOV ECX, DWORD PTR SS : [EBP + 0xC];
MOV DWORD PTR DS : [ECX + 0x130], 0x3DCCCCCD;
}
break;
}
//Dark Phoenix
case GET_ITEM(11, 17):
{
_asm
{
MOV EDX, DWORD PTR SS : [EBP + 0xC];
MOV DWORD PTR DS : [EDX + 0x128], 0x0;
MOV EAX, DWORD PTR SS : [EBP + 0xC];
MOV DWORD PTR DS : [EAX + 0x12C], 0x3F800000;
MOV ECX, DWORD PTR SS : [EBP + 0xC];
MOV DWORD PTR DS : [ECX + 0x130], 0x3F800000;
}
break;
}
//Great Dragon
case GET_ITEM(11, 21):
{
_asm
{
MOV EDX, DWORD PTR SS : [EBP + 0xC];
MOV DWORD PTR DS : [EDX + 0x128], 0x3F800000;
MOV EAX, DWORD PTR SS : [EBP + 0xC];
MOV DWORD PTR DS : [EAX + 0x12C], 0x0;
MOV ECX, DWORD PTR SS : [EBP + 0xC];
MOV DWORD PTR DS : [ECX + 0x130], 0x0;
}
break;
}
}
__asm
{
MOV ESI, gCustom.HDK_NEXT_ITEM_COLOR;
JMP ESI;
}
}
How can i define setop funtion .. i cant find it
re: [Development] Item Smoke Effect
Quote:
Originally Posted by
redf0x
How can i define setop funtion .. i cant find it
Code:
DWORD SetOp(const LPVOID dwEnterFunction, const LPVOID dwJMPAddress, const BYTE cmd)
{
BYTE btBuf[5];
DWORD dwShift = (ULONG_PTR)dwJMPAddress - (ULONG_PTR)dwEnterFunction - 5;
// ----
btBuf[0] = cmd;
memcpy( (LPVOID) & btBuf[1], (LPVOID) & dwShift, sizeof(ULONG_PTR));
// ----
return WriteMemory(dwEnterFunction, (LPVOID) btBuf, sizeof(btBuf));
}
or u using muemu file, you can use
Code:
SetCompleteHook(BYTE,Offset,&Function);
Byte: 0xE9 = jmp
0xE8 = call
re: [Development] Item Smoke Effect
Quote:
Originally Posted by
myheart
Code:
DWORD SetOp(const LPVOID dwEnterFunction, const LPVOID dwJMPAddress, const BYTE cmd)
{
BYTE btBuf[5];
DWORD dwShift = (ULONG_PTR)dwJMPAddress - (ULONG_PTR)dwEnterFunction - 5;
// ----
btBuf[0] = cmd;
memcpy( (LPVOID) & btBuf[1], (LPVOID) & dwShift, sizeof(ULONG_PTR));
// ----
return WriteMemory(dwEnterFunction, (LPVOID) btBuf, sizeof(btBuf));
}
or u using muemu file, you can use
Code:
SetCompleteHook(BYTE,Offset,&Function);
Byte: 0xE9 = jmp
0xE8 = call
Can u share me full source for main 1.02c
But lets me test brunohk source
re: [Development] Item Smoke Effect
I'm trying to use this on 1.03k
Smoke shows fine, but it's always white color, why is the color not changing?
Edit: Working fine now.
http://kundun.cl/mu.gif
re: [Development] Item Smoke Effect
Quote:
Originally Posted by
martinx09
I'm trying to use this on 1.03k
Smoke shows fine, but it's always white color, why is the color not changing?
Edit: Working fine now.
http://kundun.cl/mu.gif
how to change the white effect to another color ?
re: [Development] Item Smoke Effect
Quote:
Originally Posted by
figaro
#pragma once
const int ITEM_ID = 0x333;
#define ITEM_GET(x, y) (x * 512 + y) + ITEM_ID
#define HDK_SET_ITEM_EFFECT 0x004F3200
#define HDK_SET_COLOR_EFFECT 0x004F3265
#define HDK_ITEM_EFFECT_ALLOW 0x004F322A
#define HDK_ITEM_EFFECT_NOT_ALLOW 0x004F38C9
#define HDK_NEXT_ITEM_COLOR 0x004F3293
void AttachNewEffect();
figaro, the offsets are correct 1.05d s4 ?
There is no effect here.
re: [Development] Item Smoke Effect
.H Shit
Code:
#pragma once
// Smoke Effect System (Main 1.03.42 GMO Season 5)
#define oFirstItemCheockOffset 0x005289B7+1
#define oLastItemCheockOffset 0x005289C8+2
#define oDrawItemEffectCall1 0x00404668
#define oDrawItemEffectCall2 0x0047FD32
#define oDrawItemEffectCall3 0x0052AD33
#define oDrawItemEffectCall4 0x0052AD47
#define pDrawItemEffect ((void(__cdecl*)(DWORD ItemStruct,DWORD EffectStruct,DWORD a3)) 0x51EFC8) // Test
typedef struct
{
int Index;
float R;
float G;
float B;
} pSmokeItem, *lpSmokeItem;
class cSmokeEffect
{
public:
cSmokeEffect();
void Init();
void Load();
static void DrawItemEffect(DWORD ItemStruct,DWORD EffectStruct,DWORD a3);
std::vector<pSmokeItem> m_Data;
};
extern cSmokeEffect gSmokeEffect;
.CPP Shit
Code:
#include "StdAfx.h"
cSmokeEffect gSmokeEffect;
cSmokeEffect::cSmokeEffect()
{
this->Init();
}
void cSmokeEffect::Init()
{
this->m_Data.clear();
}
void cSmokeEffect::Load()
{
if(gEncode.ReadScript(CONFIG_BMD_SMOKE))
{
WZSMDToken Token = gEncode.GetToken();
if((Token == END) || (gEncode.GetInt() != 0))
{
MessageBox(NULL,"Falha, a seção 0 precisa ser a primeira.",CONFIG_BMD_SMOKE,MB_OK|MB_ICONERROR);
ExitProcess(0);
}
this->Init();
pSmokeItem Info;
int BootId = -1;
while(true)
{
Token = gEncode.GetToken();
if(Token == END || lstrcmpi(gEncode.GetString(),"end") == 0)
{
break;
}
memset(&Info,NULL,sizeof(Info));
BootId = gEncode.GetInt();
Info.Index = ObjectId(11,BootId);
Token = gEncode.GetToken();
Info.R = gEncode.GetFloat();
Token = gEncode.GetToken();
Info.G = gEncode.GetFloat();
Token = gEncode.GetToken();
Info.B = gEncode.GetFloat();
this->m_Data.push_back(Info);
}
gEncode.Close();
if(this->m_Data.size())
{
// Change Check limit for default boots
gToolKit.SetByte((LPVOID)(oFirstItemCheockOffset),0x47); // Start boot Id from 11,0
gToolKit.SetByte((LPVOID)(oLastItemCheockOffset),0xAA); // Finish boot Id to 11,99
// Hook all the mess
gToolKit.SetOp((LPVOID)oDrawItemEffectCall1,this->DrawItemEffect,ASM::CALL);
gToolKit.SetOp((LPVOID)oDrawItemEffectCall2,this->DrawItemEffect,ASM::CALL);
gToolKit.SetOp((LPVOID)oDrawItemEffectCall3,this->DrawItemEffect,ASM::CALL);
gToolKit.SetOp((LPVOID)oDrawItemEffectCall4,this->DrawItemEffect,ASM::CALL);
}
}
else
{
MessageBox(NULL,CONFIG_BMD_SMOKE,"ERRO",MB_OK|MB_ICONERROR);
ExitProcess(0);
}
}
void cSmokeEffect::DrawItemEffect(DWORD ItemStruct,DWORD EffectStruct,DWORD a3)
{
*(float*)(EffectStruct + 156) = 0.0f; // None
*(float*)(EffectStruct + 160) = 0.0f; // None
*(float*)(EffectStruct + 164) = 0.0f; // None
for(std::vector<pSmokeItem>::iterator it = gSmokeEffect.m_Data.begin();it != gSmokeEffect.m_Data.end();it++)
{
if(*(WORD*)(ItemStruct + 392) == it->Index) // Boots type (11)
{
*(float*)(EffectStruct + 156) = it->R;
*(float*)(EffectStruct + 160) = it->G;
*(float*)(EffectStruct + 164) = it->B;
break;
}
}
pDrawItemEffect(ItemStruct,EffectStruct,a3);
}
Ps. For main 1.03.42 but it can be adjust to other mains
THANKS FOR LEECH IT!
re: [Development] Item Smoke Effect
can anyone share the offsets of s8 muemu?
Re: [Development] Item Smoke Effect
Very nice idea.
now i understand why your nick name is Brain :tongue:
I just suggets to do it when you doing any heal skill
then the charcter got the ligth on all his body wings and boots too :P:
But it is only my suggestion.
Good Luck.
Re: [Development] Item Smoke Effect
https://i.imgur.com/CW1QpDj.jpg
https://i.imgur.com/8fyLbVI.jpg
Error, smookeffect work in select character but not work in after that