Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/01/20 in all areas

  1. M2 Download Center Download Here ( Internal ) Hello, Working on some new stuff I found out that current implementation of event looks a bit tricky. Due to this fact I basically deciced to re-implement it in C++11 providing up to date tech. Don`t forget to take a look at this topic before you start: [Hidden Content] So lets begin. Add include into the main.cpp: #ifdef __NEW_EVENT_HANDLER__ #include "EventFunctionHandler.h" #endif And add this into main function before: while (idle()); #ifdef __NEW_EVENT_HANDLER__ CEventFunctionHandler EventFunctionHandler; #endif Now add this at the end of idle: #ifdef __NEW_EVENT_HANDLER__ CEventFunctionHandler::instance().Process(); #endif Now search for: sys_log(0, "<shutdown> Destroying CArenaManager..."); And add before: #ifdef __NEW_EVENT_HANDLER__ sys_log(0, "<shutdown> Destroying CEventFunctionHandler..."); CEventFunctionHandler::instance().Destroy(); #endif Now open service.h and add this define: #define __NEW_EVENT_HANDLER__ That`s all. Now just download attachment and add included files to your source.
    2 points
  2. The whole quest is kinda.. ugh... I mean.. Really. I would not recommend using ANY dungeon functions if you are NOT sure that the player actually IS in a dungeon. Could be the culprit since your kill trigger causes the crash and there are many kill triggers that actually check for dungeon flags even before there's a check if the player is in a dungeon. Dunno if the map_index check overwrites that but I wouldn't count on it. Other than that server timers might still trigger even when the dungeon is already solved and destroyed. That might also be an issue, lemme check the quest a bit in detail, I only looked roughly over it. But I'm 99% sure it's the kill trigger that's causing it, at least the gdb clearly shows this and not a server_timer. It's definitely a quest error and you'd actually ask this person since you paid for it. If he's too fine to fix it, he shouldn't have sold it. But what am I talking about? We're here in metin2 where almost anyone can sell any stuff as long as people are willing to pay for it, no matter the quality..
    2 points
  3. M2 Download Center Download Here ( Internal ) Hello togehter, today i want to share a small, but in my opinion, usefull security upgrade for your player password-hashes. The current default hash, which is used by the most of you (some exeptions might be out there) is the MD5 Hash. This hash might be not the best choice for hashing passwords in this modern days. This is why i thought about something to change there. And my solution for this is Argon2. This Method had won the Password Hashing Competition and this is why i had choosen this over bcrypt or scrypt. This tutorial isn't a 100% beginner firendly guide! Just follow my instructions if you got a little bit of c++ knowledge and know how to work with the source! Create the libargon2 Change the hash inner the game-core source (DEFAULT PASSWORD() MYSQL FUNC TUTORIAL) For now you just need to edit the account.account table and set the size for the password to 128 (Why 128? Db.h EArgon2::HASH_LENGTH = 64. 64 * 2 = 128) And you need to replace your hashes with the argon2 once. For this follow the link to the generation: [Hidden Content] Example config for the tutorial setup: Have fun
    2 points
  4. M2 Download Center Download Here ( Internal ) Download Here ( Latest Version ) This WE is a version compiled directly by me which includes infinite fixes and features. It's certain that you won't longer use the worldeditor_en! To make it simple, I wrote all the details about this feature and the common WE inside the relative config file: (called WorldEditorRemix.ini) ; Info: ; -) 100% translated ; -) granny2.11 ; -) F6 as Insert alternative ; -) many default features not present inside the worldeditor_en (probably, that binary was taken out from an SVN long time ago and resource hacked) such as Ins for all regions and skyboxes ; -) WASD UPLEFTDOWNRIGHT to move around (+asynchronous diagonally movements) ; -) UP-LEFT-DOWN-RIGHT to move around*10 (+asynchronous diagonally movements) ; -) config file for few things ; Output options by default ; few others such as default WASD movement ; whether or not Insert should let you go where you were before the press ; no MAI dump when saving atlas ; whether or not DevIL should compress and remove alpha from minimap.dds ; whether or not loading .mdatr building heights ; default textureset when creating maps ; overlapped tabs ; other stuff ; -) several bugfixes ; default title app name ; attempting to write to an empty textureset name when creating new maps ; ViewRadius doubled every load&save ; shadowmap.dds creation ; assert when saving atlas ; crash when adjusting height ; many buffer under/overflows ; *.mdc collision data saving (for game_test) ; not checking output options when loading maps ; water brush waterid bug (the id was increased until 256 each time the function was called; now it's based on the water height just like it should be) ; init texture map reload map crash and last 2px always blank ; square shape even for up/down height brushes ; add textureset texture button (+multiselection) ; remove textureset texture feature (just selecting a texture from the list and pressing DELETE) ; creation of empty textureset with index -1 (changed to 0) ; change baseposition button ; misspelled stuff ; skybox bottom image (nb: you also need a fixed launcher for this) ; removed boring CTRL requirement (to move the camera) when editing daylight/attr ; fixed refresh texture imagebox onKey pressing the down/up keys (like when onClicking them) ; fixed TextureSet file creation if not existing ; fixed new wolfman motion event handling ; fixed crash when editing animation attack bones and 00010.gr2 was missing ; fixed locale/ymir/mob_proto load (it autodetects the most common structures) and <map>/regen.txt load/save ; fixed ./group.txt load ; fixed load/save/edit <map>/regen.txt (very nice for "m" regens, untested for "g") ; load from PACK is available if pack/property is present! Be sure pack/Index exists! ; fixed multi-object selection crash ; fixed crash when previewing a missing texture ; fixed not clearing of old environment (e.g. skybox) when switching maps ; fixed not creating property folders in root tree (object tab) ; fixed object attachment in Model Tab ; fixed newly particles names in Effect Tab ; fixed crash when saving a .mse script with no mesh model ; fixed crash when inserting a lower gradient ; -) created new TextureSet field when creating new maps ; -) created new Change/Delete Texture buttons when double-clicking a texture ; -) created Background Music playback and Shadow Recalculate buttons ; -) created water height "set 0z", "+1z", "-1z" buttons ; -) server_attr generator ; -) every crash will generate a logs/WorldEditorRemix_{target}_{date}.dmp file useful for debugging ; -) implemented a "water path" mapsettings option (the launcher requires additional code) ; -) implemented a "wind strength" msenv option (the launcher requires additional code) ; -) the "encrypt data" feature does nothing (unimplemented) ; Note: ; 0) there are no regressions in this version! a bug here means it'd also be present in older WE versions too! ; 1) the shadow output option is tricky: when UpdateUI is called, shadows are hidden although the check is pressed (i implemented the shadow recalculate function for that) #fixed since v11 ; 2) the bgm player requires /miles and the fadein/out doesn't work until you load the map ; 3) the adjusting height button works only if mdatr height is detected ; 4) the Debug version is laggy when working on maps such as n_flame_dungeon and n_ice_dungeon (by default, because SphereRadius are intensively checked in SphereLib\spherepack.h) ; 5) if you load a map, the script panels (where you load .msa et similia) will have the camera perspective a little fucked up (0z instead of -32767z or 0x 0y -163,94z) ; 6) few tree objects are not movable and/or highlightable after placed on the ground and their selection is invisible (you can still delete 'em) ; trick: draw a square selecting a normal building and 'em, then move the building and you'll see all of 'em will be moved! ; 7) the server_attr generator will clean all the unused flags! attr[idx]&=~0xFFFFFFF8; ; 8) you can read files from pack/Index 'n stuff but be aware that Property will not be considered! #fixed since v15 ; 9) the MonsterAreaInfo features are laggy and buggy as fuck ; 10) even though you can select many textures at once (using ctrl+click on textureset list; for brushing or initializing a base texture), you can't delete more than one at the same time ; 11) the .mdatr height is tricky; if you move a building, the height will not be refreshed until you put a new building or whatever you want to trigger the update event ; 12) by default, the worldeditor tries to render only the first 8 terrain textures of a 32x32px region (nb: a 1x1 map is a 256x256 px region) ; 13) the minimap rendering cannot catch the buildings/trees inside the first 2x2 regions due a ymir cache fault and you need to set the camera to "see" them ; 14) when the textureset, environment, etc load fails, the old filename still remains loaded ; 15) the attr flag "3" (three) has no implementation, so don't use it! ; 16) load from PACK doesn't load texturesets from files for first (if they are already in pack/), and the object placer's object list will remain empty because it takes the list from property/ (and not from pack/property) ; 17) to save the regen.txt you press CTRL+S ; 18) if you enable the wireframe (f4) when on Attr Tab, you see the terrain all white ; 19) the water brush disappears when the camera renders the waterwheel small/big effect ; 20) the monster area info goes under ground if you're outside the relative sectree ; 21) the full skybox may be displayed only after the top picture has been added (if the other textures have already been inserted) ; 22) the slider in the Attr Tab is something like "16 photoshop layers" in which you can split your attrs; not so helpful and quite confusing sometimes ; 23) the fixed model - object attachment attaches static objects (hairs'skeleton will not mirror the playing animation) ; 24) in environment tab, if you insert lower gradients, you may end up with an out of range crash #fixed since v30 ; 25) brushes working out-of-screen/map-range may affect random terrain places ; TODO: ; A) look at more than 8 textures for region -> DONE ; B) create a shortcut to fix the #5 note -> DONE ; C) disable the radius <= GetRadius()+0.0001f check to fix the #4 note -> REJECTED ; the worldeditor_en calls this assert and, if ignored, the lag ceases to exist (this will not occur in source version) ; at least, if the release version is not a problem for you, use that in those few cases when .mse are abused and try to kill the debug one ; D) translation in more languages other than english -> REJECTED ; english should be enough! ; E) alternative path for d: -> REJECTED ; you can mount d as a subpath of c like this: ; subst d: "c:\mt2stuff" ; F) need to fix note #19 #25 -> TODO [shortcuts] ; ### SHORTCUTS ; # ESC(ape) Clean cursor ; # Canc(el|Delete) Delete stuff such as selected buildings ; # Ctrl+S Save map ; # Ins(ert) or F6 Save shadowmap|minimap.dds ; # F3 BoundGrid Show/Hide ; # F4 Render UI Show/Hide ; # F11 WireFrame Show/Hide ; # R Reload Texture ; # Z and X Decrease/Increase Texture Splat by 0.1 ; # CapsLock Show GaussianCubic effect if shadows are displayed ; # L-Shift+1-6 Show TextureCountThreshold flags (&2-7) as colors on the ground ; # L-Shift+8 Set Max Showable texture to 8 (de-fix note 12) ; # L-Shift+0 Set Max Showable texture to 255 (fix note 12) ; # H Refresh MDATR Heights (useful when you move an object) (fix note 11) ; # Y Set Perspective as default (fix note 5) ; # T Set the Camera to catch all the object on the screen (w/a note 13) then you'll be ready to press Insert/F6 ; # DO NOT HAVE AN OBJECT SELECTED WHEN USING THOSE SHORTCUTS (MW1-7) ; # MouseWheel+1 move cursor x rotation ; # MouseWheel+2 move cursor y rotation ; # MouseWheel+3 move cursor z rotation ; # MouseWheel+4 move cursor height base (1x) ; # MouseWheel+5 move cursor height base (0.5x) ; # MouseWheel+6 move cursor height base (0.05x) ; # MouseWheel+7 move cursor ambience scale (1x) ; # MouseWheel+Q move selected object height base (1x) ; # MouseWheel+9 move selected object x position (1x) (+asyncronous) ; # MouseWheel+0 move selected object y position (1x) (+asyncronous) ; # MW+RSHIFT+9|0 as above but *10x (+asyncronous) ; # MW+RCONTROL+9|0 as above but *100x (+asyncronous) ; # MouseLeft Insert Objects ; # MouseRight Move camera (it could require CTRL too) ; # SPACE Start move/selected animation in Object/Effect/Fly CB ; # ESC Stop animation in Effect/Fly CB [config] ; ### CONFIG OPTIONS VIEW_CHAR_OUTPUT_BY_DEFAULT = 1 VIEW_SHADOW_OUTPUT_BY_DEFAULT = 1 VIEW_WATER_OUTPUT_BY_DEFAULT = 1 ; WINDOW_HEIGHT_SIZE = 1080 ; WINDOW_WIDTH_SIZE = 1920 WINDOW_FOV_SIZE = 45 ; #100 = 1px (minimal px movement when pressing WASD) WASD_MINIMAL_MOVE = 100 ; came back from where you were before pressing Insert/F6 NO_GOTO_AFTER_INSERT = 1 ; disable MAI dumps when saving atlas and/or pressing Insert/F6 NOMAI_ATLAS_DUMP = 1 ; disable minimap.dds alpha saving and enable compression NOMINIMAP_RAWALPHA = 1 ; enable .mdatr height collision loading when moving on buildings or adjusting terrain DETECT_MDATR_HEIGHT = 1 ; disable fog when loading maps NOFOG_ONMAPLOAD = 1 ; refresh all checkbox configurations when loading maps 'n stuff REFRESHALL_ONUPDATEUI = 0 ; set a default mapname prefix when creating new maps ("" to disable) NEW_MAP_MAPNAME_PREFIX = "metin2_map_" ; display a default textureset when creating new maps ("" to disable) ; note: it loads the filepath if exists, otherwise it will create an empty textureset file NEWMAP_TEXTURESETLOADPATH = "textureset\metin2_a1.txt" ; create a default textureset as "textureset/{mapname}.txt" ; note: this option is not considered if NEWMAP_TEXTURESETLOADPATH is not empty. [before v24] ; note: this option is not considered if the TextureSet path input is not empty when creating a new map [since v24] NEWMAP_TEXTURESETSAVEASMAPNAME = 1 ; remove the weird attr flags from the generated server_attr SERVERATTR_REMOVE_WEIRD_FLAGS = 1 ; show diffuse lighting to object VIEW_OBJECT_LIGHTING = 1 ; path of mob_proto used for regen MOB_PROTO_PATH = "locale/ymir/mob_proto" ; select monster area info checkbox at startup VIEW_MONSTER_AREA_INFO = 0 ; brush cursor / object selection color RGB float between 0.0 to 1.0 (default: green -> 0 1 0) RENDER_CURSOR_COLOR_R = 0.0 RENDER_CURSOR_COLOR_G = 1.0 RENDER_CURSOR_COLOR_B = 0.0 Download: [Hidden Content] How To Map: This release will not cover this part. Look at CryPrime`s tutorials to understand how to do it. About the ServerAttr Generator: (since v14) This is a beta function but it should work fine. I tested it on gm_guild_build (1x1), metin2_map_a1 (4x5), metin2_map_trent (2x2), metin2_n_snowm_01 (6x6) and the result was the same as the blackyuko map editor. (I use a different lzo version and I clean deprecated and useless flags, so the size is different from this last one but the "final image" will be the same; using game_test to fix his server_attr will let mine and his perfectly equal byte per byte) I also give you the source code of my server_attr generator function. CLICK A server_attr file is based on all the attr.atr files merged into a one raw RGBA image and each one scaled from 256x256 to 512x512. After that, the image will be splitted into sectors of 128x128 px and each one compressed using lzo compression. The server_attr header is composed by the size of the map*4. (e.g. a 4x4 will have a 16x16 size with 256 sectors inside) (gj ymir CLICK) An uncompressed server_attr sector is just like this: CLICK (the sub 4 byte header is the size returned by the LzoCompress which indicates how much the compressed sector data are large) Each attr.atr is just like this: CLICK (the header is composed of 6 byte in total: 3 WORDs respectively for version, width and height; they are always 2634, 1, 1 so don't bother about it) A single attr.atr scaled from 256x256 to 512x512 will be just like this: CLICK You can use the game_test (from source) to perform few tasks like: Create a server_attr from a .mcd file (I won't suggest it) a <collision data filename> <map directory> Regenerate an old server_attr to server_attr.new using the current lzo compression and cleaning useless flag CLICK c <filename> Other stuff such as b to create a character instance or q to quit About the SkyBox Bottom pic fix: (since v21) Both metin2launch.exe and worldeditor.exe should be edited to see the bottom pic of the skybox. Ymir messed up the code wrongly flipping the bottom image. Open ./Srcs/Client/EterLib/SkyBox.cpp and replace: ////// Face 5: BOTTOM v3QuadPoints[0] = D3DXVECTOR3(1.0f, -1.0f, -1.0f); v3QuadPoints[1] = D3DXVECTOR3(1.0f, 1.0f, -1.0f); v3QuadPoints[2] = D3DXVECTOR3(-1.0f, -1.0f, -1.0f); v3QuadPoints[3] = D3DXVECTOR3(-1.0f, 1.0f, -1.0f); with: ////// Face 5: BOTTOM v3QuadPoints[0] = D3DXVECTOR3(1.0f, 1.0f, -1.0f); v3QuadPoints[1] = D3DXVECTOR3(1.0f, -1.0f, -1.0f); v3QuadPoints[2] = D3DXVECTOR3(-1.0f, 1.0f, -1.0f); v3QuadPoints[3] = D3DXVECTOR3(-1.0f, -1.0f, -1.0f); then recompile. Credits:
    1 point
  5. M2 Download Center Download Here ( Internal )
    1 point
  6. M2 Download Center Download Here ( Internal ) So i collected every single GM logo which was used on an official server. I think it's all, if i forgot something please tell Download in tga format + their mse: [Hidden Content]
    1 point
  7. M2 Download Center Download Here ( Internal ) Download Here ( GitHub ) Create app at here:[Hidden Content] Copy CLIENT ID Then change Discord.h/DiscordClientID Add images at here: example my image's name is image1 You can also use smallImageKey and smallImageText
    1 point
  8. M2 Download Center Download Here ( Internal ) Hi, here I publish my edit of the public Render Target System. I hate it, when people earn money with public systems. Preview: [Hidden Content] DL: [Hidden Content] Original Thread [Hidden Content]
    1 point
  9. M2 Download Center Download Here ( Internal ) Hey, I don't want to waste your time, so let's start, it's gonna be short. src\Client EterBase\Timer.cpp | Find function: CTimer::GetElapsedMillisecond() Find this inside the function above: return 16 + (m_index & 1); Make it look like this: return 3 + (m_index & 3); EterBase\Timer.cpp | Find function: CTimer::Advance() Find this inside the function above: m_dwCurrentTime += 16 + (m_index & 1); Make it look like this: m_dwCurrentTime += 3 + (m_index & 3); GameLib\GameType.cpp | Find this (top of the file): extern float g_fGameFPS = 60.0f; Make it look like this: extern float g_fGameFPS = 250.0f; EterPythonLib\PythonWindow.cpp | Find function: CAniImageBox::CAniImageBox(PyObject * ppyObject) Find this inside the function above: m_byDelay(4), Make it look like this: m_byDelay(13), GameLib\MapOutdoorWater.cpp | Find function: CMapOutdoor::RenderWater() Find this inside the function above: STATEMANAGER.SetTexture(0, m_WaterInstances[((ELTimer_GetMSec() / 70) % 30)].GetTexturePointer()->GetD3DTexture()); Make it look like this: STATEMANAGER.SetTexture(0, m_WaterInstances[((ELTimer_GetMSec() / 30) % 30)].GetTexturePointer()->GetD3DTexture()); Since we don't want E/Q/R/F/T/G keys to be messed up, UserInterface\PythonApplication.cpp | Find these variables at the top of the file: float c_fDefaultCameraRotateSpeed = 1.5f; float c_fDefaultCameraPitchSpeed = 1.5f; float c_fDefaultCameraZoomSpeed = 0.05f; Make them look like this (you can tweak them more, these values aren't strict, just seems about right to me): float c_fDefaultCameraRotateSpeed = 0.5f; float c_fDefaultCameraPitchSpeed = 0.2f; float c_fDefaultCameraZoomSpeed = 0.007f; Client\pack\root\uitaskbar.py Find: if.constInfo.IN_GAME_SHOP_ENABLE: After: self.rampageGauge1.OnMouseOverIn = ui.__mem_func__(self.__RampageGauge_OverIn) Add: self.rampageGauge1.SetDelay(13) After: self.rampageGauge2.OnMouseLeftButtonUp = ui.__mem_func__(self.__RampageGauge_Click) Add: self.rampageGauge2.SetDelay(13) Scroll a little bit down, and then.. After: self.hpGauge = self.GetChild("HPGauge") Add: self.hpGauge.SetDelay(13) After: self.mpGauge = self.GetChild("SPGauge") Add: self.mpGauge.SetDelay(13) After: self.stGauge = self.GetChild("STGauge") Add: self.stGauge.SetDelay(13) Fast armor shining fix / UserInterface\PythonApplication.cpp (thanks @Nirray) Search on top of the file: double g_specularSpd=0.007f; Replace it with: double g_specularSpd=0.0017f; Python part simpler version by @VegaS™ That's all, compile your binary, pack your root and you are done. If you have any questions, feel free to ask it, or if you find an error, typo, anything inside this tutorial, don't hesitate to tell me, and I'll fix it ASAP. Credits goes to kespımuro and me for ghetto-fixing the rotation buttons. Cheers, xHeaven
    1 point
  10. Hi there devs, Its been a while since my last release and probably this will not change, but I had this guide in my head for like a year now. In my last ~2 years while I was working in the AE team various devs came and go, and this kind of guideline would have been a huge help and could prevent lots of errors. I have been in the dev scene for more than 10 years now and (as some of you may already noticed) one of my main interest has always been making more and more user friendly and complex UI objects/interfaces and along the road gathered tons of experience. You won't end up with another shiny system that you can use in your server this time by reading this article, but instead maybe I can prevent you from making windows that stays in the memory forever, opens infinite times, prevents other window's destruction, and many more. Who knows, maybe you will leave with some brand new never ever seen tricks that you can use in your future UIs. But first of all lets talk about some good2know stuff. UI layers Layers are root "windows", their purpose to hold all kind of interface windows while managing the z order of the windows (z order = depth level of the windows, which one is "above" the other). By default there are 5 layers (from bottom to top): "GAME": this is only used for the game window (game.py), and when you click on it the game will translate the click position to the map "UI_BOTTOM": this is used for shop titles "UI": this is the default layer, we would like to put most of our windows into this layer, like inventory, character window, messenger, pms, etc, so they can overlap each other "TOP_MOST": every window, that should always be in front of the player, so other windows would not overlap them from the lower layers, so for example the taskbar is placed in this layer "CURTAIN": this is for the curtain window, which is actually a black as a pit window, that is used to smooth the change from different introXX windows (like between login and charselect) This is the outest layer and goes before the other 4. So when the render happens, the 1st layer and its childs will be rendered first, then the 2nd layer, then the 3rd, etc, so by this we will get our comfy usual client layout. In the other hand, when we click, everything goes in reverse order, first the client will try to "pick" from the curtain layer's child windows (also in reverse order), then the top_most layer, etc. Ofc there is no layers beyond the game layer, so usually the "pick" will succeed there, and we will end up clicking on the map. UI windows Now lets talk a little bit about the parts of an UI window. It has a python object part and a c++ object part. When you create a basic Window (from the ui.py) basically 2 things happen: a python Window object is created first, then through the wndMgr.Register call a c++ CWindow object is created. These 2 objects are linked, in python the handle for the CWindow is saved in the self.hWnd variable, while in the CWindow the python object handle would be stored in the m_poHandler. What are these handles for? If you want to call a method on a window from python, you have to specify which window you want to perform that action on. Remember, the python part is just a "frontend" for the UI, the actual magic happens in the cpp part. Without python, its possible to create windows, but without the cpp part there is no windows at all. On the cpp part, we need the python object handle to perform callbacks, like notifying the python class when we press a key, or pressing our left mouse button. By default the newly created window will take a seat in one of the layers (if provided through the register method, otherwise it goes to the UI layer). In a healthy client we only put useful windows directly into a layer. For example you want to put your brand new won exchange window into the UI layer, but you don't want to put all parts of a window into the UI layer (for example putting the base window into the root layer then putting the buttons on it to the root layer too, then somehow using global coordinates to make it work). Instead, you want to "group" your objects, using the SetParent function. You may say that "yeah yeah who doesn't know this?", but do you know what actually happens in the background? The current window will be removed from its current parent's child list (which is almost never null, cus when you create it its in the UI layer, so the parent is the UI layer) and will be put into the end of the new parent window's child list. Why is it important, that it will be put into the end? Because it will determine the Z order of the childs of the window. For example if I create 2 ImageBox with the same size of image on the same position and then I set ImageBox1's parent before ImageBox2's parent, then I will only see ImageBox2, because that will be rendered after ImageBox1, because its position in the childList is lower than ImageBox2's. For normal window elements (like buttons) its very important, because after you set the parent of a window, you can't alter the z order (or rather the position in the childList) unless you use the SetParent again. No, you can't use SetTop, because its only for windows with "float" flags on it, which you only want to use on the base of your window (the root window that you put your stuff on it and use it as parent for most of the time). Window picking "Picking" is performed when we move the cursor. This is an important method, because this will determine the result of various events, for example the OnMouseOverIn, OnMouseOverOut, OnMouseRightButtonDown, etc. To fully understand it, you must keep in mind that every window is a square. Do you have a perfect circle image for a button? No you don't, its a square. Do you have the most abstract future window board design with full star wars going on the background? No, you DON'T. ITS A SQUARE. By default, a window is picked if: the mouse is over the window AND the window is visible (Shown) AND the window doesn't have "not_pick" flag set AND the window is "inside its parent's square" on the current mouse position, which means if the parent's position is 0,0 and it has a size of 10x10 and the window's position is 11, 0, the window is outside of its parent's square. This is really important to understand, lots of UI has fully bugged part because of ignoring this fact. I think every one of you already experienced it on some bad illumina design implementation, when you click on a picture, and your character will start to run around like a madman, because the game says that A-a-aaaaa! There is NO WINDOW ON THAT POSITION It is useful to use the not_pick flag whenever you can, for example on pure design elements, like lines and flowers and ofc the spaceships on the background. Lets say you have a size of 10x10 image that has a tooltip, and you have a window on it that has a size of 5x5. When the mouse is over the image, the tooltip will be shown, but if its over the 5x5 window, the tooltip won't appear, unless you set it to the 5x5 window too. But if you use the not_pick flag on the 5x5 window, the 5x5 window won't be picked and the tooltip would be shown even if the mouse is over the 5x5 window. Window deletion, reference counting, garbage collector, proxying The window deletion procedure starts on the python side, first the destructor of the python object will be called, then it will call the wndMgr.Destroy that deletes the c++ object. By default, we have to store our python object, or this time our python window, to make sour it doesn't vanish. Usually we do this via the interface module, like "self.wndRandomThing = myModule.RandomWindow()". But what is this? What is in the background? Python objects has reference count. Let me present it with the following example: a = ui.Window() # a new python object is created, and its reference count is 1 b = a # no new python object is created, but now b is refering to the same object as 'a', so that object has a refence count of 2 del b # b is no longer exists, so its no longer referencing to the newly created window object, so its reference count will be 1 del a # the newly created window object's reference count now 0, so it will be deleted, calling the __del__ method To be more accurate, del-ing something doesn't mean that it will be deleted immediately. If the reference count hits 0 the garbage collector (btw there is garbage collector in python if you didn't know) will delete it, and that moment the __del__ will be called. It sounds very handy isn't it? Yeeeeah its easyyyy the coder don't have to manage object deletion its sooo simple.... Yeah... But lets do the following: class stuff(object): def __del__(self): print "del" def doStuff(self): self.something = self.__del__ # here we could just simply do self.something = self too, doesnt matter a = stuff() a.doStuff() # and now you just cut your leg del a #you are expecting the "del" print, but that will never happen You may say " ? oh please who tf does something stupid like this? It SO OBVIOUS that its wrong whaaaaaaat????" But in reality, I could count on only one of my hand how many devs don't make this mistake. Even my codes from the past decade are bad according to this aspect, since I only realized this problem about a year ago, when I was working on the AE wiki. Even the yimir codes contain tons of this kind of errors, however there was definitely a smart man, who implemented the __mem_func__. Okay, I see that you still don't understand how is this possible to make this kind of mistake, so let me show you a real example: class myBoard(ui.Board): def __init__(self): super(myBoard, self).__init__() self.makeItRain() def __del__(self): super(myBoard, self).__del__() print "I want to break free. I want to breeaaaaaak freeeeeeeeeeee" def doNothing(self): pass def makeItRain(self): self.btn = ui.Button() self.btn.SetParent(self) self.btn.SetEvent(self.doNothing) #boom a = myBoard() del a # but where is the print? Thats not that obvious now right? What happens here? We create a myBoard object, which in the __init__ calls to the makeItRain func, which stores an ui.Button object, and sets the button to call for the myBoard class's doNothing function with the self object pointer in the OnLeftMouseButtonDown function, which means that the reference count will never be zero, because the btn referenced in the myBoard but myBoard is referenced in the btn but the btn is referenced in the.... so you know, its a spiral of death, that our best friend garbage collector can't resolve. Okay, but how to do it correctly? Lets talk about proxying. In python, proxies are weak references, which means that they don't increase reference count of an object, which is exactly what we need. #let me show this time the console output too class stuff(object): def __del__(self): print "del" >>> from weakref import proxy >>> a = stuff() #newly created object >>> b = proxy(a) #create weak reference to the new object (note that the weak reference object is also an object that stores the weak reference) >>> b #what is b? <weakproxy at 02DB0F60 to stuff at 02DBFB50> # b is a weakproxy object that refers to a which is a "stuff object" >>> del b # what if we delete b? # no "del" message, the stuff object is not deleted, because its reference count is still 1, because its stored in a >>> b = proxy(a) # lets recreate b >>> del a # now we delete the only one reference of the stuff object del # and here we go, we got the del message from __del__ >>> b # okay but whats up with b? <weakproxy at 02DB0F60 to NoneType at 7C2DFB7C> # because b is a weakproxy object, it won't be deleted out of nowhere, but it refers to a NoneType right now, because the stuff object is deleted (also note here that NoneType is also a python object :D) >>> if b: #what if I want to use b? ... print "a" ... Traceback (most recent call last): File "<stdin>", line 1, in <module> ReferenceError: weakly-referenced object no longer exists # in normal cases no need to trycatch this exception, because if we do everything right, we will never run into a deleted weakly-referenced object But how do we proxy something like self.doNothing? Actually, what is self.doNothing? self.doNothing has 3 parts: The first part is not that obvious, it has a base class pointer, which is points to myBoard. It has a class object pointer, that is basically "self". It refers to the current instance of myBoard. It has a function object pointer, called doNothing, which is located inside the myBoard class. And now we can understand ymir's ui.__mem_func__ class, which is exactly meant to be used for proxying class member functions: # allow me to reverse the order of the definitions inside the __mem_func__ so it will be more understandable class __mem_func__: def __init__(self, mfunc): #this happens when we write ui.__mem_func__(self.doSomething) if mfunc.im_func.func_code.co_argcount>1: # if the doSomething takes more than one argument (which is not the case right now, because it only needs the class obj pointer (which is the 'self' in the 'self.doSomething')) self.call=__mem_func__.__arg_call__(mfunc.im_class, mfunc.im_self, mfunc.im_func) #lets unfold the python object to the mentioned 3 parts else: self.call=__mem_func__.__noarg_call__(mfunc.im_class, mfunc.im_self, mfunc.im_func) #this will be called for the 'self.doSomething' def __call__(self, *arg): # this line runs whenever we call apply(storedfunc, args) or storedfunc() return self.call(*arg) class __noarg_call__: # this class is used whever the python object we want to proxy only takes one argument def __init__(self, cls, obj, func): self.cls=cls # this one I don't really get, we won't need the class object later also its not proxied, so its probably here to prevent delete the base class in rare cases self.obj=proxy(obj) # here we proxy the object pointer which is what really matters self.func=proxy(func) # and then we proxy the class func pointer def __call__(self, *arg): return self.func(self.obj) # here we just simply call the class function with the object pointer class __arg_call__: def __init__(self, cls, obj, func): self.cls=cls self.obj=proxy(obj) self.func=proxy(func) def __call__(self, *arg): return self.func(self.obj, *arg) # here we just simply call the class function with the object pointer and additional arguments Pros, cons, when to, when not to, why? Now you may ask that "Okay okay that sounds good, but why? What can this cause, how big the impact could be, is it worth to even bother with it?" First of all, you must understand that this is kinda equal to a memory leak. I would actually call these non-deleted windows as "leaking windows". Every time you warp, new and new instances will be generated from those objects, and ofc, one instance of a window means like about +50/100 instances, depending on the window complexity, how much childs it has. Usually these windows are at least remain in a Hide state, and hidden windows don't affect update and render time, but they will remain in the root layer, and may stack up depending on how much time the player warp. Still, the number of leaking root windows / warp is around 50-100, which is really not much for a linked list (the type of the childList). However, the memory consumption is much greater. One year ago AE had 10k leaking windows growth / warp. One base class (CWindow)'s size is 140 bytes, which means the memory growth is at least 1,3MB/warp and it does not contain the size of the python objects size for those windows, the linked_list headers and other necessary stuffs. After some hour of playing this can easily reach 100+MB of leaking memory. On worse cases the old windows are not even hidden, and on rewarp players may see multiple instances of the mentioned windows, like double inventory, double messenger window, etc. In this cases those windows can affect the render and update times too. Pros: your code will now work correctly regarding to this topic you may gain some performance boost you may find stuff in your client that even you don't know about you may find enough kebab for a whole week you can save kittens by removing leaking windows and proxying objects you can build my respect towards you and your code and you can even calculate the actual number using the following formula: totalRespect = proxysUsed * 2 + ui.__mem_func__sUsed - proxysMisused * 3.511769 - ui.__mem_func__sMisused * pi - 666 * ui.__mem_func__sNotUsed Cons: depending on how bad the situation is and how skilled you are, the time needed to find and fix everything could be vary, from few hours to several days if you are satisfied with your client as it is right now there is not that huge benefit regarding how much time it could take to fix all the windows Detecting leaking windows DON'T BLOCK THE BACKEND!! At first glance python code looks like you are invincible, you can do whatever you want, you are not responsible for the performance because python has a bottomless bucket full of update/render time and if the game freeze sometimes its definitely not your fault, the game is just BAD. Lets talk about OnUpdate and OnRender, whats the difference, when they are called, what to and what not to put in there. So as their name implies, they are called from the binary every time it performs an Update or Render action. In Update, the binary performs non-rendering actions, like updating the positions of walking characters, updating window positions, and every kind of calculation that is necessary for a render action, to make every kind of data up to date, reducing the cpu operations required for render as much as possible while keeping track of the time. In Render, the binary performs non-updating actions, calling only directx device rendering methods that builds up a picture of the current world, including the UI, using the current, up to date positions. If you try to count the number of stars in our galaxy to accurately simulate your star wars going on in the background of your inventory window, no matter where you do it, (render or update) you will start hurting the game. For example if you have an ui with tons of elements, generating all the elements under one tick can cause HUGE client lag. In my AE wiki, I only load one or two entity for the current page under an update tick, so it will still load quickly, but won't block the game. Notice that doing something like this is an UPDATE operation. Lets be nice and don't interrupt our rendering whit this kind of stuff. You should only use calls to render functions inside the OnRender, for example like in the ui.ListBox class, where we actually ask the binary to render a bar into our screen. Around 20% of time spent in an Update tick was consumed by the UI update (calling to a python object through the api is kinda slow by default) in the AE client one year ago. Removing the rendering and updating of the gui for testing purposes actually gave a huge boost to the client, so who knows, maybe one day someone will make a great client that runs smooth on low end pcs too. Answer the api calls if expected! Some calls from the binary like OnPressEscapeKey expects a return value. Of course if no return value is provided the binary won't crash, but can lead to weird problems and malfunctions. For example, the OnPressEscapeKey expects non-false (non-null) if the call was successful on the window, so it will stop the iteration from calling to lower level windows. So if you expect from the game to close only one window per esc push, you have to return True (or at least not False or nothing). There was a crash problem related to this in one of my friend's client recently. In his ui.EditLine class the OnPressEscapeKey looked something like this: def OnPressEscapeKey(self): if self.eventEscape(): return True return False In the original version it just return True unrelated to the eventEscape's return value. This looks fine at first glance, but if for some reason the self.eventEscape doesn't return anything and if (like the garbage collector decides to run or its disabled) the layer's or the parent's child lists changes in the binary because one or more windows are destroyed under the OnPressEscapeKey procedure and the iteration trough the child list is not interrupted, the binary will start to call invalid addresses thinking that they are existing windows, calling OnPressEscapeKey on them, resulting hardly backtraceable crashes. Closing words I can't highlight out enough times how much I like and enjoy creating new kind of UI stuff, (like animating windows that you may saw on my profile recently (click for the gif)) and because of this if you want to discuss a theory about new UI stuffs or mechanics of already existing UI stuffs feel free to do it in the comment section instead of writing me a pm to help others. Also this time (unlike for my other topics) I would like to keep this guideline up to date and maybe adding new paragraphs if I find out another common mistake/misunderstanding. DEATH TO ALL LEAKING WINDOW!!!!!4444four
    1 point
  11. M2 Download Center Download Here ( Internal ) Story: This map was used in the first ever Metin2 Closed Beta Test (Korea) in 2004. They probably didn't have the kingdoms created yet at the time, every player was in this map. Luckily they kept this map in the released client in Outdoor.eix-epk named as "metin2_map". Work done: -Misplaced objects corrected (especially a lot of fences) -Trees placed (All the trees were missing for some reason) -Some object placed where i felt empty -Made serverside with npcs and regens like map1 Installation: Video: Download1: [Hidden Content] Download2: [Hidden Content] Download3: [Hidden Content] Download4: [Hidden Content]
    1 point
  12. M2 Download Center Download Here ( Internal ) Hello, I know this files were released and released a lot of times, but I've decided to slim them for new comers or people who are interested in looking at them. It's basically, the 2014 krazy sources with every binary/compiled object cleaned up. Tools+Client+Server of mainline, mainline_cythonized, dev, dev_wolf_branch, mainline_w20, mainline_w21, mainline_released included. The archive size is 32MB Link: Here Password: ke5389JIEGH@r Good luck.
    1 point
  13. M2 Download Center Download Here ( Internal ) Download Here ( GitHub ) ---------------------------------
    1 point
  14. M2 Download Center Download Here ( Internal ) Description: When you craft a item the bonuses from the old item will be transferred(saved). ### Cube.cpp //Search : this->gold = 0; //Add after : #ifdef ENABLE_CUBE_RENEWAL this->allowCopyAttr = false; #endif //Search: else TOKEN("gold") { cube_data->gold = value1; } //Add after : #ifdef ENABLE_CUBE_RENEWAL else TOKEN("allow_copy") { cube_data->allowCopyAttr = (value1 == 1 ? true : false); } #endif //Search in : bool Cube_make (LPCHARACTER ch) LPITEM new_item; Add after : #ifdef ENABLE_CUBE_RENEWAL DWORD copyAttr[ITEM_ATTRIBUTE_MAX_NUM][2]; #endif //Search : CUBE_VALUE *reward_value = cube_proto->reward_value(); //Add after: #ifdef ENABLE_CUBE_RENEWAL for (int i=0; i<CUBE_MAX_NUM; ++i) { if (NULL==items[i]) continue; if (items[i]->GetType() == ITEM_WEAPON || items[i]->GetType() == ITEM_ARMOR) { bool hasElement = false; for (int j = 0; j < cube_proto->item.size(); ++j) { if(cube_proto->item[j].vnum == items[i]->GetVnum()) { hasElement = true; break; } } if(hasElement == false) continue; for (int a = 0; a < ITEM_ATTRIBUTE_MAX_NUM; a++) { copyAttr[a][0] = items[i]->GetAttributeType(a); copyAttr[a][1] = items[i]->GetAttributeValue(a); } break; } continue; } #endif //Search: new_item = ch->AutoGiveItem(reward_value->vnum, reward_value->count); //Add after: #ifdef ENABLE_CUBE_RENEWAL if (cube_proto->allowCopyAttr == true && copyAttr != NULL) { new_item->ClearAttribute(); for (int a = 0; a < ITEM_ATTRIBUTE_MAX_NUM; a++) { new_item->SetForceAttribute(a, copyAttr[a][0], copyAttr[a][1]); } } #endif ###cube.h //Search in : struct CUBE_DATA int percent; unsigned int gold; //Add after : #ifdef ENABLE_CUBE_RENEWAL bool allowCopyAttr; #endif ###service.h /Add: #define ENABLE_CUBE_RENEWAL Example in cube.txt section npc 20378 item 11299 1 item 30509 10 item 30516 10 item 30514 10 allow_copy 1 reward 20000 1 gold 100000 percent 60 end
    1 point
  15. I've tried various ways to keep the lambdas somehow, but always ended up having extra references to self because of it. Never really liked lambdas in python anyway so I gave up on making them work easily so didn't dig much deeper than that. But of course this doesn't mean that its not possible to keep them so the best way to do some tests, try out some ideas and come to a conclusion.
    1 point
  16. If you change yang limit to long long you will have this problem when u try to read a book [Hidden Content] char_skill.cpp search: PointChange(POINT_EXP, -need_exp); replace: PointChange(POINT_EXP, -static_cast<long long>(need_exp));
    1 point
  17. local _, player_search_check = mysql.direct_query(string.format("SELECT name FROM player.player WHERE name = '%s';", player_search)); if (player_search_check[1] ~= nil) then -- Player exists in the database. else -- Player doesn't exist in the database. end -- if/else
    1 point
  18. GF v20.3.3 patch (Metin2 Download) Contents: Some re-exported, new mob models. Simple GUI for WorldBoss event, Flower event. Removed FindM event perhaps by mistake. New skill icon for wolfman(?) Probably soon the new skills are coming too. root+dump, locales+protos
    1 point
  19. M2 Download Center Download Here ( Internal ) Hello, This time i grab an old stuff again and bring back to life: Bangsan & Imji Valley. (Jinno's and Chunjo's orc maps) Originally every empire would have had their own orc map, but Bangsan (Jinno) and Imji (Chunjo) never finished nor used. Video: -Demon Tower (Hwang Temple) placed -Heaven Cave's entrance placed -Attrs and textures corrected -Added trees, rocks where it felt too empty -Atlas dumped -Full serveride made with complete regens -Etc Everything included, even quests with the new coordinates. You don't have to make anything Download1: [Hidden Content] Download2: [Hidden Content] Download3: [Hidden Content]
    1 point
  20. M2 Download Center Download Here ( Internal ) Hi, It shows in the description of your item that it's possible to add a bonus to it. It works up to 7 bonuses. Tutorial Sincerly, ASIKOO
    1 point
  21. u can restrict GM without a sql query.....? e.g 1 of them.. bool CHARACTER::ExchangeStart(LPCHARACTER victim) { ... if (!IsLowGM() && victim->IsLowGM()) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You cannot trade items with a Game Master.")); return false; } if (IsLowGM() && !victim->IsLowGM()) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Game Masters cannot trade items with players.")); return false; } ... } u dont need to restrict all GM grade , but if u want.. just change IsLowGM >> IsGM
    1 point
  22. M2 Download Center Download Here ( Internal ) Hello, I made this map years ago but was never used. Download: [Hidden Content] The models (houses and rocks) weren't made by me. The credits for them go to Metin2Master. Rest of the map was made by me. Sorry for the video quality, my computer was sh*t back then.
    1 point
  23. Dungeon.cpp: We are looking for : deadEvent = event_create (dungeon_dead_event, info, PASSES_PER_SEC (10)); PASSES_PER_SEC (10)); // 10 seconds PASSES_PER_SEC (300)); // 5 minutes Will be like: deadEvent = event_create (dungeon_dead_event, info, PASSES_PER_SEC (300)); The session will be destroyed in 5 minutes. Into quest from the respective dungeon you have to save logout and login, you can use questFlag.
    1 point
  24. wtf enjoy with bugs guys!
    1 point
  25. M2 Download Center Download Here ( Internal ) Hi ! Today ThunderCore Society will offer you a special tool for 3d MAX Software. Note: That tool isn't for begginers and we don't offer suport for that. We hereby inform you that we take the copyrights file and his contents because ThunderCore Society has paid to perform this work. There exists an "readme" file that contains some informations about how to install the script. Attention: These files are under copyright and licensed by ThunderCore Society. Any violation of the license may result in suing. Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. NonCommercial — You may not use the material for commercial purposes. NoDerivatives — If you transform, or build upon the material, you may not distribute the modified material. No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
    1 point
  26. M2 Download Center Download Here ( Internal ) Hi everyone, In this thread I will show you how to change the color of the chat messages without any client modification. I will use the 2 new ring slots in this example. First of all, the color codes: RED: |cFFFF0000|H|h GREEN: |cFF00FF00|H|h BLUE: |cFF0080FF|H|h YELLOW: |cFFFFFF00|H|h Open game/unique_item.h and add these: TEXT_COLOR_RED = ID_OF_THE_ITEM, TEXT_COLOR_GREEN = ID_OF_THE_ITEM, TEXT_COLOR_BLUE = ID_OF_THE_ITEM, TEXT_COLOR_YELLOW = ID_OF_THE_ITEM, Open game/input_main.cpp and search for this: const TPacketCGChat* pinfo = reinterpret_cast<const TPacketCGChat*>(data); Replace with this: int len; const TPacketCGChat* pinfo = reinterpret_cast<const TPacketCGChat*>(data); Remove this: int len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s", ch->GetName(), buf); Search for this: if (CHAT_TYPE_SHOUT == pinfo->type) Add this over that: if (ch->IsEquipNewRingItem(TEXT_COLOR_RED)) { // RED len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s %s", ch->GetName(), "|cFFFF0000|H|h", buf); } else if (ch->IsEquipNewRingItem(TEXT_COLOR_GREEN)) { // GREEN len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s %s", ch->GetName(), "|cFF00FF00|H|h", buf); } else if (ch->IsEquipNewRingItem(TEXT_COLOR_BLUE)) { // BLUE len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s %s", ch->GetName(), "|cFF0080FF|H|h", buf); } else if (ch->IsEquipNewRingItem(TEXT_COLOR_YELLOW)) { // YELLOW len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s %s", ch->GetName(), "|cFFFFFF00|H|h", buf); } else { // DEFAULT COLOR len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s", ch->GetName(), buf); } Open game/char.cpp and add this event: bool CHARACTER::IsEquipNewRingItem(DWORD dwItemVnum) const { { LPITEM u = GetWear(WEAR_RING1); if (u && u->GetVnum() == dwItemVnum) { return true; } } { LPITEM u = GetWear(WEAR_RING2); if (u && u->GetVnum() == dwItemVnum) { return true; } } return false; } Open game/char.h and search for this: bool IsEquipUniqueGroup(DWORD dwGroupVnum) const; Add this under that: bool IsEquipNewRingItem(DWORD dwItemVnum) const; And now how it looks in the game: If you have any question or suggestion, please just reply to this topic. Kind Regards, Sanchez
    1 point
  27. @Rakancito Maybe i'm wrong, but this version of the 17.5 archer skill is fixed to the character. On the offical server the "bomb" get's dropped on a localtion and isn't directly bound on the character himself. So my question is, is the GIF just an older development state or is it up2date? Here is a video (don't mind what the videocreator is talking ) what i'm talking about:
    1 point
  28. M2 Download Center Download Here ( Internal ) A small detail, but how nice to look at I prepared the effect in two versions, with dark smoke and white smoke. DOWNLOAD: [Hidden Content]
    1 point
  29. Your tutorial is incompleted. (char_item part for RemoveSpecifyItem) // char_item.cpp // Search: int CHARACTER::CountSpecifyItem(DWORD vnum) const { int count = 0; LPITEM item; for (int i = 0; i < INVENTORY_MAX_NUM; ++i) { // Replace with: int CHARACTER::CountSpecifyItem(DWORD vnum, int iExceptionCell) const { int count = 0; LPITEM item; for (int i = 0; i < INVENTORY_MAX_NUM; ++i) { if(i == iExceptionCell) continue; // char_item.cpp // Search: void CHARACTER::RemoveSpecifyItem(DWORD vnum, DWORD count) { if (0 == count) return; for (UINT i = 0; i < INVENTORY_MAX_NUM; ++i) { // Replace with: void CHARACTER::RemoveSpecifyItem(DWORD vnum, DWORD count, int iExceptionCell) { if (0 == count) return; for (UINT i = 0; i < INVENTORY_MAX_NUM; ++i) { if(i == iExceptionCell) continue; // char_item.cpp // Search: 2x if (CountSpecifyItem(prt->materials[i].vnum) < prt->materials[i].count) // Replace with: if (CountSpecifyItem(prt->materials[i].vnum, item->GetCell()) < prt->materials[i].count) // char_item.cpp // Search: 2x RemoveSpecifyItem(prt->materials[i].vnum, prt->materials[i].count); // Replace with: RemoveSpecifyItem(prt->materials[i].vnum, prt->materials[i].count, item->GetCell()); // char.h // Search: int CountSpecifyItem(DWORD vnum) const; void RemoveSpecifyItem(DWORD vnum, DWORD count = 1); // Replace with: int CountSpecifyItem(DWORD vnum, int iExceptionCell = -1) const; void RemoveSpecifyItem(DWORD vnum, DWORD count = 1, int iExceptionCell = -1);
    1 point
  30. M2 Download Center Download Here ( Internal ) This is a revised version of an old thread. Following this How-To, you will have a better customizable solution for the aspect of your quests. You will be able to choice amongst: quest icon, text color, blink effect (like whisper buttons) How To You just need to replace 2 little things: I) In interfaceModule.py, replace BINARY_RecvQuest with: [Hidden Content] II) In questlib.lua, replace send_letter_ex with: [Hidden Content] Explanation: -the 2° argument of send_letter_ex will support multiple parameters: -green|blue|purple|golden|fucsia|aqua and so on (you can add them in BINARY_RecvQuest by adding new colors 0xFF+#HEX; Color Picker Online) -blink (the quest will flash like the whisper messages) -ex (a dummy tag to separate it from "info" and "item") -the 3° argument is the name of the icon to choose, which the current availables are: -scroll_open.tga -scroll_open_green.tga -scroll_open_blue.tga -scroll_open_purple.tga -scroll_open_golden.tga Examples: send_letter_ex(localeInfo.LanguageOptionTitle, "green,blink,ex", "scroll_open_green.tga") send_letter_ex(localeInfo.LanguageOptionTitle, "blue,blink,ex", "scroll_open_blue.tga") send_letter_ex(localeInfo.LanguageOptionTitle, "purple,blink,ex", "scroll_open_purple.tga") send_letter_ex(localeInfo.LanguageOptionTitle, "golden,blink,ex", "scroll_open_golden.tga") send_letter_ex(localeInfo.LanguageOptionTitle, "golden,blink,ex", "scroll_open.tga") Note: As you can imagine, the only limitation is that the color in N won't appear. (it will require additional code and work, so just forget it) Download: Check the attachment (colored-quest-scrolls-v2-res.7z) and add metin2_patch_new_questicon in your client.
    1 point
  31. Well .. i've made it for 40k to work perfect... uicharacter.py and interfacemodule.py made for r40k Client is attached to this reply.. Have fun test.zip
    1 point
  32. [Hidden Content] Let me know when you want to buy the system for full support.
    0 points
  33. It's been two years man..just change your quest. Or ask a professional to write a new one for you.
    0 points
×
×
  • 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.