Jump to content

Deso

Member
  • Posts

    23
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Deso

  1. 47 minutes ago, Chookez said:

    This is the hidden content, please

    This is the hidden content, please

    The files he is asking for are protected with hybrid crypt keys, he need's the full unpacked patch and that could be difficult since you can't login to official 2014-15 beta. 

    • Metin2 Dev 2
    • Good 2
    • Love 2
  2. Hey @ Mali,

    I wanted to take a moment to express my sincere appreciation for the incredible work you've done so far. Your coding skills are truly impressive.

    It's developers like you who make the gaming experience enjoyable and smooth for all of us. Thank you for your hard work and for sharing your talents with the community.

    Keep up the fantastic work!

    Best regards

    • Love 3
  3. The error message "TypeError: 'NoneType' object is not callable" occurs when you try to invoke a method on an object that has the value "None". This indicates that the object on which the method is being called was not properly initialized or assigned.

    In your case, the error seems to be happening in the __del__ method of the TextLine object for example. The __del__ method is the destructor of a class and is called when the object is being destroyed. However, in this case, the TextLine object appears to have the value "None," indicating that it was not properly initialized.

    • Good 1
  4. 8 hours ago, Mali said:

    It is also an important for proto sharers.

    • Reversed from 23.0.6.0

     

    Hidden Content

     

    .png

    That dwUnkFlag is actually DWORD dwAIFlag -> DWORD dwAIFlag[2].

    This is only client-side, you have to change server & dump_proto etc.

    ///@@@PythonNonPlayer.h:
    		enum  EClickEvent
    		{
    			...
    		};
    
    ///Add
    		enum EAIFlags
    		{
    			AIFLAG_AGGRESSIVE = 0,
    			AIFLAG_NOMOVE = 1,
    			AIFLAG_COWARD = 2,
    			AIFLAG_NOATTACKSHINSU = 3,
    			AIFLAG_NOATTACKJINNO = 4,
    			AIFLAG_NOATTACKCHUNJO = 5,
    			AIFLAG_ATTACKMOB = 6,
    			AIFLAG_BERSERK = 7,
    			AIFLAG_STONESKIN = 8,
    			AIFLAG_GODSPEED = 9,
    			AIFLAG_DEATHBLOW = 10,
    			AIFLAG_REVIVE = 11,
    			AIFLAG_HEALER = 12,
    			AIFLAG_COUNT = 13,
    			AIFLAG_NORECOVERY = 14,
    			AIFLAG_REFLECT = 15,
    			AIFLAG_FALL = 16,
    			AIFLAG_VIT = 17,
    			AIFLAG_RATTSPEED = 18,
    			AIFLAG_RCASTSPEED = 19,
    			AIFLAG_RHP_REGEN = 20,
    			AIFLAG_TIMEVIT = 21,
    			AIFLAG_ELEMENT_BUFF_NONE = 26,
    			AIFLAG_ELEMENT_BUFF_FIRE = 27,
    			AIFLAG_ELEMENT_BUFF_ICE = 28,
    			AIFLAG_ELEMENT_BUFF_ELECT = 29,
    			AIFLAG_ELEMENT_BUFF_WIND = 30,
    			AIFLAG_ELEMENT_BUFF_EARTH = 31,
    			AIFLAG_ELEMENT_BUFF_DARK = 32,
    
    			AIFLAG_MAX = 34 // 23.0.6.0
    		};
    
    //Find
    			DWORD       dwAIFlag;
    
    ///Change
    			DWORD       dwAIFlag[2];
    
    //Find
    		const char*			GetMonsterName(DWORD dwVnum);
    
    ///Add
    		bool				IsAIFlag(DWORD dwVnum, int iFlagIndex);
    ///@@@PythonNonPlayer.cpp:
    
    ///Add
    bool CPythonNonPlayer::IsAIFlag(DWORD dwVnum, int iFlagIndex)
    {
    	const CPythonNonPlayer::TMobTable* c_pTable = GetTable(dwVnum);
    	if (!c_pTable)
    		return false;
    
    	if (iFlagIndex < 0 || iFlagIndex >= EAIFlags::AIFLAG_MAX)
    		return false;
    
    	return IS_SET(c_pTable->dwAIFlag[iFlagIndex >> 5], 1 << (iFlagIndex & 0x1F));
    }
    ///@@@PythonNonPlayerModule.cpp:
    
    ///Add
    PyObject* nonplayerIsAIFlagByVID(PyObject* poSelf, PyObject* poArgs)
    {
    	int iVirtualID;
    	if (!PyTuple_GetInteger(poArgs, 0, &iVirtualID))
    		return Py_BuildException();
    
    	int iIndex;
    	if (!PyTuple_GetInteger(poArgs, 1, &iIndex))
    		return Py_BuildException();
    
    	CInstanceBase* pInstance = CPythonCharacterManager::Instance().GetInstancePtr(iVirtualID);
    	if (!pInstance)
    		return Py_BuildValue("b", false);
    
    	CPythonNonPlayer& rkNonPlayer = CPythonNonPlayer::Instance();
    	return Py_BuildValue("b", rkNonPlayer.IsAIFlag(pInstance->GetVirtualID(), iIndex));
    }
    
    ///Add to initNonPlayer
    		{ "IsAIFlagByVID",				nonplayerIsAIFlagByVID,				METH_VARARGS },
    
    //Find
    	PyModule_AddIntConstant(poModule, "ON_CLICK_EVENT_VEHICLE",		CPythonNonPlayer::ON_CLICK_EVENT_VEHICLE);
    
    ///Add
    	PyModule_AddIntConstant(poModule, "AIFLAG_AGGRESSIVE",			CPythonNonPlayer::EAIFlags::AIFLAG_AGGRESSIVE);
    	PyModule_AddIntConstant(poModule, "AIFLAG_NOMOVE",				CPythonNonPlayer::EAIFlags::AIFLAG_NOMOVE);
    	PyModule_AddIntConstant(poModule, "AIFLAG_COWARD",				CPythonNonPlayer::EAIFlags::AIFLAG_COWARD);
    	PyModule_AddIntConstant(poModule, "AIFLAG_NOATTACKSHINSU",		CPythonNonPlayer::EAIFlags::AIFLAG_NOATTACKSHINSU);
    	PyModule_AddIntConstant(poModule, "AIFLAG_NOATTACKJINNO",		CPythonNonPlayer::EAIFlags::AIFLAG_NOATTACKJINNO);
    	PyModule_AddIntConstant(poModule, "AIFLAG_NOATTACKCHUNJO",		CPythonNonPlayer::EAIFlags::AIFLAG_NOATTACKCHUNJO);
    	PyModule_AddIntConstant(poModule, "AIFLAG_ATTACKMOB",			CPythonNonPlayer::EAIFlags::AIFLAG_ATTACKMOB);
    	PyModule_AddIntConstant(poModule, "AIFLAG_BERSERK",				CPythonNonPlayer::EAIFlags::AIFLAG_BERSERK);
    	PyModule_AddIntConstant(poModule, "AIFLAG_STONESKIN",			CPythonNonPlayer::EAIFlags::AIFLAG_STONESKIN);
    	PyModule_AddIntConstant(poModule, "AIFLAG_GODSPEED",			CPythonNonPlayer::EAIFlags::AIFLAG_GODSPEED);
    	PyModule_AddIntConstant(poModule, "AIFLAG_DEATHBLOW",			CPythonNonPlayer::EAIFlags::AIFLAG_DEATHBLOW);
    	PyModule_AddIntConstant(poModule, "AIFLAG_REVIVE",				CPythonNonPlayer::EAIFlags::AIFLAG_REVIVE);
    	PyModule_AddIntConstant(poModule, "AIFLAG_HEALER",				CPythonNonPlayer::EAIFlags::AIFLAG_HEALER);
    	PyModule_AddIntConstant(poModule, "AIFLAG_COUNT",				CPythonNonPlayer::EAIFlags::AIFLAG_COUNT);
    	PyModule_AddIntConstant(poModule, "AIFLAG_NORECOVERY",			CPythonNonPlayer::EAIFlags::AIFLAG_NORECOVERY);
    	PyModule_AddIntConstant(poModule, "AIFLAG_REFLECT",				CPythonNonPlayer::EAIFlags::AIFLAG_REFLECT);
    	PyModule_AddIntConstant(poModule, "AIFLAG_FALL",				CPythonNonPlayer::EAIFlags::AIFLAG_FALL);
    	PyModule_AddIntConstant(poModule, "AIFLAG_VIT",					CPythonNonPlayer::EAIFlags::AIFLAG_VIT);
    	PyModule_AddIntConstant(poModule, "AIFLAG_RATTSPEED",			CPythonNonPlayer::EAIFlags::AIFLAG_RATTSPEED);
    	PyModule_AddIntConstant(poModule, "AIFLAG_RCASTSPEED",			CPythonNonPlayer::EAIFlags::AIFLAG_RCASTSPEED);
    	PyModule_AddIntConstant(poModule, "AIFLAG_RHP_REGEN",			CPythonNonPlayer::EAIFlags::AIFLAG_RHP_REGEN);
    	PyModule_AddIntConstant(poModule, "AIFLAG_TIMEVIT",				CPythonNonPlayer::EAIFlags::AIFLAG_TIMEVIT);
    	PyModule_AddIntConstant(poModule, "AIFLAG_ELEMENT_BUFF_NONE",	CPythonNonPlayer::EAIFlags::AIFLAG_ELEMENT_BUFF_NONE);
    	PyModule_AddIntConstant(poModule, "AIFLAG_ELEMENT_BUFF_FIRE",	CPythonNonPlayer::EAIFlags::AIFLAG_ELEMENT_BUFF_FIRE);
    	PyModule_AddIntConstant(poModule, "AIFLAG_ELEMENT_BUFF_ICE",	CPythonNonPlayer::EAIFlags::AIFLAG_ELEMENT_BUFF_ICE);
    	PyModule_AddIntConstant(poModule, "AIFLAG_ELEMENT_BUFF_ELECT",	CPythonNonPlayer::EAIFlags::AIFLAG_ELEMENT_BUFF_ELECT);
    	PyModule_AddIntConstant(poModule, "AIFLAG_ELEMENT_BUFF_WIND",	CPythonNonPlayer::EAIFlags::AIFLAG_ELEMENT_BUFF_WIND);
    	PyModule_AddIntConstant(poModule, "AIFLAG_ELEMENT_BUFF_EARTH",	CPythonNonPlayer::EAIFlags::AIFLAG_ELEMENT_BUFF_EARTH);
    	PyModule_AddIntConstant(poModule, "AIFLAG_ELEMENT_BUFF_DARK",	CPythonNonPlayer::EAIFlags::AIFLAG_ELEMENT_BUFF_DARK);

     

     

     

    Usage:

    nonplayer.IsAIFlagByVID(nonplayer.AIFLAG_ELEMENT_BUFF_DARK)

    Also important to know,
    They're using "ELEMENT_BUFF_DARK" inside of the new AIFlag, because the dumper stores just until "ELEMENT_BUFF_EARTH"
    If you extend it, the Protos are in a missmatch then.
    Example from offical protos: 
    spacer.png

    Btw @ Malii've send you a git request, if you're interested in to join my Tool.

  5.  Here is my slightly refactored version.. 🤣

     

    #include <unordered_map>
    
    // Add a list of maps and their corresponding max distance values to a map.
    // This allows us to look up the max distance value for a given map more efficiently than using a series of if statements.
    std::unordered_map<std::string, float> mapMaxDistances = {
        {"metin2_map_n_flame_dragon", 6000.0f},
        {"metin2_12zi_stage", 5000.0f},
        {"metin2_map_defensewave", 5000.0f},
        {"metin2_map_miniboss_01", 5000.0f},
        {"metin2_map_miniboss_02", 5000.0f},
        {"metin2_map_mists_of_island", 5000.0f}
    };
    
    PyObject* appSetCameraMaxDistance(PyObject* poSelf, PyObject* poArgs)
    {
        float fMax;
        if (!PyTuple_GetFloat(poArgs, 0, &fMax))
            return Py_BuildException();
    
        const std::string c_rstrMapFileName = CPythonBackground::Instance().GetWarpMapName();
    
        // Look up the max distance value for the current map in the mapMaxDistances map.
        // If the map is not found in the map, the max distance value will be the default value of 0.0f.
        fMax = mapMaxDistances[c_rstrMapFileName];
    
        CCamera::SetCameraMaxDistance(fMax);
        return Py_BuildNone();
    }

     

    • Facepalm 3
  6. Nice idea!
    Ive addet something like this (to request the lines inside of binary):
     

    Spoiler

    std::string CPythonLocale::GetLocaleString(uint16_t wIndex)
    {
        const std::string idx = std::to_string(wIndex);

        auto it = m_LocaleStringMap[LOCALE_STRING].find(idx);
        if (it == m_LocaleStringMap[LOCALE_STRING].end())
        {
            TraceError("CPythonLocale::GetLocaleString: Cannot find string with index %u", wIndex);
            return "";
        }

        return it->second;
    }

    CPythonLocale::Instance().GetLocaleString(888); // "'s Horse"
    Because i've deleted the Horse-Name from Source and made an exception on "RecvCharacterAppendPacket"
    and addet an Request on "__Create_SetName"

    • Facepalm 1
    • Good 2
  7. This is the hidden content, please
     or 
    This is the hidden content, please

    Nothing special, just some dinosaur

    For Example:

    6516	Primordis Guardian
    6517	Golden Portal
    6518	Golden Monolith
    6519	Golden Monolith
    6520	Golden Palm
    6521	Caravan Trader
    6522	Raptor
    6523	Rhinosaurus
    6524	Dilophosaurus
    6525	Young Rex
    6526	Small Goldirex
    6527	Mighty Goldirex
    6528	Noble Goldirex
    6529	Primordis Statue
    6530	Bomb Tower
    6531	Adult Rex
    6532	Ancient Rex


    Have fun with new Update

    • Metin2 Dev 84
    • kekw 2
    • Eyes 1
    • Dislove 2
    • Cry 1
    • Scream 1
    • Good 27
    • Love 3
    • Love 26
  8. We could also add 

    			if (!item)
    				return false;
    
    			LPCHARACTER pkChrCauser = CHARACTER_MANAGER::instance().FindByPID(pc);
    			if (pkChrCauser)
    			{
    				if (!pkChrCauser->CanHandleItem())
    				{
    					pkChrCauser->ChatPacket(7, "You cannot open this conversation, while other windows are opened.");
    					return false;
    				}
    			}

     

    before 

    return m_mapNPC[npc].OnTakeItem(*pPC);

     

    in questmanager.cpp

     

    This would make the quest function smaller. 🤪

    • Metin2 Dev 1
    • Love 1
  9. Current official protos:

     

     

    @edit: The structure was corrected and some columns had incorrect values.

     

    New proto: 

    This is the hidden content, please

    Everything should be correct in mob_proto for now, except these: "SungMaSt    SungMaDx    SungMaHt    SungMaIq" 

    • Metin2 Dev 127
    • kekw 2
    • Eyes 5
    • Dislove 1
    • Angry 1
    • Not Good 1
    • Sad 3
    • Cry 2
    • Smile Tear 1
    • Think 1
    • Confused 1
    • Lmao 2
    • Good 34
    • Love 4
    • Love 34
×
×
  • 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.