Display Real Damage Instead Of Critical!

All Helbreath Server Source Discussion here.
misery
Regular
Posts: 62
Joined: Fri May 07, 2004 1:50 pm

Post by misery »

Erm.. is is possible to display the Real damage instead of CRITICAL! or to change the value example if hit above 500 den display as critical?
"How art thou fallen from heaven."
pleymo
Regular
Posts: 79
Joined: Thu Jan 27, 2005 4:33 pm

Post by pleymo »

I think it is possible ( need code it in client i think) that be cool :P .. some one code it :D
Firestorm
Loyal fan
Posts: 260
Joined: Fri Apr 07, 2006 10:29 pm

Post by Firestorm »

Dam faking max lvl 3090000 and exp 6000000 servers! Come back to reality the only real HB is 180lvl and 200 stats! with x6 - x8 EXP!
Aryes
Member
Posts: 114
Joined: Tue Aug 31, 2004 10:14 pm
Location: Brazil

Post by Aryes »

Make it show the real damage is easy, but make it show dmg above 255 will require extra work as the variable that holds the damage is 1 byte size.
====<span style='color:red'><br>Aryes</span><br>====<br><br>HB United: www.hbuonline.net:<br><br><img src="http://hbtop50.com/button.php?u=hbkhispano" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=dcom" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=tinchocba" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=rafha_bernn" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=HB-Tere" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=Kiruku" alt="Helbreath Top 50 - Helbreath Silver" border="0" />
BlueChristmas
Loyal fan
Posts: 216
Joined: Wed Apr 19, 2006 12:19 am

Post by BlueChristmas »

Firestorm wrote: Dam faking max lvl 3090000 and exp 6000000 servers! Come back to reality the only real HB is 180lvl and 200 stats! with x6 - x8 EXP!
that's the kind of server im making. 180 200
<img src='http://img114.imageshack.us/img114/8618 ... 2dy3lx.jpg' border='0' alt='user posted image' />
misery
Regular
Posts: 62
Joined: Fri May 07, 2004 1:50 pm

Post by misery »

or perhaps instead of showing CRITICAL! show the damage but in a larger font if the damage is high? some idea i got =X
"How art thou fallen from heaven."
Tafka12
&lt;3 bd long time
Posts: 772
Joined: Wed Dec 28, 2005 6:32 pm

Post by Tafka12 »

Yeah thats client side.

But don't say 6000000000 lvl
already 250 lvl shows critical as good damage.
And also, think if there would be 20 180/200 servers
Booring eh?
<img src='http://www.hot.ee/carvanho/taavi.png' border='0' alt='user posted image' /><br><br><img src='http://www.hot.ee/carvanho/Elvine.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/LieroX.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/Football.png' border='0' alt='user posted image' />
Firestorm
Loyal fan
Posts: 260
Joined: Fri Apr 07, 2006 10:29 pm

Post by Firestorm »

BlueChristmas <<< i will come and play ya server.
misery
Regular
Posts: 62
Joined: Fri May 07, 2004 1:50 pm

Post by misery »

can someone teach me how to do it? change the damage limit of displaying CRITICAL! or totally remove the CRITICAL! word and sub it with the real damage but if the damage is higher font is larger
"How art thou fallen from heaven."
Treax2
Loyal fan
Posts: 281
Joined: Fri Mar 04, 2005 5:05 pm
Location: Estonia
Contact:

Post by Treax2 »

omg go learn c++ ... i think removeing it is easier than make that number bigger .D
diuuude
Outpost bitch
Posts: 592
Joined: Wed Dec 28, 2005 11:57 pm

Post by diuuude »

Well, i think damages client side are in a signed short, one byte size, so its range is from -128 to 127.

If damage is <=127 and >= 1, it'll be displayed like -45Pts over the head of the player. If it's greater than 127 (so it goes negative), "Critical!" is displayed.

If you change the code in client

Code: Select all

if (damage < 0){
    //display Critical
}
with something like

Code: Select all

if (damage < 0){
    damage += 256
    //display damages
}

I think you'll have the real damages displayed...
<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !
BlueChristmas
Loyal fan
Posts: 216
Joined: Wed Apr 19, 2006 12:19 am

Post by BlueChristmas »

don't know if this will help anyone but i'll post it anyhow

Code: Select all

  	for (i = 1; i < DEF_MAXCHATMSGS; i++) 
  	if (m_pChatMsgList[i] == NULL) {
    ZeroMemory(cTxt, sizeof(cTxt));
    if (m_sDamageMoveAmount > 0)
    	wsprintf(cTxt, "-%dPts", m_sDamageMoveAmount); //pts
    else strcpy(cTxt, "Critical!");
    
    int iFontType;
    if ((m_sDamageMoveAmount >= 0) && (m_sDamageMoveAmount < 12))  iFontType = 21;
    else if ((m_sDamageMoveAmount >= 12) && (m_sDamageMoveAmount < 40)) iFontType = 22;
    else if ((m_sDamageMoveAmount >= 40) || (m_sDamageMoveAmount < 0))	iFontType = 23;

    m_pChatMsgList[i] = new class CMsg(iFontType, cTxt, m_dwCurTime);
    m_pChatMsgList[i]->m_iObjectID = m_sPlayerObjectID;

    if (m_pMapData->bSetChatMsgOwner(m_sPlayerObjectID, -10, -10, i) == FALSE) {
    	delete m_pChatMsgList[i];
    	m_pChatMsgList[i] = NULL;
    }
    break;
  	}
  	m_sDamageMove = 0;
  }

