Centuu.-
Diamond 1
Earned by having 144 posts & comments.
Civilian
Granted to members for high engagement.
Full Hero
Granted to members for great contributions.
Great Mentor
Granted to veteran members who exhibit helpful and sportsmanlike behavior.
Moderator
Earned by becoming a board moderator.
Likes : 17
| #1Subject: [CODE] /dkset 1/7/2020, 11:51 am | |
| En los sources del HG, en Game.cpp al final de todo agregar: - Code:
-
//dkset by diuude and update by drawjer and modified by Ovl void CGame::GetDkSet(int iClientH) { class CItem * pItem; int dkM[] = {706,707,708,710}; int dkW[] = {724,725,726,728}; int dmM[] = {711,712,713,913}; int dmW[] = {729,730,731,914}; int weapon, iItemID, i, iEraseReq; char cTxt[120]; DWORD dwGoldCount = dwGetItemCount(iClientH, "Gold"); if(m_pClientList[iClientH] == NULL) return; if(m_pClientList[iClientH]->m_iLevel < m_iPlayerMaxLevel) return; /*if (dwGoldCount < 50000) { wsprintf(cTxt, " Not enough gold. You need 50,000 gold."); SendNotifyMsg(iClientH, iClientH, DEF_NOTIFY_NOTICEMSG, NULL, NULL, NULL, cTxt); return; // centu - el dk set cuesta gold }*/ //if (((strcmp(m_pMapList[m_pClientList[iClientH]->m_cMapIndex]->m_cName, "cityhall_1") == 0) || (strcmp(m_pMapList[m_pClientList[iClientH]->m_cMapIndex]->m_cName, "cityhall_2") == 0))) { for (i = 0; i <= 4; i++) { pItem = new class CItem; iItemID = -1; if (m_pClientList[iClientH]->m_cSex == 1) { if (m_pClientList[iClientH]->m_iStr > m_pClientList[iClientH]->m_iInt) { iItemID = dkM[i]; } else { iItemID = dmM[i]; } } else { if (m_pClientList[iClientH]->m_iStr > m_pClientList[iClientH]->m_iInt) { iItemID = dkW[i]; } else { iItemID = dmW[i]; } } if (i == 4) { if (m_pClientList[iClientH]->m_iStr > m_pClientList[iClientH]->m_iInt) { weapon = 709; } else { weapon = 714; } iItemID = weapon; } //SetItemCount(iClientH, "Gold", (dwGoldCount - 50000)); if (iItemID != -1) //if any error occures, dont crash character { _bInitItemAttr(pItem, iItemID); pItem->m_sTouchEffectType = DEF_ITET_UNIQUE_OWNER; pItem->m_sTouchEffectValue1 = m_pClientList[iClientH]->m_sCharIDnum1; pItem->m_sTouchEffectValue2 = m_pClientList[iClientH]->m_sCharIDnum2; pItem->m_sTouchEffectValue3 = m_pClientList[iClientH]->m_sCharIDnum3; _bAddClientItemList(iClientH, pItem, &iEraseReq); SendItemNotifyMsg(iClientH, DEF_NOTIFY_ITEMOBTAINED, pItem, NULL); } } //} } Después buscar - Code:
-
if (memcmp(cp, "/who", 4) == 0) { SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_TOTALUSERS, NULL, NULL, NULL, NULL); return; } Y debajo agregar - Code:
-
if (memcmp(cp, "/dkset", 6) == 0) { GetDkSet(iClientH); return; } Y en Game.h agregar - Code:
-
void GetDkSet(int iClientH); Saludos! |
|
kelvinlp
Silver 2
Earned by having 36 posts & comments.
Likes : 5
| #2Subject: Re: [CODE] /dkset 1/7/2020, 12:49 pm | |
| [You must be registered and logged in to see this link.]mira abajo al compilar los errores que me da, lo agregue según me indicas y eso pasa |
|
Centuu.-
Diamond 1
Earned by having 144 posts & comments.
Civilian
Granted to members for high engagement.
Full Hero
Granted to members for great contributions.
Great Mentor
Granted to veteran members who exhibit helpful and sportsmanlike behavior.
Moderator
Earned by becoming a board moderator.
Likes : 17
| #3Subject: Re: [CODE] /dkset 1/7/2020, 1:05 pm | |
| Esos no son errores, son advertencias y no influyen en la aplicación. |
|
kelvinlp
Silver 2
Earned by having 36 posts & comments.
Likes : 5
| #4Subject: Re: [CODE] /dkset 1/7/2020, 1:25 pm | |
| si gracias ahora guarde y al abrir verifique, que si funciono, en cityhall, una duda como puedo agregarle armas al commando, los numeros que aparecen ceparados con ( , ) hay puedo agregarla dependiendo que tipo de usuario sea o como podria?
Muchas Gracia me sirve Mucho su ayuda! |
|
Centuu.-
Diamond 1
Earned by having 144 posts & comments.
Civilian
Granted to members for high engagement.
Full Hero
Granted to members for great contributions.
Great Mentor
Granted to veteran members who exhibit helpful and sportsmanlike behavior.
Moderator
Earned by becoming a board moderator.
Likes : 17
| #5Subject: Re: [CODE] /dkset 1/8/2020, 6:09 pm | |
| - kelvinlp wrote:
- si gracias ahora guarde y al abrir verifique, que si funciono, en cityhall, una duda como puedo agregarle armas al commando, los numeros que aparecen ceparados con ( , ) hay puedo agregarla dependiendo que tipo de usuario sea o como podria?
Muchas Gracia me sirve Mucho su ayuda! Si, agregás más números ahí y después en el for aumentas el límite de 4 a la cantidad de items que agregues. |
|
Sponsored content
| #6Subject: Re: [CODE] /dkset | |
| |
|