Jump to content

Recommended Posts

Hi i've implementend a new item that when i right click it gives me bonus like +5 monster ecc and it works

i made changes in CHAR_ITEM.CPP (This works)

case 43210: 
{
	if (FindAffect(AFFECT_BRAVE_SOUL_1) || FindAffect(AFFECT_BRAVE_SOUL_2))
	{
		// remove bonus
		RemoveAffect(AFFECT_BRAVE_SOUL_1);
		RemoveAffect(AFFECT_BRAVE_SOUL_2);
		ChatPacket(CHAT_TYPE_INFO, "I bonus sono stati rimossi!");
	}
	else
	{
		// attive bonus
		AddAffect(AFFECT_BRAVE_SOUL_1, POINT_ATTBONUS_ANIMAL, 5, AFF_NONE, 60 * 60, 0, true);         // 5% bonus vs animali 
		AddAffect(AFFECT_BRAVE_SOUL_2, POINT_ATTBONUS_MONSTER, 5, AFF_NONE, 60 * 60, 0, true);         // 5% bonus vs mostri
		ChatPacket(CHAT_TYPE_INFO, "Hai attivato i bonus speciali!");
	}
	return true;
}

 

the problem is that im trying to make it highlighted when in function similiar the auto potion 

i've tried in UIINVENTORY.PY copying the one of the auto potion :

if itemVnum == 43210:
				# metinSocket - [0] : Ȱ��ȭ ����, [1] : ����� ��, [2] : �ִ� �뷮
				metinSocket = [player.GetItemMetinSocket(slotNumber, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)]	
				tempSlotNum = slotNumber
				if tempSlotNum >= player.INVENTORY_PAGE_SIZE:
					tempSlotNum -= (self.inventoryPageIndex * player.INVENTORY_PAGE_SIZE)

				isActivated = 0 != metinSocket[0]

				if isActivated:
					self.wndItem.ActivateSlot(tempSlotNum)
				else:
					self.wndItem.DeactivateSlot(tempSlotNum)

i've tried also to change !=metinsocket 0 to 1 but nada (idk even what it is about but try never hurt)

 

but clearly something is wrong

.gif
sysser empty

 

what i have missed????

 

my proto : 

Vnum	Name	Type	SubType	Size	AntiFlags	Flags	WearFlags	ImmuneFlags	Gold	ShopBuyPrice	RefinedVnum	RefineSet	AlterToMagicItemPercent	LimitType0	LimitValue0	LimitType1	LimitValue1	ApplyType0	ApplyValue0	ApplyType1	ApplyValue1	ApplyType2	ApplyValue2	ApplyType3	ApplyValue3	Value0	Value1	Value2	Value3	Value4	Value5	Specular	GainSocketPercent	AddonType
43210	Brave Soul	ITEM_USE	USE_SPECIAL	1	ANTI _DROP | ANTI_SELL | ANTI_GIVE | ANTI_PKDROP | ANTI_STACK | ANTI_MYSHOP	ITEM_STACKABLE | LOG	NONE	NONE	0	0	0	0	0	LIMIT_NONE	0	LIMIT_NONE	0	APPLY_NONE	0	APPLY_NONE	0	APPLY_NONE	0	APPLY_NONE	0	0	0	0	0	0	0	0	0	0
																																		

 

Link to comment
https://metin2.dev/topic/33688-how-to-highlight-items-in-inventory/
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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.