HomeUseful information for Helbreath beginnersStatistics overviewSearchMemberlistGalleryRulesRegisterLog in

 

 [CODE] ShorCut para el comando de Critical

Go down 
3 posters
AuthorMessage
KenZoB


KenZoB

Silver 1
Earned by having 48 posts & comments.
Civilian
Granted to members for high engagement.

Likes : 9

[CODE] ShorCut para el comando de Critical Empty
#1PostSubject: [CODE] ShorCut para el comando de Critical   [CODE] ShorCut para el comando de Critical 9991011/14/2014, 3:26 am

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. 
Back to top Go down
chogattt64


chogattt64

Silver 4
Earned by having 12 posts & comments.

Likes : 0

[CODE] ShorCut para el comando de Critical Empty
#2PostSubject: Re: [CODE] ShorCut para el comando de Critical   [CODE] ShorCut para el comando de Critical 999106/11/2016, 4: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


LifeX

Diamond 1
Earned by having 144 posts & comments.
Civilian
Granted to members for high engagement.
Great Mentor
Granted to veteran members who exhibit helpful and sportsmanlike behavior.
Moderator
Earned by becoming a board moderator.

Likes : 26

[CODE] ShorCut para el comando de Critical Empty
#3PostSubject: Re: [CODE] ShorCut para el comando de Critical   [CODE] ShorCut para el comando de Critical 999106/12/2016, 8: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

Silver 1
Earned by having 48 posts & comments.
Civilian
Granted to members for high engagement.

Likes : 9

[CODE] ShorCut para el comando de Critical Empty
#4PostSubject: Re: [CODE] ShorCut para el comando de Critical   [CODE] ShorCut para el comando de Critical 999106/19/2016, 7:46 pm

//LifeX Criticals 


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


Back to top Go down
LifeX


LifeX

Diamond 1
Earned by having 144 posts & comments.
Civilian
Granted to members for high engagement.
Great Mentor
Granted to veteran members who exhibit helpful and sportsmanlike behavior.
Moderator
Earned by becoming a board moderator.

Likes : 26

[CODE] ShorCut para el comando de Critical Empty
#5PostSubject: Re: [CODE] ShorCut para el comando de Critical   [CODE] ShorCut para el comando de Critical 999106/20/2016, 2:24 pm

KenZoB 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

Silver 4
Earned by having 12 posts & comments.

Likes : 0

[CODE] ShorCut para el comando de Critical Empty
#6PostSubject: Re: [CODE] ShorCut para el comando de Critical   [CODE] ShorCut para el comando de Critical 999107/9/2016, 10:35 pm

gracias me sirvio :D
Back to top Go down
chogattt64


chogattt64

Silver 4
Earned by having 12 posts & comments.

Likes : 0

[CODE] ShorCut para el comando de Critical Empty
#7PostSubject: Re: [CODE] ShorCut para el comando de Critical   [CODE] ShorCut para el comando de Critical 999107/9/2016, 10:35 pm

gracias me sirvio :D
Back to top Go down
Sponsored content






[CODE] ShorCut para el comando de Critical Empty
#8PostSubject: Re: [CODE] ShorCut para el comando de Critical   [CODE] ShorCut para el comando de Critical 99910

Back to top Go down
 
[CODE] ShorCut para el comando de Critical
Back to top 
Page 1 of 1
 Similar topics
-
» [CODE] Agregar critical potion
»  [CODE] Habilitar F1 Para binds
» [CODE] Colores para tu Noticement
» Code para ver items en el piso
» HOLA, volviendo al critical

Permissions in this forum:You cannot reply to topics in this forum
Join Helbreath :: Development :: Code Posting-
Jump to: