Jump to content

[HELP]Sort inventory not working from button but in chat yes


Recommended Posts

  • Premium

Hello!

I tried this sort inventory system:
https://metin2.dev/topic/18972-sort-inventory
I did the python part too, but when i click the button, nothing happen.
BUT! If i write it in the chat, its working. Stacking everything as need.

Preview: https://metin2.download/picture/fUETOE0YFugQR4G1ODe6fL94FN6SV1u3/.gif

Here is my python part:

uispecialtorage:

Spoiler

def __LoadWindow(self):

            self.titleName = self.GetChild("TitleName")
            self.separateButton2 = self.GetChild("SeparateButton2")

#some lines after:
        if self.separateButton2:
            self.separateButton2.SetEvent(ui.__mem_func__(self.ClickSeparateButton2))

        ## Etc
        self.wndItem = wndItem

#and i added the defition of ClickSeparateButton2

    def ClickSeparateButton2(self):
        #print "click_separate_button2"
        net.SendChatPacket("/click_sort_special_storage")
        chat.AppendChat(chat.CHAT_TYPE_INFO, "Workingornot???")

uiscript/specialstoragewindow.py                

Spoiler

## Separate
                {
                    "name" : "SeparateButton2",
                    "type" : "button",

                    "x" : 8,
                    "y" : 7,

                    "default_image" : "d:/ymir work/ui/pattern/inv_refresh_button_01.tga",
                    "over_image" : "d:/ymir work/ui/pattern/inv_refresh_button_02.tga",
                    "down_image" : "d:/ymir work/ui/pattern/inv_refresh_button_03.tga",
                },

 

As you can see, there is a chat_type_info, which is also not working (i just added it for testing but yea, still nothing)

What did i do wrong? Can seomone help me please? 😮
 

Sorry for my bad english.
 

Edited by Metin2 Dev
Core X - External 2 Internal

Ulthar

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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.