Jump to content

Mali

Honorable Member
  • Posts

    918
  • Joined

  • Days Won

    877
  • Feedback

    100%

Posts posted by Mali

  1. First of all thanks for the topic 🙂

    Feedback:

    Spoiler

    You cannot use bold and italic at the same time with current codes.

    Here is tut for underline + strikeout + using types at the same time:

    Spoiler

     GrpFontTexture.h:

    //Find
    	bool	m_bItalic;
    
    ///Add
    	bool	m_bBold;
    	bool	m_bUnderLine;
    	bool	m_bStrikeOut;
    
    //Find
    	bool Create(const char* c_szFontName, int fontSize, bool bItalic);
    
    ///Change
    	bool Create(const char* c_szFontName, int fontSize, bool bItalic, bool bBold, bool bUnderLine, bool bStrikeOut);

    GrpFontTexture.cpp:

    //Find
    	m_bItalic = false;
    
    ///Add
    	m_bBold = false;
    	m_bUnderLine = false;
    	m_bStrikeOut = false;
    
    //Find
    bool CGraphicFontTexture::Create(const char* c_szFontName, int fontSize, bool bItalic)
      
    ///Change
    bool CGraphicFontTexture::Create(const char* c_szFontName, int fontSize, bool bItalic, bool bBold, bool bUnderLine, bool bStrikeOut)
      
    //Find
      	m_bItalic	= bItalic;
    
    ///Add
    	m_bBold		= bBold;
    	m_bUnderLine	= bUnderLine;
    	m_bStrikeOut	= bStrikeOut;
    
    //Find
    		logFont.lfWeight			= FW_NORMAL;
    
    ///Change
    		logFont.lfWeight			= (m_bBold) ? FW_BOLD : FW_NORMAL;
    
    //Find
    		logFont.lfUnderline 			= FALSE;
    		logFont.lfStrikeOut 			= FALSE;
    
    ///Change
    		logFont.lfUnderline			= (BYTE) m_bUnderLine;
    		logFont.lfStrikeOut			= (BYTE) m_bStrikeOut;

    GrpText.cpp:

    //Find in bool CGraphicText::OnLoad(int /*iSize*/, const void* /*c_pvBuf*/)
    	bool bItalic = false;
    
    ///Add
    	bool bBold = false;
    	bool bUnderLine = false;
    	bool bStrikeOut = false;
    
    //Find
    		if(*p == 'i')
    			bItalic = true;
    
    ///Change
    		bItalic		= strchr(p, 'i') != NULL;
    		bBold		= strchr(p, 'b') != NULL;
    		bUnderLine	= strchr(p, 'u') != NULL;
    		bStrikeOut	= strchr(p, 's') != NULL;
    
    //Find
    	if (!m_fontTexture.Create(strName, size, bItalic))
    		return false;
    
    ///Change
    	if (!m_fontTexture.Create(strName, size, bItalic, bBold, bUnderLine, bStrikeOut))
    		return false;

     

    UI_DEF_FONT	Tahoma:12ibus
    Tahoma: Font Name
    12: Font Size
    i: Italic
    b: Bold
    u: Underline
    s: Strike Out
    
    (The order of the mods(after the size) doesn't matter.)

    Underline:

    4rW18R6.png

    Strike Out:

    xG3o9iw.png

    • Good 1
    • Love 2
  2. 8 minutes ago, Draveniou1 said:

     

     


    You can also do this for greater security, although everything has been tested

    			case SCMD_QUIT:
    				if (d)
    				{
    					d->DelayedDisconnect(2);
    					d->ChatPacket(CHAT_TYPE_COMMAND, "quit");
    				}
    				else
    				{
    					d->SetPhase(PHASE_CLOSE); // If the player tries to make a bug then the player will eat kick :)
    				}
    				break;

     

    It's getting more and more interesting...

    • Sad 1
    • Lmao 12
    • Good 1
    • Love 1
  3. 2 hours ago, Maze said:

    @Mali flash not work

    Syserr:
     

    0924 16:27:16495 :: uiInventory:1679: RuntimeWarning: tp_compare didn't return -1 or -2 for exception

    0924 16:27:16495 :: Traceback (most recent call last):

    0924 16:27:16495 ::   File "game.py", line 838, in RefreshInventory

    0924 16:27:16495 ::   File "interfaceModule.py", line 692, in RefreshInventory

    0924 16:27:16495 ::   File "uiInventory.py", line 840, in RefreshItemSlot

    0924 16:27:16495 ::   File "uiInventory.py", line 765, in RefreshBagSlotWindow

    0924 16:27:16495 ::   File "uiInventory.py", line 1679, in __HighlightSlot_Refresh

    0924 16:27:16495 :: SystemError
    0924 16:27:16495 :: : 
    0924 16:27:16495 :: ..\Objects\longobject.c:998: bad argument to internal function

    FIXED

  4. 1 hour ago, TMP4 said:

    So a year passed and my 2 false positive increased to 16

    This is the hidden content, please
    .

    (Still not 38 like the guy above but it's high enough..)

    Anyone have any idea what part of the code cause these alerts or how to fix?

    While it's the best open source patcher it's not really usable now, because the 16 hit contains Malwarebytes/Microsoft/ESET-NOD32/GData and those are pretty popular.

    the code does not cause this, I had the same problem before at visual studio.

    It is not patcher's fault.

    https://answers.microsoft.com/en-us/windows/forum/all/visual-studio-c-script-detected-as-trojan-virus/f5c8962c-0787-4594-8d1e-3ba5475b7892

    • Metin2 Dev 11
    • Think 1
    • Good 4
    • Love 2
  5. 6 minutes ago, Abel(Tiger) said:

    Good job 👍

    The ideea with geting the port from db it's nice (I think wom started this ideea some time ago), but not very good when we speak about a big server that use the db a lot (longer times when changing the channel). My advice it's to send all other channels info to every channel at boot and that will help you with more than change channel (now the current channel recieve the info about ch99 and other cores of the current channel if I'm not mistaken).

    The IsHack check is bad placed there and it can cause big problem for the server (players start the timer and jump over the check but in those 10 seconds they can open safebox and other stuff), also I recommend you use both CanWarp and IsHack checks because people skip one or the other when they implement new stuff 😂

     

    trying to make gf style xd

    mNJFnOE.png

    also db check is fine for me. that channel may not be online at that time.

  6. M2 Download Center

    This is the hidden content, please
    ( Internal )

    This is the hidden content, please

    Client side is from 2018 official root.

    It checks the status of the channel from db and gets the port and addr.

    It also checks if that map exists in that channel(config).

    *Info: This is currently disabled on official servers.

    • Metin2 Dev 247
    • kekw 2
    • Eyes 1
    • Dislove 2
    • Angry 1
    • Not Good 1
    • Sad 1
    • Think 1
    • Confused 2
    • Scream 5
    • Good 62
    • Love 14
    • Love 137
  7. M2 Download Center

    This is the hidden content, please
    ( Internal )

    This is the hidden content, please

    Client side is from 2018 official root.

    Mount transmutation 2018 didn't exist in root, I made minor edits.

    However, to use mount transmutation, you need to edit it according to your own mount system.

    I created a new slot effect so that it doesn't interfere with other systems (highlight) etc.

    You can use this sloteffect and the diffusecolor function elsewhere.

    ***Add this before adding this system:

    Spoiler

     

     

    • Metin2 Dev 212
    • Eyes 3
    • Dislove 1
    • Angry 2
    • Not Good 1
    • Cry 2
    • Think 3
    • Confused 2
    • Good 54
    • Love 9
    • Love 117
  8. 34 minutes ago, VegasForPresident said:

     

     

    Everything is implemented correct. I use gcc8 & FreeBSD 13

     

    if i comment 

    	static constexpr BYTE aiAttrPercentTable[ITEM_ATTRIBUTE_MAX_LEVEL] = { 0, 10, 40, 35, 15 };
    	for (BYTE c = __GetAttributeCount(); c < GetAttributeCount(); c++)
    	{
    		int iAttrLevelPercent = number(1, 100);
    		BYTE i;
    
    		for (i = 0; i < ITEM_ATTRIBUTE_MAX_LEVEL; ++i)
    		{
    			if (iAttrLevelPercent <= aiAttrPercentTable[i])
    				break;
    
    			iAttrLevelPercent -= aiAttrPercentTable[i];
    		}
    
    		__PutAttributeWithLevel(i + 1);
    	}

     

    in void CItem::GetSelectAttr(TPlayerItemAttribute(&arr)[ITEM_ATTRIBUTE_MAX_NUM])

     

    The core crash is gone but also there is no new attributes on the right side

     

    Edit: I Solved the problem. I Changed: 

     

    		for (BYTE i = 0; i < MAX_APPLY_NUM; ++i)
    		{
    			const TItemAttrTable& r = g_map_itemAttr[i];
    
    			if (r.bMaxLevelBySet[iAttributeSet] && !__HasAttr(i))
    			{
    				avail.push_back(i);
    				total += r.dwProb;
    			}
    		}

    with

     

    		for (int i = 0; i < MAX_APPLY_NUM; ++i)
    		{
    			const TItemAttrTable& r = g_map_itemAttr[i];
    
    			if (r.bMaxLevelBySet[iAttributeSet] && !HasAttr(i))
    			{
    				avail.push_back(i);
    				total += r.dwProb;
    			}
    		}

     

     

    Thanks for not helping 😞 

    It's not fix, you are using wrong function.

    check my last update and tell the result

    • Metin2 Dev 1
  9. 6 minutes ago, zsoltiabeka10 said:

    @ Mali A small thing that I've found out with the InitializeMailBoxTable() function:
    If you have it like in the repo, whenever you try /reload the mailbox table will fail and you can't reload your protos and stuff because it returns false if the table isn't empty.

    I changed it to skip loading it into the pointer if it already has data (from booting up the server).
    Because clearing the memory and inserting into it again caused me attachments reappear so that method didn't work for me.

    Maybe that could be a solution if anyone else having a problem like that.

    //repo
    bool CClientManager::InitializeMailBoxTable()
    {
    	if (m_map_mailbox.empty() == false)
    		return false;
    
    	.....
    
    }
    
    // change ?
    bool CClientManager::InitializeMailBoxTable()
    {
    	//if (m_map_mailbox.empty() == false)
    		//return false;
    
    	if (!m_map_mailbox.empty())
    		return true;
    
    	....
     }

     

    Reload?

    That function for only boot. Why are you reloading?

    edit: I get it, for protos. I will change thanks

    • Metin2 Dev 1
    • muscle 1
    • Love 1
  10. 7 minutes ago, VegasForPresident said:

    Does anyone know why i'm experiencing a kick after each warp? Besides that everything works perfect.

     

    I receive this error in game core: 

     

    SYSERR: Sep 19 18:00:13 :: Analyze: login phase does not handle this packet! header 3
    SYSERR: Sep 19 18:00:13 :: Process: UNKNOWN HEADER: 47, LAST HEADER: 3(109), REMAIN BYTES: 11, fd: 22
    SYSERR: Sep 19 18:02:37 :: Analyze: login phase does not handle this packet! header 3
    SYSERR: Sep 19 18:02:37 :: Process: UNKNOWN HEADER: 47, LAST HEADER: 3(104), REMAIN BYTES: 11, fd: 22
    SYSERR: Sep 19 18:05:16 :: Analyze: login phase does not handle this packet! header 3
    SYSERR: Sep 19 18:05:16 :: Process: UNKNOWN HEADER: 47, LAST HEADER: 3(100), REMAIN BYTES: 11, fd: 22

     

    @ Mali I KNOW YOUR DOING PARTY AT THE MOMENT BRO BUT IS IT JUST ME ?  WHY I DO GET THIS ERROR 😞 ;( 

    hmm🤔

     

    I think the problem is at your packets.

     

    for better results add it to clean files and see what happens.

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