Jump to content

Characterdetails - need a function :)


Recommended Posts

Hey community,

does anyone have a function that returns the apply point in the clip

self.InfoList.append( [ localeInfo.DETAILS_36, localeInfo.DETAILS_TOOLTIP_36, item.GetApplyPoint( item.APPLY_ATTBONUS_WARRIOR ) ] )

 

This System is from the official metin2 root, it's the bonus board of metin2.  (item.GetApplyPoint is missing in binary)

 

Thanks for Abel, if anyone provide me this function, i could rerelease this system with how2to in abel's thread.

  • Love 1
Link to comment
Share on other sites

PyObject * itemGetApplyPoint(PyObject * poSelf, PyObject * poArgs)
{
	int iValueIndex;
	if (!PyTuple_GetInteger(poArgs, 0, &iValueIndex))
		return Py_BadArgument();

	CItemData * pItemData = CItemManager::Instance().GetSelectedItemDataPointer();
	if (!pItemData)
		return Py_BuildException("Not yet select item data");

	CItemData::TItemApply ItemApply;
	if (!pItemData->GetApply(iValueIndex, &ItemApply))
		return Py_BuildException();

	return Py_BuildValue("ii", ItemApply.bType, ItemApply.lValue);
}

Didn`t test it , but it should work.

  • Love 1
Link to comment
Share on other sites

vor 4 Stunden schrieb M.Sorin:

PyObject * itemGetApplyPoint(PyObject * poSelf, PyObject * poArgs)
{
	int iValueIndex;
	if (!PyTuple_GetInteger(poArgs, 0, &iValueIndex))
		return Py_BadArgument();

	CItemData * pItemData = CItemManager::Instance().GetSelectedItemDataPointer();
	if (!pItemData)
		return Py_BuildException("Not yet select item data");

	CItemData::TItemApply ItemApply;
	if (!pItemData->GetApply(iValueIndex, &ItemApply))
		return Py_BuildException();

	return Py_BuildValue("ii", ItemApply.bType, ItemApply.lValue);
}

Didn`t test it , but it should work.

 

Thanks very much for your reply :)

After i implemented that function, i received a new error called: "Type Error. an integer is required" Line 222

 

	def RefreshLabel(self):
		self.ScollPos = int(self.ScrollBar.GetPos() * self.Diff)
		
		for i in xrange(self.UI_MAX_COUNT) :
			idx = i + self.ScollPos
			
			text = self.InfoList[idx][self.INFO_TEXT]
			type = self.InfoList[idx][self.INFO_VALUE]
			
			if type == self.CATEGORY_STARTLINE:
				self.__LabelTitleLine(i, text)
			elif type == self.CATEGORY_ENDLINE:
				self.__EmptyLine(i)
			else:
				value = playerm2g2.GetStatus(type)
				
				self.__LabelLine(i, text, value)

 

The Line 222 is "def RefreshLabel(self):"

 

I do think it's because of GetPos() but im not a developer so i dont know anything

 

€dit: i think the above posted function doesn't work.

Link to comment
Share on other sites

  • Active+ Member

Just replace that function with POINT corespondent.

item.GetApplyPoint( item.APPLY_ATTBONUS_HUMAN ) == POINT_ATTBONUS_HUMAN = 43

Or copy aApplyInfo[MAX_APPLY_NUM] from constants.cpp (server) and make a simple function to get point corespondent for apply.

  • Love 1
Link to comment
Share on other sites

vor 15 Minuten schrieb Abel(Tiger):

Just replace that function with POINT corespondent.

item.GetApplyPoint( item.APPLY_ATTBONUS_HUMAN ) == POINT_ATTBONUS_HUMAN = 43

Or copy aApplyInfo[MAX_APPLY_NUM] from constants.cpp (server) and make a simple function to get point corespondent for apply.

 

Thanks for your reply, but as i've said im not a developer i don't understand what i should do (I kinda know, but i can't do what you've said)

 

Link to comment
Share on other sites

Gerade eben schrieb Abel(Tiger):

If you don't know the essential things why are you even trying to copy something ? Pay someone who understand what i said above .

 

Thanks for your useful post, i really appreciate it, but i won't pay for something which is done in minutes.

If you don't want to help, then don't help..I can not do anything with your incomplete contributions, that should not sound mean

Link to comment
Share on other sites

vor einer Stunde schrieb Abel(Tiger):

This is the hidden content, please

Useless just for one system, useful if you use it in more places.

 

Thank's very much im currently fixxing an error that appends bonus not correctly, if i'm done i will share a tutorial to implement this system, so everyone can use it.

Thanks @Abel(Tiger) for spending your time again!

  • Metin2 Dev 2
  • Good 1
  • Love 2
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

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.