Jump to content
×
×
  • Create New...

Simple Inventory Expansion


Mali

Recommended Posts

Very easy to make.

Just make a copy of alignment via packet info and also you have full check on source client/server + python module and you can do all what you want with these functions..

And all return value row [name_row] from mysql player.player

	case ITEM_LOCK_INVENTORY:
		SetLockInventory(1);
		
	case ITEM_UNLCOCK_INVENTORY:
		SetLockInventory(0);
#Python
player.GetInventoryLocked() # Result current value from mysql

#Client
int CInstanceBase::GetInventoryLocked()
{
	return m_iInventoryLocked;
}

PyObject * playerGetInventoryLocked(PyObject* poSelf, PyObject* poArgs)
{
	CInstanceBase * ch = CPythonPlayer::Instance().NEW_GetMainActorPtr();
	int iInventoryLocked = 0;

	if (ch) {
		iInventoryLocked = ch->GetInventoryLocked();
	}

	return Py_BuildValue("i", iInventoryLocked);
}

#Server
int CHARACTER::GetInventoryLocked() const
{
	return m_iInventoryLocked;
}

void CHARACTER::SetLockInventory(int iAmount)
{
	m_iInventoryLocked = iAmount;
	UpdatePacket();
}

 

Anyway, good ideea.

Link to comment
  • Honorable Member
6 hours ago, Tasho said:

Very easy to make ^^

Just make a copy of alignment via packet info and also you have full check on source client/server + python module and you can do all what you want with these functions..

And all return value row [name_row] from mysql player.player

	case ITEM_LOCK_INVENTORY:
		SetLockInventory(1);
		
	case ITEM_UNLCOCK_INVENTORY:
		SetLockInventory(0);
#Python
player.GetInventoryLocked() # Result current value from mysql

#Client
int CInstanceBase::GetInventoryLocked()
{
	return m_iInventoryLocked;
}

PyObject * playerGetInventoryLocked(PyObject* poSelf, PyObject* poArgs)
{
	CInstanceBase * ch = CPythonPlayer::Instance().NEW_GetMainActorPtr();
	int iInventoryLocked = 0;

	if (ch) {
		iInventoryLocked = ch->GetInventoryLocked();
	}

	return Py_BuildValue("i", iInventoryLocked);
}

#Server
int CHARACTER::GetInventoryLocked() const
{
	return m_iInventoryLocked;
}

void CHARACTER::SetLockInventory(int iAmount)
{
	m_iInventoryLocked = iAmount;
	UpdatePacket();
}

 

Anyway, good ideea ^^

:facepalm:unnecessary codes but anoter way;)

  • Love 1
Link to comment
  • Honorable Member
2 hours ago, tierrilopes said:

The system stated on v2, theres a similar version free on the net.

All you need is google and the correct keywords.

 

Hint: Spanish

link?

Link to comment
  • 1 month later...
  • 3 weeks later...

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


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.