Jump to content

Ahmed

Member
  • Posts

    38
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by Ahmed

  1. Hello guys, I added skybox new system, but when i try to change skyboxes, some works and others making the client freezes without any syserr, when i tried to use the client debugger, it crashes and not responding. by the way i have tried to add this system on other metin2 clients and it works perfectly. I hope you can help me and thanks in advance
  2. Hello Guys When i go to the skipia dungeon the character is appears under ground like the photo, I hope you can help me
  3. Hello Guys After adding the new official emotions, it works greatly, but the client syserr shows me that there's a problem which is : 0512 02:49:25045 :: CRaceMotionData::SetName - UNKNOWN NAME 352 0512 02:49:25046 :: CRaceMotionData::SetName - UNKNOWN NAME 353 0512 02:49:25047 :: CRaceMotionData::SetName - UNKNOWN NAME 354 0512 02:49:25048 :: CRaceMotionData::SetName - UNKNOWN NAME 355 0512 02:49:25049 :: CRaceMotionData::SetName - UNKNOWN NAME 356 I Hope you guys help me and thanks in advance
  4. I already added this emoji textline tutorial and it doesn't work, it only shows me text instead of the photo of emoji
  5. Hello Guys i have a bug in emoji system I have a problem in the emoji system, when i try to write for example : D it appears like that emoji/e_d and the photo of the emoji doesn't appear ]] [Hidden Content] Thanks in advance
  6. how i can check it please ? and how i can make my client accept any 40k item proto
  7. Hello Guys, I tried to decrypt the tiem_proto using nirvana files by all tools but i failed and when i try to change the item_proto it shows me an syserr 0425 03:22:03928 :: CPythonItem::LoadItemTable: invalid item_proto[locale/ae/item_proto] STRIDE[156] != sizeof(SItemTable) 0425 03:22:03929 :: LoadLocaleData - LoadItemProto(locale/ae/item_proto) Error 0425 03:22:11871 :: Unknown Server Command xmas_boom 1 | xmas_boom 0425 03:22:11871 :: CPythonPlayer::SetItemData(window_type : 1, dwSlotIndex=3, itemIndex=53526) - Failed to item data can anyone please help?! because i have been in that for many days
  8. Hello Guys, I have made a button to change sky box, when someone click on that button, it should change the sky boxes but it doesn't work, so can anyone please check what's wrong with that code Thanks in advance def ClickSky(self): if constInfo.Night == 0: background.RegisterEnvironmentData(1, constInfo.ENVIRONMENT_NIGHT) background.SetEnvironmentData(1) constInfo.Night = 1 elif constInfo.Night == 2: background.RegisterEnvironmentData(2, constInfo.ENVIRONMENT_Skybox4) background.SetEnvironmentData(2) constInfo.Night = 2 elif constInfo.Night == 3: background.RegisterEnvironmentData(3, constInfo.ENVIRONMENT_Skybox3) background.SetEnvironmentData(3) constInfo.Night = 3 elif constInfo.Night == 4: background.RegisterEnvironmentData(4, constInfo.ENVIRONMENT_Skybox2) background.SetEnvironmentData(4) constInfo.Night = 4 elif constInfo.Night == 0: background.RegisterEnvironmentData(0, constInfo.ENVIRONMENT_Skybox1) background.SetEnvironmentData(0) constInfo.Night = 0 else: background.SetEnvironmentData(0) constInfo.Night = 0 snd.PlaySound('sound/ui/pick.wav')
  9. I'm using illumina interface and the grade guild doesn't exist in details in uiscript
  10. Hello Guys, I have edited all the text positions of the guild authority page as you can see but i can't edit the text position of the guild grade name on the slot I hope you can help me and thanks in advance and this is Uiguild_new.py import ui import net import chr import player import wndMgr import item import emotion import uiCommon import app import uiUploadMark import guild import quest import mouseModule import chat import playerSettingModule import uiToolTip import uiPickMoney_Guild import localeInfo import constInfo import dbg import skill import uiScriptLocale import time import snd import event from _weakref import proxy def unsigned32(n): return n & 0xFFFFFFFFL info_guildPage = 1 comment_guildPage = 0 authority_guildPage = 0 skill_guildPage = 0 grade_guildPage = 0 NAME_CLASS_I = "COMMENT_PAGE" FACE_IMAGE_DICT = { playerSettingModule.RACE_WARRIOR_M : "d:/ymir work/interface/faces/small/icon_mwarrior.tga", playerSettingModule.RACE_WARRIOR_W : "d:/ymir work/interface/faces/small/icon_wwarrior.tga", playerSettingModule.RACE_ASSASSIN_M : "d:/ymir work/interface/faces/small/icon_mninja.tga", playerSettingModule.RACE_ASSASSIN_W : "d:/ymir work/interface/faces/small/icon_wninja.tga", playerSettingModule.RACE_SURA_M : "d:/ymir work/interface/faces/small/icon_msura.tga", playerSettingModule.RACE_SURA_W : "d:/ymir work/interface/faces/small/icon_wsura.tga", playerSettingModule.RACE_SHAMAN_M : "d:/ymir work/interface/faces/small/icon_mshaman.tga", playerSettingModule.RACE_SHAMAN_W : "d:/ymir work/interface/faces/small/icon_wshaman.tga", } GRADE_ADD_MEMBER_AUTHORITY = 1 GRADE_REMOVE_MEMBER_AUTHORITY = 2 GRADE_NOTICE_AUTHORITY = 3 GRADE_SKILL_AUTHORITY = 4 class DeclareGuildWarDialog(ui.ScriptWindow): def __init__(self): ui.ScriptWindow.__init__(self) self.type=0 self.__CreateDialog() def __del__(self): ui.ScriptWindow.__del__(self) def Open(self): self.inputValue.SetFocus() self.SetCenterPosition() self.SetTop() self.Show() def Close(self): self.ClearDictionary() self.board = None self.acceptButton = None self.cancelButton = None self.inputSlot = None self.inputValue = None self.Hide() def __CreateDialog(self): try: pyScrLoader = ui.PythonScriptLoader() if localeInfo.IsVIETNAM() : pyScrLoader.LoadScriptFile(self, uiScriptLocale.LOCALE_UISCRIPT_PATH + "declareguildwardialog.py") else: pyScrLoader.LoadScriptFile(self, "uiscript/declareguildwardialog.py") except: import exception exception.Abort("DeclareGuildWarWindow.__CreateDialog - LoadScript") try: getObject = self.GetChild self.board = getObject("Board") self.typeButtonList=[] self.typeButtonList.append(getObject("NormalButton")) self.typeButtonList.append(getObject("WarpButton")) self.typeButtonList.append(getObject("CTFButton")) self.acceptButton = getObject("AcceptButton") self.cancelButton = getObject("CancelButton") self.inputSlot = getObject("InputSlot") self.inputValue = getObject("InputValue") gameType=getObject("GameType") except: import exception exception.Abort("DeclareGuildWarWindow.__CreateDialog - BindObject") if constInfo.GUILD_WAR_TYPE_SELECT_ENABLE==0: gameType.Hide() self.typeButtonList[0].SAFE_SetEvent(self.__OnClickTypeButtonNormal) self.typeButtonList[1].SAFE_SetEvent(self.__OnClickTypeButtonWarp) self.typeButtonList[2].SAFE_SetEvent(self.__OnClickTypeButtonCTF) self.typeButtonList[0].SetToolTipWindow(self.__CreateGameTypeToolTip(localeInfo.GUILDWAR_NORMAL_TITLE, localeInfo.GUILDWAR_NORMAL_DESCLIST)) self.typeButtonList[1].SetToolTipWindow(self.__CreateGameTypeToolTip(localeInfo.GUILDWAR_WARP_TITLE, localeInfo.GUILDWAR_WARP_DESCLIST)) self.typeButtonList[2].SetToolTipWindow(self.__CreateGameTypeToolTip(localeInfo.GUILDWAR_CTF_TITLE, localeInfo.GUILDWAR_CTF_DESCLIST)) self.__ClickRadioButton(self.typeButtonList, 0) self.SetAcceptEvent(ui.__mem_func__(self.__OnOK)) self.SetCancelEvent(ui.__mem_func__(self.__OnCancel)) def __OnOK(self): text = self.GetText() type = self.GetType() if ""==text: return net.SendChatPacket("/war %s %d" % (text, type)) self.Close() return 1 def __OnCancel(self): self.Close() return 1 def __OnClickTypeButtonNormal(self): self.__ClickTypeRadioButton(0) def __OnClickTypeButtonWarp(self): self.__ClickTypeRadioButton(1) def __OnClickTypeButtonCTF(self): self.__ClickTypeRadioButton(2) def __ClickTypeRadioButton(self, type): self.__ClickRadioButton(self.typeButtonList, type) self.type=type def __ClickRadioButton(self, buttonList, buttonIndex): try: selButton=buttonList[buttonIndex] except IndexError: return for eachButton in buttonList: eachButton.SetUp() selButton.Down() def SetTitle(self, name): self.board.SetTitleName(name) def SetNumberMode(self): self.inputValue.SetNumberMode() def SetSecretMode(self): self.inputValue.SetSecret() def SetFocus(self): self.inputValue.SetFocus() def SetMaxLength(self, length): width = length * 6 + 10 self.inputValue.SetMax(length) self.SetSlotWidth(width) self.SetBoardWidth(max(width + 50, 160)) def SetSlotWidth(self, width): self.inputSlot.SetSize(width, self.inputSlot.GetHeight()) self.inputValue.SetSize(width, self.inputValue.GetHeight()) def SetBoardWidth(self, width): self.board.SetSize(max(width + 50, 160), self.GetHeight()) self.SetSize(max(width + 50, 160), self.GetHeight()) self.UpdateRect() def SetAcceptEvent(self, event): self.acceptButton.SetEvent(event) self.inputValue.OnIMEReturn = event def SetCancelEvent(self, event): self.board.SetCloseEvent(event) self.cancelButton.SetEvent(event) self.inputValue.OnPressEscapeKey = event def GetType(self): return self.type def GetText(self): return self.inputValue.GetText() def __CreateGameTypeToolTip(self, title, descList): toolTip = uiToolTip.ToolTip() toolTip.SetTitle(title) toolTip.AppendSpace(5) for desc in descList: toolTip.AutoAppendTextLine(desc) toolTip.AlignHorizonalCenter() return toolTip class GuildWindow(ui.ScriptWindow): GUILD_SKILL_PASSIVE_SLOT = 0 GUILD_SKILL_ACTIVE_SLOT = 1 GUILD_SKILL_AFFECT_SLOT = 2 def __init__(self): ui.ScriptWindow.__init__(self) self.state = "INFO_GUILD" self.isLoaded = 0 self.__Initialize() self.__LoadWindow() def __del__(self): ui.ScriptWindow.__del__(self) def __Initialize(self): self.tabButtonDict = None self.pageDict = None self.titleBarDict = None self.commentBoard = None self.can_continue = 1 self.objPos = 0 self.objPos2 = 0 self.objPos3 = 0 self.tooltip_in = 0 def CanOpen(self): return guild.IsGuildEnable() def Show(self): self.__LoadWindow() ui.ScriptWindow.Show(self) def __LoadScript(self, fileName): pyScrLoader = ui.PythonScriptLoader() pyScrLoader.LoadScriptFile(self, fileName) def __BindObject(self): self.tooltipSkill = uiToolTip.SkillToolTip() self.tooltipSkill.Hide() self.markSelectDialog=uiUploadMark.MarkSelectDialog() self.markSelectDialog.SAFE_SetSelectEvent(self.__OnSelectMark) self.GetChild("Expand").SetEvent(self.Functie_glisare_max) self.GetChild("Minimize").SetEvent(self.Functie_glisare_min) self.GetChild("Minimize").Hide() self.TabButton1 = self.GetChild("Tab_Button_01") self.TabButton2 = self.GetChild("Tab_Button_02") self.TabButton3 = self.GetChild("Tab_Button_03") self.TabButton4 = self.GetChild("Tab_Button_04") self.TabButton5 = self.GetChild("Tab_Button_05") self.Button1Text = self.GetChild("Button1_Name") self.Button1Text.Hide() self.Button2Text = self.GetChild("Button2_Name") self.Button2Text.Hide() self.Button3Text = self.GetChild("Button3_Name") self.Button3Text.Hide() self.Button4Text = self.GetChild("Button4_Name") self.Button4Text.Hide() self.Button5Text = self.GetChild("Button5_Name") self.Button5Text.Hide() self.tabButtonDict = { "INFO_GUILD" : self.GetChild("Tab_Button_01"), "COMMENT_PAGE" : self.GetChild("Tab_Button_02"), "AUTHORITY_PAGE" : self.GetChild("Tab_Button_03"), "SKILL_PAGE" : self.GetChild("Tab_Button_04"), "GRADE_PAGE" : self.GetChild("Tab_Button_05") } self.pageDict = { "INFO_GUILD" : self.GetChild("Info_Guild"), "COMMENT_PAGE" : self.GetChild("Comment_GuildPage"), "AUTHORITY_PAGE" : self.GetChild("Authority_GuildPage"), "SKILL_PAGE" : self.GetChild("Skill_Page"), "GRADE_PAGE" : self.GetChild("Grade_Page") } self.titleBarDict = { "INFO_GUILD" : self.GetChild("Info_TitleBar"), "COMMENT_PAGE" : self.GetChild("Comment_TitleBar"), "AUTHORITY_PAGE" : self.GetChild("Authority_TitleBar"), "SKILL_PAGE" : self.GetChild("Skill_TitleBar"), "GRADE_PAGE" : self.GetChild("Grade_TitleBar") } #first_page self.info_guildPage() self.offerDialog = uiPickMoney_Guild.PickMoneyDialog_Guild() self.offerDialog.LoadDialog() self.offerDialog.SetMax(9) self.offerDialog.SetTitleName(localeInfo.GUILD_OFFER_EXP) self.offerDialog.SetAcceptEvent(ui.__mem_func__(self.OnOffer)) #second_page self.comment_guildPage() #3'th page self.authority_guildPage() #4'th page self.skill_guildPage() #5'th page self.grade_guildPage() def info_guildPage(self): #-1 self.mark = self.GetChild("LargeGuildMark") self.mark_change = self.GetChild("GuildMark") self.mark_change.SetEvent(lambda : self.__OnClickSelectGuildMarkButton()) self.guild_level = self.GetChild("GuildLevelValue") self.guild_name = self.GetChild("GuildNameValue") self.guild_leader = self.GetChild("GuildMasterNameValue") self.level_percent = self.GetChild("PercentExp") self.curr_exp = self.GetChild("CurrentExperienceValue") self.exp_img = self.GetChild("ExpImgFull") #-2 self.guild_members = self.GetChild("GuildMemberCountValue") self.guild_members_level = self.GetChild("GuildMemberLevelAverageValue") self.guild_members_level = self.GetChild("GuildMemberLevelAverageValue") self.guild_donate_exp = self.GetChild("OfferButton") self.guild_donate_exp.SetEvent(lambda : self.__OnClickOfferButton()) self.guild_declare_war = self.GetChild("DeclareWarButton") self.guild_declare_war.SetEvent(lambda : self.__OnClickDeclareWarButton()) def __OnSelectMark(self, markFileName): ret = net.UploadMark("upload/"+markFileName) # MARK_BUG_FIX if net.ERROR_MARK_UPLOAD_NEED_RECONNECT == ret: chat.AppendChat(1,localeInfo.UPLOAD_MARK_UPLOAD_NEED_RECONNECT) return ret def __OnClickSelectGuildMarkButton(self): if guild.GetGuildLevel() < int(localeInfo.GUILD_MARK_MIN_LEVEL): chat.AppendChat(1,localeInfo.GUILD_MARK_NOT_ENOUGH_LEVEL) elif not guild.MainPlayerHasAuthority(guild.AUTH_NOTICE): chat.AppendChat(1,localeInfo.GUILD_NO_NOTICE_PERMISSION) else: self.markSelectDialog.Open() def __OnClickOfferButton(self): curEXP = unsigned32(player.GetStatus(player.EXP)) if curEXP <= 100: chat.AppendChat(1,localeInfo.GUILD_SHORT_EXP) return self.offerDialog.Open(curEXP, 100) def OnOffer(self, exp): net.SendGuildOfferPacket(exp) def __OnClickDeclareWarButton(self): inputDialog = DeclareGuildWarDialog() inputDialog.Open() self.inputDialog = inputDialog #~~~~~~~ 2 Page def comment_guildPage(self): self.commentBoard = self.GetChild("CommentBoard") self.scrollbar = ui.ScrollBarNewDesign() self.scrollbar.SetParent(self.GetChild("Comment_GuildPage")) self.scrollbar.SetPosition(342,14) self.scrollbar.SetScrollBarSize(210) self.scrollbar.SetScrollEvent(self.__OnScroll) self.scrollbar.Show() self.commentSlot = ui.SpecialEditLine() self.commentSlot.SetParent(self.GetChild("CommentBoard")) self.commentSlot.SetPosition(220,16) self.commentSlot.SetSize(121,25) self.commentSlot.SetMax(35) self.commentSlot.OnIMEReturn = ui.__mem_func__(self.OnPostComment) self.commentSlot.SetIMEFlag(0) self.commentSlot.SetPlaceHolderText("قم بكتابة الرسالة...") self.commentSlot.SetPackedFontColor(0xffa07970) self.commentSlot.Show() self.objPos = 0 self.scrollbar.SetPos(0) self.LoadScroll() #~~~~~~~ 3 Page def authority_guildPage(self): textsAuthority = {1 : uiScriptLocale.SELECT_NAME,2 : uiScriptLocale.GUILD_RASA,3 : uiScriptLocale.GUILD_MEMBER_LEVEL, 4 : uiScriptLocale.GUILD_MEMBER_SPECIFIC_GRAVITY,5 : uiScriptLocale.GUILD_MEMBER_RANK,} self.players_Authority,u = {}, 0 for i in xrange(5): self.players_Authority[i] = ui.TextLine() self.players_Authority[i].SetParent(self.GetChild("Authority_Info_3")) self.players_Authority[i].SetPosition(60+u,17) self.players_Authority[i].SetText(textsAuthority[i+1]) self.players_Authority[i].SetFontColor(0.902, 0.816, 0.635) self.players_Authority[i].Show() if i == 0: u += 60 elif i == 1 or i == 2: u += 45 else: u+= 60 self.scrollbarAuthority = ui.ScrollBarNewDesign() self.scrollbarAuthority.SetParent(self.GetChild("Authority_Info_2")) self.scrollbarAuthority.SetPosition(344,15) self.scrollbarAuthority.SetScrollBarSize(210) self.scrollbarAuthority.SetScrollEvent(self.__OnScroll2) # self.scrollbar.Show() self.objPos2 = 0 self.scrollbarAuthority.SetPos(0) self.LoadScroll2() pass def LoadScroll2(self): curMemberCount, maxMemberCount = guild.GetGuildMemberCount() pos = self.objPos2 if curMemberCount >= 5: self.obj_count2 = 5 self.scrollbarAuthority.Show() else: self.obj_count2 = curMemberCount self.scrollbarAuthority.Hide() z=0 self.players, u = {}, 0 self.namesAuthority,self.imgs,self.levels,self.inverts,self.pos = {},{},{},{},{} for i in xrange(self.obj_count2): realPos = pos+i pid, name, grade, race, level, offer, general = guild.GetMemberData(realPos) if not name or name == "": break guildExperienceSummary = guild.GetGuildExperienceSummary() offerPercentage = 0 if guildExperienceSummary > 0: offerPercentage = int(float(offer) / float(guildExperienceSummary) * 100.0) self.players[i] = ui.ImageBox() self.players[i].SetParent(self.GetChild("Authority_Info_2")) self.players[i].SetPosition(25,20+u) self.players[i].LoadImage("d:/ymir work/interface/guild/dialog_member_slot.tga") self.players[i].Show() self.pos[i] = ui.NewComboBox() self.pos[i].SetParent(self.players[i]) self.pos[i].SetPosition(218,3) self.pos[i].SetSize(90,23) self.pos[i].SetCurrentItem(guild.GetGradeName(grade)) masterName = guild.GetGuildMasterName() mainCharacterName = player.GetMainCharacterName() if mainCharacterName == masterName: self.pos[i].Enable() self.pos[i].SetEvent(lambda gradeNumber, lineIndex=realPos, argSelf=proxy(self): argSelf.OnChangeMemberGrade(lineIndex, gradeNumber)) self.pos[i].Show() self.pos[i].ClearItem() for e in xrange(14): self.pos[i].InsertItem(e+2, guild.GetGradeName(e+2)) self.pos[i].SetCurrentItem(guild.GetGradeName(grade)) self.namesAuthority[i] = ui.TextLine() self.namesAuthority[i].SetParent(self.players[i]) self.namesAuthority[i].SetPosition(50,7) self.namesAuthority[i].SetText(name) self.namesAuthority[i].SetFontColor(0.902, 0.816, 0.635) self.namesAuthority[i].Show() self.imgs[i] = ui.ImageBox() self.imgs[i].SetParent(self.players[i]) self.imgs[i].SetPosition(93,2) self.imgs[i].LoadImage(FACE_IMAGE_DICT[race]) self.imgs[i].Show() self.levels[i] = ui.TextLine() self.levels[i].SetParent(self.players[i]) self.levels[i].SetPosition(160,7) self.levels[i].SetText(str(level)) self.levels[i].SetFontColor(0.424, 0.337, 0.329) self.levels[i].Show() self.inverts[i] = ui.TextLine() self.inverts[i].SetParent(self.players[i]) self.inverts[i].SetPosition(195,7) self.inverts[i].SetText(str(offerPercentage)+"%") self.inverts[i].SetFontColor(0.424, 0.337, 0.329) self.inverts[i].Show() u+= 30 def __OnScroll2(self): curMemberCount, maxMemberCount = guild.GetGuildMemberCount() self.objPos2 = self.scrollbarAuthority.GetPos() * (curMemberCount-6) self.LoadScroll2() def OnChangeMemberGrade(self, id, gradeNumber): PID = guild.MemberIndexToPID(id) net.SendGuildChangeMemberGradePacket(PID, gradeNumber) self.objPos2 = 0 self.scrollbarAuthority.SetPos(0) self.LoadScroll2() def RefAuthMember(self): curMemberCount, maxMemberCount = guild.GetGuildMemberCount() if curMemberCount >= 5: self.obj_count2 = 5 else: self.obj_count2 = curMemberCount pos = self.objPos2 for i in xrange(self.obj_count2): realPos = pos+i pid, name, grade, race, level, offer, general = guild.GetMemberData(realPos) if not name or name == "": break guildExperienceSummary = guild.GetGuildExperienceSummary() offerPercentage = 0 if guildExperienceSummary > 0: offerPercentage = int(float(offer) / float(guildExperienceSummary) * 100.0) if self.inverts[i] != 0: self.inverts[i].SetText(str(offerPercentage)+"%") self.pos[i].SetCurrentItem(guild.GetGradeName(grade)) if self.pos[int(realPos)].CheckOpen() == 1: self.open = 1 for e in xrange(self.obj_count2): self.pos[e].Hide() self.pos[int(realPos)].Show() def skill_guildPage(self): self.skillPoints = self.GetChild("Skill_Plus_Value") self.energy = self.GetChild("Dragon_God_Power_Value") self.energyBar = self.GetChild("EnergyFull") self.donate_energy = self.GetChild("DonateEnergyButton") self.donate_energy.SetEvent(lambda : self.__OnOpenHealGSPBoard()) self.backSlot = ui.GridSlotWindow() self.backSlot.SetParent(self.GetChild("Skill_Page")) self.backSlot.SetPosition(30-25,80) self.backSlot.ArrangeSlot(210, 6, 1, 40, 40,3,0) self.backSlot.SetSlotBaseImage("d:/ymir work/interface/slot/slot3.tga",1.0,1.0,1.0,1.0) self.backSlot.SetWindowHorizontalAlignCenter() self.backSlot.Show() self.activeSlot = ui.GridSlotWindow() self.activeSlot.SetParent(self.GetChild("Skill_Page")) self.activeSlot.SetPosition(34-25,84) self.activeSlot.ArrangeSlot(210, 6, 1, 40, 40,3,0) self.activeSlot.SetSlotBaseImage("d:/ymir work/ui/slot.tga",1.0,1.0,1.0,1.0) self.activeSlot.SetWindowHorizontalAlignCenter() self.activeSlot.Show() self.activeSlot.SetSlotStyle(wndMgr.SLOT_STYLE_NONE) self.activeSlot.SetOverInItemEvent(lambda slotNumber, type=self.GUILD_SKILL_ACTIVE_SLOT: self.OverInItem(slotNumber, type)) self.activeSlot.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem)) self.activeSlot.SetSelectItemSlotEvent(lambda slotNumber, type=self.GUILD_SKILL_ACTIVE_SLOT: self.OnPickUpGuildSkill(slotNumber, type)) self.activeSlot.SetUnselectItemSlotEvent(lambda slotNumber, type=self.GUILD_SKILL_ACTIVE_SLOT: self.OnUseGuildSkill(slotNumber, type)) self.activeSlot.SetPressedSlotButtonEvent(lambda slotNumber, type=self.GUILD_SKILL_ACTIVE_SLOT: self.OnUpGuildSkill(slotNumber, type)) self.activeSlot.AppendSlotButton("d:/ymir work/interface/button/char_buttons/plus_01_normal.tga",\ "d:/ymir work/interface/button/char_buttons/plus_02_hover.tga",\ "d:/ymir work/interface/button/char_buttons/plus_03_active.tga") ## Active for i in xrange(len(playerSettingModule.ACTIVE_GUILD_SKILL_INDEX_LIST)): slotIndex = self.activeSlot.GetStartIndex()+i skillIndex = playerSettingModule.ACTIVE_GUILD_SKILL_INDEX_LIST[i] self.activeSlot.SetSkillSlot(slotIndex, skillIndex, 0) self.activeSlot.SetCoverButton(slotIndex) self.activeSlot.RefreshSlot() guild.SetSkillIndex(slotIndex, len(playerSettingModule.PASSIVE_GUILD_SKILL_INDEX_LIST)+i) def RefreshGuildSkillPage(self): if 0 != 0: return # page = self.pageDict["MUSIC"] curPoint, maxPoint = guild.GetDragonPowerPoint() maxPoint = max(maxPoint, 1) self.energy.SetText("|cffa08784"+uiScriptLocale.CHARACTER_PSTATUS+ "|cfff8d090 " +str(curPoint) + " / " + str(maxPoint)) percentage = ( (float(curPoint / max(1, float(maxPoint))) * 100)) self.energyBar.SetPercentage(curPoint,maxPoint) skillPoint = guild.GetGuildSkillPoint() self.skillPoints.SetText("|cffa08784"+uiScriptLocale.CHARACTER_PSTATUS + "|cfff8d090 " +str(skillPoint)) # page.passiveSlot.HideAllSlotButton() self.activeSlot.HideAllSlotButton() ## Active for i in xrange(len(playerSettingModule.ACTIVE_GUILD_SKILL_INDEX_LIST)): slotIndex = self.activeSlot.GetStartIndex()+i skillIndex = playerSettingModule.ACTIVE_GUILD_SKILL_INDEX_LIST[i] skillLevel = guild.GetSkillLevel(slotIndex) skillMaxLevel = skill.GetSkillMaxLevel(skillIndex) self.activeSlot.SetSlotCount(slotIndex, skillLevel) if skillLevel <= 0: self.activeSlot.DisableCoverButton(slotIndex) else: self.activeSlot.EnableCoverButton(slotIndex) if skillPoint > 0: if skillLevel < skillMaxLevel: self.activeSlot.ShowSlotButton(slotIndex) def OnPickUpGuildSkill(self, skillSlotIndex, type): mouseController = mouseModule.mouseController if False == mouseController.isAttached(): skillIndex = player.GetSkillIndex(skillSlotIndex) skillLevel = guild.GetSkillLevel(skillSlotIndex) if skill.CanUseSkill(skillIndex) and skillLevel > 0: if app.IsPressed(app.DIK_LCONTROL): player.RequestAddToEmptyLocalQuickSlot(player.SLOT_TYPE_SKILL, skillSlotIndex) return mouseController.AttachObject(self, player.SLOT_TYPE_SKILL, skillSlotIndex, skillIndex) else: mouseController.DeattachObject() def OnUseGuildSkill(self, slotNumber, type): skillIndex = player.GetSkillIndex(slotNumber) skillLevel = guild.GetSkillLevel(slotNumber) if skillLevel <= 0: return player.UseGuildSkill(slotNumber) def OnUpGuildSkill(self, slotNumber, type): skillIndex = player.GetSkillIndex(slotNumber) net.SendChatPacket("/gskillup " + str(skillIndex)) def OnUseSkill(self, slotNumber, coolTime): if 0 != 0: return # self.activeSlot = ui.GridSlotWindow() if self.activeSlot.HasSlot(slotNumber): self.activeSlot.SetSlotCoolTime(slotNumber, coolTime) def OverInItem(self, slotNumber, type): if mouseModule.mouseController.isAttached(): return if None != self.tooltipSkill: skillIndex = player.GetSkillIndex(slotNumber) skillLevel = guild.GetSkillLevel(slotNumber) self.tooltipSkill.SetSkill(skillIndex, skillLevel) def OverOutItem(self): self.tooltipSkill.HideToolTip() self.tooltip_in = 0 def SetSkillToolTip(self, tooltipSkill): self.tooltipSkill = tooltipSkill def __OnOpenHealGSPBoard(self): curPoint, maxPoint = guild.GetDragonPowerPoint() if maxPoint - curPoint <= 0: chat.AppendChat(1,localeInfo.GUILD_CANNOT_HEAL_GSP_ANYMORE) return pickDialog = uiPickMoney_Guild.PickMoneyDialog_Guild() pickDialog.LoadDialog() pickDialog.SetMax(9) pickDialog.SetTitleName(localeInfo.GUILD_HEAL_GSP) pickDialog.SetAcceptEvent(ui.__mem_func__(self.__OnOpenHealGSPQuestionDialog)) pickDialog.Open(maxPoint - curPoint, 1) self.pickDialog = pickDialog def __OnOpenHealGSPQuestionDialog(self, healGSP): money = healGSP * constInfo.GUILD_MONEY_PER_GSP questionDialog = uiCommon.QuestionDialog() questionDialog.SetText(localeInfo.GUILD_DO_YOU_HEAL_GSP % (money, healGSP)) questionDialog.SetAcceptEvent(ui.__mem_func__(self.__OnHealGSP)) questionDialog.SetCancelEvent(ui.__mem_func__(self.__OnCloseQuestionDialog)) questionDialog.SetWidth(400) questionDialog.Open() questionDialog.healGSP = healGSP self.questionDialog = questionDialog def __OnHealGSP(self): net.SendGuildChargeGSPPacket(self.questionDialog.healGSP) self.__OnCloseQuestionDialog() def __OnCloseQuestionDialog(self): if self.questionDialog: self.questionDialog.Close() self.questionDialog = None def grade_guildPage(self): textsGrade = {0 : "رقم.", 1 : uiScriptLocale.SELECT_NAME,2 : uiScriptLocale.GUILD_GRADE_PERMISSION_JOIN,3 : uiScriptLocale.GUILD_GRADE_PERMISSION_DELETE, 4 : uiScriptLocale.GUILD_GRADE_PERMISSION_NOTICE,5 : uiScriptLocale.GUILD_GRADE_PERMISSION_SKILL,} self.players_t,u = {}, 0 for i in xrange(6): self.players_t[i] = ui.TextLine() self.players_t[i].SetParent(self.GetChild("Grade_Page")) self.players_t[i].SetPosition(30+u,17) self.players_t[i].SetText(textsGrade[i]) self.players_t[i].SetFontColor(0.902, 0.816, 0.635) self.players_t[i].Show() if i == 0: u += 45 elif i == 1: u += 65 elif i == 2: u += 40 elif i == 3: u+= 65 else: u+= 45 self.status11 = ui.NewBoard() self.status11.SetParent(self.GetChild("Grade_Page")) self.status11.SetSize(363,265) self.status11.SetPosition(0,33+12) self.status11.Show() self.scrollbarGrade = ui.ScrollBarNewDesign() self.scrollbarGrade.SetParent(self.status11) self.scrollbarGrade.SetPosition(342,15) self.scrollbarGrade.SetScrollBarSize(243) self.scrollbarGrade.SetScrollEvent(self.__OnScroll3) self.scrollbarGrade.Show() self.objPos3 = 0 self.scrollbarGrade.SetPos(0) self.LoadScroll3() def RefGradeGuild(self): if 11 >= 9: self.obj_count3 = 9 else: self.obj_count3 = 13 pos = self.objPos3 for i in xrange(1,self.obj_count3): realPos = pos+i name, authority = guild.GetGradeData(int(realPos)) self.checkbox[i].SetCheck(authority & guild.AUTH_ADD_MEMBER) self.checkbox4[i].SetCheck(authority & guild.AUTH_SKILL) self.checkbox3[i].SetCheck(authority & guild.AUTH_NOTICE) self.checkbox2[i].SetCheck(authority & guild.AUTH_REMOVE_MEMBER) self.namesGrage[i].SetText(name) def LoadScroll3(self): total = 13 pos = self.objPos3 if total >= 9: self.obj_count3 = 9 else: self.obj_count3 = total z=0 self.img_rank, u = {}, 0 self.idx = {} self.checkbox,self.checkbox2,self.checkbox3,self.checkbox4 = {},{},{},{} self.namesGrage = {} for i in xrange(1,self.obj_count3): realPos = pos+i name, authority = guild.GetGradeData(int(realPos)) self.img_rank[i] = ui.ExpandedImageBox() self.img_rank[i].SetParent(self.status11) self.img_rank[i].SetPosition(20,12+u) self.img_rank[i].LoadImage("d:/ymir work/interface/guild/dialog_rank_slot.tga") self.img_rank[i].Show() self.idx[i] = ui.TextLine() self.idx[i].SetParent(self.img_rank[i]) self.idx[i].SetPosition(10,6) self.idx[i].SetText(str(int(realPos))+".") self.idx[i].SetPackedFontColor(0xffcaa76f) self.idx[i].Show() self.namesGrage[i] = ui.EditableTextSlot(self.img_rank[i], 30, 2) self.namesGrage[i].SetEvent(ui.__mem_func__(self.OnOpenChangeGradeName), i) self.namesGrage[i].SetText(name) self.namesGrage[i].Show() event1 = lambda argSelf=proxy(self), argIndex=int(realPos), argAuthority=1<<0: apply(argSelf.OnCheckAuthority, (argIndex,argAuthority)) event2 = lambda argSelf=proxy(self), argIndex=int(realPos), argAuthority=1<<1: apply(argSelf.OnCheckAuthority, (argIndex,argAuthority)) event3 = lambda argSelf=proxy(self), argIndex=int(realPos), argAuthority=1<<2: apply(argSelf.OnCheckAuthority, (argIndex,argAuthority)) event4 = lambda argSelf=proxy(self), argIndex=int(realPos), argAuthority=1<<3: apply(argSelf.OnCheckAuthority, (argIndex,argAuthority)) self.checkbox[i] = ui.CheckBox(self.img_rank[i],122,3,event1) self.checkbox2[i] = ui.CheckBox(self.img_rank[i],173,3,event2) self.checkbox3[i] = ui.CheckBox(self.img_rank[i],225,3,event3) self.checkbox4[i] = ui.CheckBox(self.img_rank[i],275,3,event4) self.checkbox[i].SetCheck(authority & guild.AUTH_ADD_MEMBER) self.checkbox4[i].SetCheck(authority & guild.AUTH_SKILL) self.checkbox3[i].SetCheck(authority & guild.AUTH_NOTICE) self.checkbox2[i].SetCheck(authority & guild.AUTH_REMOVE_MEMBER) u += 30 def __OnScroll3(self): self.objPos3 = self.scrollbarGrade.GetPos() * (14-10) self.LoadScroll3() def OnCheckAuthority(self, argIndex, argAuthority): name, authority = guild.GetGradeData(argIndex) net.SendGuildChangeGradeAuthorityPacket(argIndex, authority ^ argAuthority) def OnChangeGradeName(self, gradeNumber): if len(gradeName) == 0: gradeName = localeInfo.GUILD_DEFAULT_GRADE net.SendGuildChangeGradeNamePacket(gradeNumber, gradeName) return TRUE def OnOpenChangeGradeName(self, arg): self.cambiar = arg self.a = uiCommon.InputDialog() self.a.SetTitle("تغيير الرتبة") self.a.SetAcceptEvent(ui.__mem_func__(self.__OnchangeName)) self.a.SetCancelEvent(ui.__mem_func__(self.__OnCloseQuestionDialog2)) self.a.Open() def __OnchangeName(self): gradeName = self.a.GetText() if len(gradeName) == 0: gradeName = localeInfo.GUILD_DEFAULT_GRADE net.SendGuildChangeGradeNamePacket(self.cambiar, gradeName) self.__OnCloseQuestionDialog2() def __OnCloseQuestionDialog2(self): if self.a: self.a.Close() self.cambiar = None self.a = None def OnUpdate(self): #-1 self.mark.SetIndex(net.GetGuildID()) self.mark.SetScale(3.3) self.guild_level.SetText(str(guild.GetGuildLevel())) self.guild_name.SetText(guild.GetGuildName()) self.guild_leader.SetText(player.GetName()) curExp, lastExp = guild.GetGuildExperience() curExp *= 100 lastExp *= 100 total = curExp + lastExp self.exp_img.SetPercentage(curExp,total) self.curr_exp.SetText("EXP: "+str(curExp)+ " " +uiScriptLocale.CHARACTER_FROM +" "+str(total)) self.level_percent.SetText("%s %.2f%%" % ("", float(curExp) / max(1, float(total)) * 100)) #-1 #-2 curMemberCount, maxMemberCount = guild.GetGuildMemberCount() self.guild_members.SetText(str(curMemberCount)+" / "+str(maxMemberCount)) self.guild_members_level.SetText(str(guild.GetGuildMemberLevelAverage())) #-2 #-4 self.RefAuthMember() #-4 #-5 self.RefreshGuildSkillPage() #-5 #-6 self.RefGradeGuild() pass def Functie_glisare_max(self): latime = self.GetChild("board").GetWidth() latime2 = self.GetChild("TabButtonsBoard").GetWidth() if latime < 467+48+39: latime = latime+2 latime2 = latime2+2 self.SetSize(latime,300) self.GetChild("board").SetSize(latime,340+10) self.GetChild("TabButtonsBoard").SetSize(latime2,300+10) self.GetChild("Authority_TitleBar").SetWidth(latime-15) self.GetChild("Skill_TitleBar").SetWidth(latime-15) self.GetChild("Grade_TitleBar").SetWidth(latime-15) self.GetChild("Comment_TitleBar").SetWidth(latime-15) self.GetChild("Info_TitleBar").SetWidth(latime-15) self.GetChild("Expand").SetPosition(latime-15-70, 10) self.GetChild("Minimize").SetPosition(latime-15-70, 10) self.GetChild("TitleName").SetPosition(0, 12-172) self.glisare = WaitingDialog() self.glisare.Open(0.0) self.glisare.SAFE_SetTimeOverEvent(self.Functie_glisare_max) else: self.TabButton1.SetOverVisual("d:/ymir work/interface/expand_system/chrbutton_big_a.tga") self.TabButton1.SetDownVisual("d:/ymir work/interface/expand_system/chrbutton_big_a.tga") self.TabButton2.SetOverVisual("d:/ymir work/interface/expand_system/chrbutton_big_a.tga") self.TabButton2.SetDownVisual("d:/ymir work/interface/expand_system/chrbutton_big_a.tga") self.TabButton3.SetOverVisual("d:/ymir work/interface/expand_system/chrbutton_big_a.tga") self.TabButton3.SetDownVisual("d:/ymir work/interface/expand_system/chrbutton_big_a.tga") self.TabButton4.SetOverVisual("d:/ymir work/interface/expand_system/chrbutton_big_a.tga") self.TabButton4.SetDownVisual("d:/ymir work/interface/expand_system/chrbutton_big_a.tga") self.TabButton5.SetOverVisual("d:/ymir work/interface/expand_system/chrbutton_big_a.tga") self.TabButton5.SetDownVisual("d:/ymir work/interface/expand_system/chrbutton_big_a.tga") if info_guildPage == 1: self.TabButton1.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_a.tga") else: self.TabButton1.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_n.tga") if comment_guildPage == 1: self.TabButton2.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_a.tga") else: self.TabButton2.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_n.tga") if authority_guildPage == 1: self.TabButton3.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_a.tga") else: self.TabButton3.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_n.tga") if skill_guildPage == 1: self.TabButton4.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_a.tga") else: self.TabButton4.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_n.tga") if grade_guildPage == 1: self.TabButton5.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_a.tga") else: self.TabButton5.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_n.tga") self.Button1Text.Show() self.Button2Text.Show() self.Button3Text.Show() self.Button4Text.Show() self.Button5Text.Show() self.GetChild("Minimize").Show() self.GetChild("Expand").Hide() def Functie_glisare_min(self): latime = self.GetChild("board").GetWidth() latime2 = self.GetChild("TabButtonsBoard").GetWidth() self.TabButton1.SetOverVisual("d:/ymir work/interface/expand_system/chrbutton_small_a.tga") self.TabButton1.SetDownVisual("d:/ymir work/interface/expand_system/chrbutton_small_a.tga") self.TabButton2.SetOverVisual("d:/ymir work/interface/expand_system/chrbutton_small_a.tga") self.TabButton2.SetDownVisual("d:/ymir work/interface/expand_system/chrbutton_small_a.tga") self.TabButton3.SetOverVisual("d:/ymir work/interface/expand_system/chrbutton_small_a.tga") self.TabButton3.SetDownVisual("d:/ymir work/interface/expand_system/chrbutton_small_a.tga") self.TabButton4.SetOverVisual("d:/ymir work/interface/expand_system/chrbutton_small_a.tga") self.TabButton4.SetDownVisual("d:/ymir work/interface/expand_system/chrbutton_small_a.tga") self.TabButton5.SetOverVisual("d:/ymir work/interface/expand_system/chrbutton_small_a.tga") self.TabButton5.SetDownVisual("d:/ymir work/interface/expand_system/chrbutton_small_a.tga") if info_guildPage == 1: self.TabButton1.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_a.tga") else: self.TabButton1.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_n.tga") if comment_guildPage == 1: self.TabButton2.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_a.tga") else: self.TabButton2.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_n.tga") if authority_guildPage == 1: self.TabButton3.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_a.tga") else: self.TabButton3.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_n.tga") if skill_guildPage == 1: self.TabButton4.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_a.tga") else: self.TabButton4.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_n.tga") if grade_guildPage == 1: self.TabButton5.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_a.tga") else: self.TabButton5.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_n.tga") self.Button1Text.Hide() self.Button2Text.Hide() self.Button3Text.Hide() self.Button4Text.Hide() self.Button5Text.Hide() if latime>340+47+39: latime = latime-2 latime2 = latime2-2 self.SetSize(latime,300) self.GetChild("board").SetSize(latime,340+10) self.GetChild("TabButtonsBoard").SetSize(latime2,300+10) self.GetChild("Authority_TitleBar").SetWidth(latime-15) self.GetChild("Skill_TitleBar").SetWidth(latime-15) self.GetChild("Grade_TitleBar").SetWidth(latime-15) self.GetChild("Comment_TitleBar").SetWidth(latime-15) self.GetChild("Info_TitleBar").SetWidth(latime-15) self.GetChild("Expand").SetPosition(latime-15-70, 10) self.GetChild("Minimize").SetPosition(latime-15-70, 10) self.GetChild("TitleName").SetPosition(0, 12-172) self.glisare = WaitingDialog() self.glisare.Open(0.0) self.glisare.SAFE_SetTimeOverEvent(self.Functie_glisare_min) else: self.GetChild("Expand").Show() self.GetChild("Minimize").Hide() def __BindEvent(self): for (tabKey, tabButton) in self.tabButtonDict.items(): tabButton.SetEvent(ui.__mem_func__(self.__OnClickTabButton), tabKey) for titleBarValue in self.titleBarDict.itervalues(): titleBarValue.SetCloseEvent(ui.__mem_func__(self.Hide)) def __LoadWindow(self): if self.isLoaded == 1: return self.isLoaded = 1 try: if localeInfo.IsARABIC() or localeInfo.IsVIETNAM() or localeInfo.IsJAPAN(): self.__LoadScript("uiscript/GuildWindow.py") else: self.__LoadScript("uiscript/GuildWindow.py") self.__BindObject() self.__BindEvent() except: import exception exception.Abort("OptionWindow.__LoadWindow") self.SetState("INFO_GUILD") def Destroy(self): self.ClearDictionary() self.__Initialize() def Close(self): self.Hide() def __OnClickTabButton(self, stateKey): global info_guildPage,comment_guildPage,authority_guildPage,skill_guildPage,grade_guildPage latime = self.GetWidth() if stateKey == "INFO_GUILD": info_guildPage = 1 comment_guildPage = 0 authority_guildPage = 0 skill_guildPage = 0 grade_guildPage = 0 if latime == 468+48+39: self.TabButton1.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_a.tga") self.TabButton2.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_n.tga") self.TabButton3.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_n.tga") self.TabButton4.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_n.tga") self.TabButton5.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_n.tga") self.Button1Text.SetText("|cfff8d090"+uiScriptLocale.GUILD_PAGE_1) self.Button2Text.SetText(uiScriptLocale.GUILD_PAGE_2) self.Button3Text.SetText(uiScriptLocale.GUILD_PAGE_3) self.Button4Text.SetText(uiScriptLocale.GUILD_PAGE_4) self.Button5Text.SetText(uiScriptLocale.GUILD_PAGE_5) else: self.TabButton1.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_a.tga") self.TabButton2.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_n.tga") self.TabButton3.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_n.tga") self.TabButton4.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_n.tga") self.TabButton5.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_n.tga") if stateKey == "COMMENT_PAGE": info_guildPage = 0 comment_guildPage = 1 authority_guildPage = 0 skill_guildPage = 0 grade_guildPage = 0 if latime == 468+48+39: net.SendGuildRefreshCommentsPacket(0) self.TabButton1.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_n.tga") self.TabButton2.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_a.tga") self.TabButton3.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_n.tga") self.TabButton4.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_n.tga") self.TabButton5.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_n.tga") self.Button1Text.SetText(uiScriptLocale.GUILD_PAGE_1) self.Button2Text.SetText("|cfff8d090"+uiScriptLocale.GUILD_PAGE_2) self.Button3Text.SetText(uiScriptLocale.GUILD_PAGE_3) self.Button4Text.SetText(uiScriptLocale.GUILD_PAGE_4) self.Button5Text.SetText(uiScriptLocale.GUILD_PAGE_5) else: self.TabButton1.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_n.tga") self.TabButton2.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_a.tga") self.TabButton3.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_n.tga") self.TabButton4.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_n.tga") self.TabButton5.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_n.tga") if stateKey == "AUTHORITY_PAGE": info_guildPage = 0 comment_guildPage = 0 authority_guildPage = 1 skill_guildPage = 0 grade_guildPage = 0 if latime == 468+48+39: self.TabButton1.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_n.tga") self.TabButton2.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_n.tga") self.TabButton3.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_a.tga") self.TabButton4.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_n.tga") self.TabButton5.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_n.tga") self.Button1Text.SetText(uiScriptLocale.GUILD_PAGE_1) self.Button2Text.SetText(uiScriptLocale.GUILD_PAGE_2) self.Button3Text.SetText("|cfff8d090"+uiScriptLocale.GUILD_PAGE_3) self.Button4Text.SetText(uiScriptLocale.GUILD_PAGE_4) self.Button5Text.SetText(uiScriptLocale.GUILD_PAGE_5) else: self.TabButton1.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_n.tga") self.TabButton2.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_n.tga") self.TabButton3.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_a.tga") self.TabButton4.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_n.tga") self.TabButton5.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_n.tga") if stateKey == "SKILL_PAGE": info_guildPage = 0 comment_guildPage = 0 authority_guildPage = 0 skill_guildPage = 1 grade_guildPage = 0 if latime == 468+48+39: self.TabButton1.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_n.tga") self.TabButton2.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_n.tga") self.TabButton3.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_n.tga") self.TabButton4.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_a.tga") self.TabButton5.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_n.tga") self.Button1Text.SetText(uiScriptLocale.GUILD_PAGE_1) self.Button2Text.SetText(uiScriptLocale.GUILD_PAGE_2) self.Button3Text.SetText(uiScriptLocale.GUILD_PAGE_3) self.Button4Text.SetText("|cfff8d090"+uiScriptLocale.GUILD_PAGE_4) self.Button5Text.SetText(uiScriptLocale.GUILD_PAGE_5) else: self.TabButton1.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_n.tga") self.TabButton2.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_n.tga") self.TabButton3.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_n.tga") self.TabButton4.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_a.tga") self.TabButton5.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_n.tga") if stateKey == "GRADE_PAGE": info_guildPage = 0 comment_guildPage = 0 authority_guildPage = 0 skill_guildPage = 0 grade_guildPage = 1 if latime == 468+48+39: self.TabButton1.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_n.tga") self.TabButton2.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_n.tga") self.TabButton3.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_n.tga") self.TabButton4.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_n.tga") self.TabButton5.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_big_a.tga") self.Button1Text.SetText(uiScriptLocale.GUILD_PAGE_1) self.Button2Text.SetText(uiScriptLocale.GUILD_PAGE_2) self.Button3Text.SetText(uiScriptLocale.GUILD_PAGE_3) self.Button4Text.SetText(uiScriptLocale.GUILD_PAGE_4) self.Button5Text.SetText("|cfff8d090"+uiScriptLocale.GUILD_PAGE_5) else: self.TabButton1.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_n.tga") self.TabButton2.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_n.tga") self.TabButton3.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_n.tga") self.TabButton4.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_n.tga") self.TabButton5.SetUpVisual("d:/ymir work/interface/expand_system/chrbutton_small_a.tga") self.SetState(stateKey) def SetState(self, stateKey): self.state = stateKey if constInfo.ENABLE_FIX_CHARACTER_PAGE: if stateKey == NAME_CLASS_I: self.OnRefreshComments() for (tabKey, tabButton) in self.tabButtonDict.items(): if stateKey!=tabKey: tabButton.SetUp() for pageValue in self.pageDict.itervalues(): pageValue.Hide() for titleBarValue in self.titleBarDict.itervalues(): titleBarValue.Hide() self.titleBarDict[stateKey].Show() self.pageDict[stateKey].Show() def __GetGuildBoardCommentData(self, index): commentID, chrName, comment = guild.GetGuildBoardCommentData(index) if 0==commentID: if ""==chrName: chrName=localeInfo.UI_NONAME if ""==comment: comment=localeInfo.UI_NOCONTENTS return commentID, chrName, comment def OnPostComment(self): text = self.commentSlot.GetText() if not text: return FALSE if not guild.MainPlayerHasAuthority(guild.AUTH_NOTICE): chat.AppendChat(1,localeInfo.GUILD_NO_NOTICE_PERMISSION) return net.SendGuildPostCommentPacket(text[:50]) self.commentSlot.SetText("") self.objPos = 0 self.scrollbar.SetPos(0) self.LoadScroll() return TRUE def OnDeleteComment(self, index): commentID, chrName, comment = self.__GetGuildBoardCommentData(index) net.SendGuildDeleteCommentPacket(commentID) self.LoadScroll() def OnRefreshComments(self): net.SendGuildRefreshCommentsPacket(0) def __OnScroll(self): self.OnRefreshComments() self.objPos = self.scrollbar.GetPos() * (guild.GetGuildBoardCommentCount()-6) self.LoadScroll() def LoadScroll(self): net.SendGuildRefreshCommentsPacket(0) pos = self.objPos if guild.GetGuildBoardCommentCount() >= 6: self.obj_count = 6 self.scrollbar.Show() else: self.obj_count = guild.GetGuildBoardCommentCount() self.scrollbar.Hide() self.delete,self.important, self.spaces,self.namesCommand,self.comments, u = {},{},{},{},{}, 0 for i in xrange(self.obj_count): realPos = pos+i commentID, chrName, comment = self.__GetGuildBoardCommentData(realPos) if chrName == "Noname": break self.spaces[i] = ui.ImageBox() self.spaces[i].SetParent(self.GetChild("Comment_GuildPage")) self.spaces[i].SetPosition(20,20+u) self.spaces[i].LoadImage("d:/ymir work/interface/guild/dialog_message_slot.tga") self.spaces[i].Show() self.namesCommand[i] = ui.TextLine() self.namesCommand[i].SetParent(self.spaces[i]) self.namesCommand[i].SetPosition(50,8) self.namesCommand[i].SetText(chrName) self.namesCommand[i].SetPackedFontColor(0xffcaa76f) self.namesCommand[i].Show() self.important[i] = ui.ImageBox() self.important[i].SetParent(self.spaces[i]) self.important[i].SetPosition(87,8) self.important[i].LoadImage("d:/ymir work/interface/guild/dialog_message_importantmsg.tga") self.comments[i] = ui.TextLine() self.comments[i].SetParent(self.spaces[i]) self.comments[i].SetPosition(310,8) if "!" == comment[0]: self.comments[i].SetText(comment[1:]) self.comments[i].SetPackedFontColor(0xffdb9b93) self.important[i].Show() else: self.comments[i].SetText(comment) self.comments[i].SetPackedFontColor(0xffa08784) self.comments[i].Show() masterName = guild.GetGuildMasterName() mainCharacterName = player.GetMainCharacterName() if mainCharacterName == chrName or (masterName == mainCharacterName): self.delete[i] = ui.Button() self.delete[i].SetParent(self.spaces[i]) self.delete[i].SetPosition(305,7) self.delete[i].SetUpVisual("d:/ymir work/interface/guild/close_mini_01_normal.tga") self.delete[i].SetOverVisual("d:/ymir work/interface/guild/close_mini_02_hover.tga") self.delete[i].SetDownVisual("d:/ymir work/interface/guild/close_mini_03_active.tga") self.delete[i].SetEvent(lambda x = realPos: self.OnDeleteComment(x)) self.delete[i].Show() u += 35 def GetState(self): return self.state def OnPressExitKey(self): self.Close() return TRUE def OnPressEscapeKey(self): self.Close() return TRUE class WaitingDialog(ui.ScriptWindow): def __init__(self): ui.ScriptWindow.__init__(self) self.eventTimeOver = lambda *arg: None self.eventExit = lambda *arg: None def __del__(self): ui.ScriptWindow.__del__(self) def Open(self, waitTime): import time curTime = time.clock() self.endTime = curTime + waitTime self.Show() def Close(self): self.Hide() def Destroy(self): self.Hide() def SAFE_SetTimeOverEvent(self, event): self.eventTimeOver = ui.__mem_func__(event) def SAFE_SetExitEvent(self, event): self.eventExit = ui.__mem_func__(event) def OnUpdate(self): import time lastTime = max(0, self.endTime - time.clock()) if 0 == lastTime: self.Close() self.eventTimeOver() else: return def OnPressEscapeKey(self): self.Close() return TRUE def OnPressExitKey(self): self.Close() return TRUE
  11. Hello Guys,..i'm having a problem in offline shop max yang, when i finished adding max yang in offline shop and go to the client i created a shop successfully but when i try to add another item or to change price of the item the client logout but the server is still connected and i can connect again... i went to the syserr of the client and it was clean and in the syserr for the server i found this Process: FDWATCH: peer null in event: ident 23------------ (means that the core crashed but there was no game core) and when i added the offline_shop_item.sql which belongs to the (offlineshop max yang files) the server has crashed the core and when i made a debug i found this #0 0x08386bb2 in mysql_fetch_row () #1 0x0827fb68 in COfflineShopManager::Refresh (this=0xbfbfaa70, ch=0x5669f000) at offlineshop_manager.cpp:705 #2 0x08160ab4 in CInputMain::OfflineShop (this=0x2a35f49c, ch=0x5669f000, data=0x567df000 "8\tF▒▒▒▒▒▒▒▒", uiBytes=<value optimized out>) at input_main.cpp:1262 #3 0x08166be4 in CInputMain::Analyze (this=0x2a35f49c, d=0x2a35f400, bHeader=<value optimized out>, c_pData=0x567df000 "8\tF▒▒▒▒▒▒▒▒") at input_main.cpp:3345 #4 0x0814dfeb in CInputProcessor::Process (this=0x2a35f49c, lpDesc=0x2a35f400, c_pvOrig=0x567df000, iBytes=3, r_iBytesProceed=@0xbfbfa2f4) at input.cpp:102 #5 0x08116ed3 in DESC::ProcessInput (this=0x2a35f400) at desc.cpp:313 #6 0x08283a84 in io_loop (fdw=0x293f5500) at main.cpp:1035 #7 0x082844b0 in idle () at main.cpp:912 #8 0x08285da4 in main (argc=1, argv=Cannot access memory at address 0x4 ) at main.cpp:562 please can anyone help me at this?
  12. the Error happens because of the function you write read the post again
  13. Hello Guys, i'm facing a problem which is....while compiling but when i remove this function and put the original one which is TPacketGCShopUpdatePrice pack2; the compile works good but i need to put the function which is in the photo because i'm enabling the max gold for offline shop any idea?
  14. Hello everyone can any one please help me to fix this problem the sash cannot be wear and the costume weapon wear in the sash slot :/
  15. Hello everyone can any one please help me to fix this problem the sash cannot be wear and the costume weapon wear in the sash slot :/
×
×
  • 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.