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.SearchRulesRegisterLog in
Share
 

 [CODE] ShorCut para el comando de Critical

Go down 
AuthorMessage
KenZoB

KenZoB


[CODE] ShorCut para el comando de Critical Empty
PostSubject: [CODE] ShorCut para el comando de Critical   [CODE] ShorCut para el comando de Critical EmptyThu 13 Nov 2014, 10:26 pm

El code consiste en hacer que el comando de critical en vez de poner /critical usar la letra Ctrl + C para activarlo.

Abrimos ClientSources:
Game.cpp buscamos:

Code:
case DEF_REQUEST_RESURRECTPLAYER_NO:  // By snoopy

Abajo agregamos:

Code:
case DEF_REQUEST_CRITICALSADD:  // Shortcut para Critical

abajo de :

Code:
case 68://'D'
      if (m_bCtrlPressed == TRUE && m_cGameMode == DEF_GAMEMODE_ONMAINGAME && (!m_bInputStatus) )
      {   m_cDetailLevel++;
         if( m_cDetailLevel > 2 ) m_cDetailLevel = 0;
         switch( m_cDetailLevel ) {
         case 0:
            AddEventList( NOTIFY_MSG_DETAIL_LEVEL_LOW, 10 );
            break;
         case 1:
            AddEventList( NOTIFY_MSG_DETAIL_LEVEL_MEDIUM, 10 );
            break;
         case 2:
            AddEventList( NOTIFY_MSG_DETAIL_LEVEL_HIGH, 10 );
            break;
      }   }
      break;

Agregar abajo:

Code:
case 67://'C' shortcut para criticals
      if (m_bCtrlPressed && m_cGameMode == DEF_GAMEMODE_ONMAINGAME && (!m_bInputStatus) )
      {   
      bSendCommand(DEF_REQUEST_CRITICALSADD, 0, 0, 0, 0 ,0, NULL, 0);
      }   
      break;

en NetMessages.h agregamos:

Code:
//ShortCut para criticals
#define DEF_REQUEST_CRITICALSADD                0x0FC94216


ahora vamos a HGSources y buscamos:

Code:
case DEF_REQUEST_RESURRECTPLAYER_NO:
            RequestResurrectPlayer(iClientH, FALSE);
            break;


Abajo agregamos:

Code:
case DEF_REQUEST_CRITICALSADD:
            PlayerOrder_GetCrits(iClientH);
            break;


Nota: Asegúrense de tener la función de tu comando de critical igual a esta sino remplazarla por el nombre que tengas. 


[CODE] ShorCut para el comando de Critical Pbucket
Back to top Go down
chogattt64

chogattt64


[CODE] ShorCut para el comando de Critical Empty
PostSubject: Re: [CODE] ShorCut para el comando de Critical   [CODE] ShorCut para el comando de Critical EmptySat 11 Jun 2016, 12:06 pm

amigo quisiera saber como agregar drop i quitar drop el %Del drop rare item de los NPC como poner items i sacar item porfavor me sirviria mucho ese Tutorial ah i respecto a este comando de critical me sale los siguiente errores : C:\Users\Windows 7\Desktop\Helbreath Server\HG Src\Game.cpp(12029) : error C2065: 'DEF_REQUEST_CRITICALSADD' : undeclared identifier
C:\Users\Windows 7\Desktop\Helbreath Server\HG Src\Game.cpp(12029) : error C2051: case expression not constant
C:\Users\Windows 7\Desktop\Helbreath Server\HG Src\Game.cpp(12030) : error C2065: 'PlayerOrder_GetCrits' : undeclared identifier
Error executing cl.exe.

HGserver.exe - 3 error(s), 0 warning(s)
Back to top Go down
LifeX
♕ Grand Master
LifeX


[CODE] ShorCut para el comando de Critical Empty
PostSubject: Re: [CODE] ShorCut para el comando de Critical   [CODE] ShorCut para el comando de Critical EmptySun 12 Jun 2016, 4:58 am

Because you did not declare all of the function inside HGServer. KenzoB did not finish up the code, or he did not paste all other people's code.

FYI KenzoB can not code. Anyway this is the fix you need chogattt64.

Go into NetMessages.h Add
Code:
#define DEF_REQUEST_CRITICALSADD 0x0FC94216

Go into Game.h Add
Code:
// This will declare your functions
void PlayerOrder_GetCrits (int iClientH);

Go into Game.cpp Add
Code:
//LifeX Criticals
void CGame::PlayerOrder_GetCrits(int iClientH)
{
 char notice[256];

 m_pClientList[iClientH]->m_iSuperAttackLeft += 100;
 SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_SUPERATTACKLEFT, NULL, NULL, NULL, NULL);

 wsprintf(notice,"You have got 100 criticals!");
 SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_NOTICEMSG, NULL, NULL, NULL, notice);
 return;

}


You want to add in criteria for the critical request also can, its up to you.

Eg. 
// This is where you trade 10 majestics for 100 criticals.

Code:
//LifeX Criticals
void CGame::PlayerOrder_GetCrits(int iClientH)
{
 char notice[256];
 
 if (m_pClientList[iClientH]->m_iGizonItemUpgradeLeft < 10)
 {
 wsprintf(notice,"You don't have 10 majestics.");
 SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_NOTICEMSG, NULL, NULL, NULL, notice);
 return;
 }
 else
 {
 m_pClientList[iClientH]->m_iGizonItemUpgradeLeft -= 10;
 m_pClientList[iClientH]->m_iSuperAttackLeft += 100;
 SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_SUPERATTACKLEFT, NULL, NULL, NULL, NULL);

 wsprintf(notice,"You have traded 100 criticals for 10 majestics!");
 SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_NOTICEMSG, NULL, NULL, NULL, notice);
 return;
 }
}
Back to top Go down
KenZoB

KenZoB


[CODE] ShorCut para el comando de Critical Empty
PostSubject: Re: [CODE] ShorCut para el comando de Critical   [CODE] ShorCut para el comando de Critical EmptySun 19 Jun 2016, 3:46 pm

//LifeX Criticals 


This most beautiful code you created your LifeX not know that this code was yours wowwwwwww




[CODE] ShorCut para el comando de Critical Pbucket
Back to top Go down
LifeX
♕ Grand Master
LifeX


[CODE] ShorCut para el comando de Critical Empty
PostSubject: Re: [CODE] ShorCut para el comando de Critical   [CODE] ShorCut para el comando de Critical EmptyMon 20 Jun 2016, 10:24 am

[You must be registered and logged in to see this link.] wrote:
//LifeX Criticals 


This most beautiful code you created your LifeX not know that this code was yours wowwwwwww


Of course its mine, and its beautiful. If follow you code, where its not even finish because everyone know you can't even code, what more pasting some other people's work.

The code is edited by me of course its mine, Im not using any of the original codes which you PASTE.

Good day Erick "Gay" KenzoB
Back to top Go down
chogattt64

chogattt64


[CODE] ShorCut para el comando de Critical Empty
PostSubject: Re: [CODE] ShorCut para el comando de Critical   [CODE] ShorCut para el comando de Critical EmptySat 09 Jul 2016, 6:35 pm

gracias me sirvio :D
Back to top Go down
chogattt64

chogattt64


[CODE] ShorCut para el comando de Critical Empty
PostSubject: Re: [CODE] ShorCut para el comando de Critical   [CODE] ShorCut para el comando de Critical EmptySat 09 Jul 2016, 6:35 pm

gracias me sirvio :D
Back to top Go down
 
[CODE] ShorCut para el comando de Critical
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: