An essential info site for anyone learning the game. Great community and often very insightful posts.
 
HomeUseful information for Helbreath beginnersPlay, discover, and broadcast your Helbreath moments for free.Statistics overviewSearchMemberlistRulesRegisterLog in
 

 [CODE] Majestic Point UP!!

Go down 
AuthorMessage
KenZoB
‏‏‎ ‎‏‏‎ ‎
‏‏‎ ‎‏‏‎ ‎
KenZoB

Posts : 42

[CODE] Majestic Point UP!! Empty
PostSubject: [CODE] Majestic Point UP!!   [CODE] Majestic Point UP!! 9991011/14/2014, 12:15 am

La función de este code es que cuando subes un Majestic Point te sale un mensaje en la parte superior del cuerpo así como el de "Level UP" diciendo "Majestic Point UP"


Todo el code va en el Cliente.

Declaramos en Game.h:

Code:
void NotifyMsg_MajesticUp(char * pData);

ahora vamos a Lan_eng.h y declaramos :

Code:
#define   NOTIFYMSG_MAJUP1   "Majestic UP"
#define   NOTIFYMSG_MAJUP2   "Majestic UP"

en Game.cpp buscamos :

Code:
void CGame::NotifyMsg_SettingSuccess(char * pData)

y arriba de eso agregamos :

Code:
// majestic up
void CGame::NotifyMsg_MajesticUp(char * pData)
{char * cp;
 int  * ip;
 int i, iPrevLevel;
 char cTxt[120];

   iPrevLevel = m_iLevel;

   cp = (char *)(pData   + DEF_INDEX2_MSGTYPE + 2);

   /*ip  = (int *)cp;
   m_iLevel = *ip;
   cp += 4;

   ip   = (int *)cp;
   m_iStr = *ip;
   cp  += 4;

   ip   = (int *)cp;
   m_iVit = *ip;
   cp  += 4;

   ip   = (int *)cp;
   m_iDex = *ip;
   cp  += 4;

   ip   = (int *)cp;
   m_iInt = *ip;
   cp  += 4;

   ip   = (int *)cp;
   m_iMag = *ip;
   cp  += 4;

   ip   = (int *)cp;
   m_iCharisma = *ip;
   cp  += 4;*/

   // Elian
   /*m_iLU_Point = m_iLevel*3 - ((m_iStr + m_iVit + m_iDex + m_iInt + m_iMag + m_iCharisma) - 70) - 3;
   m_cLU_Str = m_cLU_Vit = m_cLU_Dex = m_cLU_Int = m_cLU_Mag = m_cLU_Char = 0;*/

   wsprintf(cTxt, NOTIFYMSG_MAJUP1);
   AddEventList(cTxt, 10);

   switch (m_sPlayerType) {
   case 1:
   case 2:
   case 3:
      PlaySound('C', 21, 0);
      break;

   case 4:
   case 5:
   case 6:
      PlaySound('C', 22, 0);
      break;
   }

   _RemoveChatMsgListByObjectID(m_sPlayerObjectID);

   for (i = 1; i < DEF_MAXCHATMSGS; i++)
   if (m_pChatMsgList[i] == NULL) {
      ZeroMemory(cTxt, sizeof(cTxt));
      strcpy(cTxt, "Majestic UP");
      m_pChatMsgList[i] = new class CMsg(23, 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;
      }
      return;
   }
}

buscamos y remplazamos :

Code:
case DEF_NOTIFY_GIZONITEMUPGRADELEFT: // 0x0BA4// Item upgrade is possible.
      cp = (char *)(pData   + DEF_INDEX2_MSGTYPE + 2);
      sp  = (short *)cp;
      sV1 = *sp;
      cp += 2;
      m_iGizonItemUpgradeLeft = sV1;
      dwp = (DWORD *)cp;
      switch (*dwp) {
      case 1: //
         AddEventList(NOTIFY_MSG_HANDLER_GIZONITEMUPGRADELEFT1, 10);
         NotifyMsg_MajesticUp(pData);
         break;
      }
      //wsprintf(G_cTxt,"majesty: %d", m_iGizonItemUpgradeLeft);
      //DebugLog(G_cTxt);
      cp += 4;
      break;

y listo ya eso es todo.


[CODE] Majestic Point UP!! Pbucket
Back to top Go down
Centuu.-
‏‏‎ ‎‏‏‎ ‎
‏‏‎ ‎‏‏‎ ‎
Centuu.-

Posts : 228

[CODE] Majestic Point UP!! Empty
PostSubject: Re: [CODE] Majestic Point UP!!   [CODE] Majestic Point UP!! 999103/9/2016, 9:13 pm

Yo pude hacer que, al recibir mucha experiencia, subas muchos Majestic Points :D


binarydata » Wed Apr 06, 2005 8:14 pm wrote:
hb dead anyways
Back to top Go down
KenZoB
‏‏‎ ‎‏‏‎ ‎
‏‏‎ ‎‏‏‎ ‎
KenZoB

Posts : 42

[CODE] Majestic Point UP!! Empty
PostSubject: Re: [CODE] Majestic Point UP!!   [CODE] Majestic Point UP!! 999104/10/2017, 7:22 pm

bien hay Centu :D


[CODE] Majestic Point UP!! Pbucket
Back to top Go down
Centuu.-
‏‏‎ ‎‏‏‎ ‎
‏‏‎ ‎‏‏‎ ‎
Centuu.-

Posts : 228

[CODE] Majestic Point UP!! Empty
PostSubject: Re: [CODE] Majestic Point UP!!   [CODE] Majestic Point UP!! 999104/10/2017, 8:14 pm

Ya tenés que tocar el HGServer, la función CheckLevelUp... es muy enroscado, tuve que crear un sistema llamado Majestic Level (como Paragón de Diablo III), que verifique si sos Level Max y checkee Next Exp = Level+MajesticLevel.. pero funciona!


binarydata » Wed Apr 06, 2005 8:14 pm wrote:
hb dead anyways
Back to top Go down
 
[CODE] Majestic Point UP!!
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Join Helbreath :: Open Source / Development Corner :: C++-
Jump to: