İstek nesne ie npc den item satın alma

Konu sahibinin aradığı materyalleri bulmasına yardımcı olmak için konuya yorum yazabilirsiniz.

memett4545

Üye
Üye
merhaba arkadaşlar nesne ile npc den item satın alma sistemini nerden bulabilirim x forumlarında var ama sıkıntılı diye duydum sökebileceğim bi files veya elinde olan varsa paylaşabilir mi
 
Mekan2 filesinde var bende şuan ona bakıyorum
 

Dosya Eklentileri

  • mekan2 item to item.jpg
    mekan2 item to item.jpg
    39,9 KB · Gösterim: 22
extern_wa_shopitem.py root içerisine at

game.py:
import extern_wa_shopitem            ekle

bul
    def OnShopError(self, type):
        try:
            self.PopupMessage(localeInfo.SHOP_ERROR_DICT[type])
        except KeyError:
            self.PopupMessage(localeInfo.SHOP_ERROR_UNKNOWN % (type))
değiştir
    def OnShopError(self, type):
        try:
            self.PopupMessage(extern_wa_shopitem.ShopErrorDict(type))
        except KeyError:
            self.PopupMessage(localeInfo.SHOP_ERROR_UNKNOWN % (type))
uishop.py:
import extern_wa_shopitem         ekle

bul
def AskBuyItem(self, slotPos):

    def AskBuyItem(self, slotPos):
        slotPos = self.__GetRealIndex(slotPos)

        itemIndex = shop.GetItemID(slotPos)
        itemPrice = shop.GetItemPrice(slotPos)
        itemCount = shop.GetItemCount(slotPos)

        item.SelectItem(itemIndex)
        itemName = item.GetItemName()

        itemBuyQuestionDialog = uiCommon.QuestionDialog()
        itemBuyQuestionDialog.SetText(localeInfo.DO_YOU_BUY_ITEM(itemName, itemCount, localeInfo.NumberToMoneyString(itemPrice)))
        itemBuyQuestionDialog.SetAcceptEvent(lambda arg=True: self.AnswerBuyItem(arg))
        itemBuyQuestionDialog.SetCancelEvent(lambda arg=False: self.AnswerBuyItem(arg))
        itemBuyQuestionDialog.Open()
        itemBuyQuestionDialog.pos = slotPos
        self.itemBuyQuestionDialog = itemBuyQuestionDialog

        constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)
değiştir
    def AskBuyItem(self, slotPos):
        slotPos = self.__GetRealIndex(slotPos)

        itemIndex = shop.GetItemID(slotPos)
        itemPrice = shop.GetItemPrice(slotPos)
        itemCount = shop.GetItemCount(slotPos)

        item.SelectItem(itemIndex)
        itemName = item.GetItemName()

        itemBuyQuestionDialog.SetText(extern_wa_shopitem.FuncCheckMsg(slotPos,itemName,itemCount,itemPrice))
        itemBuyQuestionDialog.SetAcceptEvent(lambda arg=True: self.AnswerBuyItem(arg))
        itemBuyQuestionDialog.SetCancelEvent(lambda arg=False: self.AnswerBuyItem(arg))
        itemBuyQuestionDialog.Open()
        itemBuyQuestionDialog.pos = slotPos
        self.itemBuyQuestionDialog = itemBuyQuestionDialog

        constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)
uitooltip.py:
import extern_wa_shopitem        ekle

bul
    def SetShopItem(self, slotIndex):
        itemVnum = shop.GetItemID(slotIndex)
        if 0 == itemVnum:
            return

        price = shop.GetItemPrice(slotIndex)
        self.ClearToolTip()
        self.isShopItem = True

        metinSlot = []
        for i in xrange(player.METIN_SOCKET_MAX_NUM):
            metinSlot.append(shop.GetItemMetinSocket(slotIndex, i))
        attrSlot = []
        for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
            attrSlot.append(shop.GetItemAttribute(slotIndex, i))

        self.AddItemData(itemVnum, metinSlot, attrSlot)
        self.AppendPrice(price)
değiştir
    def SetShopItem(self, slotIndex):
        itemVnum = shop.GetItemID(slotIndex)
        if 0 == itemVnum:
            return

        price = shop.GetItemPrice(slotIndex)
        self.ClearToolTip()
        self.isShopItem = True

        metinSlot = []
        for i in xrange(player.METIN_SOCKET_MAX_NUM):
            metinSlot.append(shop.GetItemMetinSocket(slotIndex, i))
        attrSlot = []
        for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
            attrSlot.append(shop.GetItemAttribute(slotIndex, i))

        self.AddItemData(itemVnum, metinSlot, attrSlot)

        extern_wa_shopitem.FuncCheckPrice(self,slotIndex,price)
ekle locale_game.txt
PRICE01 Fiyatı:
PRICE02 Fiyatı: x%d
SHOP_NOT_ENOUGH_COUNT Yeterli öğeniz yok.

Linkleri görebilmek için giriş yap veya kayıt ol.
 
Geri