[Development] Item Smoke Effect

Perfect, it was great to, thank Brain, really optimal source.
Too bad it's not for a dark purpose as "Black."

Thanks aecrimch the main 1.03B + ENG

Brain - [Development] Item Smoke Effect - RaGEZONE Forums

Brain - [Development] Item Smoke Effect - RaGEZONE Forums

Brain - [Development] Item Smoke Effect - RaGEZONE Forums
 

Attachments

  • [09-19] 15Hrs e 32Min-0000 - [Development] Item Smoke Effect - RaGEZONE Forums
    [09-19] 15Hrs e 32Min-0000.webp
    100.2 KB · Views: 730
  • [09-19] 17Hrs e 36Min-0000 - [Development] Item Smoke Effect - RaGEZONE Forums
    [09-19] 17Hrs e 36Min-0000.webp
    74.5 KB · Views: 663
  • [09-19] 17Hrs e 37Min-0001 - [Development] Item Smoke Effect - RaGEZONE Forums
    [09-19] 17Hrs e 37Min-0001.webp
    77.5 KB · Views: 672
Last edited:
@
mauro07 Have source Main 1.03k?​

Here my version of this src but with some modification's made by me, for optimize the code...

SetItemEffect.cpp:
Code:
#include "Stdafx.h"
#include "SetItemEffect.h"
#include "Utils.h"

#define ITEM_INTER 834
#define GET_ITEM(x,y) (x * 512 + y) + ITEM_INTER

void __declspec(naked) SetItemEffect()
{
    _asm
    {
        MOV pItemType, ECX
    }
    if (pItemType == GET_ITEM(11, 52))    //Hades Boots Allow Effect
    {
        _asm
        {
            MOV ESI, HDK_ITEM_EFFECT_ALLOW
            JMP ESI
        }
    }
    _asm
    {
        MOV ESI, HDK_ITEM_EFFECT_NOT_ALLOW 
        JMP ESI
    }
}


void __declspec(naked) SetColorEffect()
{
    _asm
    {
        MOV pItemType, ECX
    }
    if (pItemType == GET_ITEM(11, 52))    //Hades Boots Set Color Effect ([COLOR=#0000cd]Blue[/COLOR])
    {
        _asm
        {
            MOV EDX, DWORD PTR SS:[EBP+0xC]
            MOV DWORD PTR DS:[EDX+0x9C],0    //[COLOR=#ff0000]Red Color Value[/COLOR]
            MOV EAX, DWORD PTR SS:[EBP+0xC]
            MOV DWORD PTR DS:[EAX+0xA0],0    //[COLOR=#008000]Green Color Value[/COLOR]
            MOV ECX, DWORD PTR SS:[EBP+0xC]
            MOV DWORD PTR DS:[ECX+0xA4],0x3F000000    //[COLOR=#0000ff]Blue Color Value[/COLOR]
        }
    }
    _asm
    {
        MOV ESI, HDK_NEXT_ITEM_COLOR
        JMP ESI
    }
}

void InitSmokeEffect()
{
    SetNop(HDK_SET_ITEM_EFFECT, 12);
    WriteJmp(HDK_SET_ITEM_EFFECT, (DWORD)&SetItemEffect);


    SetNop(HDK_SET_COLOR_EFFECT, 46);
    WriteJmp(HDK_SET_COLOR_EFFECT, (DWORD)&SetColorEffect);
}

SetItemEffect.h:
Code:
#define HDK_SET_ITEM_EFFECT        0x004F9F76
#define HDK_SET_COLOR_EFFECT        0x004F9FDA
#define HDK_ITEM_EFFECT_ALLOW        0x004F9F9F
#define HDK_ITEM_EFFECT_NOT_ALLOW    0x004FA63E
#define HDK_NEXT_ITEM_COLOR        0x004FA013

void SetItemEffect();
void SetColorEffect();

void InitSmokeEffect();
 
Last edited:
@mauro07 thx
Screen(04_26-22_45)-0000 - [Development] Item Smoke Effect - RaGEZONE Forums
and add the effect on more than one item?
PS:effects already achieved success with the new wings?
-Edit
SetItemEffect
if (pItemType == GET_ITEM(11, 150) //Dragon Black
||pItemType == GET_ITEM(11, 1)) //Dragon[Original]

SetColorEffect

