[src] Autobind For Bs Items

Codes already submitted by people of the forums.
Post Reply
diuuude
Outpost bitch
Posts: 592
Joined: Wed Dec 28, 2005 11:57 pm

Post by diuuude »

It was requested first by Tafka who sells his majestic upgradable items in BlackSmith. It will bind weapon / armors to the player who buy it and then item will be allowed to upgraded using MJ points.

Of course you must add the items in the ItemUpgradeHandler

Open game.cpp and go to function CGame::RequestPurchaseItemHandler(int iClientH, char * pItemName, int iNum)

Find

Code: Select all

if (_bAddClientItemList(iClientH, pItem, &iEraseReq) == TRUE) {
    if (m_pClientList[iClientH]->m_iCurWeightLoad < 0) m_pClientList[iClientH]->m_iCurWeightLoad = 0;
Right before, add :

Code: Select all

// AutoBind Weapon And Armour To Player Who Buy It
  	switch(pItem->m_sIDnum){
    case xxx: // item 1
    case xxx:  // item2
    case xxx: // item 3...
    	pItem->m_sTouchEffectValue1 = m_pClientList[iClientH]->m_sCharIDnum1;
    	pItem->m_sTouchEffectValue2 = m_pClientList[iClientH]->m_sCharIDnum2;
    	pItem->m_sTouchEffectValue3 = m_pClientList[iClientH]->m_sCharIDnum3;
    	break;
    default:
    	break;
  	}
Add as much items as you want... but they must be purchasable at blacksmith / shop
<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !
locobans
Outpost Junkie
Posts: 2264
Joined: Tue Jul 13, 2004 3:51 am
Location: Behind You
Contact:

Post by locobans »

Nice diuuude.
QUOTE (ADDKiD @ Dec 1 2006, 4:01 PM) <br>You guys make me laugh alot, half the shit I say, is bullshit...<br><br><img src='http://img485.imageshack.us/img485/492/banssig1ng.gif' border='0' alt='user posted image' /><br><br><b>I see no changes at all, wake up in the morning and ask myself...<br>Is life worth living? Should I blast myself?</b><br><br><b><a href='http://2paclegacy.com' target='_blank'>2PacLegacy.com</a></b>
Tafka12
&lt;3 bd long time
Posts: 772
Joined: Wed Dec 28, 2005 6:32 pm

Post by Tafka12 »

:P nice ty
<img src='http://www.hot.ee/carvanho/taavi.png' border='0' alt='user posted image' /><br><br><img src='http://www.hot.ee/carvanho/Elvine.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/LieroX.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/Football.png' border='0' alt='user posted image' />
RageIlluminati
Outpost bitch
Posts: 559
Joined: Wed Mar 30, 2005 6:45 am

Post by RageIlluminati »

we did in other way... everybody could buy DK items from Blacksmith... only 180 could wear it... and on the first upgrade id binded automatically... but DK armors we did not bind...
<img src='http://helbreath.pri.ee/userbars/hbest-gamemaster2.jpg' border='0' alt='user posted image' /> <img src='http://helbreath.pri.ee/userbars/hbsoccer-owner.jpg' border='0' alt='user posted image' /> <img src='http://helbreath.pri.ee/userbars/scorpa-rider.jpg' border='0' alt='user posted image' /> <img src='http://helbreath.pri.ee/userbars/logout-master.jpg' border='0' alt='user posted image' /> <br>.<br>................................Ego sum Rage, flagellum Dei!<br><br>The problem with America is stupidity. I'm not saying there should be a capital punishment for stupidity, but why don't we just take the safety labels off of everything and let the problem solve itself? (bash.org)
Post Reply