Jump to content

v17.5 Active Pet Seal Effect


Recommended Posts

  • Honorable Member

M2 Download Center

This is the hidden content, please
( Internal )

Hello,

This little thing is marks your pet seal into your inventory like the autopotion. This arrives with the v17.5 patch.

Open PetSystem.cpp and replace or make it fit for you:

void CPetActor::SetSummonItem(LPITEM pItem)
{
	if (NULL == pItem)
	{
		LPITEM pSummonItem = ITEM_MANAGER::instance().FindByVID(m_dwSummonItemVID);
		if (NULL != pSummonItem)
			pSummonItem->SetSocket(1, FALSE);
		
		m_dwSummonItemVID = 0;
		m_dwSummonItemVnum = 0;
		return;
	}

	pItem->SetSocket(1, TRUE);
	m_dwSummonItemVID = pItem->GetVID();
	m_dwSummonItemVnum = pItem->GetVnum();
}

After that open the uiInventory.py and paste this code below the autopotion if-statement in the RefreshBagSlotWindow function.

			elif itemVnum >= 53001 and itemVnum <= 53256:
				metinSocket = [player.GetItemMetinSocket(globalSlotNumber, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)]# <!> globalSlotNumber may be different <!>
				isActivated = 0 != metinSocket[1]
				if isActivated:
					self.wndItem.ActivateSlot(i)
				else:
					self.wndItem.DeactivateSlot(i)

 

  • Metin2 Dev 53
  • kekw 1
  • Scream 1
  • Good 19
  • Love 52
Link to comment
Share on other sites

48 minutes ago, Galet said:

Thanks for the release dude ! Also I love your shinning effect

 

Spoiler

 

I don't think is a "shinning" effect, is just multiple effects added. :)

Write me on private for weapon too.

d2c4c13152d7b71344e85dd142bd33e5.gif

Example for armor:


//InstanceBase.cpp
//Search for:
	case CItemData::ITEM_TYPE_ARMOR:
		__ClearArmorRefineEffect();
//Add after:
		if (pItem->GetSubType() == CItemData::ARMOR_BODY)
		{
			DWORD dwVnum = pItem->GetIndex();
			if ((11297 <= dwVnum && dwVnum <= 11299) || (11497 <= dwVnum && dwVnum <= 11499) || (11697 <= dwVnum && dwVnum <= 11699) || (11897 <= dwVnum && dwVnum <= 11899))
			{
				for (int iCount = 0; iCount < 10; iCount++)
					__AttachEffect(EFFECT_REFINED + EFFECT_BODYARMOR_REFINED7 + refine - 7);
			}	
		}

 

 

 

Thanks for release. :D

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 2
Link to comment
Share on other sites

  • Premium
il y a 1 minute, Tasho a dit :

 

  Masquer le contenu

 

I don't think is a "shinning" effect, is just multiple effects added. :)

Write me on private for weapon too.

d2c4c13152d7b71344e85dd142bd33e5.gif

Example for armor:



//InstanceBase.cpp
//Search for:
	case CItemData::ITEM_TYPE_ARMOR:
		__ClearArmorRefineEffect();
//Add after:
		if (pItem->GetSubType() == CItemData::ARMOR_BODY)
		{
			DWORD dwVnum = pItem->GetIndex();
			if ((11297 <= dwVnum && dwVnum <= 11299) || (11497 <= dwVnum && dwVnum <= 11499) || (11697 <= dwVnum && dwVnum <= 11699) || (11897 <= dwVnum && dwVnum <= 11899))
			{
				for (int iCount = 0; iCount < 10; iCount++)
					__AttachEffect(EFFECT_REFINED + EFFECT_BODYARMOR_REFINED7 + refine - 7);
			}	
		}

 

 

 

 

Thanks for release.

Yeah I know about how it's made but I find it more powerfull than the original, also thanks for the tips I appreciate !

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 3
Link to comment
Share on other sites

  • 2 weeks later...
1108 21:08:31391 ::
networkModule.py(line:209) SetSelectCharacterPhase
system.py(line:130) __pack_import
system.py(line:110) _process_result
introSelect.py(line:30) <module>
system.py(line:130) __pack_import
system.py(line:110) _process_result
interfaceModule.py(line:12) <module>
system.py(line:130) __pack_import

networkModule.SetSelectCharacterPhase - <type 'exceptions.IndentationError'>:unexpected indent (uiInventory.py, line 709)

1108 21:08:31391 :: ============================================================================================================
1108 21:08:31391 :: Abort!!!!

help me pls 

3I8SQpoQTnqF6E8hJo0DVA.png

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1
Link to comment
Share on other sites

  • Premium
Il y a 1 heure, memett4545 a dit :

1108 21:08:31391 ::
networkModule.py(line:209) SetSelectCharacterPhase
system.py(line:130) __pack_import
system.py(line:110) _process_result
introSelect.py(line:30) <module>
system.py(line:130) __pack_import
system.py(line:110) _process_result
interfaceModule.py(line:12) <module>
system.py(line:130) __pack_import

networkModule.SetSelectCharacterPhase - <type 'exceptions.IndentationError'>:unexpected indent (uiInventory.py, line 709)

1108 21:08:31391 :: ============================================================================================================
1108 21:08:31391 :: Abort!!!!

help me pls 

3I8SQpoQTnqF6E8hJo0DVA.png

Dude at least read the code, you just had to remove one tab (same for the if condition) instead of posting a screen here. Just look at the original code

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 1
  • Love 1
Link to comment
Share on other sites

uiInventory.py

Search:

 

def RefreshBagSlotWindow(self):

Find this:

		self.wndItem.RefreshSlot()

		if self.wndBelt:
			self.wndBelt.RefreshSlot()

Add below:

			if 53001 <= itemVnum and 53051 >= itemVnum:
				metinSocket = [player.GetItemMetinSocket(slotNumber, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)]

				if slotNumber >= player.INVENTORY_PAGE_SIZE*self.inventoryPageIndex:
					slotNumber -= player.INVENTORY_PAGE_SIZE*self.inventoryPageIndex

				isActivated = 0 != metinSocket[1]
				if isActivated:
					self.wndItem.ActivateSlot(slotNumber)
				else:
					self.wndItem.DeactivateSlot(slotNumber)

 

Link to comment
Share on other sites

En 9/11/2017 a las 13:04, Galet dijo:

Dude at least read the code, you just had to remove one tab (same for the if condition) instead of posting a screen here. Just look at the original code

metinSocket = [player.GetItemMetinSocket(slotNumber, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)]# <!> globalSlotNumber may be different <!>

globalSlotNumber
replace

slotNumber

Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...
  • 2 months later...
  • 4 months later...
  • Silver
On 2/3/2018 at 11:25 PM, PeaceMaker said:

any idea how to make it work in taskbar ? 

 

it shows active in inventory only and no in taskbar 

 

 

it's easy:
open file: 
uitaskbar.py

find string:
if constInfo.IS_AUTO_POTION(itemIndex):
and past this code under block

 

Example:

Spoiler

rNMq1kO.png

 


 

elif itemIndex >= 53001 and itemVnum <= 53005:
	metinSocket = [player.GetItemMetinSocket(Position, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)]
							
	isActivated = 0 != metinSocket[1]
							
	if isActivated:
		slot.ActivateSlot(slotNumber)
	else:
		slot.DeactivateSlot(slotNumber)
Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

Announcements



×
×
  • 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.