if (pItemType == GET_ITEM(11, 150))
{
_asm
{
MOV EDX, DWORD PTR SS:[EBP+0xC]
MOV DWORD PTR DS:[EDX+0x9C],0x3F000000 //Red Color Value
MOV EAX, DWORD PTR SS:[EBP+0xC]
MOV DWORD PTR DS:[EAX+0xA0],0x3F000000 //Green Color Value
MOV ECX, DWORD PTR SS:[EBP+0xC]
MOV DWORD PTR DS:[ECX+0xA4],0x3F000000 //Blue Color Value
}
}
if (pItemType == GET_ITEM(11, 1))
{
_asm
{
MOV EDX, DWORD PTR SS:[EBP+0xC]
MOV DWORD PTR DS:[EDX+0x9C],0x3F800000 //Red Color Value
MOV EAX, DWORD PTR SS:[EBP+0xC]
MOV DWORD PTR DS:[EAX+0xA0],0 //Green Color Value
MOV ECX, DWORD PTR SS:[EBP+0xC]
MOV DWORD PTR DS:[ECX+0xA4],0 //Blue Color Value
}
}

Screen(04_26-23_49)-0000 - [Development] Item Smoke Effect - RaGEZONE Forums Screen(04_26-23_50)-0001 - [Development] Item Smoke Effect - RaGEZONE Forums
 
Last edited:
effects 1.02c, I base this function makes the other a little time ... (sorry my english is bad)

.h
Code:
#include "stdafx.h"

//struct
struct _effect
{
	int  Boots;
	float R;
	float G;
	float B;
};

//extern
extern _effect e[255];

//função refeita
__declspec() void DTset_effect();

//arquivo de leitura
void _loadfile_effect(char* filename);

.cpp
Code:
#include "stdafx.h"

//variavel global
int variavelE;

//struct
_effect e[255];

//variaveis
int pItemID_boots = 0;
float R       = 0.0f;
float G       = 0.0f;
float B       = 0.0f;

void _loadfile_effect(char* filename)
{
	Tokenizer          token;
	TokenizerGroup     group;
	TokenizerSection   section;

	token.ParseFile(std::string(filename), group);

	if(group.GetSection(0, section))
	{
		for(int i = 0; i < section.RowCount; i++)
		{
			e[variavelE].Boots         = section.Rows[i].GetInt(0);
			e[variavelE].R             = section.Rows[i].GetFloat(1);
			e[variavelE].G             = section.Rows[i].GetFloat(2);
			e[variavelE].B             = section.Rows[i].GetFloat(3);
			variavelE++;
		}
	}
}

//função refeita
__declspec(naked) void DTset_effect()
{
	__asm
	{
		// set:: boots
        MOV EAX,DWORD PTR SS:[EBP+8]
		MOVSX ECX,WORD PTR DS:[EAX+0x2D8]
		MOV pItemID_boots, ECX
	}

	for(int i = 0; i < variavelE; i++)
	{
        if(pItemID_boots == ITEM_GET(11, e[i].Boots))
		{
		    R = e[i].R;
		    G = e[i].G;
		    B = e[i].B;
	        _asm
	       {
		   // R
           MOV ECX,DWORD PTR SS:[EBP+0xC] // struct RGB
	       MOV EDX, R
           MOV DWORD PTR DS:[ECX+0x128],EDX // float =D
		   // G
           MOV EDX,DWORD PTR SS:[EBP+0xC]  // struct RGB
	       MOV EAX, G
           MOV DWORD PTR DS:[EDX+0x12C],EAX // float =D
		   // B
           MOV EAX,DWORD PTR SS:[EBP+0xC]  // struct RGB
	       MOV ECX, B
           MOV DWORD PTR DS:[EAX+0x130],ECX
	       MOV ESI, 0x0052F273
	       JMP ESI
	       }
		}
	}

    _asm
    {
	    MOV EDI, 0x0052F76D
		JMP EDI
	}
}

.cpp hook
Code:
	 //effect item
	 //leitura do arquivo
	 //_loadfile_effect(".\\DTserver\\scripts\\effects.dat");
	 //retira a verificação dos items
	 //*(BYTE*)(0x0052F0FC)    = 0xEB;
	 //*(BYTE*)(0x0052F0FC+1)  = 0x29;
	 //WriteMemoryNop(0x0052F0FE, 41);
	 //da hook do sistema
	 //HookProc(0x0052F158,                (DWORD)(&DTset_effect));
	 //WriteMemoryNop(0x0052F158+5, 278);

base .dat

Code:
0

      11   0.000008f    0.1888877f   1.8555555f
      //add others items and float colors
end
 
Last edited:
@pobrinho
Have off set to Main 1.03k for source Jewel Info + Edition Spcial ?


