[CODE] Atribute Stones
Author Message ailyn
Silver 4
Over 12 posts and comments.
Likes : 7#1 Subject: [CODE] Atribute Stones 4/30/2017, 7:57 pm buenos dias, buenas tarde, buenas noches, alguien podria decirme si es posible publicar el codigo de
[CODE] Atribute Stones porfavor si alguien lo tiene completo lo necesito le agradesco de hacerlo en adelanto
ailyn
Silver 4
Over 12 posts and comments.
Likes : 7#2 Subject: Re: [CODE] Atribute Stones 4/30/2017, 7:59 pm [CODE] Atribute Stones Quote : Atribute Stones By HB-Tere Staff _________________________ Estos son unos items, que al hacerle doble click y si se?alas un arma o algo por el estilo, le da determinados stats. _________________________ EN LOS SOURCES DEL HG +abrir game.cpp +buscar en la funcion _bDepleteDestTypeItemUseEffect case DEF_ITEMEFFECTTYPE_ARMORDYE +agregar despues del ultimo break de ese case-> Codigo: Código:[ltr] case DEF_ITEMEFFECTTYPE_SWEAPONATTRIBUTE_STONE: if ((sDestItemID >= 0) && (sDestItemID < DEF_MAXITEMS)) { if (m_pClientList[ iClientH ]->m_pItemList[sDestItemID] != NULL) { if (m_pClientList[ iClientH ]->m_pItemList[sDestItemID]->m_cCategory == 1) { dwSWEType = (m_pClientList[ iClientH ]->m_pItemList[sDestItemID]->m_dwAttribute & 0x0000F000) >> 12; dwSWEValue = (m_pClientList[ iClientH ]->m_pItemList[sDestItemID]->m_dwAttribute & 0x00000F00) >> 8; if (dwSWEValue <= 0) { DropItemID(iClientH, m_pClientList[ iClientH ]->m_pItemList[ sDestItemID ]->m_sIDnum, m_pClientList[ iClientH ]->m_sX, m_pClientList[ iClientH ]->m_sY, m_pClientList[ iClientH ]->m_pItemList[sItemIndex]->m_sItemEffectValue1, m_pClientList[ iClientH ]->m_pItemList[sItemIndex]->m_sItemEffectValue2, m_pClientList[ iClientH ]->m_pItemList[sItemIndex]->m_sItemEffectValue3); ItemDepleteHandler(iClientH, sDestItemID, FALSE, FALSE); } else { if ((dwSWEValue >= 1) && ( dwSWEType == m_pClientList[ iClientH ]->m_pItemList[sItemIndex]->m_sItemEffectValue1)) { DropItemID(iClientH, m_pClientList[ iClientH ]->m_pItemList[ sDestItemID ]->m_sIDnum, m_pClientList[iClientH]->m_sX, m_pClientList[iClientH]->m_sY, m_pClientList[ iClientH ]->m_pItemList[sItemIndex]->m_sItemEffectValue1, m_pClientList[ iClientH ]->m_pItemList[sItemIndex]->m_sItemEffectValue2 + dwSWEValue, m_pClientList[ iClientH ]->m_pItemList[sItemIndex]->m_sItemEffectValue3); ItemDepleteHandler(iClientH, sDestItemID, FALSE, FALSE); } else { wsprintf(cInfo, "El item seleccionado no puede ser mejorado."); SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_IPACCOUNTINFO, NULL, NULL, NULL, cInfo); return FALSE; } } SummonCelebrate(iClientH); return TRUE; } else { wsprintf(cInfo, "El item seleccionado no puede ser mejorado."); SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_IPACCOUNTINFO, NULL, NULL, NULL, cInfo); return FALSE; } } } case DEF_ITEMEFFECTTYPE_PWEAPONATTRIBUTE_STONE: if ((sDestItemID >= 0) && (sDestItemID < DEF_MAXITEMS)) { if (m_pClientList[ iClientH ]->m_pItemList[sDestItemID] != NULL) { if (m_pClientList[ iClientH ]->m_pItemList[sDestItemID]->m_cCategory == 1) { dwSWEType = (m_pClientList[ iClientH ]->m_pItemList[sDestItemID]->m_dwAttribute & 0x00F00000) >> 20; dwSWEValue = (m_pClientList[ iClientH ]->m_pItemList[sDestItemID]->m_dwAttribute & 0x000F0000) >> 16; if (dwSWEValue <= 0) { DropItemID(iClientH, m_pClientList[ iClientH ]->m_pItemList[ sDestItemID ]->m_sIDnum, m_pClientList[ iClientH ]->m_sX, m_pClientList[ iClientH ]->m_sY, m_pClientList[ iClientH ]->m_pItemList[sItemIndex]->m_sItemEffectValue1, m_pClientList[ iClientH ]->m_pItemList[sItemIndex]->m_sItemEffectValue2, m_pClientList[ iClientH ]->m_pItemList[sItemIndex]->m_sItemEffectValue3); ItemDepleteHandler(iClientH, sDestItemID, FALSE, FALSE); } else { if ((dwSWEValue >= 1) && ( dwSWEType == m_pClientList[ iClientH ]->m_pItemList[sItemIndex]->m_sItemEffectValue1)) { DropItemID(iClientH, m_pClientList[ iClientH ]->m_pItemList[ sDestItemID ]->m_sIDnum, m_pClientList[iClientH]->m_sX, m_pClientList[iClientH]->m_sY, m_pClientList[ iClientH ]->m_pItemList[sItemIndex]->m_sItemEffectValue1, m_pClientList[ iClientH ]->m_pItemList[sItemIndex]->m_sItemEffectValue2 + dwSWEValue, m_pClientList[ iClientH ]->m_pItemList[sItemIndex]->m_sItemEffectValue3); ItemDepleteHandler(iClientH, sDestItemID, FALSE, FALSE); } else { wsprintf(cInfo, "El item seleccionado no puede ser mejorado."); SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_IPACCOUNTINFO, NULL, NULL, NULL, cInfo); return FALSE; } } SummonCelebrate(iClientH); return TRUE; } else { wsprintf(cInfo, "El item seleccionado no puede ser mejorado."); SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_IPACCOUNTINFO, NULL, NULL, NULL, cInfo); return FALSE; } } }[/ltr] + en item.h agregar: Codigo: Código:[ltr]#define DEF_ITEMEFFECTTYPE_SWEAPONATTRIBUTE_STONE 34 #define DEF_ITEMEFFECTTYPE_PWEAPONATTRIBUTE_STONE 35[/ltr] + en game.cpp agregar: Codigo: Código:[ltr]void CGame::DropItemID(int iClientH,int iItemID,int iX, int iY, int dwType, int dwValue,int cColor) { class CItem * pItem; pItem = new class CItem; if (_bInitItemAttr(pItem, iItemID) == FALSE) { delete pItem; } else { if (dwType <= 10){ pItem->m_dwAttribute = NULL; dwType = dwType << 20; dwValue = dwValue << 16; pItem->m_dwAttribute = pItem->m_dwAttribute | dwType | dwValue; } else if (dwType > 10){ dwType = dwType << 12; dwValue = dwValue << 8; pItem->m_dwAttribute = pItem->m_dwAttribute | dwType | dwValue; } pItem->m_cItemColor = cColor; m_pMapList[ m_pClientList[iClientH]->m_cMapIndex ]->bSetItem(iX, iY, pItem); SendEventToNearClient_TypeB(MSGID_EVENT_COMMON, DEF_COMMONTYPE_ITEMDROP, m_pClientList[iClientH]->m_cMapIndex,iX, iY, pItem->m_sSprite, pItem->m_sSpriteFrame, pItem->m_cItemColor, pItem->m_dwAttribute); // v1.4 } } void CGame::SummonCelebrate(int iClientH) { char seps[] = "= \t\n"; char cOwnerType; short sOwnerH, sType; int dX1, dY1, dX2, dX3, dY2, dY3; int ix, iy; if (m_pClientList[iClientH] == NULL) return; if (m_pClientList[iClientH]->m_bIsInitComplete == FALSE) return; if (m_pClientList[iClientH]->m_bIsKilled == TRUE) return; if (m_pClientList[iClientH]->m_bIsOnServerChange == TRUE) return; sType = 14; dX1 = m_pClientList[iClientH]->m_sX; dX2 = m_pClientList[iClientH]->m_sX - 1; dX3 = m_pClientList[iClientH]->m_sX + 1; dY1 = m_pClientList[iClientH]->m_sY; dY2 = m_pClientList[iClientH]->m_sY - 1; dY3 = m_pClientList[iClientH]->m_sY + 1; switch (m_pMagicConfigList[sType]->m_sType) { case DEF_MAGICTYPE_HPUP_SPOT: m_pMapList[m_pClientList[iClientH]->m_cMapIndex]->GetOwner(&sOwnerH, &cOwnerType, dX1, dY1); Effect_HpUp_Spot(iClientH, DEF_OWNERTYPE_PLAYER, sOwnerH, cOwnerType, m_pMagicConfigList[sType]->m_sValue4, m_pMagicConfigList[sType]->m_sValue5, m_pMagicConfigList[sType]->m_sValue6); SendEventToNearClient_TypeB(MSGID_EVENT_COMMON, DEF_COMMONTYPE_MAGIC, m_pClientList[iClientH]->m_cMapIndex, m_pClientList[iClientH]->m_sX, m_pClientList[iClientH]->m_sY, dX1, dY1, (sType + 100), m_pClientList[iClientH]->m_sType); break; case DEF_MAGICTYPE_SPDOWN_AREA: m_pMapList[m_pClientList[iClientH]->m_cMapIndex]->GetOwner(&sOwnerH, &cOwnerType, dX1, dY1); if (bCheckResistingMagicSuccess(m_pClientList[iClientH]->m_cDir, sOwnerH, cOwnerType, 95) == FALSE) { Effect_SpDown_Spot(iClientH, DEF_OWNERTYPE_PLAYER, sOwnerH, cOwnerType, m_pMagicConfigList[sType]->m_sValue4, m_pMagicConfigList[sType]->m_sValue5, m_pMagicConfigList[sType]->m_sValue6); } for (iy = (dY1 - m_pMagicConfigList[sType]->m_sValue3); iy <= (dY1 + m_pMagicConfigList[sType]->m_sValue3); iy++) for (ix = (dX1 - m_pMagicConfigList[sType]->m_sValue2); ix <= (dX1 + m_pMagicConfigList[sType]->m_sValue2); ix++) { m_pMapList[m_pClientList[iClientH]->m_cMapIndex]->GetOwner(&sOwnerH, &cOwnerType, ix, iy); if (bCheckResistingMagicSuccess(m_pClientList[iClientH]->m_cDir, sOwnerH, cOwnerType, 95) == FALSE) { Effect_SpDown_Spot(iClientH, DEF_OWNERTYPE_PLAYER, sOwnerH, cOwnerType, m_pMagicConfigList[sType]->m_sValue7, m_pMagicConfigList[sType]->m_sValue8, m_pMagicConfigList[sType]->m_sValue9); } SendEventToNearClient_TypeB(MSGID_EVENT_COMMON, DEF_COMMONTYPE_MAGIC, m_pClientList[iClientH]->m_cMapIndex, m_pClientList[iClientH]->m_sX, m_pClientList[iClientH]->m_sY, dX1, dY1, (sType + 100), m_pClientList[iClientH]->m_sType); } break; } }[/ltr] + en game.h declarar: Codigo: [code]void SummonCelebrate(int iClientH); void DropItemID(int iClientH,int iItemID,int iX, int iY, int dwType, int dwValue,int cColor); Y ahora los items que tienen que agregar son: Codigo: Código:[ltr]Item = 1019 AncientStone 11 0 35 9 1 8 0 0 0 1 0 6 157 -110 1 -1 0 0 0 0 0 -1 42 6 Item = 1020 SharpStone 11 0 35 7 1 6 0 0 0 1 0 6 160 -110 1 -1 0 0 0 0 0 -1 42 0 Item = 1021 ExpStone 11 0 34 11 1 7 0 0 0 1 0 6 158 -110 1 -1 0 0 0 0 0 -1 42 0 Item = 1022 LuckyStone 11 0 34 12 1 7 0 0 0 1 0 6 161 -110 1 -1 0 0 0 0 0 -1 42 0[/ltr] _____________ Sprites necesarios: DESCARGAR esta publicacion era del helbreathss pero ya no esta online en fin no logro poner este codigo siempre me da errores que no entiendo
LifeX
Diamond 1
Over 144 posts and comments.
10th Anniversary
Earned after being a member for 10 years.
Likes : 26#3 Subject: Re: [CODE] Atribute Stones 5/1/2017, 3:07 pm After reviewing the code, there are some restriction and glitches in it, but overall its good in those specs. There is a lot for me to explain in terms of its restriction based on the code above, but with a bit of studying and coding, you can add and edit more stuffs. Just some corrections to make sure the code above works perfectly. You will need to declare DWORD dwSWEType, dwSWEValue; At the beginning of function _bDepleteDestTypeItemUseEffect And you need to include break; in both the end function of the case DEF_ITEMEFFECTTYPE_SWEAPONATTRIBUTE_STONE DEF_ITEMEFFECTTYPE_PWEAPONATTRIBUTE_STONE in _bDepleteDestTypeItemUseEffect Well shared.
Centuu.-
Diamond 1
Over 144 posts and comments.
Likes : 17#4 Subject: Re: [CODE] Atribute Stones 5/1/2017, 4:57 pm And, of course, we need the sprites.
ailyn
Silver 4
Over 12 posts and comments.
Likes : 7#5 Subject: Re: [CODE] Atribute Stones 5/2/2017, 12:20 am este es el error que me esta dando, ya he puesto el codigo desde que lo publique, no me explique cuando mensione la palabra error, el error consiste en que cuando le doy el atributo a un item permitido, entonces ese no se borra sino que se queda y hace un nuevo con el status ancient ejemplo..VIDEO
LifeX
Diamond 1
Over 144 posts and comments.
10th Anniversary
Earned after being a member for 10 years.
Likes : 26#6 Subject: Re: [CODE] Atribute Stones 5/4/2017, 2:10 pm Well, I don't have that issue. Probably you need to check and see if you have change any other codes. DropItemID would be the function to give stats and also to drop the item on the floor. The function is not dropping the item but instead adding a new item on it. Check the function.
ailyn
Silver 4
Over 12 posts and comments.
Likes : 7#7 Subject: Re: [CODE] Atribute Stones 5/4/2017, 8:58 pm LifeX wrote: Well, I don't have that issue. Probably you need to check and see if you have change any other codes. DropItemID would be the function to give stats and also to drop the item on the floor. The function is not dropping the item but instead adding a new item on it. Check the function. if ((dwSWEValue >= 1) && ( dwSWEType == m_pClientList[ iClientH ]->m_pItemList[sItemIndex]->m_sItemEffectValue1)) { DropItemID(iClientH, m_pClientList[ iClientH ]->m_pItemList[ sDestItemID ]->m_sIDnum, m_pClientList[iClientH]->m_sX, m_pClientList[iClientH]->m_sY, m_pClientList[ iClientH ]->m_pItemList[sItemIndex]->m_sItemEffectValue1, m_pClientList[ iClientH ]->m_pItemList[sItemIndex]->m_sItemEffectValue2 + dwSWEValue, m_pClientList[ iClientH ]->m_pItemList[sItemIndex]->m_sItemEffectValue3); ItemDepleteHandler(iClientH, sDestItemID, FALSE, FALSE);}
Sponsored content
#8 Subject: Re: [CODE] Atribute Stones
[CODE] Atribute Stones
Similar topics
Permissions in this forum: You cannot reply to topics in this forum
Latest topics »
HB Centenario (SRC+Server+Files) 10/22/2024, 10:09 pm by
nicoprs »
Helbreath Sources 10/13/2024, 9:22 pm by
Genesis »
[CODE] Fix Windows 8 - 10 9/18/2024, 10:07 pm by
Celestials »
New Helbreath 3D Project-HB: Reigns of Middleland 8/28/2024, 9:19 pm by
Quietmov3s »
Crear una nueva magia 8/9/2024, 9:21 am by
nicoprs »
Helbreath Clients to Download 7/26/2024, 8:54 pm by
Sabrina »
Files Src etc Helbreath Argentina 7/23/2024, 4:21 am by
nicoprs »
Problemas con el Visual C++ 6.0 en windows 7 x64 7/22/2024, 4:45 pm by
Sabrina »
Helbreath Korea 7/22/2024, 2:21 pm by
Sabrina »
Como banear cuenta / jugadores 7/22/2024, 8:29 am by
nicoprs
Marketplace recent topics 50 $ HB Necklace Of …
8/28/2024, 10:57 pm
GM4
Donation helbreath adven…
8/19/2020, 11:52 am
Apocalipsi
100 $ New Atribute
5/17/2020, 3:47 am
KenZoB
250 $ Teams vs Team E…
5/17/2020, 3:41 am
KenZoB
100 $ Stacked Items
4/9/2020, 3:41 pm
sleeq
100 $ Battlestaff
4/9/2020, 3:31 pm
sleeq
200 $ Linear spell da…
12/27/2019, 5:39 am
sleeq
500 $ Item grid sour…
12/17/2019, 2:58 pm
skyddr8512
888 $ New ~ Riding …
12/17/2019, 2:58 pm
skyddr8512
980 $ Hello ~ Riding…
12/13/2019, 4:32 pm
skyddr8512
Add an ad
View all ads