little help on this one please folks

All Helbreath Client Source Discussion here.
Post Reply
xenx
Member
Posts: 169
Joined: Tue Oct 03, 2006 7:08 am

Post by xenx »

im having some real trouble, whatever i do my client will allow max stats to go above 200 and i dont want it to

i have looked here

Code: Select all

	if ((msX >= sX + 195) && (msX <= sX + 205) && (msY >= sY + 127) && (msY <= sY + 133) && (m_iStr <= 200) && (m_iLU_Point > 0))
	{	if (m_bCtrlPressed == TRUE)
  {	if ((m_iLU_Point >= 5)&&(m_bIsDialogEnabled[42] == FALSE))
  	{	m_iLU_Point -= 5;
    m_cLU_Str += 5;
  	}
  	PlaySound('E', 14, 5);
  }else
  {	if ((m_iLU_Point > 0)&&(m_bIsDialogEnabled[42] == FALSE))
  	{	m_iLU_Point--;
    m_cLU_Str++;
  	}
  	PlaySound('E', 14, 5);
(m_iStr <= 200)<<<<<
and its plainly set to 200, i just dont get wtf is going on iv got settings.cfg set to 200 max stats, its definitly somewhere in the client causing this problem, any ideas of where else to look please guys
EvilHit
Loyal fan
Posts: 356
Joined: Sun Jan 16, 2005 3:20 am

Post by EvilHit »

Code: Select all

void CGame::DlgBoxClick_ChangeStatsMajestic(short msX, short msY)
{
 short sX, sY;

	sX = m_stDialogBoxInfo[42].sX;
	sY = m_stDialogBoxInfo[42].sY;

	if ((cStateChange1 != 0) || (cStateChange2 != 0) || (cStateChange3 != 0)){
	// Strength UP - Diuuude
  if ((msX >= sX + 195) && (msX <= sX + 205) && (msY >= sY + 127) && (msY <= sY + 133) && (m_cLU_Str+m_iStr < DEF_STATS_LIMIT)) {
  	if (cStateChange1 == DEF_STR)
  	{	cStateChange1 = 0;
    m_cLU_Str += 1;
    m_iLU_Point -= 1;
  	}else if (cStateChange2 == DEF_STR)
  	{	cStateChange2 = 0;
    m_cLU_Str += 1;
    m_iLU_Point -= 1;
  	}else if (cStateChange3 == DEF_STR)
  	{	cStateChange3 = 0;
    m_cLU_Str += 1;
    m_iLU_Point -= 1;
  	}
  	PlaySound('E', 14, 5);
  }

  // Vitality UP - Diuuude
  if ((msX >= sX + 195) && (msX <= sX + 205) && (msY >= sY + 146) && (msY <= sY + 152) && ((m_cLU_Vit+m_iVit < DEF_STATS_LIMIT))) {
  	if (cStateChange1 == DEF_VIT)
  	{	cStateChange1 = 0;
    m_cLU_Vit += 1;
    m_iLU_Point -= 1;
  	}else if (cStateChange2 == DEF_VIT)
  	{	cStateChange2 = 0;
    m_cLU_Vit += 1;
    m_iLU_Point -= 1;
  	}else if (cStateChange3 == DEF_VIT)
  	{	cStateChange3 = 0;
    m_cLU_Vit += 1;
    m_iLU_Point -= 1;
  	}
  	PlaySound('E', 14, 5);
  }

  // Dexterity UP - Diuuude
  if ((msX >= sX + 195) && (msX <= sX + 205) && (msY >= sY + 165) && (msY <= sY + 171) && (m_cLU_Dex+m_iDex < DEF_STATS_LIMIT)) {
  	if (cStateChange1 == DEF_DEX){
    cStateChange1 = 0;
    m_cLU_Dex += 1;
    m_iLU_Point -= 1;
  	}
  	else if (cStateChange2 == DEF_DEX){
    cStateChange2 = 0;
    m_cLU_Dex += 1;
    m_iLU_Point -= 1;
  	}
  	else if (cStateChange3 == DEF_DEX){
    cStateChange3 = 0;
    m_cLU_Dex += 1;
    m_iLU_Point -= 1;
  	}
  	PlaySound('E', 14, 5);
  }

  // Intelligence UP - Diuuude
  if ((msX >= sX + 195) && (msX <= sX + 205) && (msY >= sY + 184) && (msY <= sY + 190) && (m_cLU_Int+m_iInt < DEF_STATS_LIMIT)) {
  	if (cStateChange1 == DEF_INT){
    cStateChange1 = 0;
    m_cLU_Int += 1;
    m_iLU_Point -= 1;
  	}
  	else if (cStateChange2 == DEF_INT){
    cStateChange2 = 0;
    m_cLU_Int += 1;
    m_iLU_Point -= 1;
  	}
  	else if (cStateChange3 == DEF_INT){
    cStateChange3 = 0;
    m_cLU_Int += 1;
    m_iLU_Point -= 1;
  	}
  	PlaySound('E', 14, 5);
  }

  // Magic UP - Diuuude
  if ((msX >= sX + 195) && (msX <= sX + 205) && (msY >= sY + 203) && (msY <= sY + 209) && (m_cLU_Mag+m_iMag < DEF_STATS_LIMIT)) {
  	if (cStateChange1 == DEF_MAG){
    cStateChange1 = 0;
    m_cLU_Mag += 1;
    m_iLU_Point -= 1;
  	}
  	else if (cStateChange2 == DEF_MAG){
    cStateChange2 = 0;
    m_cLU_Mag += 1;
    m_iLU_Point -= 1;
  	}
  	else if (cStateChange3 == DEF_MAG){
    cStateChange3 = 0;
    m_cLU_Mag += 1;
    m_iLU_Point -= 1;
  	}
  	PlaySound('E', 14, 5);
  }
in globeldef.h add

Code: Select all

#define DEF_STATS_LIMIT   200
xenx
Member
Posts: 169
Joined: Tue Oct 03, 2006 7:08 am

Post by xenx »

hmm ok if i edit that code to what u said here : void CGame::DlgBoxClick_ChangeStatsMajestic

it does nothing, but if i add it here :
void CGame::DlgBoxClick_LevelUpSettings(short msX, short msY)
it works perfect,

i dont really understand these majestic points btw is it gizon upgrade on ur character or something newer?

anyway i have got it to stop u levelling past 200 stats now thanks to that code even if i did use it in a different place hehe so cheers m8
Post Reply