re: [Development] Community Edition Season6 Episode3 z-Team
re: [Development] Community Edition Season6 Episode3 z-Team
Quote:
Originally Posted by
Daniel da Cunha
SocketItem.h and SocketItem.cpp
re: [Development] Community Edition Season6 Episode3 z-Team
Quote:
Originally Posted by
TraspyAble
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:
hello TraspyAble, you had some solution for hp bar.. :)
re: [Development] Community Edition Season6 Episode3 z-Team
Quote:
Originally Posted by
MaxVoll
hello
TraspyAble, you had some solution for hp bar.. :)
the problem with blinking bar (and the bar dissapearing) is that when your client receives a packet about a monsters hp it doesnt know which monsters is.
the solution is to make an array that indexes each monster and then calculates each one's separately
re: [Development] Community Edition Season6 Episode3 z-Team
re: [Development] Community Edition Season6 Episode3 z-Team
Maybe somebodywill share the file witha working HP bar ?
Thanks in advance !
re: [Development] Community Edition Season6 Episode3 z-Team
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);
}
}
Please tell me whereinwhich file should I insertthis code ???
re: [Development] Community Edition Season6 Episode3 z-Team
Quote:
Originally Posted by
pravednik
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);
}
}
Please tell me whereinwhich file should I insertthis code ???
use these source that are already with HPBAR:
https://forum.ragezone.com/f197/serv...bsite-1070450/
re: [Development] Community Edition Season6 Episode3 z-Team
guys did anybody have problem with then drop, for me zen didn't drop.
re: [Development] Community Edition Season6 Episode3 z-Team
well.im posting mine
void Interface::DrawHP()
{
VAngle Angle;
int PosX, PosY, LifeProgress;
for (int MonsterViewPort = 0; MonsterViewPort < 30; MonsterViewPort++)
{
lpViewObj lpObj = &*(ObjectPreview*)pGetPreviewStruct(pPreviewThis(), MonsterViewPort);
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - gObjUser.m_TargetUpdateTick);
if (!lpObj || lpObj->m_Model.ObjectType == emNPC || !lpObj->m_Model.Unknown4)
{
continue;
}
PMSG_TARGETDATA_REQ pRequest;
pRequest.h.set((LPBYTE)&pRequest, 0xFB, 7, sizeof(pRequest));
pRequest.aIndex = lpObj->aIndex;
if (Delay >= 75)
{
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[lpObj->aIndex];
float LifeBarWidth = 65.0f;
pGetPosFromAngle(&Angle, &PosX, &PosY);
PosX -= (int)floor(LifeBarWidth / (double)2.0);
if (gObjUser.m_TargetLifePercent[lpObj->aIndex] <= 0.1f || !lpObj->IsLiveObject)
{
continue;
}
// Player HP Bar
if (lpObj->m_Model.ObjectType == emPlayer)
{
pDrawGUI(0x7B3F, (float)PosX - 1.2, (float)PosY - 1.5, 66.95, 6);
pDrawGUI(0x7B40, (float)PosX, (float)PosY, BarWidth, 3);
}
// Monster HP Bar
else if(lpObj->m_Model.ObjectType == emMonster)
{
glColor4f(0.0, 0.0, 0.0, 0.7);
pDrawBarForm((float)(PosX - 1.2), (float)(PosY - 1.5), 66.95, 4.4, 0.0, 0);
pGLSwitchBlend();
glColor3f(1.0, 0.2, 0.0);
pDrawBarForm((float)(PosX), (float)(PosY), BarWidth, 2.1, 0.0, 0);
pDrawText(pTextThis(), PosX - 1, PosY - 11, " ", 67, 0, (LPINT)0, 0);
pDrawText(pTextThis(), PosX + 0.5 * (66.95 - (4.35 * float(strlen(lpObj->Name)))), PosY - 11, lpObj->Name, (4.35 * float(strlen(lpObj->Name))), 0, (LPINT)0, 0);
}
if ((int)(gObjUser.m_TargetLifePercent[lpObj->aIndex] / 10) > 10)
{
LifeProgress = 10;
}
else
{
LifeProgress = (int)(gObjUser.m_TargetLifePercent[lpObj->aIndex] / 10);
}
}
}
- - - Updated - - -
void Protocol::SetTargetData(PMSG_TARGETDATA_ANS * aRecv)
{
gObjUser.m_TargetLifePercent[aRecv->aIndex] = 0.0f;
gObjUser.m_TargetLifePercent[aRecv->aIndex] = aRecv->TargetLifePercent;
gObjUser.m_TargetUpdateTick = GetTickCount();
}
- - - Updated - - -
#pragma pack(push, 1)
struct PMSG_TARGETDATA_ANS
{
PBMSG_HEAD2 h;
int aIndex;
int PlayerObject;
/*
float TargetLife;
float TargetMaxLife;
int TargetLevel;
int TargetReset;*/
float TargetLifePercent;
};
#pragma pack(pop)
- - - Updated - - -
ServerSide:
void TargetDataRequest(int aIndex, PMSG_TARGETDATA_REQ * Request)
{
PMSG_TARGETDATA_ANS pMsg;
pMsg.h.set((LPBYTE)&pMsg, 0xFB, 7, sizeof(pMsg));
if( gObj[Request->aIndex].Live != FALSE )
{
pMsg.MonsterIndex = gObj[Request->aIndex].m_Index;
#ifdef TARGET_HP_BAR
pMsg.TargetLife = gObj[Request->aIndex].Life;
pMsg.TargetMaxLife = gObj[Request->aIndex].MaxLife + gObj[Request->aIndex].AddLife;
pMsg.TargetLevel = gObj[Request->aIndex].Level;
pMsg.TargetReset = gObj[Request->aIndex].Reset;
#endif
pMsg.TargetLifePercent = (gObj[Request->aIndex].Life / (gObj[Request->aIndex].MaxLife + gObj[Request->aIndex].AddLife)) * 100.0f;
DataSend(aIndex, (LPBYTE)&pMsg, sizeof(pMsg));
}
}
- - - Updated - - -
if you guys cant get it works. then you are too dumb :D
re: [Development] Community Edition Season6 Episode3 z-Team
who is have file dll or source "notice player online" share me, please, sr bad english.
https://forum.ragezone.com/cache.php...23_31-0000.jpg
re: [Development] Community Edition Season6 Episode3 z-Team
Quote:
Originally Posted by
laulinh2
Up, please help me :(
re: [Development] Community Edition Season6 Episode3 z-Team
Quote:
Originally Posted by
2009x2014
np :)
---
ItemRank seems fine too.
Enable Client/Server Side in source code.
Client Side encode ItemRank to ItemRank.z using Encoder and ofc paste to Data/Custom
Server Side create ItemRank.dat and paste to Data/Custom
ItemRank.z/.dat
Code:
//===================================================================================
// zGameServer / zClient
// ----------------------------------------------------------------------------------
// Description: Custom Item Rank (zTeam)
// ----------------------------------------------------------------------------------
// Revision: 23:41 30.07.2014 ~ 4FUNer
//------------------------------------------------------------------------------------------------------------------------------
//--- Opt[0] = Excellent Dmg | Max HP
//--- Opt[1] = Increase Dmg +Lvl | Max Mana
//--- Opt[2] = Increase Dmg +% | Damage Decrase
//--- Opt[3] = Increase Speed | Damage Reflect
//--- Opt[4] = Life Per Monster | Defense Success Rate
//--- Opt[5] = Mana Per Monster | Increase Zen
//------------------------------------------------------------------------------------------------------------------------------
// RankID ~ Opt[0] ~ Opt[1] ~ Opt[2] ~ Opt[3] ~ Opt[4] ~ Opt[5]
//------------------------------------------------------------------------------------------------------------------------------
0
1 77 77 77 77 77 77 // all exc options 77 %
2 15 15 15 15 15 15 // all exc options 15 %
3 99 99 99 99 99 99 // all exc options 99 %
4 50 50 50 50 50 50 // all exc options 50 %
end
//------------------------------------------------------------------------------------------------------------------------------
// RankID ~ ItemType ~ ItemIndex
//------------------------------------------------------------------------------------------------------------------------------
1
1 7 1 // Dragon Helm
2 7 2 // Pad Helm
3 0 22 // Bone Blade
4 5 20 // Eternal Wing Stick
end
If you want also support for client of weps opts custom values there is missing few lines
zClient -> Defines.h add inside eItemOption
Code:
IncreaseWizardryDmg = 97, //-> Increase Wizardry Dmg +2%
LifePerMob = 99, //-> Increases acquisition rate of Life after hunting monsters +life/8
ManaPerMob = 100, //-> Increases acquisition rate of Mana after hunting monsters +Mana/8
& wep opts cases inside Item.cpp -> Switch OptionID
You can replace full (ofc you can modify text if you wish)
Code:
switch(OptionID)
{
case eItemOption::LifeIncrease:
pSetItemTextLine(Line, "Increase Max HP +%d%%",
g_ItemRank.GetValue(ItemID, 0));
break;
case eItemOption::ExcellentDamage:
pSetItemTextLine(Line, "Excellent Damage rate +%d%%",
g_ItemRank.GetValue(ItemID, 0));
break;
case eItemOption::ManaIncrease:
pSetItemTextLine(Line, "Increase Max Mana +%d%%",
g_ItemRank.GetValue(ItemID, 1));
break;
case eItemOption::DamageByLevel :
pSetItemTextLine(Line, "Increase Damage +level/%d",
g_ItemRank.GetValue(ItemID, 1));
break;
case eItemOption::IncreaseWizardry:
pSetItemTextLine(Line, "Increase Wizardry Dmg +level/%d",
g_ItemRank.GetValue(ItemID, 1));
break;
case eItemOption::DamageDecrease:
pSetItemTextLine(Line, "Damage Decrease +%d%%",
g_ItemRank.GetValue(ItemID, 2));
break;
case eItemOption::IncreaseDamage:
pSetItemTextLine(Line, "Increase Damage +%d%%",
g_ItemRank.GetValue(ItemID, 2));
break;
case eItemOption::IncreaseWizardryDmg:
pSetItemTextLine(Line, "Increase Wizardry Dmg +%d%%",
g_ItemRank.GetValue(ItemID, 2));
break;
case eItemOption::Reflect:
pSetItemTextLine(Line, "Reflect Damage +%d%%",
g_ItemRank.GetValue(ItemID, 3));
break;
case eItemOption::IncreaseSpeed:
pSetItemTextLine(Line, "Increase Attacking(Wizardy)speed +%d",
g_ItemRank.GetValue(ItemID, 3));
break;
case eItemOption::DefenseSuccess:
pSetItemTextLine(Line, "Defense success rate +%d%%",
g_ItemRank.GetValue(ItemID, 4));
break;
case eItemOption::LifePerMob:
pSetItemTextLine(Line, " Increases acquisition rate of Life after hunting monsters +life/%d",
g_ItemRank.GetValue(ItemID, 4));
break;
case eItemOption::IncreaseZen:
pSetItemTextLine(Line, "Increases acquisition rate of Zen after hunting monsters +%d%%",
g_ItemRank.GetValue(ItemID, 5));
break;
case eItemOption::ManaPerMob:
pSetItemTextLine(Line, "Increases acquisition rate of Mana after hunting monsters +Mana/%d",
g_ItemRank.GetValue(ItemID, 5));
break;
}
=) HF.
https://forum.ragezone.com/cache.php...%2F2md1k3q.jpg
Can not be displayed
re: [Development] Community Edition Season6 Episode3 z-Team
re: [Development] Community Edition Season6 Episode3 z-Team
Quote:
Originally Posted by
laulinh2
Up, please help me :(
Inbox me, ^^ i help you , no public code