can someone please post the item line for arrows

Discussion about Helbreath Server Files.
Post Reply
xenx
Member
Posts: 169
Joined: Tue Oct 03, 2006 7:08 am

Post by xenx »

anyone got the item.cfg line for 10 and 100 arrows in their server files still, i cant find it in any of mine, and im adding new arrows but they cant drop 1 at a time.. hehe

i just need 1 of u to copy and paste the line out of item.cfg for me if poss, cheers
xenx
Member
Posts: 169
Joined: Tue Oct 03, 2006 7:08 am

Post by xenx »

hmm i just found out how it does it....

Code: Select all

// multiple arrows
	ZeroMemory(cData, sizeof(cData));	
	ZeroMemory(cItemName, sizeof(cItemName));
	
	// New 18/05/2004
	if (m_pClientList[iClientH]->m_pIsProcessingAllowed == FALSE) return;

	// Multiple arrows 
	if (memcmp(pItemName, "10Arrows", 8) == 0) {
  strcpy(cItemName, "Arrow");
  dwItemCount = 10;
	}
	else if (memcmp(pItemName, "100Arrows", 9) == 0) {
  strcpy(cItemName, "Arrow");
  dwItemCount = 100;
	}
	else {
  memcpy(cItemName, pItemName, 20);
  dwItemCount = 1;
	}

how can i add PoisonArrows into this code guys ?

just copy the same again underneath and change the name to PoisonArrows ?
bone-you
Spamtastic
Posts: 1310
Joined: Wed Mar 16, 2005 3:12 am

Post by bone-you »

Seems logical. You mean have them drop from mobs as 10/100 bundles? If so, just make 10PoisonArrow 100PoisonArrow items and copy the item cfg lines.

Item = 77 10Arrows 6 0 0 1 4 0 1 4 0 1 0 6 10 10 10 -1 3 0 0 0 0 0 4 0
Item = 78 100Arrows 6 0 0 1 4 0 1 4 0 1 0 6 10 100 100 -1 5 0 0 0 0 0 4 0
<img src='http://www.helbreathx.net/sig/sig.jpeg' border='0' alt='user posted image' /><br><a href='http://mafia.cheats4us.org/index.php?x=231030' target='_blank'>#1 on Mafia :D</a><br><!--QuoteBegin-Slipknight+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Slipknight)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->100mb Internet, burstable too 10GB oc192<br>his speed can go up too 10gbs<br>...<br>Yes my car can have a top speed of 1000mph<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br>^^ I wonder where the retard went to.
xenx
Member
Posts: 169
Joined: Tue Oct 03, 2006 7:08 am

Post by xenx »

ooh lol u just answered my source code request post i thought i would have to do that in the code...lmao sweet mate cheers

damn no nvm, it only works for Arrows, it wont work for PoisonArrows, or any other type of arrows i try to come up with
there is a bit in the sourc that deals with the name Arrows and does the multiples, if u add the item line like you said, you get that bug where u have 1 x 100 arrows

and 1 shot fires all of em remember

i didnt realise but there isnt actually an item line for 100 arrows, its dealt with in the source when you buy them, i just need to know how to edit the drop code to allow more than 1 PoisonArrow to drop

or how to fix that bug ofc, but i dont need to be able to buy them so it dont really matter.
bone-you
Spamtastic
Posts: 1310
Joined: Wed Mar 16, 2005 3:12 am

Post by bone-you »

When it drops, do an itemid check before it actually drops and set the amount up.

like..

if (iItemID == xxx) whatever your id is for poison arrows
pItem->m_dwCount = iDice(25,2) or something. 25-50 arrow drops.

You have to stick that after this line though

pItem = new class CItem;

Your best bet is to stick it right above this.

m_pMapList[ m_pNpcList[iNpcH]->m_cMapIndex ]->bSetItem(m_pNpcList[iNpcH]->m_sX,
m_pNpcList[iNpcH]->m_sY,
pItem);
<img src='http://www.helbreathx.net/sig/sig.jpeg' border='0' alt='user posted image' /><br><a href='http://mafia.cheats4us.org/index.php?x=231030' target='_blank'>#1 on Mafia :D</a><br><!--QuoteBegin-Slipknight+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Slipknight)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->100mb Internet, burstable too 10GB oc192<br>his speed can go up too 10gbs<br>...<br>Yes my car can have a top speed of 1000mph<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br>^^ I wonder where the retard went to.
xenx
Member
Posts: 169
Joined: Tue Oct 03, 2006 7:08 am

Post by xenx »

sorted, works perfectly! thanks a lot m8, srry about the whole 2 topics thing i did 1 for for the config and another for source code i didnt know how it worked, but i do now and wohoo :PP
Post Reply