Would you like to react to this message? Create an account in a few clicks or log in to continue.
This is a website run by veteran Helbreath players with the aim of sharing discussions and content exclusively related to the development of a server and its gameplay.
We depend on Ads revenue to keep our site running. Please consider disabling your Ad Blocker so that we can continue to create the content you come to enjoy. Thank you for your continued cooperation and understanding.
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); } } //} }
if (memcmp(cp, "/dkset", 6) == 0) { GetDkSet(iClientH); return; }
Y en Game.h agregar
Code:
void GetDkSet(int iClientH);
Saludos!
kelvinlp
Posts : 46 Since : 2018-07-31
Subject: Re: [CODE] /dkset 1/7/2020, 9:49 am
mira abajo al compilar los errores que me da, lo agregue según me indicas y eso pasa
Centuu.-
Posts : 242 Since : 2014-11-26
Subject: Re: [CODE] /dkset 1/7/2020, 10:05 am
Esos no son errores, son advertencias y no influyen en la aplicación.
binarydata » Wed Apr 06, 2005 8:14 pm wrote:
hb dead anyways
kelvinlp
Posts : 46 Since : 2018-07-31
Subject: Re: [CODE] /dkset 1/7/2020, 10:25 am
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?
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.