Code: Select all

	case DEF_OBJECTDYING:
  _RemoveChatMsgListByObjectID(wObjectID - 30000);

  for (i = 1; i < DEF_MAXCHATMSGS; i++) 
  if (m_pChatMsgList[i] == NULL) {
  	ZeroMemory(cTxt, sizeof(cTxt));
  	if (sV1 > 0)
    wsprintf(cTxt, "-%dPts!", sV1); //pts
  	else strcpy(cTxt, "Critical!");
  	
  	int iFontType;
  	if ((sV1 >= 0) && (sV1 < 12))  iFontType = 21;
  	else if ((sV1 >= 12) && (sV1 < 40)) iFontType = 22;
  	else if ((sV1 >= 40) || (sV1 < 0))	iFontType = 23;

  	m_pChatMsgList[i] = new class CMsg(iFontType, cTxt, m_dwCurTime);
  	m_pChatMsgList[i]->m_iObjectID = wObjectID - 30000;
  	
  	if (m_pMapData->bSetChatMsgOwner(wObjectID - 30000, -10, -10, i) == FALSE) {
    delete m_pChatMsgList[i];
    m_pChatMsgList[i] = NULL;
  	}
  	return;
  }
  break;

Code: Select all

	case DEF_OBJECTDAMAGE:	
  // Ç÷¹À̾ ij½ºÆÃ Áß¿¡ ¸Â¾Ò´Ù¸é Ãë¼Ò´Ù. 
  if (memcmp(cName, m_cPlayerName, 10) == 0) {
  	m_bIsGetPointingMode = FALSE;
  	m_iPointCommandType  = -1;  // v2.15 NULL -> -1
  	// v1.41 Ä¿¼­ ¸ð¾ç º¯°æ 
  	m_stMCursor.sCursorFrame = 0;
  	
  	// »ç¿ëÁßÀ̾ú´ø ½ºÅ³À» Á¦°Å 
  	ClearSkillUsingStatus();
  }
  
  // Ÿ°Ý ¹ÞÀº ¸Þ½ÃÁö¸¦ 
  _RemoveChatMsgListByObjectID(wObjectID - 30000);
  
  for (i = 1; i < DEF_MAXCHATMSGS; i++) 
  if (m_pChatMsgList[i] == NULL) {
  	ZeroMemory(cTxt, sizeof(cTxt));
  	
  	if (sV1 != 0) {
    if (sV1 > 0)
    	wsprintf(cTxt, "-%dPts", sV1); //pts
    else strcpy(cTxt, "Critical!");
    
    int iFontType;
    if ((sV1 >= 0) && (sV1 < 12))  iFontType = 21;
    else if ((sV1 >= 12) && (sV1 < 40)) iFontType = 22;
    else if ((sV1 >= 40) || (sV1 < 0))	iFontType = 23;

    m_pChatMsgList[i] = new class CMsg(iFontType, cTxt, m_dwCurTime);
  	}
  	else {
    strcpy(cTxt, " * Failed! *");
    m_pChatMsgList[i] = new class CMsg(22, cTxt, m_dwCurTime);
    PlaySound('C', 17, 0);
  	}
  	m_pChatMsgList[i]->m_iObjectID = wObjectID - 30000;

  	if (m_pMapData->bSetChatMsgOwner(wObjectID - 30000, -10, -10, i) == FALSE) {
    delete m_pChatMsgList[i];
    m_pChatMsgList[i] = NULL;
  	}
  	return;
  }
  break;
	}
}
<img src='http://img114.imageshack.us/img114/8618 ... 2dy3lx.jpg' border='0' alt='user posted image' />
misery
Regular
Posts: 62
Joined: Fri May 07, 2004 1:50 pm

Post by misery »

thank you BlueChristmas, Diuuude and all for your contribution and help, deeply appreciated =) when its 100% working i'll upload it here and edit the topic title.
"How art thou fallen from heaven."
Inf3ktion
Regular
Posts: 42
Joined: Tue Jul 05, 2005 1:34 am

Post by Inf3ktion »

I figured it out!
Edit: wow, after testing it's fucked up.
-3024 damage all the time where critical should be. -_- back to work on it.
xAndrewx
just visiting
Posts: 4
Joined: Sat Feb 11, 2006 7:23 pm

Post by xAndrewx »

Quick question, sorry for bothering you, and anyone can awnser this...

Code: Select all

if (damage < 0){
   damage += 200
   //display damages
}
That means all I have to do is change it by adding that little line in order for the "Critical!" message to appear when the damage exceeds 200?

Or, was that an example, and not something you could actually use?
Post Reply