Çözüldü Offline Shopu Butonla Açma

Bu konu çözüme ulaştırılmıştır. Çözüm için konuya yazılan tüm yorumları okumayı unutmayın. Eğer konudaki yorumlar sorununuzu çözmediyse yeni bir konu açabilirsiniz.
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.

lmaohw

Premium Üye
Premium Üye
MT Üye
Mesaj
187
Çözümler
11
Beğeni
64
Puan
474
Ticaret Puanı
0
Selamlar, great offline shop kurdum buna bir kısayol atamak istiyorum paket olmadan bunun pazarını açmamız mümkün mü ve bir kısayol atamak.
Mesela envanterde pazar kurmak için buton oluyor bazı fileslarda onu eklesem paket satın almaya gerek kalmıyor satıcıdan anladığım kadarıyla
 
Çözüm
C++:
Genişlet Daralt Kopyala
cmd.cpp
Arat
ACMD(do_clear_affect);
Altına Ekle
ACMD(do_open_shop)
   
Arat
    { "do_clear_affect", do_clear_affect,     0, POS_DEAD,        GM_LOW_WIZARD},
Altına Ekle
    { "open_shop", do_open_shop,     0, POS_DEAD,        GM_PLAYER},

cmd_general.cpp
Dosyanın en sonuna ekle.

ACMD(do_open_shop)
{
    UseSilkBotary();
}


Python:
Genişlet Daralt Kopyala
uiinventory.py aç ve arat
            self.costumeButton = self.GetChild2("CostumeButton")
Altına ekle
            self.shopButton = self.GetChild2("ShopButton")
Arat
        # Costume Button
        if self.costumeButton:
            self.costumeButton.SetEvent(ui.__mem_func__(self.ClickCostumeButton))
Altına ekle
        # Shop Button
        if self.shopButton...
C++:
Genişlet Daralt Kopyala
cmd.cpp
Arat
ACMD(do_clear_affect);
Altına Ekle
ACMD(do_open_shop)
   
Arat
    { "do_clear_affect", do_clear_affect,     0, POS_DEAD,        GM_LOW_WIZARD},
Altına Ekle
    { "open_shop", do_open_shop,     0, POS_DEAD,        GM_PLAYER},

cmd_general.cpp
Dosyanın en sonuna ekle.

ACMD(do_open_shop)
{
    UseSilkBotary();
}


Python:
Genişlet Daralt Kopyala
uiinventory.py aç ve arat
            self.costumeButton = self.GetChild2("CostumeButton")
Altına ekle
            self.shopButton = self.GetChild2("ShopButton")
Arat
        # Costume Button
        if self.costumeButton:
            self.costumeButton.SetEvent(ui.__mem_func__(self.ClickCostumeButton))
Altına ekle
        # Shop Button
        if self.shopButton:
            self.shopButton.SetEvent(ui.__mem_func__(self.ClickShopButton))
Üstüne ekle.
Arat
    def ClickCostumeButton(self):
        if self.wndCostume:
            if self.wndCostume.IsShow():
                self.wndCostume.Hide()
            else:
                self.wndCostume.Show()
        else:
            self.wndCostume = CostumeWindow(self)
            self.wndCostume.Show()
Üstüne ekle
    def ClickShopButton(self):
        net.SendChatPacket("/open_shop")

Şimdi buton ekle.
inventorywindow.py aç ve arat

                            ## CostumeButton
                            {
                                "name" : "CostumeButton",
                                "type" : "button",

                                "x" : 78,
                                "y" : 5,

                                "tooltip_text" : "Costume",

                                "default_image" : "d:/ymir work/ui/game/taskbar/costume_Button_01.tga",
                                "over_image" : "d:/ymir work/ui/game/taskbar/costume_Button_02.tga",
                                "down_image" : "d:/ymir work/ui/game/taskbar/costume_Button_03.tga",
                            },
Altına ekle
                            ## ShopButton
                            {
                                "name" : "ShopButton",
                                "type" : "button",

                                "x" : 118,
                                "y" : 148,

                                "tooltip_text" : "Shop",

                                "default_image" : "d:/ymir work/ui/game/taskbar/costume_Button_01.tga",
                                "over_image" : "d:/ymir work/ui/game/taskbar/costume_Button_02.tga",
                                "down_image" : "d:/ymir work/ui/game/taskbar/costume_Button_03.tga",
                            },

Geri kalan buton ve koordinatları sen ayarlarsın.
 
Son düzenleme:
Çözüm
C++:
Genişlet Daralt Kopyala
cmd.cpp
Arat
ACMD(do_clear_affect);
Altına Ekle
ACMD(do_open_shop)
  
Arat
    { "do_clear_affect", do_clear_affect,     0, POS_DEAD,        GM_LOW_WIZARD},
Altına Ekle
    { "open_shop", do_open_shop,     0, POS_DEAD,        GM_PLAYER},

cmd_general.cpp
Dosyanın en sonuna ekle.

ACMD(do_open_shop)
{
    UseSilkBotary();
}


Python:
Genişlet Daralt Kopyala
uiinventory.py aç ve arat
            self.costumeButton = self.GetChild2("CostumeButton")
Altına ekle
            self.shopButton = self.GetChild2("ShopButton")
Arat
        # Costume Button
        if self.costumeButton:
            self.costumeButton.SetEvent(ui.__mem_func__(self.ClickCostumeButton))
Altına ekle
        # Shop Button
        if self.shopButton:
            self.shopButton.SetEvent(ui.__mem_func__(self.ClickShopButton))
Üstüne ekle.
Arat
    def ClickCostumeButton(self):
        if self.wndCostume:
            if self.wndCostume.IsShow():
                self.wndCostume.Hide()
            else:
                self.wndCostume.Show()
        else:
            self.wndCostume = CostumeWindow(self)
            self.wndCostume.Show()
Üstüne ekle
    def ClickShopButton(self):
        net.SendChatPacket("/open_shop")

Şimdi buton ekle.
inventorywindow.py aç ve arat

                            ## CostumeButton
                            {
                                "name" : "CostumeButton",
                                "type" : "button",

                                "x" : 78,
                                "y" : 5,

                                "tooltip_text" : "Costume",

                                "default_image" : "d:/ymir work/ui/game/taskbar/costume_Button_01.tga",
                                "over_image" : "d:/ymir work/ui/game/taskbar/costume_Button_02.tga",
                                "down_image" : "d:/ymir work/ui/game/taskbar/costume_Button_03.tga",
                            },
Altına ekle
                            ## ShopButton
                            {
                                "name" : "ShopButton",
                                "type" : "button",

                                "x" : 118,
                                "y" : 148,

                                "tooltip_text" : "Shop",

                                "default_image" : "d:/ymir work/ui/game/taskbar/costume_Button_01.tga",
                                "over_image" : "d:/ymir work/ui/game/taskbar/costume_Button_02.tga",
                                "down_image" : "d:/ymir work/ui/game/taskbar/costume_Button_03.tga",
                            },

Geri kalan buton ve koordinatları sen ayarlarsın.
Teşekkürler
 
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.
Üst