Bueno Al ver que Todos estan tirando la Casa por la ventana con los SRC El buen Amigo
@OBBY ME animo a ayudar con este granito de arena para todos los que estan aprendiendo a programar ya que yo aun estoy aprendiendo soy nuevo en estas cosas xD No soy programador Si en caso lo ve el codigo aun progamador xD lo hice A lo que entendi El codigo xDDD
Sin nada mas que decir Aqui viene:
Parte GameServer
RuneEffect.cpp
RuneEfecto.h
Buscan: DSPROTOCOL.CPP
gCustomRankUser.GCReqRankLevelUser(lpObj->Index, lpObj->Index);
Pegan
gRuneEffect.GCRuneEffect(lpObj->Index, lpObj->Index);
Busacan: Viewport
gCustomRankUser.GCReqRankLevelUser(aIndex, gObj[n].Index);
Pega:
gRuneEffect.GCRuneEffect(aIndex, gObj[n].Index);
stadafx.h
#include "RuneEffect.h"
Main.dll
HealthBar.cpp
Va al inicio
DWORD RunEffectTickTime[10] = { 0 };
Buscan
void DrawNewHealthBar() //dentro de esto buscan
if (*(BYTE*)(ViewportAddress + 0x320) == 1)
Pegan:
Spoiler for Hiden:
//Rune Efecto 100%
int index = *(WORD*)(ViewportAddress + 0x7E);
ObjectPreview* Object = &*(ObjectPreview*)(ViewportAddress);
if (!pCheckEffectPlayer((DWORD*)(ViewportAddress + 0x4EC), 28))
{
if (pPlayerState > 4)
{
for (std::vector<RuneEffectType>::iterator it = gRuneEffect.m_RuneEffectInfo.begin(); it != gRuneEffect.m_RuneEffectInfo.end(); it++)
{
if (gRuneEffect.m_RuneEffect[index].cGM != 32)
{
if (*(BYTE*)(ViewportAddress + 32) == 3) //pk
{
if (it->Index == 0) //FREE
{
if ((GetTickCount() - RunEffectTickTime[index]) > it->Time)
{
if (gRuneEffect.m_RuneEffect[index].cVip == 0 && it->Type == 1)
{
gRuneEffect.RenderRuneEffect((int)&Object->m_Model, it->TextureIndex, it->Typo, it->Size);
RunEffectTickTime[index] = GetTickCount();
}
}
}
if (it->Index == 1) //VIP AL1
{
if ((GetTickCount() - RunEffectTickTime[index]) > it->Time)
{
if (gRuneEffect.m_RuneEffect[index].cVip == 1 && it->Type == 1)
{
gRuneEffect.RenderRuneEffect((int)&Object->m_Model, it->TextureIndex, it->Typo, it->Size);
RunEffectTickTime[index] = GetTickCount();
}
}
}
if (it->Index == 2) //VIP AL2
{
if ((GetTickCount() - RunEffectTickTime[index]) > it->Time)
{
if (gRuneEffect.m_RuneEffect[index].cVip == 2 && it->Type == 1)
{
gRuneEffect.RenderRuneEffect((int)&Object->m_Model, it->TextureIndex, it->Typo, it->Size);
RunEffectTickTime[index] = GetTickCount();
}
}
}
if (it->Index == 3) //VIP AL3
{
if ((GetTickCount() - RunEffectTickTime[index]) > it->Time)
{
if (gRuneEffect.m_RuneEffect[index].cVip == 3 && it->Type == 1)
{
gRuneEffect.RenderRuneEffect((int)&Object->m_Model, it->TextureIndex, it->Typo, it->Size);
RunEffectTickTime[index] = GetTickCount();
}
}
}
}
else
{
if (it->Index == 4) //PKLEVEL 6
{
if ((GetTickCount() - RunEffectTickTime[index]) > it->Time)
{
if (*(BYTE*)(ViewportAddress + 32) == 6 && it->Type == 1)
{
gRuneEffect.RenderRuneEffect((int)&Object->m_Model, it->TextureIndex, it->Typo, it->Size);
RunEffectTickTime[index] = GetTickCount();
}
}
}
}
}
}
}
}
else
{
if (pPlayerState > 4)
{
for (std::vector<RuneEffectType>::iterator it = gRuneEffect.m_RuneEffectInfo.begin(); it != gRuneEffect.m_RuneEffectInfo.end(); it++)
{
if (it->Index == 5) //GAME MASTER
{
if ((GetTickCount() - RunEffectTickTime[index]) > it->Time)
{
if (it->Type == 1)
{
gRuneEffect.RenderRuneEffect((int)&Object->m_Model, it->TextureIndex, it->Typo, it->Size);
RunEffectTickTime[index] = GetTickCount();
}
}
}
}
}
}
RuneEffect.cpp //crean
Spoiler for Hiden:
#include "stdafx.h"
#include "RuneEffect.h"
#include "NewUIMyInventory.h"
#include "Object.h"
#include "Import.h"
#include "Defines.h"
//#include "Console.h"
#include "zzzmathlib.h"
#include "Util.h"
#include "ModelEffect.h"
#include "CustomPetEffect.h"
RuneEffect gRuneEffect;
RuneEffect::RuneEffect()
{
this->m_RuneEffectInfo.clear();
}
void RuneEffect::LoadRuneEffect(RuneEffectType* info)
{
for (int n = 0; n < MAX_TYPE_RUNEEFFECT; n++)
{
if (info[n].Index < 0 || info[n].Index >= MAX_TYPE_RUNEEFFECT)
{
return;
}
this->m_RuneEffectInfo.push_back(info[n]);
}
}
void RuneEffect::GCRuneEffect(PMSG_CUSTOM_RUNEEFFECT* aRecv)
{
if (aRecv == NULL)
{
return;
}
// ---
this->m_RuneEffect[aRecv->iIndex].m_Level = aRecv->iLevel;
this->m_RuneEffect[aRecv->iIndex].m_Resets = aRecv->iReset;
this->m_RuneEffect[aRecv->iIndex].m_MResets = aRecv->iMReset;
this->m_RuneEffect[aRecv->iIndex].cVip = aRecv->cVip;
this->m_RuneEffect[aRecv->iIndex].cGM = aRecv->cGM;
this->m_RuneEffect[aRecv->iIndex].cPK = aRecv->cPK;
char Testando[200];
wsprintf(Testando, "Vem Agora %d/%d", this->m_RuneEffect[aRecv->iIndex].cVip, aRecv->cVip);
//Console.Write(Testando, 0, 0);
}
void RuneEffect::RenderRuneEffect(DWORD ObjectModel, int ID, int Typo, float Size)
{
int Iterator = 0;
MU3Float lBone[MAX_MODEL_EFFECT];
MU3Float lBone2[MAX_MODEL_EFFECT];
vec3_t Color;
vec3_t ColorRandom;
Vector(1.0, 1.0, 1.0, Color);
Vector(((float)(rand() % 100) / 100), ((float)(rand() % 100) / 100), ((float)(rand() % 100) / 100), ColorRandom);
lBone[Iterator].X = *(float*)(ObjectModel + 252);
lBone[Iterator].Y = *(float*)(ObjectModel + 256);
lBone[Iterator].Z = *(float*)(ObjectModel + 260);
lBone2[Iterator].X = *(float*)(ObjectModel + 264);
lBone2[Iterator].Y = *(float*)(ObjectModel + 268);
lBone2[Iterator].Z = *(float*)(ObjectModel + 272);
//lBone[Iterator].Z = lBone[Iterator].Z + (float)(Z);
//
//lBone2[Iterator].Z = lBone2[Iterator].Z + (float)(Z);
//32378 2.0 Type: 2 //VIP
//441 Type 1
//32404 Type 1 //Admin
//32313
//pSkillEffect(ID, (int)&lBone, (int)&lBone2, Color, 2, 1, -1, 0, 0, 0, Size, -1);
CreateEffect(ID, (int)&lBone, (int)&lBone2, ColorRandom, Typo, 0, -1, 0, 0, 0, Size, -1);
//vec3_t vLight;
//Vector(ColorR, ColorG, ColorB, vLight);
//float fLumi = sinf(WorldTime * 0.0015f) * 0.3f + 0.5f;
//Vector(fLumi * vLight[0], fLumi * vLight[1], fLumi * vLight[2], vLight);
//EnableAlphaBlend();
//RenderTerrainAlphaBitmap(ID, *(float*)(ObjectModel + 252), *(float*)(ObjectModel + 256), Size, Size, vLight, WorldTime * Speed, 1.0, FloorDistance, 1);
//DisableAlphaBlend();
}
RuneEffect.h
Spoiler for Hiden:
#pragma once
#include <vector>
#define Hero *(DWORD*)0x007BC4F04
#define WorldTime *(float*)0x005EF5A1C
#define EnableAlphaBlend ((void(__cdecl*)()) 0x636070)
#define DisableAlphaBlend ((void(__cdecl*)()) 0x00635F50)
#define sub_4DB0E0 ((BOOL(__cdecl*)(int a1))0x004DB0E0)
#define cRenderCharacter ((void(__cdecl*)(ObjectPreview *a4, ObjectModel *a5, int Select)) 0x0057D260)
#define battleCastleInitEtcSetting ((void(__cdecl*)()) 0x8CF360)
#define CreateBattleCastleCharacter_Visual ((void(__cdecl*)(int a1, int a2)) 0x8CF360)
#define cSkillEffect ((void(__cdecl*)(int a1, int a2, int a3, float * a4, int a5, int a6, __int16 a7, __int16 a8, __int16 a9, __int16 a10, float a11, __int16 a12)) 0x6D9070)
#define RenderTerrainAlphaBitmap ((void(__cdecl*)(int Texture,float xf,float yf,float SizeX,float SizeY,vec3_t Light,float Rotation,float Alpha,float Height, char a10)) 0x005DAD80)
#define sub_558630 ((void(__cdecl*)(int a1, int a2, int a3)) 0x558630)
#define pCheckEffectPlayer ((bool(__thiscall*)(void * This,char a2)) 0x004C8640)
#define MODEL_PLAYER 1163
#define MAX_TYPE_RUNEEFFECT 6
struct RuneEffectType
{
int Index;
int Type;
int TextureIndex;
int Typo;
float Size;
float Time;
};
//
struct PMSG_CUSTOM_RUNEEFFECT
{
PSBMSG_HEAD h;
int iIndex;
int iLevel;
int iReset;
int iMReset;
int cVip;
int cGM;
int cPK;
};
// ---
struct CUSTOM_RUNEEFFECT_DATA
{
WORD m_Index;
WORD m_Resets;
WORD m_MResets;
WORD m_Level;
WORD cVip;
WORD cGM;
WORD cPK;
};
// ---
class RuneEffect
{
public:
RuneEffect();
// ---
void GCRuneEffect(PMSG_CUSTOM_RUNEEFFECT* aRecv);
//void RenderRuneEffect(DWORD ObjectModel, int ID, float Size, float ColorR, float ColorG, float ColorB, float Speed, float FloorDistance);
void RenderRuneEffect(DWORD ObjectModel, int ID, int Typo, float Size);
void LoadRuneEffect(RuneEffectType* info);
void Init();
CUSTOM_RUNEEFFECT_DATA m_RuneEffect[1000000]; //Mover si se te crashea el servidor
public:
std::vector<RuneEffectType> m_RuneEffectInfo;
private:
// ---
};
extern RuneEffect gRuneEffect;
// ---
Protocol.cpp
definen:
#include "RuneEffect.h"
Buscan
case 0xF3:
switch(((lpMsg[0]==0xC1)?lpMsg[3]:lpMsg[4]))
pegan
case 0xEF:
gRuneEffect.GCRuneEffect((PMSG_CUSTOM_RUNEEFFECT*)lpMsg);
break;
Main.cpp //Recuerden siempre definir #include "RuneEffect.h"
gRuneEffect.LoadRuneEffect(gProtect.m_MainInfo.m_RuneEffect);
Protect.h //Recuerden siempre definir #include "RuneEffect.h"
RuneEffectType m_RuneEffect[MAX_TYPE_RUNEEFFECT];
stdafx.h Al final pegan
#include "BuffIcon.h"
GetMainInfo
RuneEffect.cpp
RuneEffect.h
GetMainInfo.cpp
#include "RuneEffect.h"
RuneEffectType m_RuneEffect[MAX_TYPE_RUNEEFFECT];
gRuneEffect.Load("RuneEffect.txt");
memcpy(info.m_RuneEffect, gRuneEffect.m_RuneEffect, sizeof(info.m_RuneEffect));
Ahora el Text
RuneEffect.txt
============
// Rune Effect Colores Variados
//32378 Clasico
//441 RUEDA
//32404 Agujero Negro de Colores
//32119 DEstellos alrrededor
// TipodeEfecto = 0 1 2
//================================================================================================================
// Active TextureIndex TipodeEfecto Tamaño de Efecto TimeEfecto Requerido
0 32378 2 1.0 400.0 //Account Free
1 32378 2 1.0 400.0 //Account Vip 1
1 32378 2 1.0 400.0 //Account Vip 2
1 32378 2 1.0 400.0 //Account Vip 3
1 32378 2 1.0 400.0 //Pk Level 6
1 32378 2 1.0 400.0 //Game Master
end
Espero que Ayude a Varios Recuerden no soy Coder xD Gracias por compartir los SRC
@OBBY De la GL e.E
So publico este codigo que lo tenia usando pero Lo cambie por uno Mejor ASi que Disfruten :D Aqui unas fotos
https://ibb.co/fHdjc8Zhttps://ibb.co/ZK9P9sThttps://ibb.co/b6YLJD3