----------------------------------------------------------------------------------------------------- [LOCALE_TR]>locale_game.txt aç ekle INVENTORY_PLUS_ITEM %s 100 adet Su Taşı karşılığında envanterini görmek istiyor? INVENTORY_PLUS_GOLD %s 5 Milyon Yang karşılığında envanterini görmek istiyor? INVENTORY_PLUS_TIME Tekrar sorgu göndermek için 10 saniye beklemen gerekli. INVENTORY_PLUS_CHAT Şuanda %s adlı oyuncunun profilini görmektesin. INVENTORY_PLUS_REFUSE Envanter görüntüleme isteği kabul edilmedi. ----------------------------------------------------------------------------------------------------- [ROOT]>uitarget.py aç //1.1 arat ve değiştir def YangButton(self): if not (self.zaman < app.GetTime()): chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.INVENTORY_PLUS_TIME) return self.zaman = app.GetTime() + 10 net.SendWhisperPacket(chr.GetNameByVID(self.vid), '#YangSorgu#Yang#') constInfo.INVENTORY_TARGET_VID = self.vid #net.SendChatPacket("/view_equip_gold " + str(self.vid)) self.questionDialog.Close() def ItemButton(self): if not (self.zaman < app.GetTime()): chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.INVENTORY_PLUS_TIME) return self.zaman = app.GetTime() + 10 net.SendWhisperPacket(chr.GetNameByVID(self.vid), '#ItemSorgu#Item#') constInfo.INVENTORY_TARGET_VID = self.vid #net.SendChatPacket("/view_equip_item " + str(self.vid)) self.questionDialog.Close() //1.2 arat name.Show() //1.2 altına ekle self.zaman = 0 ----------------------------------------------------------------------------------------------------- [ROOT]>game.py aç //2.1 arat def OnRecvWhisper(self, mode, name, line): // 2.1 uygun bir yere ekle if line.find("#YangSorgu#") != -1: if constInfo.profil == 1: net.SendWhisperPacket(name, "#Red2#"+str(player.GetName())+"#") return if line.find("#Yang#") != -1: self.YangDialog = uiCommon.QuestionDialog() self.YangDialog.SetText(localeInfo.INVENTORY_PLUS_GOLD % (str(name))) self.YangDialog.SetAcceptEvent(lambda arg=TRUE: self.OnYangDialog(name, 1)) self.YangDialog.SetCancelEvent(lambda arg=FALSE: self.OnYangDialog(name, 0)) self.YangDialog.Open() else: if line.find("Red") != -1: self.uyari = uiCommon.PopupDialog() self.uyari.SetText(localeInfo.INVENTORY_PLUS_REFUSE) self.uyari.Open() return chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.INVENTORY_PLUS_CHAT % (name)) net.SendChatPacket("/view_equip_gold " + str(constInfo.INVENTORY_TARGET_VID)) return if line.find("#Red2#") != -1: chat.AppendChat(1,str(line.split("#")[2])+" isimli oyuncu Profil görüntülemeyi engelledi.") return if line.find("#ItemSorgu#") != -1: if constInfo.profil == 1: net.SendWhisperPacket(name, "#Red2#"+str(player.GetName())+"#") return if line.find("#Item#") != -1: self.ItemDialog = uiCommon.QuestionDialog() self.ItemDialog.SetText(localeInfo.INVENTORY_PLUS_ITEM % (str(name))) self.ItemDialog.SetAcceptEvent(lambda arg=TRUE: self.OnItemDialog(name, 1)) self.ItemDialog.SetCancelEvent(lambda arg=FALSE: self.OnItemDialog(name, 0)) self.ItemDialog.Open() else: if line.find("Red") != -1: self.uyari = uiCommon.PopupDialog() self.uyari.SetText(localeInfo.INVENTORY_PLUS_REFUSE) self.uyari.Open() return chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.INVENTORY_PLUS_CHAT % (name)) net.SendChatPacket("/view_equip_item " + str(constInfo.INVENTORY_TARGET_VID)) return if line.find("#Red2#") != -1: chat.AppendChat(1,str(line.split("#")[2])+" isimli oyuncu Profil görüntülemeyi engelledi.") return //2.2 arat def OnRecvWhisperError(self, mode, name, line): //2.2 kod bloğunun sonuna ekle def OnYangDialog(self, ad, flag): if flag == 0: net.SendWhisperPacket(ad, "#YangSorgu#Red#") self.YangDialog.Close() return self.YangDialog.Close() net.SendWhisperPacket(ad, "#YangSorgu#Cevap#") def OnItemDialog(self, ad, flag): if flag == 0: net.SendWhisperPacket(ad, "#ItemSorgu#Red#") self.ItemDialog.Close() return self.ItemDialog.Close() net.SendWhisperPacket(ad, "#ItemSorgu#Cevap#") ----------------------------------------------------------------------------------------------------- [ROOT]>uigameoption.py aç //3.1 arat self.blockButtonList.append(GetObject("block_party_request_button")) //3.1 altına ekle self.blockButtonList.append(GetObject("block_profil_request_button")) //3.2 arat self.blockButtonList[5].SetToggleUpEvent(self.__OnClickBlockPartyRequest) //3.2 altına ekle self.blockButtonList[6].SetToggleUpEvent(self.__OnClickProfilButton) //3.3 arat self.blockButtonList[5].SetToggleDownEvent(self.__OnClickBlockPartyRequest) //3.3 altına ekle self.blockButtonList[6].SetToggleDownEvent(self.__OnClickProfilButton) //3.4 arat def __OnClickBlockPartyRequest(self): //3.4 kod bloğunun sonuna ekle def __OnClickProfilButton(self): if constInfo.profil == 0: self.blockButtonList[6].Down() chat.AppendChat(chat.CHAT_TYPE_INFO, "Profil görüntüleme sistemi kapatıldı.") constInfo.profil = 1 else: self.blockButtonList[6].SetUp() chat.AppendChat(chat.CHAT_TYPE_INFO, "Profil görüntüleme sistemi aktif.") constInfo.profil = 0 //3.5 arat def Show(self): self.RefreshMobile() self.RefreshBlock() ui.ScriptWindow.Show(self) //3.5 alt kısmına aşağıdaki kodu ekle if constInfo.profil == 1: self.blockButtonList[6].Down() else: pass ----------------------------------------------------------------------------------------------------- [UISCRIPT]>gameoptiondialog.py aç //uygun bir yere eklenir ## Profil ## { "name" : "profil_on_off", "type" : "text", "x" : LINE_LABEL_X, "y" : 265+2, "text" : "Profil Bilgisi", }, { "name" : "block_profil_request_button", "type" : "toggle_button", "x" : LINE_DATA_X, "y" : 265, "text" : "Profil", "default_image" : ROOT_PATH + "middle_button_01.sub", "over_image" : ROOT_PATH + "middle_button_02.sub", "down_image" : ROOT_PATH + "middle_button_03.sub", }, ----------------------------------------------------------------------------------------------------- [ROOT]>constInfo.py aç ve ekle INVENTORY_TARGET_VID = 0 profil = 0 -----------------------------------------------------------------------------------------------------