Jump to content

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
https://metin2.dev/topic/17957-characterdetails-need-a-function/
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
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.

  • Bot

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

english_banner.gif

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)

 

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

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

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.