Join Helbreath
Would you like to react to this message? Create an account in a few clicks or log in to continue.


A site run by veteran gamers with the aim of sharing discussions and content exclusively related to the development of Helbreath and its gameplay.
 
HomeUseful information for Helbreath beginnersPlay, discover, and broadcast your Helbreath moments for free.Statistics overviewSearchMemberlistRulesRegisterLog in

We depend on Ads revenue to keep our site running. Please consider disabling your Ad Blocker so that we can continue to create the content you come to enjoy.
Thank you for your continued cooperation and understanding.


 

 [CODE] Auto SS + Enemy Kill

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

Posts : 49
Since : 2014-11-05

[CODE] Auto SS + Enemy Kill Empty
PostSubject: [CODE] Auto SS + Enemy Kill   [CODE] Auto SS + Enemy Kill 9991011/6/2014, 1:37 pm

En el game.cpp, del cliente... simplemente, modifican esta función:

Remplazar esta función:

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

por esta:

Code:
void CGame::NotifyMsg_EnemyKillReward(char *pData)
{
 DWORD * dwp;
 short * sp, sGuildRank;
 char  * cp, cName[12], cGuildName[24], cTxt[120];
 int   iExp, iEnemyKillCount, iWarContribution;
 int i;

   ZeroMemory(cName, sizeof(cName));
   ZeroMemory(cGuildName, sizeof(cGuildName));

   cp = (char *)(pData + DEF_INDEX2_MSGTYPE + 2);
   dwp  = (DWORD *)cp;
   iExp = *dwp;
   cp += 4;
   dwp  = (DWORD *)cp;
   iEnemyKillCount = *dwp;
   cp += 4;
   memcpy(cName, cp, 10);
   cp += 10;
   memcpy(cGuildName, cp, 20);
   cp += 20;
   sp  = (short *)cp;
   sGuildRank = *sp;
   cp += 2;
   sp  = (short *)cp;
   iWarContribution = *sp;
   cp += 2;

   if (iWarContribution > m_iWarContribution)
   {   wsprintf(G_cTxt, "%s +%d!", m_pGameMsgList[21]->m_pMsg, iWarContribution - m_iWarContribution);
      SetTopMsg(G_cTxt, 5);
   }else if (iWarContribution < m_iWarContribution)
   {}
   m_iWarContribution = iWarContribution;

   if (sGuildRank == -1)
   {   wsprintf(cTxt, NOTIFYMSG_ENEMYKILL_REWARD1, cName);
      AddEventList(cTxt, 10);
   }else
   {   wsprintf(cTxt, NOTIFYMSG_ENEMYKILL_REWARD2, cName, cGuildName); // Fixed by Snoopy
      AddEventList(cTxt, 10);
   }

/*   if( m_iExp != iExp ) // removed by snoopy because too much msg hide victim's name
   {   if (m_iExp > iExp) wsprintf(cTxt, EXP_DECREASED,m_iExp - iExp);
      else wsprintf(cTxt, EXP_INCREASED,iExp - m_iExp);
      AddEventList(cTxt, 10);
   }*/

   if (m_iEnemyKillCount != iEnemyKillCount)
   {   if (m_iEnemyKillCount > iEnemyKillCount)
      {   wsprintf(cTxt, NOTIFYMSG_ENEMYKILL_REWARD5,m_iEnemyKillCount - iEnemyKillCount);
         AddEventList(cTxt, 10);
      }else
      {   wsprintf(cTxt, NOTIFYMSG_ENEMYKILL_REWARD6, iEnemyKillCount - m_iEnemyKillCount);
         AddEventList(cTxt, 10);
      }
   }

   //New Addon - ZeroEoyPnk - MundoHelbreath
   _RemoveChatMsgListByObjectID(m_sPlayerObjectID);

   for (i = 1; i < DEF_MAXCHATMSGS; i++)
   if (m_pChatMsgList[i] == NULL) {
      ZeroMemory(cTxt, sizeof(cTxt));
      strcpy(cTxt, "Enemy Kill!");
      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;
      }
   }

   if( iExp >= 0 ) m_iExp = iExp;
   if( iEnemyKillCount >= 0 ) m_iEnemyKillCount = iEnemyKillCount;
   PlaySound('E', 23, 0);
   CreateScreenShot();
}

Aca esta para que funcione en el F12:

Buscar en "DlgBoxClick_SysMenu":

Code:
//Guide Map Toggle
if ((msX >= sX + 28) && (msX <= sX + 127) && (msY >= sY + 178) && (msY <= sY + 193))
{ if( m_bIsDialogEnabled[9] ) DisableDialogBox(9);
else EnableDialogBox(9, 0, 0, 0, NULL);
}

Abajo agregar:

Code:
if ((msX >= sX + 132) && (msX <= sX + 235) && (msY >= sY + 178) && (msY <= sY + 193))
{ if (EKScreen == TRUE){
EKScreen == FALSE;
AddEventList( NOTIFY_MSG_EKSCREEN_OFF, 10 );
}else
{ EKScreen == TRUE;
AddEventList( NOTIFY_MSG_EKSCREEN_ON, 10 );
}
}


buscar en "DrawDialogBox_SysMenu":

Code:
PutString(sX + 23, sY + 180, DRAW_DIALOGBOX_SYSMENU_GUIDEMAP, RGB(45,25,25));
PutString(sX + 24, sY + 180, DRAW_DIALOGBOX_SYSMENU_GUIDEMAP, RGB(45,25,25));
if (m_bIsDialogEnabled[9]) PutString(sX + 99, sY + 180, DRAW_DIALOGBOX_SYSMENU_ON, RGB(255,255,255));
else PutString(sX + 98, sY + 180, DRAW_DIALOGBOX_SYSMENU_OFF, RGB(200,200,200));

abajo agregar:

Code:
PutString(sX + 134, sY + 180, DRAW_DIALOGBOX_SYSMENU_SS, RGB(45,25,25));
PutString(sX + 135, sY + 180, DRAW_DIALOGBOX_SYSMENU_SS, RGB(45,25,25));
if (EKScreen == TRUE) PutString(sX + 208, sY + 180, DRAW_DIALOGBOX_SYSMENU_SS_ON, RGB(255,255,255));
else PutString(sX + 208, sY + 180, DRAW_DIALOGBOX_SYSMENU_SS_OFF, RGB(255,255,255));

en lan_eng.h agregar:

Code:
#define DRAW_DIALOGBOX_SYSMENU_SS "EK SS"
#define NOTIFY_MSG_EKSCREEN_OFF "EK Screen OFF"
#define NOTIFY_MSG_EKSCREEN_ON "EK Screen ON"
Back to top Go down
jonathan123456

jonathan123456

Posts : 32
Since : 2016-05-26

[CODE] Auto SS + Enemy Kill Empty
PostSubject: Re: [CODE] Auto SS + Enemy Kill   [CODE] Auto SS + Enemy Kill 9991010/27/2016, 2:07 pm

Gracias amigo el Enemil Kill Funciono pero cuando llega a la parte de agregar el f12 em saltan varios errores ... igual deje el enemil kill :)
Back to top Go down
 
[CODE] Auto SS + Enemy Kill
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: