you need to send the life of each monster to the client and update it as it is falling ... DrawSome use as a base.
Printable View
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
graciasfabiann1. dime ati te sale error en monlife.
User.cpp(463): error C2065: 'monlife' : identificador no declarado
fabiann1, tu saves que al pasar el Mouse sobre este Mob. causa crash al main.
http://s2.subirimagenes.com/otros/pr...8sin-ttulo.jpg
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
lifebar=true;
if (!lifebar)
What is this in source ?
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.
Visual bug found:
http://i.imgur.com/688mYVA.png
and
http://i.imgur.com/xHjXnEr.png
but then no ....
http://i.imgur.com/Gbbh4m3.png
Tell me how to fix this visual bug. Thanks in advance!
@BenQ, missing this itens into ItemToolTip.bmd into your client, edit it with Magic Hand and will appear items descriptions.
Have a tutorial into tutorial section.
Pastebin dude...
https://www.google.com.ar/search?q=v...TbKK_CsASK3YBo
its a lot of sources from this files...
can you share your monlife function? thanks
hola fabiann. dime tienes idea porque al pegarle a 1 monster les baja la vida a todos iguales.
http://s2.subirimagenes.com/fondosyc...2716210003.jpg
http://i.imgur.com/X5RJui0.png
What is problem ? Thanks in advance!
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);
}
// ----------------------------------------------------------------------------------------------
This is what I've done.
https://www.youtube.com/watch?v=kISfRp4eIGU
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:
Quote:
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);
}
}
Anyone get it work on VS2013?
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
Yes I am working on this files with vs13
- - - Updated - - -
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
@oneDmitry what do you want to get?
And I have a question:
FilterMain system is working for somebody? Today I started to debug it, because its not working for me... The filterslist doesnt load when the GS start.
Somebody know anything from this?
Mail system still not working. Mail body is not sending from client side. any fix?
Use another exdb.
Tried like 8-9 ExDb's. Can you gimme a good one?