Jump to content

Recommended Posts

Hi, I have a problem ... I have implemented this system , When I press the button, window Appear Every time I hit the button. So the window appears each time you press the button and this is not good .

 

M1FrFr6

https://metin2.download/picture/VzTU42UClHo2BQl35M23xabIbMRow47t/.jpg

This is tut for system with this bug:

uiinventory.py from root and replace all function def ClickMallButton with :

def ClickMallButton(self):
      self.choix = ui.BoardWithTitleBar()
      self.choix.SetSize(210, 80)
      self.choix.SetCenterPosition()
      self.choix.AddFlag('float')
      self.choix.AddFlag('movable')
      self.choix.SetTitleName("Ouverture entrepôt")
      self.choix.Show()
      
      self.EntrepotIs = ui.Button()
      self.EntrepotIs.SetEvent(self.OpenIs)
      self.EntrepotIs.SetParent(self.choix)
      self.EntrepotIs.SetPosition(35, 40)
      self.EntrepotIs.SetUpVisual("d:/ymir work/ui/public/middle_button_01.sub")
      self.EntrepotIs.SetOverVisual("d:/ymir work/ui/public/middle_button_02.sub")
      self.EntrepotIs.SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
      self.EntrepotIs.SetText("ItemShop")
      self.EntrepotIs.SetToolTipText("Ouvrir l'entrepot ItemShop")
      self.EntrepotIs.Show()
      
      self.Magasinier = ui.Button()
      self.Magasinier.SetEvent(self._normal_mall)
      self.Magasinier.SetParent(self.choix)
      self.Magasinier.SetPosition(105, 40)
      self.Magasinier.SetUpVisual("d:/ymir work/ui/public/middle_button_01.sub")
      self.Magasinier.SetOverVisual("d:/ymir work/ui/public/middle_button_02.sub")
      self.Magasinier.SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
      self.Magasinier.SetText("Magasinier")
      self.Magasinier.SetToolTipText("Ouvrir le magasinier")
      self.Magasinier.Show()
------------------  
under add this: :
    def OpenIs(self):
        self.EntrepotIs.Hide()
        self.choix.Hide()
        self.Magasinier.Hide()
        net.SendChatPacket("/click_mall")
   
    def _normal_mall(self):
        self.EntrepotIs.Hide()
        self.Magasinier.Hide()
        self.choix.Hide()
        net.SendChatPacket("/click_safebox")
--------------------------------------------------------------------------------------------
open cmd_general.cpp from game/src and search:
ACMD(do_click_mall)
{
   ch->ChatPacket(CHAT_TYPE_COMMAND, "ShowMeMallPassword");
}
----------------------------------------------
under add:
ACMD(do_click_safebox)
{
   ch->ChatPacket(CHAT_TYPE_COMMAND, "ShowMeSafeboxPassword");
}
----------------------------------------------
open cmd.cpp from game/src and search:
ACMD(do_click_mall);
----------------------------------------------
under add:
ACMD(do_click_safebox);
----------------------------------------------

in cmd_general.cpp from game/src search:
{ "click_mall",    do_click_mall,    0,    POS_DEAD,    GM_PLAYER    },
----------------------------------------------
under add:
{ "click_safebox",         do_click_safebox,         0,   POS_DEAD,   GM_PLAYER      },
----------------------------------------------
open char.cpp from game/src and search:
else if (GetDistanceFromSafeboxOpen() > 1000)
   {

      ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<â°í> °Å¸®°¡ ¸Ö¾î¼­ â°í¸¦ ¿­ ¼ö ¾ø½À´Ï´Ù."));
      return;
   }
----------------------------------------------
and replace with:
/*else if (GetDistanceFromSafeboxOpen() > 1000)
   {

      ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<â°í> °Å¸®°¡ ¸Ö¾î¼­ â°í¸¦ ¿­ ¼ö ¾ø½À´Ï´Ù."));
      return;
   }*/
================================================================================================

Help?

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

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

  • 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.