Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Development] Community Edition Season6 Episode3 z-Team

Junior Spellweaver
Joined
Feb 13, 2013
Messages
193
Reaction score
70
hola VeltonD, una pregunta.. te molestaria si te pido el codigo para poder colocar el hp bar ensima del monstruo.. ya que la unica manera que vi fue. cambiando

void User::DrawSome() = void User::DrawPartyHP()

y

void User::DrawPartyHP() = void User::DrawSome()..

queda el bar hp del party pero eh intentado miles de cosas para dejarlo asi y nada. soy nuevo en esto aun.. Bueno gracias y disculpa la joda

you need to send the life of each monster to the client and update it as it is falling ... DrawSome use as a base.
 
Elite Diviner
Joined
Sep 9, 2014
Messages
469
Reaction score
498
osea que debo enviar desde el gs. hacia el cliente? soy nuevo en esto xD , disculpa la joda.
 
Newbie Spellweaver
Joined
Dec 30, 2007
Messages
94
Reaction score
10
osea que debo enviar desde el gs. hacia el cliente? soy nuevo en esto xD , disculpa la joda.

Edit Zclient.dll
busca drawsome en el codigo del dll


void User::DrawSome()
{
VAngle Angle;
int PosX, PosY, LifeProgress;
// ----
if (!lifebar)
{
return;
}
else
{
for( int PartySlot = 0; PartySlot < 75; PartySlot++ )
{
lpViewObj lpObj = &*(ObjectPreview*)pGetPreviewStruct(pPreviewThis(), PartySlot);
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - gObjUser.m_TargetUpdateTick);
// ----
if( !lpObj || lpObj->m_Model.ObjectType != emMonster || !lpObj->m_Model.Unknown4 )
{
continue;
}
// ----
PMSG_TARGETDATA_REQ pRequest;
pRequest.h.set((LPBYTE)&pRequest, 0xFB, 7, sizeof(pRequest));
pRequest.aIndex = lpObj->aIndex;
// ----
if( Delay >= 10 )
{
gProtocol.DataSend((LPBYTE)&pRequest, pRequest.h.size);
}
// ----
Angle.X = lpObj->m_Model.VecPosX;
Angle.Y = lpObj->m_Model.VecPosY;
Angle.Z = lpObj->m_Model.VecPosZ + lpObj->m_Model.Unknown216.Z + 100.0;
// ----
float BarWidth = (64.5f / 100.0f) *monlife[lpObj->aIndex];
float LifeBarWidth = 65.0f;
// ----
pGetPosFromAngle(&Angle, &PosX, &PosY);
PosX -= (int)floor(LifeBarWidth / (double)2.0);
// ----
if(monlife[lpObj->aIndex] <= 0.1f)
{
continue;
}
// ----
pDrawColorText(lpObj->Name, PosX -1, PosY - 9, 67, 1, eWhite, 9, 3);
// ----
pDrawGUI(32514, (float)PosX - 1.2, (float)PosY - 1.5, 66.95, 6);
pDrawGUI(32513, (float)PosX, (float)PosY, BarWidth, 3);
// ----
if( (int)(monlife[lpObj->aIndex] / 10) > 10 )
{
LifeProgress = 10;
}
else
{
LifeProgress = (int)(monlife[lpObj->aIndex] / 10);
}
// ----
pGLSwitch();
}
pGLSwitch();
glColor3f(1.0, 1.0, 1.0);
}
}

change the offset of drawparty for drawsome
 
Elite Diviner
Joined
Sep 9, 2014
Messages
469
Reaction score
498
gracias
fabiann1. dime ati te sale error en monlife.

User.cpp(463): error C2065: 'monlife' : identificador no declarado
 
Elite Diviner
Joined
Sep 9, 2014
Messages
469
Reaction score
498
fabiann1, tu saves que al pasar el Mouse sobre este Mob. causa crash al main.

RacRac - [Development] Community Edition Season6 Episode3 z-Team - RaGEZONE Forums
 
Newbie Spellweaver
Joined
Dec 30, 2007
Messages
94
Reaction score
10
fabiann1, tu saves que al pasar el Mouse sobre este Mob. causa crash al main.

RacRac - [Development] Community Edition Season6 Episode3 z-Team - RaGEZONE Forums


i post source :

