Jump to content

Block Enchant and Reinforce for weapons?


Go to solution Solved by Metin2 Dev,

Recommended Posts

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

  • Bot
  • Solution

The official servers already did that for begginers weapons with antiflag.

Spoiler

/* 1. item_lenght.h <==> This step you need to repeat for ItemData.h (GameLib) */
// 1.1. Search:
	ITEM_ANTIFLAG_WOLFMAN		= (1 << 18),
// 1.1. Add after:
	ITEM_ANTIFLAG_REINFORCE		= (1 << 19),
	ITEM_ANTIFLAG_ENCHANT		= (1 << 20),
	
	
/* 2. char_item.cpp */
// 2.1. Search:
		case USE_CHANGE_ATTRIBUTE :
// 2.1. Add after:	< if(item2->GetAttributeSetIndex() == -1) >
			if (IS_SET(item2->GetAntiFlag(), ITEM_ANTIFLAG_ENCHANT))
			{
				ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't change a bonus in this item."));
				return false;
			}
									
									
// 2.2. Search:
		case USE_ADD_ATTRIBUTE :
// 2.2. Add after:	< if (item2->GetAttributeSetIndex() == -1) >
			if (IS_SET(item2->GetAntiFlag(), ITEM_ANTIFLAG_REINFORCE))
			{
				ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't add a bonus in this item."));
				return false;
			}
		
		
/* 3. ProtoReader.cpp <==> This step you need to repeat for ItemCSVReader.cpp (Dump Proto) */
// 3.1. Search:
	"ANTI_WOLFMAN",
// 3.1. Add after:
	"ANTI_REINFORCE", "ANTI_ENCHANT"
								

/* 4. PythonItemModule.cpp */
// 4.1. Search:
	PyModule_AddIntConstant(poModule, "ITEM_ANTIFLAG_WOLFMAN",		CItemData::ITEM_ANTIFLAG_WOLFMAN);
// 4.1. Add after:
	PyModule_AddIntConstant(poModule, "ITEM_ANTIFLAG_REINFORCE", 		CItemData::ITEM_ANTIFLAG_REINFORCE);
	PyModule_AddIntConstant(poModule, "ITEM_ANTIFLAG_ENCHANT",		CItemData::ITEM_ANTIFLAG_ENCHANT);
								

 

 

  • Love 7

english_banner.gif

17 minutes ago, Abel(Tiger) said:

The official servers already did that for begginers weapons with antiflag. If i have time i will make a tutorial and edit this post.

thank you very much really. I hope you can have time, regards. :)

  • Bot
4 hours ago, Abel(Tiger) said:

The official servers already did that for begginers weapons with antiflag.

  Reveal hidden contents


/* 1. item_lenght.h <==> This step you need to repeat for ItemData.h (GameLib) */
// 1.1. Search:
	ITEM_ANTIFLAG_WOLFMAN		= (1 << 18),
// 1.1. Add after:
	ITEM_ANTIFLAG_REINFORCE		= (1 << 19),
	ITEM_ANTIFLAG_ENCHANT		= (1 << 20),
	
	
/* 2. char_item.cpp */
// 2.1. Search:
		case USE_CHANGE_ATTRIBUTE :
// 2.1. Add after:	< if(item2->GetAttributeSetIndex() == -1) >
			if (IS_SET(item2->GetAntiFlag(), ITEM_ANTIFLAG_ENCHANT))
			{
				ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't change a bonus in this item."));
				return false;
			}
									
									
// 2.2. Search:
		case USE_ADD_ATTRIBUTE :
// 2.2. Add after:	< if (item2->GetAttributeSetIndex() == -1) >
			if (IS_SET(item2->GetAntiFlag(), ITEM_ANTIFLAG_REINFORCE))
			{
				ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't add a bonus in this item."));
				return false;
			}
		
		
/* 3. ProtoReader.cpp <==> This step you need to repeat for ItemCSVReader.cpp (Dump Proto) */
// 3.1. Search:
	"ANTI_WOLFMAN",
// 3.1. Add after:
	"ANTI_REINFORCE", "ANTI_ENCHANT"
								

/* 4. PythonItemModule.cpp */
// 4.1. Search:
	PyModule_AddIntConstant(poModule, "ITEM_ANTIFLAG_WOLFMAN",		CItemData::ITEM_ANTIFLAG_WOLFMAN);
// 4.1. Add after:
	PyModule_AddIntConstant(poModule, "ITEM_ANTIFLAG_REINFORCE", 		CItemData::ITEM_ANTIFLAG_REINFORCE);
	PyModule_AddIntConstant(poModule, "ITEM_ANTIFLAG_ENCHANT",		CItemData::ITEM_ANTIFLAG_ENCHANT);
								

 

 

It works perfectly. Thank you very much for the help.
:D

english_banner.gif

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.