Jump to content

xP3NG3Rx

Honorable Member
  • Posts

    839
  • Joined

  • Days Won

    393
  • Feedback

    100%

Posts posted by xP3NG3Rx

  1. As far as I know this class controlled by the OX event timers. The base of it is on the server and the processor is inside the binary.

    b56d8b529d.png

     

    7592e5e1ef.png

     

    ps.: of course it can be handled from python too.

     

    Edit: Here is a small example via quest how it works:

    quest devtest begin
    	state start begin
    		when login begin
    			big_control_notice("Question.[ENTER]What should I ask from you,[ENTER]if you just want to win?[ENTER]O: Nothing, X:gimmemoney[ENTER]You have 10 seconds to answer.")
    			--[[
    			--Without multiline token([ENTER]) handling:
    			big_control_notice("Question.")
    			big_control_notice("What should I ask from you,")
    			big_control_notice("if you just want to win?")
    			big_control_notice("O: Nothing, X:gimmemoney")
    			big_control_notice("You have 10 seconds to answer.")
    			--]]
    			big_control_notice("#start")
    			timer("hihihaha", 10)
    		end
    		when hihihaha.timer begin
    			big_control_notice("The right answer is:[ENTER]None of these.[ENTER]Thanks for being a part, Bye!")
    			big_control_notice("#send")
    			timer("makethestoryend", 5)
    		end
    		when makethestoryend.timer begin
    			big_control_notice("#end")
    		end
    	end
    end

     

    99d129ca45.gif

     

    Last word: After the second message the animation is a bit weirder than the first two. So for sure they made this for the ox, and didn't test it well enough.

    • Love 1
  2. Yo!

     

    Yesterday I have noticed that webzen changed the CPythonMiniMap::__LoadAtlasMarkInfo function whiches basically load all the positions of the npcs, warp portals onto the atlaswindow.
    I don't know they stopped sending the HEADER_GC_NPC_POSITION packet on every single login or not, but it seems with this code and the files from the official locale all the maps have the complete npc position info. My opinion about this that it's not needed to send this packet after every single login/warp.

     

    So I reversed this small modification, which is a bit different then the old one.

    This is how the old position info looks like:

    #TokenIndex	Type	PosX	PosY	ToolTipText
    0	WARP	140900	13900	"ąÚ¶óÇö"

    And this is the new one:

    #TokenIndex	PosX	PosY	NPCVnum
    0	44100	3300	20081

     

    Here is the modified function:

    Spoiler
    
    
    void CPythonMiniMap::__LoadAtlasMarkInfo()
    {
    	ClearAtlasMarkInfo();
    	ClearGuildArea();
    
    	CPythonBackground& rkBG=CPythonBackground::Instance();
    	if (!rkBG.IsMapOutdoor())
    		return;
    
    	CMapOutdoor& rkMap=rkBG.GetMapOutdoorRef();
    
    	// LOCALE
    	char szAtlasMarkInfoFileName[64+1];
    	_snprintf(szAtlasMarkInfoFileName, sizeof(szAtlasMarkInfoFileName), "%s/map/%s_point.txt", LocaleService_GetLocalePath(), rkMap.GetName().c_str());
    	// END_OF_LOCALE
    
    	CTokenVectorMap stTokenVectorMap;
    	if (!LoadMultipleTextData(szAtlasMarkInfoFileName, stTokenVectorMap))
    	{
    		Tracef(" CPythonMiniMap::__LoadAtlasMarkInfo File Load %s ERROR\n", szAtlasMarkInfoFileName);
    		return;
    	}
    
    #ifndef ENABLE_GF_ATLAS_MARK_INFO
    	const std::string strType[TYPE_COUNT] = { "OPC", "OPCPVP", "OPCPVPSELF", "NPC", "MONSTER", "WARP", "WAYPOINT" };
    #endif
    
    	for (DWORD i = 0; i < stTokenVectorMap.size(); ++i)
    	{
    		char szMarkInfoName[32+1];
    		_snprintf(szMarkInfoName, sizeof(szMarkInfoName), "%lu", i);
    
    		if (stTokenVectorMap.end() == stTokenVectorMap.find(szMarkInfoName))
    			continue;
    
    		const CTokenVector & rVector = stTokenVectorMap[szMarkInfoName];
    
    #ifdef ENABLE_GF_ATLAS_MARK_INFO
    		const std::string& c_rstrPositionX = rVector[0].c_str();
    		const std::string& c_rstrPositionY = rVector[1].c_str();
    		const std::string& c_rstrVnum = rVector[2].c_str();
    		const DWORD c_dwVnum = atoi(c_rstrVnum.c_str());
    
    		const CPythonNonPlayer::TMobTable* c_pMobTable = CPythonNonPlayer::Instance().GetTable(c_dwVnum);
    		if (c_pMobTable)
    		{
    			TAtlasMarkInfo aAtlasMarkInfo;
    			aAtlasMarkInfo.m_fX = atof(c_rstrPositionX.c_str());
    			aAtlasMarkInfo.m_fY = atof(c_rstrPositionY.c_str());
    			aAtlasMarkInfo.m_strText = c_pMobTable->szLocaleName;
    			if (c_pMobTable->bType == CActorInstance::TYPE_NPC)
    				aAtlasMarkInfo.m_byType = TYPE_NPC;
    			else if (c_pMobTable->bType == CActorInstance::TYPE_WARP)
    			{
    				aAtlasMarkInfo.m_byType = TYPE_WARP;
    				int iPos = aAtlasMarkInfo.m_strText.find(" ");
    				if (iPos >= 0)
    					aAtlasMarkInfo.m_strText[iPos] = 0;
    
    			}
    			else if (c_pMobTable->bType == CActorInstance::TYPE_STONE && c_dwVnum >= 20702 && c_dwVnum <= 20706)
    				aAtlasMarkInfo.m_byType = TYPE_NPC;
    
    			aAtlasMarkInfo.m_fScreenX = aAtlasMarkInfo.m_fX / m_fAtlasMaxX * m_fAtlasImageSizeX - (float)m_WhiteMark.GetWidth() / 2.0f;
    			aAtlasMarkInfo.m_fScreenY = aAtlasMarkInfo.m_fY / m_fAtlasMaxY * m_fAtlasImageSizeY - (float)m_WhiteMark.GetHeight() / 2.0f;
    
    			switch (aAtlasMarkInfo.m_byType)
    			{
    			case TYPE_NPC:
    				m_AtlasNPCInfoVector.push_back(aAtlasMarkInfo);
    				break;
    			case TYPE_WARP:
    				m_AtlasWarpInfoVector.push_back(aAtlasMarkInfo);
    				break;
    			}
    		}
    #else
    		const std::string & c_rstrType = rVector[0].c_str();
    		const std::string & c_rstrPositionX = rVector[1].c_str();
    		const std::string & c_rstrPositionY = rVector[2].c_str();
    		const std::string & c_rstrText = rVector[3].c_str();
    
    		TAtlasMarkInfo aAtlasMarkInfo;
    		//memset(&aAtlasMarkInfo, 0, sizeof(aAtlasMarkInfo));
    
    		for ( int i = 0; i < TYPE_COUNT; ++i)
    		{
    			if (0 == c_rstrType.compare(strType[i]))
    				aAtlasMarkInfo.m_byType = (BYTE)i;
    		}
    		aAtlasMarkInfo.m_fX = atof(c_rstrPositionX.c_str());
    		aAtlasMarkInfo.m_fY = atof(c_rstrPositionY.c_str());
    		aAtlasMarkInfo.m_strText = c_rstrText;
    
    		aAtlasMarkInfo.m_fScreenX = aAtlasMarkInfo.m_fX / m_fAtlasMaxX * m_fAtlasImageSizeX - (float)m_WhiteMark.GetWidth() / 2.0f;
    		aAtlasMarkInfo.m_fScreenY = aAtlasMarkInfo.m_fY / m_fAtlasMaxY * m_fAtlasImageSizeY - (float)m_WhiteMark.GetHeight() / 2.0f;
    
    		switch(aAtlasMarkInfo.m_byType)
    		{
    			case TYPE_NPC:
    				m_AtlasNPCInfoVector.push_back(aAtlasMarkInfo);
    				break;
    			case TYPE_WARP:
    				m_AtlasWarpInfoVector.push_back(aAtlasMarkInfo);
    				break;
    		}
    #endif
    	}
    }

    Don't forget to include the PythonNonPlayer.h, if you don't have it.

     

    Some facts what good to know about this:

    • This code does nothing until the RecvNPCList runs down, because when the packet arrives into the client, it clears the loaded vectors what was loaded from the txt files.
    • Just in that case do remove the packet, if you know what you are doing, and 101% sure about it...
    • Without the packet the server will not take care about your atlaswindow anymore, so you have to take care about it by yourself, if you place a new NPC/Warp portal on a map, you have to add it into the text file of the map at clientside. (Easy to write a script which iterates all over the map folder and collect these entries.)
    • I don't provide guide/help how to remove the HEADER_GC_NPC_POSITION packet, it's very basic..
    • Metin2 Dev 2
    • Love 15
  3. M2 Download Center

    This is the hidden content, please
    ( Internal )

    Here ( Required )

    Hi everyone.

     

    The time has come, and sorry for this late.

    What is this? Check the base version on this video:

    Spoiler

     

     

     

    Necessary functions:

     

    It doesn't hurt to know:

    1. Need a bit of knowledge of programming, especially for implementing the python parts.
    2. You need to see the whole python core of metin2 how it works to understand what, why and how.
    3. Regarding to 1. and 2. this release is not for beginners.
    4. It has been tested on test and a live server too, small problems what appeared has been fixed.
    5. MouseWheel is not included, but public on the internet.

     

    Special thank to @masodikbela for testing and @Tatsumaru for the gui elements(wider tab buttons).

    This is the hidden content, please

     

    PS.: If I missed something out from the guide feel free to let me know.

    • Metin2 Dev 78
    • Dislove 1
    • Angry 1
    • Not Good 1
    • Think 1
    • Confused 1
    • Lmao 1
    • Good 13
    • Love 6
    • Love 73
  4. This isn't the best solution against it.

    You just messed with your clients who already bought it from you.

    You should not make business from this with this behavior.

     

    Spoiler

    If I was one of your clients, I would do a refund and delete this in 2 minutes.

    This coding style was ok in 2014-2015, today is 2020.

    png files renamed to tga. Dear lord, bless those who paid for this.

    This is my personal opinion don't take it as an assault.

     

    • Metin2 Dev 1
    • Think 1
    • Good 1
    • Love 1
    • Love 6
  5. announcement_metin2_de_f766b5a5d27d5fea6

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

    • Locales + Protos
    • root(msm+txt files) + dumped metadata w/ builtins
    • New mounts, new costumes
    • Some new gui elements for the upcoming new skills

     

    ps.: the female warrior looks like princess jasmine from aladdin https://metin2.dev/uploads/custom-emoji/emoticons/default_biggrin.png

     

    • Metin2 Dev 39
    • Sad 1
    • Confused 1
    • Lmao 1
    • Good 14
    • Love 1
    • Love 28
  6. I did post already about this here:

     

    At the official the numbers in the txt file are the scale values there, multiplied with 0.01f and there the scale goes.

    I modified a bit the client to show you what I mean:

    d183442972.png

    (ehehe somebody tried to steal my nickname :D)

    Right now the positions of the sashes are calculated by c++ as you can see on the pseudo code above.

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