Jump to content
metin2dev

Search the Community

Showing results for tags 'python'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Community
    • Announcements
    • Feedback
  • Metin2
    • General
    • Questions and Answers
    • Guides & HowTo
    • Design
    • Private Servers
    • Services
    • Videos
  • Releases
    • General
    • Tools
    • Programming / Scripts
    • Quests
    • Binaries & Clients/Serverfiles
    • 3D Models
    • 2D Graphics
    • Operating Systems
  • Safe Zone
    • Offtopic
    • Games Talk
    • Music/Videos/Art

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


Website URL


ICQ


Yahoo


Skype


Location

Found 130 results

  1. Hi devs, I'd like to share a script I developed the other night whilst working on a project, this script is meant to improve the quality of life of Metin2 as often players find it hard to accurately tell the cooldown of skills and end up spamming their keyboards like many of us have. Preview: Without any further ado, let's dig right into coding this bad boy. First you will have to unpack your locale and look for taskbar.py in your ui folder and look for the following: "name" : "quick_slot_1", ... "children" : And replace the content of "children" : ( ... ), with this: { "name" : "slot_1", "type" : "image", "x" : 3, "y" : 3, "image" : "d:/ymir work/ui/game/taskbar/1.sub", "children" : ( { "name" : "slot_1_cd", "type" : "text", "x" : 0, "y" : 0, "horizontal_align" : "center", "vertical_align" : "center", "text" : "10", "fontname" : "Tahoma Bold:16", "r" : 1, "g" : 1, "b" : 0, "a" : 0, }, ), }, { "name" : "slot_2", "type" : "image", "x" : 35, "y" : 3, "image" : "d:/ymir work/ui/game/taskbar/2.sub", "children" : ( { "name" : "slot_2_cd", "type" : "text", "x" : 0, "y" : 0, "horizontal_align" : "center", "vertical_align" : "center", "text" : "10", "fontname" : "Tahoma Bold:16", "r" : 1, "g" : 1, "b" : 0, "a" : 0, }, ), }, { "name" : "slot_3", "type" : "image", "x" : 67, "y" : 3, "image" : "d:/ymir work/ui/game/taskbar/3.sub", "children" : ( { "name" : "slot_3_cd", "type" : "text", "x" : 0, "y" : 0, "horizontal_align" : "center", "vertical_align" : "center", "text" : "10", "fontname" : "Tahoma Bold:16", "r" : 1, "g" : 1, "b" : 0, "a" : 0, }, ), },{ "name" : "slot_4", "type" : "image", "x" : 99, "y" : 3, "image" : "d:/ymir work/ui/game/taskbar/4.sub", "children" : ( { "name" : "slot_4_cd", "type" : "text", "x" : 0, "y" : 0, "horizontal_align" : "center", "vertical_align" : "center", "text" : "10", "fontname" : "Tahoma Bold:16", "r" : 1, "g" : 1, "b" : 0, "a" : 0, }, ), }, Then look for: "name" : "quick_slot_1", ... "children" : And replace the content of its "children" : ( ... ), with the following: { "name" : "slot_f1", "type" : "image", "x" : 3, "y" : 3, "image" : "d:/ymir work/ui/game/taskbar/f1.sub", "children" : ( { "name" : "slot_f1_cd", "type" : "text", "x" : 0, "y" : 0, "horizontal_align" : "center", "vertical_align" : "center", "text" : "10", "fontname" : "Tahoma Bold:16", "r" : 1, "g" : 1, "b" : 0, "a" : 0, }, ), }, { "name" : "slot_f2", "type" : "image", "x" : 35, "y" : 3, "image" : "d:/ymir work/ui/game/taskbar/f2.sub", "children" : ( { "name" : "slot_f2_cd", "type" : "text", "x" : 0, "y" : 0, "horizontal_align" : "center", "vertical_align" : "center", "text" : "10", "fontname" : "Tahoma Bold:16", "r" : 1, "g" : 1, "b" : 0, "a" : 0, }, ), }, { "name" : "slot_f3", "type" : "image", "x" : 67, "y" : 3, "image" : "d:/ymir work/ui/game/taskbar/f3.sub", "children" : ( { "name" : "slot_f3_cd", "type" : "text", "x" : 0, "y" : 0, "horizontal_align" : "center", "vertical_align" : "center", "text" : "10", "fontname" : "Tahoma Bold:16", "r" : 1, "g" : 1, "b" : 0, "a" : 0, }, ), },{ "name" : "slot_f4", "type" : "image", "x" : 99, "y" : 3, "image" : "d:/ymir work/ui/game/taskbar/f4.sub", "children" : ( { "name" : "slot_f4_cd", "type" : "text", "x" : 0, "y" : 0, "horizontal_align" : "center", "vertical_align" : "center", "text" : "10", "fontname" : "Tahoma Bold:16", "r" : 1, "g" : 1, "b" : 0, "a" : 0, }, ), }, Now save your work in taskbar.py and pack your files. Next we'll move onto root so I need you to unpack your root files and look for uitaskbar.py Now I need you to look for the following line: self.quickslot = [] as you can see below: self.quickslot = [] self.quickslot.append(self.GetChild("quick_slot_1")) self.quickslot.append(self.GetChild("quick_slot_2")) And then enter the following block of code above it: self.cooldownText = [] self.cooldownText.append(self.GetChild("slot_1_cd")) self.cooldownText.append(self.GetChild("slot_2_cd")) self.cooldownText.append(self.GetChild("slot_3_cd")) self.cooldownText.append(self.GetChild("slot_4_cd")) self.cooldownText.append(self.GetChild("slot_f1_cd")) self.cooldownText.append(self.GetChild("slot_f2_cd")) self.cooldownText.append(self.GetChild("slot_f3_cd")) self.cooldownText.append(self.GetChild("slot_f4_cd")) for i in xrange(8): self.cooldownText[i-1].Hide() Note: Please pay attention to code indentation Afterwards you will need to search for: if player.IsSkillCoolTime(Position): and under it add the following: (coolTime, elapsedTime) = player.GetSkillCoolTime(Position) slot.SetSlotCoolTime(slotNumber, coolTime, elapsedTime) cooldownDelay = 0 cooldown = coolTime-elapsedTime+cooldownDelay self.cooldownText[slotNumber].Show() self.cooldownText[slotNumber].SetText("%d" % cooldown) self.cooldownText[slotNumber].SetOutline() if cooldown < 10: self.cooldownText[slotNumber].SetPosition(7,0) elif cooldown > 9 and cooldown < 100: self.cooldownText[slotNumber].SetPosition(2,0) elif cooldown > 99: self.cooldownText[slotNumber].SetPosition(-1,0) Note: Please pay attention to code indentation Now make a new line under the whole code block of: if player.IsSkillCoolTime(Position): and add the following code: elif not player.IsSkillCoolTime(Position): self.cooldownText[slotNumber].Hide() Awesome! You should be good to go, now pack your root and head in for some testing! If you encounter any bugs or you have suggestions please let me know!
  2. Hello everyone. It's a good day to share an old code with you. First of all you need to know: I don't help to install it. Don't even take the contact with me about it. The whole code is written by me, and reversed from official binaries. At the beginning do a backup for your files(srcs+pys) and READ CAREFULLY the readme. W/o brain.exe please close this tab, or your browser, thank you for your understanding. Preview: Download.exe Enjoy & #h4v3fun, pngr
  3. masodikbela

    [PyLUA++]Tradehouse

    Hi there Devs, I would like to share my "little" system. If you aren't interested in the introduction/preview etc. and you just want to download it and put in to your server, just scroll down until the "[How-To] Set up" subtitle. The story Firstly let me tell this system's story. I've got an idea one year before, that it would be good if the players would be able to put their items into a "global" system where they could see the other player's items, and they could buy it for DC or gold (that time I worked with the latest vanilla core (not with the source)). Then in the following 8 days I made it (it took about 80-90 working hours). Originally the system was created for one of my friend's server. but this server has never started, and nobody used this system. After some mounts I've decided to publish it on the Hungarian forum, because it won't worth to work on it for long hours if nobody uses it and its just collecting dust on my computer. Then I've published it on the 2nd of December, 2014. After some time I've decided to translate it into English and I've got a new idea for a new feature. This feature was: the trade system (I will explain its working later). This idea inspired by one of the players (from a server where this system was able to use). He told me that it would be better if they could set the gold price via an item (what's value is very high). Then with more than 180 working hours (totally) behind my back I'm here. Overview [How-To] Set up Customizing the tradehouse Questions and Answers Notes changelog: 19th of August, 2015: I publicated the tradehouse here. my toDo list: add logging for the system (the released version don't log the actions in the tradehouse) Thanks for reading the topic, if you have any problem/remark feel free to ask it here or write me a PM. Have a good day!
  4. Merhaba! for i in range(o-400000,o+400000): I am using such a loop, but this is causing the frost. I tried to use thread but the room does not work on metin2servers, how can we fix it? thanks for a lot
  5. MrMuniez

    open [Python]Auto Trade

    Hi. I want create simple python script to autotrade withother character. On this moment i finding player with nickname and starting trade. But i cant add all items to trade window. Heres my simple code: import ui,app,chat,chr,net,player,item,skill,time,game,shop,chrmgr,thread,event,exchange SWITCH_RARE_VNUM = 30270 start = 0 end = 2000000 SzamVID = 0 exslot = 0 for vid in range(start, end): if chr.GetInstanceType(vid) != 6: continue if chr.GetNameByVID(vid) == "DajSeNaLuz": SzamVID = vid break net.SendExchangeStartPacket(SzamVID) for i in range(0,90*2): if player.GetItemIndex(i) == SWITCH_RARE_VNUM: chat.AppendChat(chat.CHAT_TYPE_INFO, "Odłamek znaleziony") net.SendExchangeItemAddPacket(i, exslot) exslot += 1 net.SendExchangeAcceptPacket() I think problem is that i dont understant how to use net.SendExchangeItemAddPacket function. Somebody can explain what is wrong here?
  6. Special thanks for design and help: [url=https://metin2dev.org/board/index.php?/profile/12872-legolasofficial/]LegolasOfficial[/url] Download: https://mega.nz/#!pBUj0IoC!tYUbK3liAC5fSxxWQ1sWjUKypNFphPergj4lDZxk6RQ
  7. Fleon

    Multiple login saver

    Almost completed. What do you guys think? This will probably be also relased to the public, i completed the marking system now it is 100% working and it's fully client-launcher made, no server. This is for an old style server so it had to be easy to use and in-line with the current "metin2 official" style. Output from the script (to show the obfuscation, it is done with python27, base64 and struct. It is some decent premade algorithm.): Test2Dev:ztjYyuGW Account1:ztjYyuGW Account2:ztjYyuGW Account3:ztjYyuGW //They do NOT get displayed as x5 since it's a dict and the key "Account4" is taken just once, but still i shouldn't write them, will perform an earlier check. Account4:ztjYyuGW Account4:ztjYyuGW Account4:ztjYyuGW Account4:ztjYyuGW Account4:ztjYyuGW Account5:ztjYyuGW north:4crn3Q== It works with txt to dict conversion and vice versa.
  8. We're looking for a programmer to give us C++ and Python services for a Metin2 project. The service will be payed well. The pace of work will be high, so we need a professional people to work with us. High level of C++ and Python is needed to develop the work correctly. If you're interested on this job, leave a reply on this post or just send us a private message. Thank you! :)
  9. Hello, To extend NPC Shop to 80 Items follow these steps. ServerSide Open "common/length.h" and search: SHOP_HOST_ITEM_MAX_NUM = 40 Replace with: SHOP_HOST_ITEM_MAX_NUM = 80 In the same file search: SHOP_PRICELIST_MAX_NUM = 40 Replace with: SHOP_PRICELIST_MAX_NUM = 80 Now open "game/shop.cpp" and search: m_pGrid = M2_NEW CGrid(5, 9) Replace with: m_pGrid = M2_NEW CGrid(10, 9) Now open "game/shop_manager.cpp" and search: CGrid grid = CGrid(5, 9) Replace with: CGrid grid = CGrid(10, 9) Now compile Db File & Game File and ServerSide's steps complete. ClientSide NOTE: If you want Only NPC Shop's with 80 Items follow this guide, else if you want NPC Shop & Private Shop follow the Update Istruction. Extract "pack/uiscript" from your Client and open "shopdialog.py". Now reaplace all content with: Shopdialog.py ~ 80 Items Now create "shopdialog2.py" and insert this content: ShopDialog2 ~ 80 Items for Shop Ok, at this point you can compress your UiScript with the new file "shopdialog2.py". Extract "pack/root" from your Client and open "interfacemodule.py" Search this: self.dlgShop = uiShop.ShopDialog() self.dlgShop.LoadDialog() self.dlgShop.Hide() After add: self.dlgShop2 = uiShop.ShopDialog2() self.dlgShop2.LoadDialog() self.dlgShop2.Hide() Same file, search this: def OpenShopDialog(self, vid): self.wndInventory.Show() self.wndInventory.SetTop() self.dlgShop.Open(vid) self.dlgShop.SetTop() After add: def OpenShopDialog2(self, vid): self.wndInventory.Show() self.wndInventory.SetTop() self.dlgShop2.Open(vid) self.dlgShop2.SetTop() Now open "game.py" and Search: def StartShop(self, vid): self.interface.OpenShopDialog(vid) Replace with: def StartShop(self, vid): if chr.IsNPC(vid): self.interface.OpenShopDialog(vid) else: self.interface.OpenShopDialog2(vid) Now open "uishop.py" and Search: def Close(self): self.OnCloseQuestionDialog() shop.Close() net.SendShopEndPacket() self.CancelShopping() self.tooltipItem.HideToolTip() self.Hide() Replace with: def Close(self): self.OnCloseQuestionDialog() shop.Close() net.SendShopEndPacket() self.CancelShopping() self.Hide() Same file, search: def OnUpdate(self): USE_SHOP_LIMIT_RANGE = 1000 (x, y, z) = player.GetMainCharacterPosition() if abs(x - self.xShopStart) > USE_SHOP_LIMIT_RANGE or abs(y - self.yShopStart) > USE_SHOP_LIMIT_RANGE: self.Close() After add: UiShop.py ~ ShopDialog2 Now you can compress "root" file. #Update [24-02-15] Fixed Client Bug. Changes in "shop_manager.cpp" added. #Update [26-02-15] Added PrivateShop with 80 Items. NPC & PrivateShop with 80 Items ClientSide: Open "UserInterface/Packet.h" in you Binary Client Source and Search: SHOP_HOST_ITEM_MAX_NUM = 40 Replace with: SHOP_HOST_ITEM_MAX_NUM = 80 Now you can compile your Binary Source. Open your Client File and extract "pack/uiscript". Open "shopdialog.py" and replace all contentwith: Shopdialog.py ~ 80 Items Now open "privateshopbuilder.py" and replace all content with: PrivateShopBuilder ~ 80 Items Now you can compress your UiScript. Screen Private Shop: Et Voilà, we ended. Good work, Bye.
  10. Chyu ^^

    solved Stream module

    Hi devs, I've been looking a long time for a module called stream. In a client we can found it used like: stream.popupWindow.Close(), stream.SetSelectCharacterPhase(), stream.SetConnectInfo() and so much more. Where is a definition of this module? I've been lookin' in a binary sources but with no success, in Root aswell. Thanks.
  11. martysama0134

    [How-To] Metin2 & Cython

    Intro This release will explain how to "convert" your root .py files to .c ones. Actually, Cython only converts those files to pure CPython code. Download NOTE: ALL THE FILES HAVE BEEN MOVED TO HOW-TO-CYTHON-MT2. EDIT: As requested by many people, you can download the compatible and clean official cn root dated 20131228-0034 without further edits: rootCn_20131228-0034_edit.raruiscriptCn_20131228-0034.rarcN-serverinfo-edit.pyIs Cython really worth it?ProsAll the modules are compiled, and they can't be "extracted as .py" anymore.We can always disassemble the launcher with IDA, but the result will be pseudo-c code after waiting 6-8h of analyzing. Since we're not using .pyx files but directly .py ones, there's no "so much optimization".At least, 10% of performance increasing is guaranteed. ConsFor testing purposes, it's heavy to maintain. Everytime you try to re-compile your root files, you should wait 5-10 minutes.You can always use the uncythonized root (.py files) when you perform tests, and compile cython whenever you will make an update in your live server. The launcher's size will increase ~10mb. You can actually pack it to save space.If you directly use a .pyd (still 10mb), the launcher's size won't increase. VideoTutorial Credits Me (lollo_9_1/martysama0134)Night (OST suggestion)Random TestersWhat's New:v2.0The module's name check is now case-insensitive (colorInfo == colorinfo)Added a new function rootlib/uiscriptlib.getList() to retrieve a tuple of all the available cythonized modules.Now you can compile a uiscriptlib library from the uiscript*.py files! (implemented as __USE_EXTRA_CYTHON__)Added a sample ui.py containing the code to run uiscriptlib.
  12. Hello, today I will give you this login interface, which is very similar to WoM2. It's coded by me, good luck Original interface(WoM2): My interface: Photo1: Photo2: Download: https://1drv.ms/u/s!AhOzstvwiFbCbOvOhJG_R8ohLeg Link alternativ: https://www118.zippyshare.com/v/FxNbjoDa/file.html
  13. teschio

    python search dev for system

    search developer for fix system i pay it skype: xxdarkwindxx
  14. teschio

    Search Developer

    Search developer python + lua + C++ contact me here or skype: xxdarkwindxx
  15. Hello, today I will give you this login interface, which is very similar to WoM2. It's coded by me, good luck Original interface(WoM2): My interface: Photo1: Photo2: Download: 1. https://1drv.ms/u/s!AhOzstvwiFbCa_hZFTG57aD_mTU 2. https://www111.zippyshare.com/v/rIWjrge8/file.html btw: configuration in root/intrologin.py: SERVER_IP = "192.168.1.5" CH1_PORT = 21000 CH2_PORT = 22000 CH3_PORT = 23000 CH4_PORT = 24000 PORT_AUTH = 31009 NUME_SERVER = "Andy"
  16. Raylee

    [Looking] C++ & Pyhton Coder

    Lycosa2 - Behind the Worlds is looking for a: "CODER!" profile: Very good knowledge of C ++ / Python If you are interested to work for our project, feel free to contact me with a private message! Best regards Lycosa2-TEAM
  17. Perhaps it will be useful for some people for various systems. Have fun. # onPressKeyDict[app.DIK_F5] = lambda : self.Print() # For test function @root/game.py def Print(self): import app, chat list = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" # Set list maxStr = 10 # Set the maximum number of characters k = "" for v in xrange(maxStr): k = k + list[app.GetRandom(0, len(list) - 1)] chat.AppendChat(chat.CHAT_TYPE_INFO, "Result word: %s" % str(k))
  18. justkapi

    I need a line of code

    Hello! I need a line of code that will make my character go to pre entered coordinates. Edit: No teleportation ;P
  19. Hello devs, I have discovered a thing that is a bit confusing for me. I don't have enough experience in client section, however I would like somebody to explain me how this things works. I'm talking here about connection between files in Root package and client binary. Let's move on to my question. Okay, let's take a function form IntroLogin.py: net.SetPhaseWindow(net.PHASE_WINDOW_LOGIN, self) I though that this function has it's definition in NetworkModule.py: def SetPhaseWindow(self, newPhaseWindow): if self.newPhaseWindow: print "Already changed to a new window, ", newPhaseWindow self.__ChangePhaseWindow() self.newPhaseWindow = newPhaseWindow if self.curPhaseWindow: print "Change when fade out." self.curtain.FadeOut(self.__ChangePhaseWindow) else: print "Current window does not exist." self.__ChangePhaseWindow() But here is a problem with arguments. Function in NetworkModule.py has two parameters, self and newPhaseWindow. So if this definition is from function in IntroLogin.py it would looks like: net.PHASE_WINDOW_LOGIN is a self argument and self (of SetPhaseWindow() function) is newPhaseWindow. I think there is not problem with second argument, but first could not be correct. So I've been looking for definition in client binary... Here we go, PythonNetworkStream.cpp: void CPythonNetworkStream::SetPhaseWindow(UINT ePhaseWnd, PyObject* poPhaseWnd) { if (ePhaseWnd >= PHASE_WINDOW_NUM) { return; } m_apoPhaseWnd[ePhaseWnd] = poPhaseWnd; } Yes, this probably could be that we are searching for, BUT! We have a bit similar function (by name) in PythonNetworkStreamModule.cpp: And we know that our function is called with net module. So could this be a definition? PyObject* netSetPhaseWindow(PyObject* poSelf, PyObject* poArgs) { int ePhaseWnd; if (!PyTuple_GetInteger(poArgs, 0, &ePhaseWnd)) return Py_BuildException(); PyObject* poPhaseWnd; if (!PyTuple_GetObject(poArgs, 1, &poPhaseWnd)) return Py_BuildException(); CPythonNetworkStream& rkNetStream=CPythonNetworkStream::Instance(); rkNetStream.SetPhaseWindow(ePhaseWnd, poPhaseWnd); return Py_BuildNone(); } List of questions: What does net module do? Where can I find it? Can I compile it by myself? What definition is from function in IntroLogin.py? Why there are those two functions in binary? What does each of them do? Thanks for all replies, regards Chyu ^^.
  20. Chyu ^^

    Python and it's struggles

    Hello developers, especially Python ones! Here am I to create a discussion about Python. I would like to hear your thoughts on this programming language. Why do you like it and why don't? Through working with M2 I spent the most time in C++, C# and LUA. Now I decided to do some stuffs in my client but I'm really disgusted with it's syntax. Why did Ymir choose this language? Are there any better scripting language alternatives? Here are a few examples that making me want to drive up a wall: no data types no semicolons import command does not distinguish python includes and my includes (like C do by "" and <>) Correct: if (ASSEMBLY and ARPA): return 1 Incorrect: if (ASSEMBLY && ARPA): return 1 Correct: JesusHere = { "WHY" : Locale.WHY, "SO" : Locale.SO, "SERIOUS" : Locale.SERIOUS, } Incorrect: JesusHere = { "WHY" : Locale.WHY, "SO" : Locale.SO, "SERIOUS" : Locale.SERIOUS, } Correct: def printme(str): "This prints a passed string into this function." print str return Incorrect: def printme(str) { "This prints a passed string into this function." print str return }
  21. Abel(Tiger)

    python [Py] Root 02.02.2018

    I think they forgot to cythonize =)) I don't recommend to use that code, is ugly ... https://mega.nz/#!Ixl0nLZa!61VOx87EA9zBUiNAHD-poUZnaIx3VZr6RVgqUT3LZu4
  22. Hello Dev Community! Today I will share You my litlle project what I made, because i saw many things of this problem - it means bonus page, bonus window or as You call it. This is my first thread on metin2dev forum. I do this 2 years ago nad post on known polish forum - mpcforum.pl. This can be a long topic, sorry in advance but I think it's worth. Original thread on mpcforum: http://www.mpcforum.pl/topic/1038647-okno-bonus-by-sanki/ I will share it there, because I think it's good idea for servers. So let's go! Screen: I know... it is in polish language, but You can translate it very fast and simply... Google translator can help You Notice the tabs, spaces, etc. THIS IS THE FIRST BAD thing what You can do wrong. 1. For first... unpack root and uiscript, go to root folder and open game.py, in imports add this: import uiBonus under: import uiCharacter 2. Next search in this file: onPressKeyDict[app.DIK_Z] and add under(this function is for opening and closing this bonus window): onPressKeyDict[app.DIK_X] = lambda: self.interface.ToggleBonusWindow() in this file it's end. You can close this file. 3. Now go to interfacemodule.py also in root files (in this file will be add very much so You have to be carefoul and check to add all good) and add import like in game.py: import uiBonus 4. Now in this file search: def __init__(self): and under this: self.wndInventory = None add this: self.wndBonus = None 5. Now search this function: def __MakeWindows(self): and under: wndInventory = uiInventory.InventoryWindow() add this: wndBonus = uiBonus.BonusWindow() 6. In this same function but a few lines below after this: self.wndCharacter = wndCharacter add this: self.wndBonus = wndBonus 7. Ok. Good. Now search this function: def Close(self): and after this: if self.wndInventory: self.wndInventory.Destroy() add this: if self.wndBonus: self.wndBonus.Destroy() 7.1 Now again in the same function, a few lines below, we are looking for: del self.wndInventory add this: del self.wndBonus 8. Now search another function: def ShowAllWindows(self): and under this: self.wndInventory.Show() add this: self.wndBonus.Show() 9. Now next function or search this: def HideAllWindows(self): under: if self.wndInventory: self.wndInventory.Hide() add: if self.wndBonus: self.wndBonus.Hide() 10. Uff... not far...but now be carefoul! Search function : def ToggleInventoryWindow(self): and UNDER this function, NOT IN THIS function add new: def ToggleBonusWindow(self): if FALSE == player.IsObserverMode(): if FALSE == self.wndBonus.IsShow(): self.wndBonus.Show() self.wndBonus.SetTop() else: self.wndBonus.Hide() 11. Ok. Next search: def __HideWindows(self): and in this after line: self.wndInventory, add: self.wndBonus, OK. In this way, we end add window to python files. Now only remain for us to add and pack to root files: uibonus.py and add and pack to uiscript files: bonus.py link for this files: http://speedy.sh/Yn8Jb/zakladka-bonus.rar scan: http://img23.imageshack.us/img23/1237/l6n5.png IF AFTER ADD, SOMETHING DON'T WONT WORKING( turn off client etc.) check client SYSERR! PS. If problem is in this window bonus, errors will be in the middle of the polish. A reference to the file where to look. Only one problem for older clients(2010) and oldest, is checking locals "IsARABIC", but the solution is easy... There You must only comment three lines(add # in beginning of the line) 38, 39 and 40 in uiBonus.py file. It must be like this: If I somewhere write something wrong, misspell, translate, spoilers etc or incorrect description(everything write what i learned alone) I ask for precise, explanation, etc. I don't translate this files because I don't have time for it... :< If anybody translate files to english(show text in window ingame and errors) will be that good and send me this files or give link in thread I will add it to topic. PS.2. There is a little small bug( resis sura and ninja are reversed), only numbers in uibonus.py( now it is like this: odpninja... bonusid = 61 ... odpsura... bonusid = 60... ) reverse bonusid and it will be good( odpninja... bonusid = 60 ... odpsura.... bonusid = 61 ... ). I think, everyone know what i mean Prohibition of copying on other forums, etc. For personal use only. Kind Regards, Sanki
  23. ICDev

    System save account

    Extract root and open intrologin.py At the beginning add: import os from _winreg import * Search: self.loginExitButton = GetObject("LoginExitButton") Add: self.saveLoginButton = GetObject("SaveLoginButton") self.loadCredentialButton = GetObject("LoadCredentials") Finally at the end add: def ICDev_ECRYPT(self,data): Data = '' for l in data: Data = Data+str(int(ord(l) + 2) * 2)+' ' return Data def ICDev_DECRYPT(self,data): Data = '' data = data.split() for l in data: Data = Data+chr((int(l) / 2) - 2) return Data def __OnClickSaveLoginButton(self): id = self.idEditLine.GetText() pwd = self.pwdEditLine.GetText() if (len(id) != 0 and len(pwd) != 0): if not os.path.exists("SOFTWARE\ICDev"): key = CreateKey(HKEY_CURRENT_USER,"SOFTWARE\ICDev") SetValueEx(key, "UserID", 0, REG_SZ, self.ICDev_ECRYPT(id)) SetValueEx(key, "Passwd", 0, REG_SZ, self.ICDev_ECRYPT(pwd)) CloseKey(key) self.PopupNotifyMessage("Datele au fost salvate!",self.SetIDEditLineFocus) def __OnClickLoadInfoButton(self): try: key = OpenKey(HKEY_CURRENT_USER, "SOFTWARE\ICDev", 0, KEY_ALL_ACCESS) self.Connect(self.ICDev_DECRYPT(QueryValueEx(key, "UserID")[0]),self.ICDev_DECRYPT(QueryValueEx(key, "Passwd")[0])) except: self.PopupNotifyMessage("Nu exista nici un account salvat!",self.SetIDEditLineFocus) Extract locale_xx and open loginwindow.py Search: "text" : uiScriptLocale.LOGIN_CONNECT, }, ), }, Add: ## userDataBoard { "name" : "UserDataBoard", "type" : "thinboard", "x" : (SCREEN_WIDTH - 208) / 2, "y" : (SCREEN_HEIGHT - 355), "width" : 205, "height" : 55, "children" : ( { "name" : "SaveLoginButton", "type" : "button", "x" : 10, "y" : 0, "vertical_align" : "center", "default_image" : "d:/ymir work/ui/public/large_button_01.sub", "over_image" : "d:/ymir work/ui/public/large_button_02.sub", "down_image" : "d:/ymir work/ui/public/large_button_03.sub", "text" : uiScriptLocale.LOGIN_SAVE_BUTTON, }, { "name" : "LoadCredentials", "type" : "button", "x" : 105, "y" : 0, "vertical_align" : "center", "default_image" : "d:/ymir work/ui/public/large_button_01.sub", "over_image" : "d:/ymir work/ui/public/large_button_02.sub", "down_image" : "d:/ymir work/ui/public/large_button_03.sub", "text" : uiScriptLocale.LOGIN_LOAD_BUTTON, }, ), }, In local_interface.txt (local_xx) add: LOGIN_SAVE_BUTTON Save LOGIN_LOAD_BUTTON Load Now add in YourClient/lib: MEGA
  24. Hi all! I followed the guide at that link about the connection between client and quest: https://metin2dev.org/board/index.php?/topic/1698-howtooldquest-client-communicationfor-any-version/ But when I press the button in game, nothing happens in the quest! If I do it only on a graphical point of view, the button reacts to the click, but it doesn't get the anti exp active. This is my code added for the quest: game.py: def OnClickBlockExp(self): event.QuestButtonClick(int(constInfo.BLOCK_EXP)) ---------------------------------------------------------------------------------------------------------------- def __ServerCommand_Build(self): serverCommandList={ "blocco_exp" : self.blocco_exp, ---------------------------------------------------------------------------------------------------------------- def blocco_exp(self,value): constInfo.BLOCK_EXP = int(value) quest: quest anti_exp begin state start begin when login begin cmdchat("blocco_exp "..q.getcurrentquestindex()) if pc.getqf("blocco_exp") == 1 then pc.setqf("exp_pc",pc.get_exp()) chat("[Blocco Esperienza] - Attivato!") elseif pc.getqf("blocco_exp") == 0 then chat("[Blocco Esperienza] - Disattivato!") end end when button or info begin if pc.getqf("blocco_exp") == 0 then pc.setqf("blocco_exp", 1) pc.setqf("exp_pc",pc.get_exp()) chat("[Blocco Esperienza] - Attivato!") elseif pc.getqf("blocco_exp") == 1 then pc.setqf("blocco_exp", 0) chat("[Blocco Esperienza] - Disattivato!") end end when kill with not npc.is_pc() begin if pc.getqf("blocco_exp") == 1 then pc.give_exp2(pc.getqf("exp_pc")-pc.get_exp()) end end end end Could someone tell me why it doesn't work please?
  25. xDiiZeRx

    Inventar sortieren

    Hello! Anyone can you send me this Sortieren system?
×