Beiträge von MT2Dev

    Hi Devs,


    Today i wanna share with you my version (edited for metin src) of Artistic Style 3.6.4.



    Bitte melden Sie sich an, um diesen Link zu sehen.


    Bitte melden Sie sich an, um diesen Link zu sehen.


    Bitte melden Sie sich an, um diesen Link zu sehen.



    Artistic Style 3.6.4 for MT2 (C++)



    What is this ?


    "Artistic Style" is a source code indenter, formatter, and beautifier for the C, C++, C++/CLI, ObjectiveC, C# and Java programming languages.


    AStyle allows you to change your coding style in bulk without messing with files one by one. It is a great program for editing your sloppy and unsafe source code. (Hi Korean devs..)


    This version edited by me is specially prepared for editing MT2 source codes, it does not break the codes or file format.




    How To Use ?


    Download the repo, move the two file in your src, double click the .bat files (each folder) and thats it!


    NOTE: This program is safe for the source code, not doing anything wrong or will not broke your code so feel free to try this. (Take a backup for sure)




    Have fun, best regards, MT2Dev.

    INTRODUCTION & PROBLEM


    Hello, we will solve the famous "Cannot Find Tree" problem in the "CHARACTER::Sync" function in the server src and also the problems that may be caused by the "Dead();" section used for everything that is not a PC in this function.


    WHAT DID WE CHANGE?


    All of the currently shared fixes are actually incomplete, we will make a new arrangement to solve this problem at its root, thus we will fix the problem completely.


    HOW TO DO?


    Without going into details such as editing the reward mechanism of the existing dead function, we will simply create a new dead function and use it in Sync. The main purpose of this function, which can only be used for mobs and metins, is that it does not give a reward (drop) after the dead function, let's get started.


    UPDATE - 23/10/2024


    I fixed a code that caused the (!new_tree) part of the function to return false under all circumstances also added all the nullptr checks and extra sys_err messages where necessary, expanded the content of the existing sys_err messages, these changes will not cause any performance disadvantages and there is no possibility of it being misused in any way anymore, please use the final version.


    First, open "char_battle.cpp"


    Then open "char.cpp"

    Lastly, open "char.h"

    Code
    1. // Find;
    2. void Dead (LPCHARACTER pkKiller = NULL, bool bImmediateDead = false);
    3. // Add under;
    4. void RewardlessDead(); // DevFix 29

    Best regards, MT2Dev.

    INTRODUCTION & PROBLEM


    Hello, with the request of a member, i made an arrangement to prevent the clients (.exe) from overlapping on the taskbar and to open all clients separately, i am sharing it in case anyone needs it.


    WHAT DID WE CHANGE?


    By creating a different ID for each .exe opened, we will ensure that the operating system does not see them as the same application, thanks to these unique IDs, each .exe will be different and will not overlap.


    HOW TO DO?


    We will modify only one file, open the "UserInterface.cpp" file in Client src/UserInterface.


    INTRODUCTION & PROBLEM


    Hello, the issue we will be working on this time is actually important, it will prevent players from using mounts/horses in various PvP maps (Guild War, Arena, PvP Event Maps, etc. - in addition to these, OX and Wedding maps are among the banned maps-) or if they go to unwanted map while riding on a mount/horse, we will have them dismount/unsummon when they enter these maps. Although there are many topics about this in various places, none of them offer a complete solution, so I am sharing with you all the checks I have made for my own src.


    WHY & WHAT DID WE CHANGE?


    Especially in PvP-oriented maps such as Guild War map, it is generally undesirable for players to gain an advantage by using mounts/horses. To prevent this, we will add the necessary controls in the right places and create a function that includes maps where we do not want characters to use mounts/horses. (You can create a new case in this function and add the extra map index code if you want to include in the list, so it will be very easy to activate this obstacle on the map you want.)


    ATTENTION!


    1- I do not use the COSTUME_MOUNT system in my own src, so I wrote the codes accordingly while creating this topic, so if you are using this system, you should add the necessary controls to this system and adjust some of the controls I gave you (because some sections were written based on the old mount system) , otherwise it may not work correctly or effectively!


    2- As I said during the explanation, add it below or above the code you are looking for (whichever I said in the explanation), their positions are important! Many codes have different placements, so while following this guide, make sure that you do not make any mistakes in the parts i mentioned above or below.


    HOW TO DO?


    First, open the "char.h" file.


    Then open the "char_horse.cpp" file.


    Then open the "char_item.cpp" file.

    Then open the "cmd_general.cpp" file.

    Then open the "cmd_gm.cpp" file.

    Then open the "input_login.cpp" file.

    Then open the "questlua_horse.cpp" file.

    Then open the "questlua_pc.cpp" file.

    We're done with src, now we need to edit on the SF side. First, open your quest file and open all your quests in the style of "ride_xxx.quest", especially "ride.quest", and do the following for all of them.

    Finally open the "locale_string.txt" file

    Best regards, MT2Dev.

    INTRODUCTION & PROBLEM


    Hello, as you know in the horse system in the game, the player can feed his horse in an unlimited number of times, this will not cause an overflow problem due to the controls in the codes, but I think feeding a horse whose health is already full does not benefit the player.


    WHY & WHAT DID WE CHANGE?


    We made sure that the horse refuses to be fed when its health reaches the maximum level and the player receives an information message, and we also added extra controls.


    UPDATE - 29/06/2024


    We updated the fix for be effective.


    HOW TO DO?


    First, open the "horse_rider.cpp" file.


    Then, open the "char_item.cpp" file.



    Then, open the "cmd_general.cpp" file.

    Then open the "questlua_horse.cpp" file.


    Now we need to change one last thing in our .quests, open the SF quest folder and find&open the "horse_menu.quest"


    Finally, open the "locale_string.txt" and added to the end;

    Best regards, MT2Dev.

    INTRODUCTION & PROBLEM


    Hello, I have been wanting to renew the safebox password system in the game for a long time, I wanted to deal with it as soon as I had time, I think the resulting code is useful, so I am sharing it with you so that everyone can use it.


    WHY & WHAT DID WE CHANGE?


    Many controls were missing within the functions, I think that giving too much freedom to the players in systems where such players can make choices by entering a text may pave the way for the possibility of abuse. Innovations and controls were added both for this and for situations related to the password security of the players. Let's briefly look at what we did;


    - The password can only consist of digits.

    - The password can consist of a maximum of 6 and a minimum of 4 digits.

    - If the player does not change his password and continues to use it as "000000", he will encounter a warning message that he must change his password every time he opens the safebox or mall.

    - The player must be near the storekeeper to change the password. (Those who do not prefer it can simply make it a comment line)

    - If the player writes his current password as his new password when changing his password, he will receive a warning and the process will not be completed.

    - If the player wants to change his password to "000000", game will be asked to choose another password and the process will not be completed.


    ATTENTION!


    For functions that need to be completely changed, remember that if there is a system or fix-related codes you are already using, you should make this change after adapting it to the function I have given.


    HOW TO DO?


    First, open the "char.cpp" file.


    Then open the "cmd_general.cpp" file.


    Lastly open the "locale_string.txt" file.


    Best Regards, MT2Dev.

    INTRODUCTION & PROBLEM


    Hi, while I was fixing the little things that bothered me in the GM codes, i made a change related to this, but there was no time to share it, it might be useful for those who care about details, so I wanted to share it.


    WHY ?


    Necessary controls and information/error messages were missing within the functions, the codes were renewed by adding everything necessary.


    SOLUTION


    First, open the "cmd_gm.cpp".


    INTRODUCTION & PROBLEM


    Hello, today we will completely renew one of the most frequently used GM commands, the /set command. We will add all the necessary controls to this command, which does not contain any controls or information, and we will activate gender, character and skill group changes and add a new field where you can adjust the magic speed of the players.


    WHY ?


    You may think that there is no need for the GM team to use this anyway, but not every GM in the game is obliged to master the game functions, so our aim is to make their job as easy as possible and eliminate the possibility of triggering something wrong.


    SOLUTION


    First, open the "cmd_gm.cpp".


    IMPORTANT NOTE


    Only those who use a C++11 standards compiler can apply this edit!

    (Compilers Supporting C++11; GCC 4.8 and above, Clang 3.3 and above, VS 12 and above)


    INTRODUCTION & PROBLEM


    Hello, today we will completely renew the /full_set command from the GM commands and the other commands connected to it (like do_all_skill_master, do_item_full_set, do_attr_full_set). We will replace useless items and their enchantments, make the function content more modern, and add informational messages (C++11 and above). I didn't need to add stones and ores, the items and their enchantments were already op enough. 😄


    WHY ?


    Anyone who wants to try something in game with a GM character during the testing phase or on the live server, or who just wants to strengthen their character, has been busy producing special items for themselves through the DB (or with various auxiliary scripts). We aim to get rid of an extra hassle with this code that exists in the original source of the game.


    SUGGESTION


    Since the items obtained here will be at a very high rate, I recommend that you make these codes available only to player with GM_IMPLEMENTOR authority.


    UPDATE - 04/25/2024


    Upon the request of a user from @ Amsterdam, a check was added to ensure that the GM character is not lower than the level of the items to be equipped. If the character is lower than 90 Lvl, the function will give an error and will not continue. Apart from this, a separate information message has been added for each item in the item_attr section.


    SOLUTION


    First, open the "cmd_gm.cpp" file.



    I posted some fix about this problem on 20 April in another forum, if someone want to look at that too, here is it;



    Maybe this codes not the only ones that has this overflow, so you should check all of the cmd codes or add a general control like what's Sogma's suggested above, best regards.


    Aber das geile ist ja so scamer wollen das verkaufen xD


    Bitte melden Sie sich an, um dieses Bild zu sehen.


    WTF is this :D