// SetOp((LPVOID)0x005B96E8, (LPVOID)this->DrawPartyHP, ASM::CALL);
SetOp((LPVOID)0x005B96E8, (LPVOID)this->DrawSome, ASM::CALL);

void User::DrawSome()
{
VAngle Angle;
int PosX, PosY, LifeProgress;
// ----
lifebar=true;
if (!lifebar)
{
return;
}
else
{
for( int PartySlot = 0; PartySlot < 30; PartySlot++ )
{
lpViewObj lpObj = &*(ObjectPreview*)pGetPreviewStruct(pPreviewThis(), PartySlot);
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - gObjUser.m_TargetUpdateTick);
// ----
if( !lpObj || lpObj->m_Model.ObjectType != emMonster || !lpObj->m_Model.Unknown4 )
{
continue;
}
// ----
PMSG_TARGETDATA_REQ pRequest;
pRequest.h.set((LPBYTE)&pRequest, 0xFB, 7, sizeof(pRequest));
pRequest.aIndex = lpObj->aIndex;
//gObjUser.SetTargetData((PMSG_TARGETDATA_ANS*)pRequest.aIndex);
// ----
if( Delay >= 10 )
{
gProtocol.DataSend((LPBYTE)&pRequest, pRequest.h.size);
}
// ----
Angle.X = lpObj->m_Model.VecPosX;
Angle.Y = lpObj->m_Model.VecPosY;
Angle.Z = lpObj->m_Model.VecPosZ + lpObj->m_Model.Unknown216.Z + 100.0;
// ----

float BarWidth = (64.5f / 100.0f) * gObjUser.m_TargetLifePercent;
float LifeBarWidth = 65.0f;
// ----
pGetPosFromAngle(&Angle, &PosX, &PosY);
PosX -= (int)floor(LifeBarWidth / (double)2.0);
// ----
if(gObjUser.m_TargetLifePercent <= 0.1f)
{
continue;
}
// ----
pDrawColorText(lpObj->Name, PosX -1, PosY - 9, 67, 1, eWhite, 9, 3);
// ----
pDrawGUI(32514, (float)PosX - 1.2, (float)PosY - 1.5, 66.95, 6);
pDrawGUI(32513, (float)PosX, (float)PosY, BarWidth, 3);
// ----
if( (int)(gObjUser.m_TargetLifePercent / 10) > 10 )
{
LifeProgress = 10;
}
else
{
LifeProgress = (int)(gObjUser.m_TargetLifePercent / 10);
}
// ----
pGLSwitch();
}
pGLSwitch();
glColor3f(1.0, 1.0, 1.0);
//}

}

you can start with that and modify to read every monster hp. sorry i dont use this function but did it and dont finish u.u

gObjUser.m_TargetLifePercent

this is your target hp, you need to create a function monlife() to find every monster hp .

sorry poor english
 
Last edited:
Newbie Spellweaver
Joined
Jan 15, 2014
Messages
42
Reaction score
12
lifebar=true;
if (!lifebar)
What is this in source ?
 
Newbie Spellweaver
Joined
Dec 30, 2007
Messages
94
Reaction score
10
just remove it...

its a configuration for players if they dont want hp bar this = false
i use f6 edit the source to disable that option .
f6 original = news manager
i change for show hide hp bar


lo puse para que no le de error.
 
Experienced Elementalist
Joined
Nov 26, 2013
Messages
270
Reaction score
90
just remove it...

its a configuration for players if they dont want hp bar this = false
i use f6 edit the source to disable that option .
f6 original = news manager
i change for show hide hp bar


lo puse para que no le de error.

Can you tell me please, where you get my hp bar source? i was writed it with Wizik, and shared it just for few guyz.
 
Newbie Spellweaver
Joined
Jan 15, 2014
Messages
42
Reaction score
12
Visual bug found:
688mYVA - [Development] Community Edition Season6 Episode3 z-Team - RaGEZONE Forums


and

xHjXnEr - [Development] Community Edition Season6 Episode3 z-Team - RaGEZONE Forums


but then no ....
Gbbh4m3 - [Development] Community Edition Season6 Episode3 z-Team - RaGEZONE Forums


Tell me how to fix this visual bug. Thanks in advance!
 

Attachments

You must be registered for see attachments list
Newbie Spellweaver
Joined
Dec 30, 2007
Messages
94
Reaction score
10
Can you tell me please, where you get my hp bar source? i was writed it with Wizik, and shared it just for few guyz.
Pastebin dude...


