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 134 results

  1. FreeWar_official

    [PREVIEW] Controller Mode

    Premise:The system in question is integrated into the client through the use of existing libraries! it was enough to enable it through some modifications of the source and to define the various commands, make the installation very simple and intuitive I assure you! What can i do?It is expected that by the end of the realization of this system you can fully use the client "PG, game windows and maybe even chat", at the moment you can use the PG. Have you a release date?At the moment no, the work still requires the care of many details.Have a video about this system?This V 0.1 Alpha "DirectInput" This V 0.2 Alpha "XInput" This V 0.3 Alpha "New Functions" FEATURES: * Migration to XInput and abandonment of DirectInput support * Adding vibration vibration & low life "PS and Xbox Controller" * QuickSlot that can be recalled by pressing the O (PSX) or B (X360) button * Defined DeadZone "Analog" * Added Settings window "Under construction" * Added virtual keyboard to write in chat and more; * Added character selection via controller; * Addition of Auto-Select NPC / MOB / PG and with the pressure of X (PS) A (XBOX) its relative function; * Added quest and selection navigation;
  2. Hi there everyone, I'd like to share a small function which will give you a random name whilst creating a new character. This will only include the function and a list of names, so you will have to set the event on your own. Preview: The function which will most likely be put in introCreate.py import os import app #import the above lines if you don't have them already def __randomizeName(self): dir = os.path.dirname(os.path.abspath("introCreate.py")) list = open("%s\\names.list" % dir, "r").read().split("\n") rng = app.GetRandom(0, len(list)-1) randomName = list[rng] self.heroName.SetText("%s" % randomName) ## change variable 'heroName' with your editline's name Also place the attached file to this thread in the main directory of the client. (i.e: where the launcher is) names.list contains 150 names, if you ever need more names let me know so I can up the number or you can add more yourself, but do note you need to put each name as a new line so you won't mess up the function. That's all for now, hope you all have a great day! Cheers. names.list
  3. Auto refine option when you upgrade the item with SCROLL or on NPC. I did all checks like example : When you have just one scroll in inventory, refine window will be close. When the item is already maximum upgrade. (+8 to +9 just in case will be succes) and more .. Preview: https://gyazo.com/63959d63b9acc7d4337e16de061ea747 Download : https://mega.nz/#!SZpDWBKB!EbBTPAThBjFZBuFCdvttRz5Yia4oYrAj5m4r0pNFe6U
  4. GitHub repository: https://github.com/Vegas007/Metin2-Extended-Modules-For-Script-Window
  5. 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. We start with locale: Now we shall move onto root part: version 1.0 version 2.0 If you encounter any bugs or you have suggestions please let me know! Changes:
  6. 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
  7. 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!
  8. 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
  9. 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?
  10. Special thanks for design and help: [url=https://metin2dev.org/board/index.php?/profile/12872-legolasofficial/]LegolasOfficial[/url] Download: https://mega.nz/#!pBUj0IoC!tYUbK3liAC5fSxxWQ1sWjUKypNFphPergj4lDZxk6RQ
  11. 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.
  12. 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! :)
  13. 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.
  14. 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.
  15. 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.
  16. 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
  17. teschio

    python search dev for system

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

    Search Developer

    Search developer python + lua + C++ contact me here or skype: xxdarkwindxx
  19. 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"
  20. Raylee

    [Looking] C++ & Python 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
  21. 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))
  22. 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
  23. 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 ^^.
  24. 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 }
×