Jump to content

Recommended Posts

Where i can increase the rates to get a aura of sword book?

Example i beat 20 metins stones and i get any other book from other classes but i dont drop any aura.

1 minute ago, БlyatMAN said:

Where i can increase the rates to get a aura of sword book?

Example i beat 20 metins stones and i get any other book from other classes but i dont drop any aura.

Item book 50300

Link to comment
https://metin2.dev/topic/33327-aura-of-sword/
Share on other sites

  • Honorable Member

In the item_manager.cpp -> ITEM_MANAGER::CreateDropItem

Give a try to change the "Drop Item Group" (m_map_pkDropItemGroup) iteration like so:

	// Drop Item Group
	{
		itertype(m_map_pkDropItemGroup) it;
		it = m_map_pkDropItemGroup.find(pkChr->GetRaceNum());

		if (it != m_map_pkDropItemGroup.end())
		{
			typeof(it->second->GetVector()) v = it->second->GetVector();

			for (DWORD i = 0; i < v.size(); ++i)
			{
				int iPercent = (v[i].dwPct * iDeltaPercent) / 100;

				if (iPercent >= number(1, iRandRange))
				{
					item = CreateItem(v[i].dwVnum, v[i].iCount, 0, true);
					if (item)
					{
						if (item->GetType() == ITEM_POLYMORPH)
						{
							if (item->GetVnum() == pkChr->GetPolymorphItemVnum())
							{
								item->SetSocket(0, pkChr->GetRaceNum());
							}
						}
						//##!!
						else if (item->GetType() == ITEM_SKILLBOOK) // also you can add  && pkChr->IsStone()
						{
							if (item->GetVnum() == ITEM_SKILLBOOK_VNUM)
							{
								if (number(1, 100) <= 30) // 30%
								{
									extern const DWORD GetRandomSkillVnum(BYTE bJob = JOB_MAX_NUM, BYTE bSkillGroup = 0);
									item->SetSocket(0, GetRandomSkillVnum(pkKiller->GetJob(), pkKiller->GetSkillGroup()));
								}
								//else
								//{
								//	//not needed. CreateItem does the job
								//}
							}
						}
						//##!!

						vec_item.push_back(item);
					}
				}
			}
		}
	}

 

Edited by xP3NG3Rx
  • Metin2 Dev 1
Link to comment
https://metin2.dev/topic/33327-aura-of-sword/#findComment-168700
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.