its a lot of sources from this files...

can you share your monlife function? thanks
 
Last edited:
Elite Diviner
Joined
Sep 9, 2014
Messages
469
Reaction score
498
hola fabiann. dime tienes idea porque al pegarle a 1 monster les baja la vida a todos iguales.

RacRac - [Development] Community Edition Season6 Episode3 z-Team - RaGEZONE Forums
 
Newbie Spellweaver
Joined
Jan 15, 2014
Messages
42
Reaction score
12
X5RJui0 - [Development] Community Edition Season6 Episode3 z-Team - RaGEZONE Forums



What is problem ? Thanks in advance!
 

Attachments

You must be registered for see attachments list
Elite Diviner
Joined
Sep 9, 2014
Messages
469
Reaction score
498
te paso como lo toy usando yo..


void User::DrawPartyHP()
{
char LifeDisplay[20];
VAngle Angle;
int PosX, PosY, LifeProgress;
for( int PartySlot = 0; PartySlot < 10; PartySlot++ )
{

PartyList PartyMember = *(PartyList*)((char*)&pPartyListStruct + 10 * PartySlot);
lpViewObj lpPartyObj = &*(ObjectPreview*)pGetPreviewStruct(pPreviewThis(), PartyMember.ViewportID);

lpViewObj lpObj = gObjUser.lpViewTarget;
// ----
if( !lpObj || lpObj->m_Model.ObjectType != emMonster || !lpObj->m_Model.Unknown4 )
{
return;
}
// ----
float LifeBarWidth = 65.0f;
// ----
Angle.X = lpObj->m_Model.VecPosX;
Angle.Y = lpObj->m_Model.VecPosY;
Angle.Z = lpObj->m_Model.VecPosZ + lpObj->m_Model.Unknown216.Z + 100.0;
// ----
pGetPosFromAngle(&Angle, &PosX, &PosY);
PosX -= (int)floor(LifeBarWidth / (double)2.0);
// ----
if( gObjUser.m_TargetLifePercent <= 0.0f )
{
return;
}
// ----
float BarWidth = (64.5f / 100.0f) * gObjUser.m_TargetLifePercent;
pDrawText(pTextThis(), PosX-1, PosY - 9, " ", 67, 0, (LPINT)0, 0);
pDrawText(pTextThis(), PosX+0.5*(66.95-(4.35*float(strlen( lpObj->Name)))), PosY - 9, lpObj->Name, 0, 0, (LPINT)0, 0);
pDrawGUI(0x7B3F, (float)PosX - 1.2, (float)PosY - 1.5, 66.95, 6);
pDrawGUI(0x7B40, (float)PosX, (float)PosY, BarWidth, 3);
// ----
pGLSwitch();
}
pGLSwitch();
glColor3f(1.0, 1.0, 1.0);
}
// ----------------------------------------------------------------------------------------------


void User::DrawSome()
{
char LifeDisplay[20];
VAngle Angle;
int PosX, PosY, LifeProgress;
// ----
float LifeBarWidth = 38.0f;
lpViewObj lpObj = gObjUser.lpViewTarget;
// ----
if( !lpObj || lpObj->m_Model.ObjectType != emMonster || !lpObj->m_Model.Unknown4 )
{
return;
}
// ----
Angle.X = lpObj->m_Model.VecPosX;
Angle.Y = lpObj->m_Model.VecPosY;
Angle.Z = lpObj->m_Model.VecPosZ + lpObj->m_Model.Unknown216.Z + 100.0;
// ----
pGetPosFromAngle(&Angle, &PosX, &PosY);
PosX -= (int)floor(LifeBarWidth / (double)2.0);
// ----
sprintf(LifeDisplay, "%s", lpObj->Name);
pSetTextColor(pTextThis(), 0xFF, 0xE6, 0xD2, 0xFF);
pDrawText(pTextThis(), PosX + 2, PosY - 6, LifeDisplay, 0, 0, (LPINT)1, 0);
// ----
pSetBlend(true);
glColor4f(0.0, 0.0, 0.0, 0.5);
pDrawBarForm((float)(PosX + 1), (float)(PosY + 1), LifeBarWidth + 4.0, 5.0, 0.0, 0);
pGLSwitchBlend();
// ----
glColor3f(0.2, 0.0, 0.0);
pDrawBarForm((float)PosX, (float)PosY, LifeBarWidth + 4.0, 5.0, 0.0, 0);
// ----
glColor3f(0.19607843, 0.039215688, 0.0);
pDrawBarForm((float)(PosX + 2), (float)(PosY + 2), LifeBarWidth, 1.0, 0.0, 0);
// ----
if( (int)(gObjUser.m_TargetLifePercent / 10) > 10 )
{
LifeProgress = 10;
}
else
{
LifeProgress = (int)(gObjUser.m_TargetLifePercent / 10);
}
// ----
glColor3f(0.98039216, 0.039215688, 0.0);
// ----
for( int i = 0; i < LifeProgress; i++ )
{
pDrawBarForm((float)(i * 4 + PosX + 2), (float)(PosY + 2), 3.0, 2.0, 0.0, 0);
}
// ----
pGLSwitch();
glColor3f(1.0, 1.0, 1.0);
}
// ----------------------------------------------------------------------------------------------
 