__declspec(naked) void item_information(){ _asm { MOV DX, WORD PTR SS:[EBP] MOV joia_ID, EDX } if(joia_ID == ITEMGET(14,16)) { color = 0; text = 0; jewel_infor = (char*)0x07811AC0; } else if(joia_ID == ITEMGET(14,100)) { color = 0; text = 0; jewel_infor = "upa seu item para + 14"; } else if(joia_ID == ITEMGET(14,101)) { color = 0; text = 0; jewel_infor = "upa seu item para + 15"; } else if(joia_ID == ITEMGET(14,102)) { color = 0; text = 0; jewel_infor = "reseta seu personagem, clicar com botão direito"; } else if(joia_ID == ITEMGET(14,103)) { color = 0; text = 0; jewel_infor = "limpa seu pk, clicar com botão direito"; } else if(joia_ID >= ITEMGET(0,27) && joia_ID <= ITEMGET(0,28) ||//swords joia_ID >= ITEMGET(2,16) && joia_ID <= ITEMGET(2,17) ||//scepters joia_ID == ITEMGET(3,11) ||//spears joia_ID >= ITEMGET(4,23) && joia_ID <= ITEMGET(4,24) ||//bows joia_ID >= ITEMGET(5,30) && joia_ID <= ITEMGET(5,32) ||//staffs joia_ID >= ITEMGET(6,17) && joia_ID <= ITEMGET(6,20) ||//shields joia_ID >= ITEMGET(7,45) && joia_ID <= ITEMGET(7,52) ||//helms joia_ID >= ITEMGET(8,45) && joia_ID <= ITEMGET(8,52) ||//armors joia_ID >= ITEMGET(9,45) && joia_ID <= ITEMGET(9,52) ||//pants joia_ID >= ITEMGET(10,45)&& joia_ID <= ITEMGET(10,52)||//gloves joia_ID >= ITEMGET(11,45)&& joia_ID <= ITEMGET(11,52)) //boots { jewel_infor = "item especial primeira edição"; color = 7; text = 1; } else { _asm { MOV EDI, 0x00619171 JMP EDI } } _asm { LEA EAX,DWORD PTR DS:[EAX+EAX*4] PUSH jewel_infor LEA EDX,DWORD PTR DS:[EAX+EAX*4] LEA EAX,DWORD PTR DS:[EDX*4+0x79F4F00] PUSH EAX CALL CALL_INFOR MOV EAX,DWORD PTR DS:[0x7A27BF8] ADD ESP,8 MOV ESI, color MOV DWORD PTR DS:[EAX*4+0x79F609C],ESI MOV EDI, text MOV DWORD PTR DS:[EAX*4+0x7A25098],EDI INC EAX MOV DWORD PTR DS:[0x7A27BF8],EAX MOV EDI, 0x00619171 JMP EDI CALL_INFOR: MOV EDI, 0x00791B10 JMP EDI }}
 
not made ​​for this version, I posted a code for 1.02s jpn, you can only use as a base to another version, and change many things like registers, etc ... some BYTE and then each version a new code
 
not made ​​for this version, I posted a code for 1.02s jpn, you can only use as a base to another version, and change many things like registers, etc ... some BYTE and then each version a new code

sorry for stupid question but u can show me how to find offset using for your code :blush::blush:
 
I am trying to adapt this custom design on this topic and when I try to compile the dll appears to me the following message:
http://forum.ragezone.com/f508/client-1-03p-eng-source-954658/



Code:
1>------ Build started: Project: Main, Configuration: Release Win32 ------
1>Build started 17/10/2013 23:37:04.
1>InitializeBuildStatus:
1>  Touching "Release\Main.unsuccessfulbuild".
1>ClCompile:
1>  Camera.cpp
1>  DllLib.cpp
1>  Effect.cpp
1>  ToolKit.cpp
1>  Running Code Analysis for C/C++...
1>c:\users\walter\desktop\soucer main\client1.03psrc+hpbar\dlllib.cpp(6): warning C6244: Local declaration of 'hInstance' hides previous declaration at line '29' of 'c:\users\walter\desktop\soucer main\client1.03psrc+hpbar\stdafx.h'
1>ResourceCompile:
1>  All outputs are up-to-date.
1>Main.obj : error LNK2005: _DllMain@12 already defined in DllLib.obj
1>     Creating library C:\Users\Walter\Desktop\soucer main\Client1.03PSRC+HPBar\Release\Main.lib and object C:\Users\Walter\Desktop\soucer main\Client1.03PSRC+HPBar\Release\Main.exp
1>Main.exp : warning LNK4070: /OUT:3DCamera.dll directive in .EXP differs from output filename 'C:\Users\Walter\Desktop\soucer main\Client1.03PSRC+HPBar\Release\Main.dll'; ignoring directive
1>C:\Users\Walter\Desktop\soucer main\Client1.03PSRC+HPBar\Release\Main.dll : fatal error LNK1169: one or more multiply defined symbols found
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:05.68
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


I would love to add this effect in my project but unfortunately I'm not getting, if someone can help me I will be very grateful
 
I now, i am very stupid But can some1 pls help to add this beautiful work for this main(1.03P)???
 
Back