HomeUseful information for Helbreath beginnersStatistics overviewSearchMemberlistGalleryRulesRegisterLog in

 

 [CODE] Fire Strike Hambuerk

Go down 
AuthorMessage
Zmoky


Zmoky

High Engagement
10th Anniversary
Earned after being a member for 10 years.
Silver 2
Over 36 posts and comments.

Likes : 23

[CODE] Fire Strike Hambuerk Empty
#1PostSubject: [CODE] Fire Strike Hambuerk   [CODE] Fire Strike Hambuerk 999103/9/2024, 5:32 am

El code consiste en que al equiparte el FireStrikeHauberk, si un player te hace algun daño, se te lanza sobre ti mismo la magia FireStrike. 

Muy util si te dan lize.

Src HG

Buscar en Game.cpp

Code:
void CGame::Effect_Damage_Spot_DamageMove

Code:
void CGame::Effect_Damage_Spot

en ambos abajo de 

Code:
switch (cAttackerType) {
case DEF_OWNERTYPE_PLAYER:

agregar 

Code:
if (m_pClientList[sTargetH] == NULL) return 0;
 sItemIndex = m_pClientList[sTargetH]->m_sItemEquipmentStatus[DEF_EQUIPPOS_ARMS];
 if(sItemIndex != -1 && m_pClientList[sTargetH]->m_pItemList[sItemIndex] != NULL)
 {
 if((m_pClientList[sTargetH]->m_pItemList[sItemIndex]->m_sIDnum == 1000) ||
 (m_pClientList[sTargetH]->m_pItemList[sItemIndex]->m_sIDnum == 1001))//FireStrikeHauberk M - W
 {
 PlayerMagicHandler(sTargetH, m_pClientList[sTargetH]->m_sX, m_pClientList[sTargetH]->m_sY, 30, TRUE);
 }
 }

Por ultimo en 

Code:
void CGame::PlayerMagicHandler

Buscar

Code:
if (m_pClientList[iClientH]->m_sItemEquipmentStatus[ DEF_EQUIPPOS_RHAND ] != -1) {
 wWeaponType = ((m_pClientList[iClientH]->m_sAppr2 & 0x0FF0) >> 4);
 if ((wWeaponType >= 34) && (wWeaponType <= 39)) {

 }
 else return;
 }


y reemplazar todo por :

Code:
int sItemIndex2;
 sItemIndex2 = m_pClientList[iClientH]->m_sItemEquipmentStatus[DEF_EQUIPPOS_ARMS];
 if((sItemIndex2 != -1) && (m_pClientList[iClientH]->m_pItemList[sItemIndex2] != NULL))
 {
 if((m_pClientList[iClientH]->m_pItemList[sItemIndex2]->m_sIDnum == 1002) ||
 (m_pClientList[iClientH]->m_pItemList[sItemIndex2]->m_sIDnum == 1001)) sItemIndex2 = NULL;//FireStrikeHauberk M - W
 }
 if(sItemIndex2 != NULL)
 {
 if (m_pClientList[iClientH]->m_sItemEquipmentStatus[DEF_EQUIPPOS_RHAND] != -1) {
 wWeaponType = ((m_pClientList[iClientH]->m_sAppr2 & 0x0FF0) >> 4);
 if ((wWeaponType >= 34) && (wWeaponType <= 39)) {
 }
 else return;
 }

 if ((m_pClientList[iClientH]->m_sItemEquipmentStatus[DEF_EQUIPPOS_LHAND]   != -1) ||
 (m_pClientList[iClientH]->m_sItemEquipmentStatus[DEF_EQUIPPOS_TWOHAND] != -1)) return;
 }

Para finalizar en su item.cfg tienen que crear dos nuevos item con la ID que deseen, en este caso segun el code tendria que ser la 1000 para M y 1001 para W.

Algo asi por ejemplo :


Code:
Item = 1000 FireStrikeHauberk(M) 1 3 2 12 12 0 14 100 0 1000 0 7 1 2400 1200 2 0 90 1 -3 -3 0 6 3
Item = 1001 FireStrikeHauberk(W) 1 3 2 12 12 0 14 100 0 1000 0 11 2 2400 1200 3 0 90 2 -3 -3 0 6 9
Back to top Go down
 
[CODE] Fire Strike Hambuerk
Back to top 
Page 1 of 1
 Similar topics
-
» [CODE] New Magia Strike of the Ghost
» [Magic] Strike of the Ghost
» Get IP code
» [CODE] MP,HP,SP, EN COLORES
» [CODE] /dkset

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