Jump to content

Recommended Posts

Hi,

This is a item witch can change dragon soul attributes, I made it with subtype but you can easily do it by vnum. Here you have the case for subtype:
(If in DragonSoul.h function PutAttributes is on private move it on public.)

 

Spoiler

#ifdef USE_CHANGE_ATTRIBUTE_DS
					case USE_C_ATTRIBUTE_DS:
					{
						LPITEM pDS;
						if (!IsValidItemPosition(DestCell) || !(pDS = GetItem(DestCell)))
							return false;
 
						if (pDS->IsExchanging() || pDS->IsEquipped())
						{
							ChatPacket(CHAT_TYPE_INFO, "Alchimia este echipata, dezechipeaz-o pentru a folosi bonusul.");
							return false;
						}
 
						if (pDS->IsDragonSoul())
						{
							pDS->ClearAttribute();
							DSManager::instance().PutAttributes(pDS);
							item->SetCount(item->GetCount() - 1);
							ChatPacket(CHAT_TYPE_INFO, "Bonusul a fost schimbat cu succes.");
						}
						else
						{
							ChatPacket(CHAT_TYPE_INFO, "Itemul se poate folosi doar pe alchimie.");
							return false;
						}
					}
#endif

 

https://pastebin.com/0cNA0Xtj

  • Metin2 Dev 13
  • Confused 1
  • Scream 1
  • Good 4
  • Love 2
  • Love 4
Link to comment
https://metin2.dev/topic/21357-change-attribute-on-alchemy/
Share on other sites

  • 1 year later...
  • Active Member
2 hours ago, Alexander20 said:

Hi man, where do i add this part of code?

https://metin2.download/picture/9ewIO5UysKCSL3EG1wyYNjrtvSOiksb3/.png

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 6
  • Good 3
  • Love 2
  • Love 1

it has an small bug, it can sometimes switch double boni

 

abae812b6f.png

 

"Kraft der Dunkelheit" switched 2 times on it (Strenght of darkness, new elementar boni)

 

you need to fix the ClearAttribute function, its bugged from default on, it lefts the fifth bonus always on the item so you can double them.

better make a new clearattribute function only for DS

Edited by Metin2 Dev
Core X - External 2 Internal

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.