Jump to content
metin2dev
xP3NG3Rx

c++ [GF v17.5] Active pet seal effect

Recommended Posts

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)

 

  • Like 19
  • Thanks 2

Share this post


Link to post
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

  • Like 1

Share this post


Link to post
Share on other sites
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 !

  • Like 2

Share this post


Link to post
Share on other sites
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

  • Like 1

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
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)

 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

it works perfectly fine of taskbar, but don;t work on inventory.

here is the code

MplHeCL.png

 

No syserr

Share this post


Link to post
Share on other sites
1 hour ago, alondark said:

not working, pet time is crazied

With time crazied you mean something like this?

CRAZIED-MOTHER.jpg

  • Haha 1

Share this post


Link to post
Share on other sites
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)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×