[src] /dkset by KaoZureS

Codes already submitted by people of the forums.
Post Reply
KaoZureS
Regular
Posts: 38
Joined: Thu Feb 23, 2006 1:54 pm

Post by KaoZureS »

Thanks aDaraio Alejo for the help.
I can´t speak english :P
So excuses me by the coherence errors.

In exchange for 100k of Gold, you get the DKSet items.
In the others /dkset, if you get the bag Full Load, the items has been deleted. In this, you need to keep the items in the warehouse, exept 100k.

Code: Select all

void CGame::GetDkSet(int iClientH) //by KaoZureS & aDaraio Alejo 
{ 
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; 

DWORD dwGoldCount; 

if (iCalcTotalWeight(iClientH) < 20000) { 
if(m_pClientList[iClientH] == NULL) return; 
if(m_pClientList[iClientH]->m_iLevel < 180) return; 
dwGoldCount = dwGetItemCount(iClientH, "Gold"); 
if(dwGoldCount >= 100000) 
{ 
SetItemCount(iClientH, "Gold", dwGoldCount - 100000); 
} 
else 
{ 

SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_NOTICEMSG, NULL, NULL, NULL, "You need 100k of Gold."); 
    
   return; 
} 
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 > 100) 
  { 
   iItemID=dkM[i]; 
  } 
  else 
  { 
   iItemID=dmM[i]; 
  } 
 } 
 else 
 { 
  if (m_pClientList[iClientH]->m_iStr > 100) 
  { 
   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; 
 } 
 if (iItemID != -1) 
 { 
  _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); 
  SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_NOTICEMSG, NULL, NULL, NULL, "You get DKSet."); 
 } 
} 
} 
else 
{ 
   SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_NOTICEMSG, NULL, NULL, NULL, "Save your items in the warehouse pls."); 
} 
} 
//dk set Fin //
CyaZ!!!
<img src='http://personales.ciudad.com.ar/KaoZureS/firma.jpg' border='0' alt='user posted image' />
Crossfade
Loyal fan
Posts: 354
Joined: Sun Mar 20, 2005 5:55 pm

Post by Crossfade »

so you just basically added one message line that tells the player to put it in their warehouse? might want to relook over the weight calculation.
you should make it send a message telling them they can't carry anymore items like

Code: Select all

SendItemNotifyMsg(iClientH, DEF_NOTIFY_CANNOTCARRYMOREITEM, NULL, NULL);
Sprint
Spamtastic
Posts: 1000
Joined: Tue Jun 06, 2006 6:59 am
Location: Far from home
Contact:

Post by Sprint »

Just one thing, why not make the DKset go to WH straight, so it wond drop under legs or come into the bag, just straightly into the WH. In this way you would get away from all these probs. I dunno how cos I dont code C++. But Acidx or sum1 like him should be able to do this?
<span style='color:blue'><span style='font-size:19pt;line-height:100%'><u><b>FUCK Helbreath!</b></u></span></span><br><br><span style='color:gray'><a href='http://www2.analystica.com/users/anttu/online/ngd' target='_blank'>ngdnetwork</a> OFFICIAL WEBSITE OF Northern Game Developers. Do visit! (THEY ARE UP!)<br><a href='http://project3d.x.am' target='_blank'>Project3d development forum</a> plz join and discuss,develop,give ideas,feedback. Anything goes as long it helps the project!</span><br><br>Zepto Znote 6625WD: 1.8Ghz dual core, 2GB, 512mb graphics card(dedicated), 160GB HDD<br><img src='http://www.signaturebar.com/uploads/images/10111.jpg' border='0' alt='user posted image' /><br><img src='http://www.signaturebar.com/uploads/images/13229.jpg' border='0' alt='user posted image' /><br><img src='http://www.signaturebar.com/uploads/images/8852.png' border='0' alt='user posted image' />
Treax2
Loyal fan
Posts: 281
Joined: Fri Mar 04, 2005 5:05 pm
Location: Estonia
Contact:

Post by Treax2 »

KaoZureS wrote: Thanks aDaraio Alejo for the help.
I can´t speak english :P
So excuses me by the coherence errors.

In exchange for 100k of Gold, you get the DKSet items.
In the others /dkset, if you get the bag Full Load, the items has been deleted. In this, you need to keep the items in the warehouse, exept 100k.

Code: Select all

void CGame::GetDkSet(int iClientH) //by KaoZureS & aDaraio Alejo 
{ 
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; 

DWORD dwGoldCount; 

if (iCalcTotalWeight(iClientH) < 20000) { 
if(m_pClientList[iClientH] == NULL) return; 
if(m_pClientList[iClientH]->m_iLevel < 180) return; 
dwGoldCount = dwGetItemCount(iClientH, "Gold"); 
if(dwGoldCount >= 100000) 
{ 
SetItemCount(iClientH, "Gold", dwGoldCount - 100000); 
} 
else 
{ 

SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_NOTICEMSG, NULL, NULL, NULL, "You need 100k of Gold."); 
    
   return; 
} 
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 > 100) 
  { 
   iItemID=dkM[i]; 
  } 
  else 
  { 
   iItemID=dmM[i]; 
  } 
 } 
 else 
 { 
  if (m_pClientList[iClientH]->m_iStr > 100) 
  { 
   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; 
 } 
 if (iItemID != -1) 
 { 
  _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); 
  SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_NOTICEMSG, NULL, NULL, NULL, "You [B]got[/B] DKSet."); 
 } 
} 
} 
else 
{ 
   SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_NOTICEMSG, NULL, NULL, NULL, "Save your items in the warehouse pls."); 
} 
} 
//dk set Fin //
CyaZ!!!
i dont understand why there is "Save your items in the warehouse pls." if the items are binded and u wont drop them?
Post Reply