Jump to content

View Belt Extra Slot in ToolTIP


Recommended Posts

M2 Download Center

This is the hidden content, please
( Internal )

Hello, i think that will be nice to know how much slot add every belt.

 

So i have investigated a little bit about that and i have done a mod.

You need to change just uitooltip.py in the root.

 

Search 

WARP_SCROLLS = [22011, 22000, 22010]

And add this after:

extra_slot = [0,1,2,4,6,9,12,16]

Now search

		elif item.ITEM_TYPE_BELT == itemType:
			self.__AppendLimitInformation()
			self.__AppendAffectInformation()
			self.__AppendAttributeInformation(attrSlot)
			self.__AppendAccessoryMetinSlotInfo(metinSlot, constInfo.GET_BELT_MATERIAL_VNUM(itemVnum))

And replace with

		elif item.ITEM_TYPE_BELT == itemType:
			self.__AppendLimitInformation()
			self.__AppendAffectInformation()
			self.__AppendAttributeInformation(attrSlot)
			self.AppendTextLine("Extra slots : %s " % extra_slot[item.GetValue(0)], self.SPECIAL_POSITIVE_COLOR)
			self.__AppendAccessoryMetinSlotInfo(metinSlot, constInfo.GET_BELT_MATERIAL_VNUM(itemVnum))

As you can see, just a textline has added.

self.AppendTextLine("Extra slots : %s " % extra_slot[item.GetValue(0)], self.SPECIAL_POSITIVE_COLOR)

Here you can change the text, and the color (self.SPECIAL_POSITIVE_COLOR)

Hope that will be nice for you,

 

Lup.

  • Metin2 Dev 11
  • Think 1
  • Confused 1
  • Good 3
  • Love 1
  • Love 24
Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...
  • 5 years later...
  • Honorable Member
PyObject* playerGetBeltSlotCount(PyObject* poSelf, PyObject* poArgs)
{
	int iBeltGrade = 0;
	if (!PyTuple_GetInteger(poArgs, 0, &iBeltGrade))
		return Py_BadArgument();
	
	BYTE bSlotCount = 0, bPos = 0;
	while (bPos < c_Belt_Inventory_Slot_Count)
		if (CBeltInventoryHelper::IsAvailableCell(bPos++, iBeltGrade))
			bSlotCount++;

	return Py_BuildValue("i", bSlotCount);
}

		{ "GetBeltSlotCount",				playerGetBeltSlotCount,				METH_VARARGS },

player.GetBeltSlotCount(item.GetValue(0))

 

PythonPlayerModule.cpp

Edited by Mali61
File Name

 

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.