Jump to content

Sash reseting stats doesn't work


Recommended Posts

Hey,

so the only problem left is reseting sash stats, whenever i put the reset stat item on it,nothing happens.

i looked in python and it should open a message box with "would you like to reset sash stats,yes/no" and it doesnt appear

https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif

if constInfo.IS_ACCE_ITEM_DETACH(scrollIndex) == TRUE:
			item.SelectItem(targetIndex)
			if item.GetItemSubType() == item.COSTUME_TYPE_ACCE:
				if self.GetAcceAttribute(targetSlotPos) == 0:
					return
		
				self.questionDialog = uiCommon.QuestionDialog()
				self.questionDialog.SetText("Would you like to reset your sash shoulder stats?")
				self.questionDialog.SetAcceptEvent(ui.__mem_func__(self.OnDetachMetinFromItem))
				self.questionDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseQuestionDialog))
				self.questionDialog.Open()
				self.questionDialog.sourcePos = scrollSlotPos
				self.questionDialog.targetPos = targetSlotPos
			else:
				return

 

i believe the issue might be with python/client bin. any ideas?

Edited by Metin2 Dev
Core X - External 2 Internal
  • Good 1
Link to comment
Share on other sites

  • Premium

I just created a fix for you and every other people in needs ! However, I don't know why Wahmon are bulying you xD

Follow my post or click on this link (the link is updated whereas this post are not) : https://metin2dev.org/board/index.php?/topic/9251-sash-resetting-scroll-fix/

Open uiinventory.py and search :

def DetachMetinFromItem(self, scrollSlotPos, targetSlotPos):
Then replace the whole function by :
    def DetachMetinFromItem(self, scrollSlotPos, targetSlotPos): ## Resetting Sash Stats Fix - Galet - 11/11/2015 - 17h45 - Tribute to the victims of the war
        scrollIndex = player.GetItemIndex(scrollSlotPos)
        targetIndex = player.GetItemIndex(targetSlotPos)
        for i in xrange(player.INVENTORY_PAGE_SIZE*2):
            slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(i)
            getItemVNum=player.GetItemIndex
            itemVnum = getItemVNum(slotNumber)
            if 85009 == itemVnum:
                item.SelectItem(targetIndex)
                if item.GetItemSubType() == item.COSTUME_TYPE_ACCE:
                    if self.GetAcceAttribute(targetSlotPos) == 0:
                        return
                    
                    self.questionDialog = uiCommon.QuestionDialog()
                    self.questionDialog.SetText("Would you like to reset your sash shoulder stats?")
                    self.questionDialog.SetAcceptEvent(ui.__mem_func__(self.OnDetachMetinFromItem))
                    self.questionDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseQuestionDialog))
                    self.questionDialog.Open()
                    self.questionDialog.sourcePos = scrollSlotPos
                    self.questionDialog.targetPos = targetSlotPos
                else:
                    return
            else:
                if not player.CanDetach(scrollIndex, targetSlotPos):
                    chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.REFINE_FAILURE_METIN_INSEPARABLE_ITEM)
                    return
            
                self.questionDialog = uiCommon.QuestionDialog()
                self.questionDialog.SetText(localeInfo.REFINE_DO_YOU_SEPARATE_METIN)
                self.questionDialog.SetAcceptEvent(ui.__mem_func__(self.OnDetachMetinFromItem))
                self.questionDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseQuestionDialog))
                self.questionDialog.Open()
                self.questionDialog.sourcePos = scrollSlotPos
                self.questionDialog.targetPos = targetSlotPos

If you want it on pastebin, here you go : http://pastebin.com/UG4Tvkv6

It is probably not the best way to fix it but should works like a charm !

Have a nice day all :)

Edited by galet
  • Love 3
Link to comment
Share on other sites

try this work for me 

 

90000    sash_scroll    "ITEM_USE"    "USE_DETACHMENT"    1    "ANTI_STACK"    "NONE"    "NONE"    "NONE"    0    0    0    0    0    "LIMIT_NONE"    0    "LIMIT_NONE"    0    "APPLY_NONE"    0    "APPLY_NONE"    0    "APPLY_NONE"    0    7    0    0    0    0    0    0    0    0

 

Link to comment
Share on other sites

try this work for me 

 

90000    sash_scroll    "ITEM_USE"    "USE_DETACHMENT"    1    "ANTI_STACK"    "NONE"    "NONE"    "NONE"    0    0    0    0    0    "LIMIT_NONE"    0    "LIMIT_NONE"    0    "APPLY_NONE"    0    "APPLY_NONE"    0    "APPLY_NONE"    0    7    0    0    0    0    0    0    0    0

 

I'm talking about the window(detachment_metin refinement window) appears instead of remove sash window.

Edit,fixed it

code:

def DetachMetinFromItem(self, scrollSlotPos, targetSlotPos):
		scrollIndex = player.GetItemIndex(scrollSlotPos)
		targetIndex = player.GetItemIndex(targetSlotPos)
		for i in xrange(player.INVENTORY_PAGE_SIZE*4):
			slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(i)
			getItemVNum=player.GetItemIndex
			itemVnum = getItemVNum(slotNumber)
			if 85209 == itemVnum:
				item.SelectItem(targetIndex)
				if self.GetAcceAttribute(targetSlotPos) == 0:
					return
		
			if not player.CanDetach(scrollIndex, targetSlotPos):
				chat.AppendChat(chat.CHAT_TYPE_INFO, locale.REFINE_FAILURE_METIN_INSEPARABLE_ITEM)
				return
		
			if 85001 <= targetIndex  and 85008 >= targetIndex : 
				self.questionDialog = uiCommon.QuestionDialog()
				self.questionDialog.SetText(locale.ACCE_DO_YOU_REMOVE_ATTR)
				self.questionDialog.SetAcceptEvent(ui.__mem_func__(self.OnDetachMetinFromItem))
				self.questionDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseQuestionDialog))
				self.questionDialog.Open()
				self.questionDialog.sourcePos = scrollSlotPos
				self.questionDialog.targetPos = targetSlotPos
			else:
				self.questionDialog = uiCommon.QuestionDialog()
				self.questionDialog.SetText(locale.REFINE_DO_YOU_SEPARATE_METIN)
				self.questionDialog.SetAcceptEvent(ui.__mem_func__(self.OnDetachMetinFromItem))
				self.questionDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseQuestionDialog))
				self.questionDialog.Open()
				self.questionDialog.sourcePos = scrollSlotPos
				self.questionDialog.targetPos = targetSlotPos

 

Regards.

Edited by metin2-factory
Link to comment
Share on other sites

  • 1 month later...

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.