Jump to content

Search the Community

Showing results for tags 'metin2'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Community
    • M2Dev
    • Offtopic
    • Games Talk
    • Music / Videos / Art
    • Member Representations
    • Services & Sales
  • Metin2
    • General
    • Questions and Answers
    • Frequently Asked Questions
    • Private Servers
    • Videos
  • Suggest a Tutorial / Release
    • Suggest a Tutorial / Release
    • Temporary forum
  • Releases
    • General
    • Guides & HowTo
    • Tools
    • Programming & Scripts / Systems
    • Maps
    • Quests
    • Binaries & Clients / ServerFiles
    • 3D Models
    • 2D Graphics
    • Operating Systems

Categories

There are no results to display.

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Nationality


Skype


Discord


Website


Steam ID


Mapping


3D


2D


C++


LUA


Python


PHP


SQL


HTML


CSS


JavaScript


Empire

Found 627 results

  1. In this discussion you can find information about my works and direct links to videos about them. For all products there is a warranty for any bugs or problems found. Installations* are always included in the price. *Installation always takes place through the use of automatic programs (very short times). New Status Points System v1.0 New Special ITEM boost-effectv1.0 Info Board System (advanced version)v1.0 Specialty System v1.0 New Ikarus's Offline-Shop v1.0 Those who doesn't known me can take a look to my free release made in this forum to known my knowledge: WEB: http://www.ikarusdeveloper.eu Those who are Martysama customers will receive a 10% discount coupon for my products. To have it you must be registered on the martysama website. Best Regards and we see you soon with new works. Skype: live:ikarus.developer
  2. Hey @all, A view weeks ago I started to create a V2 of my old Wiki Environment. (It is a monthly payed service, hosted on my own servers) Current features (not detailed): Full Monster/Item Data Displaying Multi-Language System Searching for Monsters/Items Writing Guides (with Monster/Item association) Commentary-System like Reddit (every comment can be commented recursivly) API Login via currently visiting M2-Servers login (no extra registration) (Optional) 3D Peview of all Objects (have to be converted from gr2 into any WebGL compatible format) (Admin) Blacklisting Monsters/Items for easy update handling (Admin) Moderation of written guides (Admin) Moderation of written comments Responsive default design (will be customizable in the future like WordPress) Used Files (example for english [en] language): ./item_list.txt ./item_proto.txt ./mob_proto.txt ./en/item_names.txt ./en/itemdesc.txt ./en/mob_names.txt ./en/item_attr.txt (example below) ./en/map_names.txt (example below) ./icons/[all_icons].png ./locale/cube.txt ./locale/common_drop.txt ./locale/fishing.txt ./locale/group.txt ./locale/group_group.txt ./locale/mob_drop_item.txt ./locale/special_item_group.txt ./locale/map/[all_map_folder] ./locale/map/index DM me for more information Kind regards Coniesan aka. luki4fun Images (using demo server files and only a small preview)
  3. Automatic payment and delivery system by: Site: http://mark3dservice.pl/ Skype: marek.mark16
  4. Official Serverstart 20.03.2020 19:00 CET Homepage | Forum | Discord (Die deutsche Vorstellung ist weiter unten) You will find the Presentation in other languages at our official website soon.
  5. Nexus2 Discord Server starts at 20 December 2019 (19:00 WET) Presentation can suffer changes anytime
  6. - EVERY SKIN IS ONLY AESTHETIC -Website: http://edefunpvp.com/ -Regiser: http://www.edefunpvp.com/#registration - Open -Download: http://www.edefunpvp.com/#download - Open -TELEGRAM EDEA: https://t.me/edeafunpvp -DISCORD EDEA: https://discord.gg/q4CytA3 -Here you can find info and talk with other players and staff members. Cheers EDEA STAFF
  7. Server Name: Ancient2 server Scorpio. Open Channels: CH1, CH2. Maximum Level: 99. Status Points: 90. Server Site: https://ancient2.com Server Forum: https://board.ancient2.com Registration: https://ancient2.com/register Client: https://ancient2.com/download Experience Rate: 15%. Yang Rate: 15%. Object Rate: 15%. Blacksmith Rate: Like official server, but increased a little bit. Server details: 22.05: Romanian language available in client side also. 24/05: Portuguese (PT) and Portuguese (BR) language available in client side also. Ancient2 is a pvm hard classic server, very well balanced and very attractive, full English language, the gameplay is just a bit changed compared with 2009 or 2010 gameplay. Advanced Teleporter Extra drop: The server drop is exactly like offcial server, but we have made some changes. Bravery Cape (x20) can be obtained from metin stones. Blessing Chest can be obtained from metin stones, this chest will drop this random items >Enchant Item (x2), Reinforce Item, Blessing Marble, Stone Handbook, Zen Bean (x2), Blessing Scroll. Also level 35+ metin stones will drop (x2) and (x2). Drop metin stone level 40+ The game is still in development and any changes will be announced here (when the topic is updated) or after changes has been made on our Discord server: https://discord.gg/UNWEj54 We have in plan to implement multi language to let any country to play our game in their language. Evolutions: 65 to 90 for weapons. 70 to 90 for armours. Any other evolutions can be for the usual items like official. Bonuses: Can vary, I will update the topic with the values of bonuses asap. Upgrade items: Can be obtained from mobs and the rate is very good, increased at 10% from server. Sistems: Costumes, pets, mount, offline shop, change channel. Any other sistemes will be implemented when necessary, we try to keep our server as classic is possible. Details about events: Ester egg event active, collect 10x Easter egg and it will be automatically changed in Blessing Chest. Blessing Chest drop > Gold Ring can be sold for 10.000 yang at General Store. No other events active at the moment. The game team: [GA]Okami Notes: No more yang in Blessing Chest - been removed!
  8. Hello. well i wanna start my metin2 server and i will buy a kvm vps. so um what os should it have? like ubuntu? or what. thanks to everyone who will answer
  9. ***Change Bonus V0.1 [C++/Python]*** 16/02/2017 ***Search Chest [C++/Python]*** 31/01/2017 ***Search Shop [C++/Python]*** 23/11/2016 ***Shop Decoracion [C++/Python]*** 28/10/2016 PD: * The installation of any system mentioned here is totally free. * Fix any bug or problem that has such a system. It fixes at no cost. * Work is performed on orders either in c ++ / python / moon. Sorry for the English. Send private message for price.
  10. Im searching for someone to help me with the machine and put the server online // I need one metin 2 Developer
  11. Hello, I'm a tester on a metin2 private server and I was wondering if you guys could give me some advice on what to firstly look out for on the server, what are some common bugs i should look out for? Sorry if this isn't in the right topic. Edit: Grammar mistakes. Thanks in advance, Me.
  12. Hey guys! I am a videomaker who worked until now in the italian community of Metin2. Now, I am here to introduce my services to the international community. Website: RayVideos Contacts: RayVideos/Contacts Services more info on my website: RayVideos/Services Trailer Videos Intro Videos Tutorial Videos Banners/Gifs Some of my works (more on my Portfolio)
  13. This Serverfiles have the Lycan Unbugged. Versions Bin: 28249 Game: 43360 Db: 43370 Language: Turkish (TR) Particulars Alchemy Dragon to work without bugs Customs system to work perfectly, updated Belts system running smoothly Functional Nemere tower and stable Skill table updated Proto Table updated Player_Index Locale.lua updated Skill Power updated Locale_string.txt updated New Character Added Lycan Added Lycan against defenses Increased Slots of the NPC's Stores to 80 Mysql eliminated log Guild can be up to 112 characters Group can have up to 14 characters Cover the permanent Bravery Vouchers (50, 100, 500 and 1000 MD's) functional All Lycan Items added Effect of Green and Purple Potion (when used) added 12 slots in trade window to 24 slots And more... Screens Downloads & Infos Game + DB VDI (made by TylerDurden / Passwords and Users inside the rar file) Client Fix for Pack (Put the two files in Pack inside Client) You have to use FreeBSD 9.2+ Sql PW: maxmi33 Acc: teste / sezer123 In the folder Pack you will see two files: Server_Name.cfg > In this file you have to write the name of your server Server_IP.cfg > In this file write the IP Credits Maxmi for made the Serverfiles and the Client Tyler Durden for made the Uploads Me for the translation to English and the reorganization of the Topic and the Links
  14. Hi there, Recently the official server had introduced a new upgrading scroll called rituals stone, it can work only with item with a minimum level of 80, has a better chance of success, and the failed items don't lose a level. So I have created it's c++ part, and I would like to share it with you: https://github.com/AEM5299/MT2_Rituals_Stone you can find the icon and item_desc and so on here: https://mega.nz/#!fVMBkB6A!05DtaW7A32mtVPxWT0rJza5L6yoIvbFNgFIDz01ZA5E https://mega.nz/file/L2hhQLaD#BN1vtpht8HaHxgxCWszTBjYlZAK-vr7viGaX9Z1r1og it's in Arabic, you can translate to your own language If you found any bugs please comment below
  15. Hello, It's been a while since I'm back at metin2 so I thought I should create a service. What can I do: Create system by your request(Don't expect me always to agree to create the system you want) Fixing bugs(Same as above) Code php/python(without gui or maybe if you want a simple gui I can do it) Create quests/lua functions according to your ideas The cost depends on the difficulty. Now, currently the systems I have to sale is only these ones: MultiLanguage system includes(locale_string.txt / mob_proto / item_proto / quest ) translations. Price 25€ Account protection: Each new ip that connects to X account needσ to be verified via website/email otherwise user gets an error. Price 50€ Merge mob_drop_item.txt, common_drop_item.txt, etc_drop_item.txt, special_item_group.txt, drop_item_group.txt to sql tables. Price 30€ Skillbook & Polymorph item names at drop: Price 15€ Payment methods: Only paypal/Western Union. How do we do our deal: Half price first after I do the job I receive the remaining money
  16. I'm getting off the metin scene so I have some stuff from my latest server to sell. I will be updating this thread as I will have some free time. Costume Weapon Stattrack (count kills like in CS:GO) - 10 euro Play specified audio file (.mp3 / .wav) for every player at same map or in same map with radius - 10 euro Block single IP address (ex. 192.168.1.1) or mask (ex. 192.168.*) from logging to game - 20 euro White list IP address logging into player account - 20 euro Logging all success/failure ingame login to accounts with entered (wrong or both) password - 10 euro Automatic notification / event system - 20 euro Visual effects (aura and other shinings) on player (for ex. by wearing item) - 30 euro Synchronised dancing - 10 euro At my server video presentation you can see some systems https://www.youtube.com/watch?v=49WOSAN4TIg You need to work on source to add any stuff. Payment: Skrill / Paypal / PaySafeCard Every system with full support via skype or help on teamviewer if needed. If you need other things, we can also talk about it. SKYPE: bullett.pl I will respond as soon as possible and then you can ask about my systems.
  17. Metin2 Spectre (----) Middle School server 60% PVP & 40% PVM. We opened on April 14 of the recent year 2020. Characteristics: Maximum level 135 (upgradeable). Talismans (Bonuses) + Item Bonuses. Aura system: perfectly functional. Character blocking system. Inventory security system. New guild system. Hide / Show icon in the wardrobe window. Offline Store + Show store all the time. Blink Dynk System. (The client tab blinks when sending a message or MP). Copy & Paste System. (You can copy links or messages with Ctrl C + Ctrl V). New guild war map. Special storage: perfectly functional. (Storage is displayed by mashing the letter "K"). 4 special inventories. Pet system. New weapon effects. Self-doper. Infinite lines - Automatic Elixir. No dungeons, bosses especially have a map, you can find it on the Teleporter. (MAP OF TITANS) Metin2 Specter has its doors open for any Metin2 lover. Hopefully we can live up to your expectations. Discord: https://discord.gg/tZwcnX Website: http://spectre2.site/ Register: http://spectre2.site/users/register Download: http://spectre2.site/download Metin2 Specter awaits you!
  18. Hi M2DEV! Today I want to show you my converter. This allows you to convert *.txt (like item_proto.txt or item_names.txt and etc..) to *.csv and back. To easily open and edit data to Excel. You can easily delete or add columns or simply modify the data. How use? Just drag *.txt or *.csv file to Metin2 Converter by Helia01 (ver. 0.0.1).exe Metin2 Converter by Helia01 (ver. 0.0.1).exe
  19. I think the title should explain all. The system give way to set mob's drops via tables (Database) instead to use mob_drop_item.txt, common_drop_item.txt, drop_item_group.txt which can be buggy (easly, just a wrong space) without trace any error in your game expirience. WARNING : The System doens't disable the txts so you can use the txts and the tables without any problems. I have inserted "/reload d" command to reload the drop tables without restart channels. i will code a small tool in python to convert the txts to tables (i will be added to the repository). The drop chance by default is set to 1/1000 (so in table you should set it to 1000 to give 100% drop chance 'base' , it will change via the ymir's algorithm depend on the levels killer/victim). you can chance this scale to use 100 instead 1000 basically changing in lenght.h the value of DROP_SCALE_TABLE here you can find the repository. MySkype: live:ikarus.developer update: Added a small part to install only if you are using __SEND_TARGET_INFO__ to show the drop in the target board WARNING: i noticed some people think this system is a realtime database reading based system. i want explain it better , to make sure every body know how this system works. This system works using caching, it reading the tables once on boot, then the db core will update all core during core boot using cache. Only if you want to reload (refreshing the cache) the db core will read again the tables and will send to every core the "update".
  20. Hi everyone! I recently saw that some people who create something in 3ds max use very old solutions like bones from 3ds max 7 or 3ds max 7 program. So i give u full UNBUGED bones for 2014 max. (exporter from 2013 version works on 2014 version of max, granny version 2.9.12.0) Bones: https://mega.nz/file/Ffg1hBRS#Q-nx3x04QDxfHQw6eJAH5OlxfCtGeRy-FHCKxTekcfQ pwd: metin2.dev (for rig armors / costumes i prefer modifier SKIN) Have FUN!
  21. Hi there, Found them while surfing the dark and i want to share them with you. They are made by a designer for Ymir long time ago.
  22. 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')
  23. There is a bug about the stealth of the assassin with buffs actived. If the players near the assassin that is using the stealth move the camera zoom , the effects become visible again. here the fix of this problem source : myself Sameone could need to add #include "../UserInterface/Locale_inc.h" at the beginning of the file source/EterBase/StdAfx.h to include the defines in Locale_inc.h
  24. 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
×
×
  • 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.