X And M Stone Upgrades

Submit your code requests, and if you are good at coding come help others with their requests.
Post Reply
Warlord
Regular
Posts: 34
Joined: Sun Dec 05, 2004 11:08 am

Post by Warlord »

So My problem is that when upgrading an item, you can do it like Demon Slayer + 20 without losing any x stones.
Can someone help me? If you upgrade, it will say you that you failed, try again, but the stone doesn't dissapear :o

Code: Select all

void CGame::RequestItemUpgradeHandler(int iClientH, int iItemIndex)
{
	int i, iItemX,iItemY, iSoM, iSoX, iSomH, iSoxH, iValue; // v2.172
	DWORD dwTemp, dwSWEType;
	double dV1, dV2, dV3;
	short sItemUpgrade = 2;

	if (m_pClientList[iClientH] == NULL) return;
	if ((iItemIndex < 0) || (iItemIndex >= DEF_MAXITEMS)) return;
	if (m_pClientList[iClientH]->m_pItemList[iItemIndex] == NULL) return;

	iValue = (m_pClientList[iClientH]->m_pItemList[iItemIndex]->m_dwAttribute & 0xF0000000) >> 28;
	if (iValue >= 15 || iValue < 0 ) {
  SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_ITEMUPGRADEFAIL, 1, NULL, NULL, NULL);
  return;
	}
This is the start of that code what I should edit...

I just want to make it so, that you can upgrade the swords and armors, but stones must dissapear by each time you try to upgrade.

Thanks...
Dshaked
&lt;3 bd long time
Posts: 747
Joined: Tue Oct 11, 2005 6:40 pm

Post by Dshaked »

I got working merien stone upgrade, stone breaks always when I upgrade or fail upgrading, but xelima dont break :S
Old Helbreath Nemesis Player<br><img src='http://img232.imageshack.us/img232/9784/dshakedqc5.jpg' border='0' alt='user posted image' /><br><img src='http://img232.imageshack.us/img232/6475 ... barqj0.jpg' border='0' alt='user posted image' /><br><a href='index.php?showtopic=7107&hl=' target='_blank'>MainServer Hexing Tutorial</a><br><a href='index.php?showtopic=7663&hl=x-mas' target='_blank'>My Files</a>
Warlord
Regular
Posts: 34
Joined: Sun Dec 05, 2004 11:08 am

Post by Warlord »

Dshaked wrote: I got working merien stone upgrade, stone breaks always when I upgrade or fail upgrading, but xelima dont break :S
Can you share this code with me?:P


EDIT: Btw I am using old files..not 3.02!
Tafka12
&lt;3 bd long time
Posts: 772
Joined: Wed Dec 28, 2005 6:32 pm

Post by Tafka12 »

That CGame::RequestItemUpgradeHandler is about majestic upgrade.
You should find the function that uses stone upgrade and change it's probability and maximum upgrade +'s (to +15)
<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' />
Post Reply