Newbie Spellweaver
Joined
Sep 9, 2013
Messages
87
Reaction score
12
This is what I've done.


Can someone tell me how to change time of disappearing HP Bar? - I want to do it disappear when monster is dead, not when monster disappear.

And how to fix showing of HP (the red one bar) ? It's sometimes working, sometimes not & sometimes it's blinking.

S. Code that I use:
void User::DrawSome(){
VAngle Angle;
int PosX, PosY, LifeProgress;
// ----
{
for( int PartySlot = 0; PartySlot < 75; PartySlot++ )
{
lpViewObj lpObj = &*(ObjectPreview*)pGetPreviewStruct(pPreviewThis(), PartySlot);
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - gObjUser.m_TargetUpdateTick);
// ----
if( !lpObj || lpObj->m_Model.ObjectType != emMonster || !lpObj->m_Model.Unknown4 )
{
continue;
}
// ----
PMSG_TARGETDATA_REQ pRequest;
pRequest.h.set((LPBYTE)&pRequest, 0xFB, 7, sizeof(pRequest));
pRequest.aIndex = lpObj->aIndex;
// ----
if( Delay >= 10 )
{
gProtocol.DataSend((LPBYTE)&pRequest, pRequest.h.size);
}
// ----
Angle.X = lpObj->m_Model.VecPosX;
Angle.Y = lpObj->m_Model.VecPosY;
Angle.Z = lpObj->m_Model.VecPosZ + lpObj->m_Model.Unknown216.Z + 100.0;
// ----
float BarWidth = (64.5f / 100.0f) *gObjUser.m_TargetLifePercent;
float LifeBarWidth = 65.0f;
// ----
pGetPosFromAngle(&Angle, &PosX, &PosY);
PosX -= (int)floor(LifeBarWidth / (double)2.0);
// ----
if(gObjUser.m_TargetLifePercent <= 0.1f)
{
continue;
}
// ----
pDrawColorText(lpObj->Name, PosX -1, PosY - 9, 67, 1, eWhite, 9, 3);
// ----
pDrawGUI(0x7B3F, (float)PosX - 1.2, (float)PosY - 1.5, 66.95, 6);
pDrawGUI(0x7B40, (float)PosX, (float)PosY, BarWidth, 3);
// ----
if( (int)(gObjUser.m_TargetLifePercent / 10) > 10 )
{
LifeProgress = 10;
}
else
{
LifeProgress = (int)(gObjUser.m_TargetLifePercent / 10);
}
// ----
pGLSwitch();
}
pGLSwitch();
glColor3f(1.0, 1.0, 1.0);
}
}
 
Last edited:
Newbie Spellweaver
Joined
Aug 26, 2011
Messages
61
Reaction score
1
Well .. HP bar does not appear in the monsters ..
I have to use both functions? DrawSome and DrawPartyHP, or only one?

offsets are correct. Main 1.03K JPN
 
Don't be afraid to ask!
Loyal Member
Joined
Jun 2, 2012
Messages
1,454
Reaction score
252
Anyone get it work on VS2013?

Yes I am working on this files with vs13



Hmhm, the CraftSystem source will be shared somewhere?

I have seen in my source everywhere grey "#ifdef __NOVUS__"

Where need to define novus?


Sorry, I am just fcking tired maybe :DD I made it :) Now i am going to sleep before I ask one more idiot question :'D
 
Last edited:
Back
Top