Jump to content

flatik

Premium
  • Posts

    94
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    100%

Posts posted by flatik

  1. 13 minutes ago, SCOOB said:

    Edit: It does not work, the skills disappear and on old account I get UNKNOWN PACKET HEADER.

    GIF: https://metin2.download/video/hqmgJNMnQrJw4E3fgrHmGUZCB4SNEKKh/.mp4



    I did the issues.cpp part of the tutorial, but that did not change anything.
     

    I didn't really look into the source code, but the packet error made it easy to find the cause.
    You also need to rewrite TPlayerSkill in binary source code.

    • Good 1
  2. On 9/24/2021 at 5:30 PM, Karbust said:

    I keep getting this error in Debug mode:

    7otFd8t.png

    std::shared_ptr<CGrannyMotion> CGraphicThing::GetMotionPointer(int iMotion)
    {
    	assert(CheckMotionIndex(iMotion)); //line 131
    
    	if (iMotion >= m_pgrnFileInfo->AnimationCount)
    		return NULL;
    
    	if (m_motions.empty())
    		return NULL;
    
    	return m_motions.at(iMotion);
    }

    Any idea?

    Thank you

    There is an error message because the weapon has no animation.

     

    try:

    std::shared_ptr<CGrannyMotion> CGraphicThing::GetMotionPointer(int iMotion)
    {
    	if (!CheckMotionIndex(iMotion))
    		return nullptr;
    
    	if (m_motions.empty())
    		return nullptr;
    
    	return m_motions.at(iMotion);
    }

     

    • Love 1
  3. 2 hours ago, Brayle said:

    Thats not how it works..
    If you publish something even for free you are responsible for it therefore it is your responisibility to help your clients.
    Just don't publish something for free if you don't take the responisibility over your clients.

    Like Martysama.. he asks money but he helps his clients..

    trying-not-to-laugh-zoom-in.gif

  4. do_safebox_size small fix:

    void CInputDB::SafeboxLoad(LPDESC d, const char * c_pData
    {
    ***
    BYTE bSize = std::clamp<BYTE>(p->bSize, 0, 3);
    ***
    }

     

    ACMD(do_safebox_size)
    {
    	char arg1[256];
    	one_argument(argument, arg1, sizeof(arg1));
    
    	int size = 0;
    
    	if (*arg1)
    		str_to_number(size, arg1);
    
    	size = std::clamp(size, 0, 3);
    
    	ch->ChatPacket(CHAT_TYPE_INFO, "Safebox size set to %d", size);
    	ch->SetSafeboxSize(size * SAFEBOX_PAGE_SIZE);
    }

     

  5. Hi all!

    This is recommended for those who are testing or running on windows. The reason for the error is that they have a 100% chance of dropp.
    C++11.

     

    Based on the video, you can watch:

     

    number_ex old version:

    https://metin2.download/video/404cFTu02qN7zGDbO2RA8za82mHM6xzq/.mp4

     

    number_ex fixed:

    https://metin2.download/video/8084RGh8gld28tLTsoYfx1ITK5W1fWxC/.mp4

     

    FIX:

    #include <random>
    
    int number_ex(int from, int to, const char* file, int line)
    {
        if (from > to)
        {
            int tmp = from;
    
            sys_err("number(): first argument is bigger than second argument %d -> %d, %s %d", from, to, file, line);
    
            from = to;
            to = tmp;
        }
    
        int returnValue = 0;
    
        std::random_device rd;
        std::mt19937 gen(rd());
        std::uniform_int_distribution<> distrib(from, to);
    
        if ((to - from + 1) != 0)
            returnValue = distrib(gen);
        else
            sys_err("number(): devided by 0");
    
        return returnValue;
    }

     

    • Metin2 Dev 2
    • Good 3
    • Love 10
×
×
  • 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.