Jump to content

Thorek

Active Member
  • Posts

    40
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Thorek

  1. On 5/2/2024 at 12:15 AM, Assembly said:

    @ThorekWhat if we want to give more than one enchantment?

    Well, if you want do this like YMIR, you can extend sockets count.

    On 5/2/2024 at 5:46 AM, josehdelaro said:

    ty some problems but work

    What problems? I'll take a look.

  2. 4 hours ago, Vegaz said:

    @Thorek

    Take Polak, you ridicule everyone and on your "forum" people laugh at you because you can't write in python. The boy may be starting his adventure with coding from the simplest things and you have the nerve to criticize him instead of congratulating or in some way still directing him?
    I feel bad having anything to do with Poland because of people like you.

    Take Niemiec, which forum is mine? Yes, I can't write in Python because Python is crap, and I don't like this language. Even if he started his adventure, he could have looked for this addition before he published it.

    I appreciate every work, but honestly - why would we need topics like this when we have tons of them? But yes - my first comment may be a little toxic, and I want to apologize for this.

  3. You can check if ifstream is open instead of using the filesystem library (which comes from C++17):

    std::ifstream file(LocaleService_GetBasePath() + "/fishing.json");
    
    if (!file.is_open()
    	return;
    
    // ...

    Also you should remove #include <fmt/core.h> to avoid compilation errors.

    • Facepalm 1
  4. 40 minutes ago, BadRomani said:

    Thank you bro. Thanks to your help, the build was created successfully.

            "value": [ 1, 3, 5, 7, 10 ],
            "duration": [ 1800, 1800, 1800,180 1800 ]

    when used in this way, the server will not boot.

            "value": [ 1, 3 ],
            "duration": [ 1800, 1800 ]

    This is how the server opens.

     

    How can I add more? As in blend.txt.

    After every item in JSON array, you must put a comma (except for the last one).

    For example, if you have: [ 1800, 1800, 1800,180 1800 ]

    Server not booting because after 180 comma wasn't found.

  5. 8 minutes ago, BadRomani said:

    spacer.png

    spacer.png

    Wops, sorry - contains function comes from C++20.

    Change return in CBlendItem::Find to return items.find(item) != items.end();

    • Love 1
  6. 12 minutes ago, filipw1 said:

    Good stuff, but I've got it already for 30 minutes. You should use map instead of vector to save some time on finding the right blend data in you data pool. Nice to see people getting rid of some old and ugly code. 

    You should fix all your systems to comments my topics!!! Thanks, fixed.

    • Angry 1
    • Lmao 1
  7. This is the hidden content, please

    Another Download

    This is the hidden content, please

    BlendItemRenewal

    Completely new and fresh approach to load blend items using JSON.

    Better than previous versions?

    I suppose so. The source file for this version has only about 50 lines so it is very slim.

    I have decided to adhere to the YMIR coding style, so there are no classes or structures.

    So - how to install this „system”?

    • Make sure the compiler you are using supports (at least) C++11.
      • Install 
        This is the hidden content, please
         parser.
        • Replace blend_item.h and blend_item.cpp with the old ones, and that is it.
          • If you want hot-reloading the JSON file, you can add the cmd_gm.cpp part (recommended).

    Example blend.json file content below.

    {
    	"50821": {
    		"type": "CRITICAL_PCT",
    		"value": [ 8, 10, 12, 15, 20 ],
    		"duration": [ 60, 120, 180, 300, 600 ]
    	},
    
    	"50822": {
    		"type": "PENETRATE_PCT",
    		"value": [ 8, 10, 12, 15, 20 ],
    		"duration": [ 60, 120, 180, 300, 600 ]
    	},
    
    	"50823": {
    		"type": "ATTACK_SPEED",
    		"value": [ 2, 3, 4, 5, 8 ],
    		"duration": [ 60, 120, 180, 300, 600 ]
    	},
    
    	"50824": {
    		"type": "RESIST_MAGIC",
    		"value": [ 8, 10, 12, 15, 20 ],
    		"duration": [ 60, 120, 180, 300, 600 ]
    	},
    
    	"50825": {
    		"type": "ATT_BONUS",
    		"value": [ 30, 50, 70, 90, 120 ],
    		"duration": [ 60, 120, 180, 300, 600 ]
    	},
    
    	"50826": {
    		"type": "DEF_BONUS",
    		"value": [ 40, 70, 100, 150, 200 ],
    		"duration": [ 60, 120, 180, 300, 600 ]
    	},
    
    	"51002": {
    		"type": "ENERGY",
    		"value": [ 1, 3, 5, 7, 10 ],
    		"duration": 1800 // It is possible to use only one duration (and value).
    	}
    }
    • Metin2 Dev 95
    • Eyes 5
    • Good 14
    • Love 1
    • Love 26
  8. This is the hidden content, please

    Alternative download links → 

    This is the hidden content, please
     (2.0.0) or
    This is the hidden content, please
     (2.0.0)

    Hi! By this tool you can remove unused lines from locale_game and locale_interface text files in fast & easily way.

    Is faster than script created by dracaryS.

    How to use? Just move root directory to downloaded file and wait for cleaned files.

    30.01.23 -> I released new version so

    This is the hidden content, please
    !

    • Metin2 Dev 42
    • Eyes 2
    • Good 7
    • Love 1
    • Love 17
  9. I had a problem with Aura which not disappearing after weapon change.

    Solution is simple, just:

    // Before this condition (SwapItem, char_item.cpp):
    if (TItemPos(EQUIPMENT, item2->GetCell()).IsEquipPosition())
    {
      // [...]
    
    // Add check:
    if (item2->GetType() == ITEM_WEAPON)
    {
    	if (IsAffectFlag(AFF_GWIGUM))
    		RemoveAffect(SKILL_GWIGEOM);
    
    	if (IsAffectFlag(AFF_GEOMGYEONG))
    		RemoveAffect(SKILL_GEOMKYUNG);
    }
    • Metin2 Dev 1
  10. const uint32_t width = m_Config.bWindowed ? GetSystemMetrics(SM_CXFULLSCREEN) : GetSystemMetrics(SM_CXSCREEN);
    const uint32_t height = m_Config.bWindowed ? GetSystemMetrics(SM_CYFULLSCREEN) : GetSystemMetrics(SM_CYSCREEN);
    
    if (m_Config.width >= width)
    	m_Config.width = width;
    
    if (m_Config.height >= height)
    	m_Config.height = height;

    This version looks better imho.

    • Metin2 Dev 3
    • Scream 2
    • Good 2
  11. Hello Devs! Sorry for my bad English...

     

    Today I would like to present a program that I will try to develop (from time to time).

    M2Manager is a tool that allows you to manage server quite professionally.

     

    Below I will present some functions that the program already has.

    If you want, you can write in a comment what I can add to program before it is published(?).

     

    This is how the main window of program looks like:

    5hkDGUp.png

    As you can see, it's very minimalistic. Has ability to connect with a MySQL server and save data.

    When we connect to server, we can go to some tab (for example, item creator).

    kWvppoq.png

    Program has automatic detection of item_proto table, so if you have any new columns, they will be displayed.

    After configuring the columns, we can save our own template, set item icon, GR2 model (if it's, for example, armor), path to item_list.txt and MSM files. All entries will be added automatically (to client and to db).

    Ch6QjBD.png

    If we enter the GR2 model, we also have option to edit it (e.g. textures).

    ZnnOaXJ.png

    After change path(s), we can save corrected model or configure the texture(s) location!

    4zRwc06.png

    And a lot more!

    If you are (for some reason) interested in project, let me know and there will be more information about it here!

    • Metin2 Dev 6
    • Good 4
    • Love 1
    • Love 4
  12. Hello, I think this is not a bug.

    The problem that you have is (probably) caused by Is1GoldItem function used by uiShop.py and uiInventory.py.

    # uiShop.py:
    if item.Is1GoldItem():
    	itemPrice = attachedCount / itemPrice / 5
    else:
    	itemPrice = itemPrice * max(1, attachedCount) / 5
    
    # uiInventory.py:
    if item.Is1GoldItem():
    	itemPrice = itemCount / itemPrice / 5
    else:
    	itemPrice = itemPrice * itemCount / 5

    As you can see, if you want sell item and this item has flag named ITEM_FLAG_COUNT_PER_1GOLD, price is changed.

    So to fix your problem you can e.g. comment this checks.

×
×
  • 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.