TRBizeps 49 Posted February 3, 2018 Share Posted February 3, 2018 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. 1 Link to comment Share on other sites More sharing options...
M.Sorin 284 Posted February 3, 2018 Share Posted February 3, 2018 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. 1 Link to comment Share on other sites More sharing options...
TRBizeps 49 Posted February 3, 2018 Author Share Posted February 3, 2018 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 More sharing options...
Active+ Member Abel(Tiger) 1206 Posted February 3, 2018 Active+ Member Share Posted February 3, 2018 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. 1 Link to comment Share on other sites More sharing options...
TRBizeps 49 Posted February 3, 2018 Author Share Posted February 3, 2018 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 More sharing options...
Active+ Member Abel(Tiger) 1206 Posted February 3, 2018 Active+ Member Share Posted February 3, 2018 If you don't know the essential things why are you even trying to copy something ? Pay someone who understand what i said above . 2 Link to comment Share on other sites More sharing options...
TRBizeps 49 Posted February 3, 2018 Author Share Posted February 3, 2018 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 More sharing options...
Active+ Member Abel(Tiger) 1206 Posted February 3, 2018 Active+ Member Share Posted February 3, 2018 This is the hidden content, please Sign In or Sign Up Useless just for one system, useful if you use it in more places. 11 1 5 3 Link to comment Share on other sites More sharing options...
TRBizeps 49 Posted February 3, 2018 Author Share Posted February 3, 2018 vor einer Stunde schrieb Abel(Tiger): This is the hidden content, please Sign In or Sign Up 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! 2 1 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now