Jump to content

Klaus

Active Member
  • Posts

    90
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Klaus

  1. I updated based on the tutorials here on the forum, to compile clientsource in visual studio 2022 and C++20, the compilation was error-free and the game works well, however, after 15/20h with the client open, if you are running items in switchbot or macro (automatically populate potions id 70020), the client crashes (stops working), allocates memory until it reaches approximately 4GB and ends with the error "Microsoft Visual C++ Runtime Libray - Runtime Error!"

    No other errors were detected, there are no errors in the syserr or in the compilation, in debug mode there are no warnings either. Anyone who has experienced something similar or has any idea what could be causing this problem, I have already checked by comparing all the files individually with other sources and no discrepancies were found.

    I thank you for your attention.

  2. I posted it a while ago and it was causing bugs quite frequently (the visuals of the skills didn't come out, the complete "damage" didn't come out), after this last update to the post, I applied the correction and it improved significantly, I fixed the ninja problem and the effects are hidden.

    However, the problems as before continue to occur (the visuals of the skills do not appear, the complete "damage" does not appear), he noticed that the problems only occurred when there are 20/40 players on a map, especially during a war/event . In tests with few players there is no problem. If there is any kind of solution, I would appreciate it. Mainly using effects on weapons/armor, this ninja bug fix is essential.

    Edit: After applying correction, kingdom "flag" also disappears, I believe it should be maintained.

    .png

  3. Bug:.png

    I'm having a problem with my files and I have no idea what could be causing it, the damage values come out normal, but if I keep moving the screen or in "wars" with many players, the damage starts to come out with missing numbers.

    In the example, instead of showing "7xx38", it shows "7 38", has anyone experienced this or have any idea what might be causing it?

    I thank you for your attention!

    • Love 1
  4. The error occurs randomly, but always with the same header, I followed the steps in the guide in the link above but without success, I tried to update the buf in the function at the end to send the correct size, but without success. I thank the attention.

    in questpc.cpp:

     

    	void PC::SendQuestInfoPakcet()
    	{
    		assert(m_iSendToClient);
    		assert(m_RunningQuestState);
    
    		packet_quest_info qi;
    
    		qi.header = HEADER_GC_QUEST_INFO;
    		qi.size = sizeof(struct packet_quest_info);
    		qi.index = m_RunningQuestState->iIndex;
    		qi.flag = m_iSendToClient;
    #ifdef ENABLE_QUEST_CATEGORY
    		qi.c_index = CQuestManager::instance().ReadQuestCategoryFile(qi.index);
    #endif
    
    		TEMP_BUFFER buf;
    		buf.write(&qi, sizeof(qi));
    
    		if (m_iSendToClient & QUEST_SEND_ISBEGIN)
    		{
    			BYTE temp = m_RunningQuestState->bStart?1:0;
    			buf.write(&temp,1);
    			qi.size+=1;
    
    			sys_log(1, "QUEST BeginFlag %d", (int)temp);
    		}
    		if (m_iSendToClient & QUEST_SEND_TITLE)
    		{
    			m_RunningQuestState->_title.reserve(30+1);
    			buf.write(m_RunningQuestState->_title.c_str(), 30+1);
    			qi.size+=30+1;
    
    			sys_log(1, "QUEST Title %s", m_RunningQuestState->_title.c_str());
    		}
    		if (m_iSendToClient & QUEST_SEND_CLOCK_NAME)
    		{
    			m_RunningQuestState->_clock_name.reserve(16+1);
    			buf.write(m_RunningQuestState->_clock_name.c_str(), 16+1);
    			qi.size+=16+1;
    
    			sys_log(1, "QUEST Clock Name %s", m_RunningQuestState->_clock_name.c_str());
    		}
    		if (m_iSendToClient & QUEST_SEND_CLOCK_VALUE)
    		{
    			buf.write(&m_RunningQuestState->_clock_value, sizeof(int));
    			qi.size+=4;
    
    			sys_log(1, "QUEST Clock Value %d", m_RunningQuestState->_clock_value);
    		}
    		if (m_iSendToClient & QUEST_SEND_COUNTER_NAME)
    		{
    			m_RunningQuestState->_counter_name.reserve(16+1);
    			buf.write(m_RunningQuestState->_counter_name.c_str(), 16+1);
    			qi.size+=16+1;
    
    			sys_log(1, "QUEST Counter Name %s", m_RunningQuestState->_counter_name.c_str());
    		}
    		if (m_iSendToClient & QUEST_SEND_COUNTER_VALUE)
    		{
    			buf.write(&m_RunningQuestState->_counter_value, sizeof(int));
    			qi.size+=4;
    
    			sys_log(1, "QUEST Counter Value %d", m_RunningQuestState->_counter_value);
    		}
    		if (m_iSendToClient & QUEST_SEND_ICON_FILE)
    		{
    			m_RunningQuestState->_icon_file.reserve(24+1);
    			buf.write(m_RunningQuestState->_icon_file.c_str(), 24+1);
    			qi.size+=24+1;
    
    			sys_log(1, "QUEST Icon File %s", m_RunningQuestState->_icon_file.c_str());
    		}
    
    		CQuestManager::instance().GetCurrentCharacterPtr()->GetDesc()->Packet(buf.read_peek(),buf.size());
    
    		m_iSendToClient = 0;
    
    	}

     

  5. PF is configured, however, my website linked to CloudFlare is always blocked, even adding it to the exclusions, already excluding normal IPs, such as my own, the exclusion works normally, does anyone have any idea what I could be doing wrong or how I can How do I grant access to CloudFlare so that the website can function later?

    PF blocks all connections, except from the player table

    pf.conf

    # Change the value to reflect your public interface. You can see this with ifconfig.
    ext_if="em0"
    
    # Ports used for services
    service_ports="{ 22, 80 }"
    
    # Ports used by Metin2
    game_ports="{ 15001 }"
    
    # IP addresses that should override the firewall rules, such as your web server.
    table <trusted_hosts> persist file "/var/db/trusted_hosts"
    table <cloudflare> persist file "/var/db/cloudflare_ips"
    table <player_ips> persist file "/var/db/player_ips"
    
    set block-policy drop
    set optimization aggressive
    set skip on lo
    
    scrub on $ext_if reassemble tcp no-df random-id
    
    antispoof quick for { lo0 $ext_if }
    
    block in log
    
    # Rate limits, trial and error
    
    pass in quick on $ext_if proto tcp to any port $service_ports
    
    pass in quick on $ext_if proto {tcp,udp} from <player_ips> to any port $game_ports keep state
    pass in quick on $ext_if proto {tcp,udp} from <trusted_hosts>
    pass in quick on $ext_if proto {tcp,udp} from <cloudflare>
    
    pass in inet proto icmp all icmp-type echoreq
    
    pass out all keep state
    pass out on $ext_if all modulate state
    

    cloudflare_ips

    173.245.48.0/20
    103.21.244.0/22
    103.22.200.0/22
    103.31.4.0/22
    141.101.64.0/18
    108.162.192.0/18
    190.93.240.0/20
    188.114.96.0/20
    197.234.240.0/22
    198.41.128.0/17
    162.158.0.0/15
    104.16.0.0/13
    104.24.0.0/14
    172.64.0.0/13
    131.0.72.0/22

     

  6. https://metin2.download/video/fwGP2CA3YPZ3gOd15D9j46DzkIG17j8a/.mp4

    On my server, when I'm hitting normally (tapas, without using skills), the character doesn't have that kick/pull that in the video we can see, that when one hits he ends up "pulling" the other character, does anyone have any idea how I can solve this or what responsible function?

    I thank you for your attention!

  7. in input_main.cpp check 

    SYSERR: Jun 7 14:26:57 :: SyncPosition: Too many SyncPosition Count(20) from Name(sdg)

    https://metin2.download/picture/gSXqz5tI6nlNB6kD7MblOne9w3BtWuWk/.png

    Personally, I left the log only for analysis purposes and I disabled the diesconnect when it exceeds the pre-established limit, maybe it could be your case.

  8. Hello, I randomly get this error when receiving a private message within the game, I have already analyzed both packets, to check if there was any incompatibility between them (client/game), unfortunately, I was not successful. Does anyone have any ideas/suggestions as to what could be causing it, or if they've had this problem and managed to solve it?!

    I don't have new systems that could cause any conflicts, the source is very clean and with _IMPROVED_PACKET_ENCRYPTION_ disabled. I don't get any other package errors, just this one.

    Quote

    1110 08:55:17250 :: Phase Game does not handle this header (header: 34, last: 3, 34)
    1110 08:55:17297 :: Unknown packet header: 105, last: 3 34


    Anyway, thanks for everyone's attention!

  9. Hello, my client is closing many times, mainly after a teleport or receiving a private message, when he clicks to open, the client is terminated. I don't have any new system related to packages with error, I've already checked variables and packages several times, compared with several other sources and I haven't had any success. I also searched and couldn't find anything about it. If anyone can help me, it doesn't have to be a fix, but where the problem is, I'd be very grateful. If need be, I'm willing to pay for the correction.

    Here are some logs I saved:

    Quote

     

    Phase Game does not handle this header (header: 81, last: 45, 81)

    528 21:55:26441 :: Phase Game does not handle this header (header: 34, last: 114, 34)
    0528 21:55:26780 :: Unknown packet header: 101, last: 114 34

    0530 21:48:11876 :: Phase Game does not handle this header (header: 34, last: 3, 34)
    0530 21:48:12275 :: Unprocessed packet header 32, state Game

    0530 21:48:12666 :: Unknown packet header: 182, last: 34 32

    0805 10:17:49861 :: Phase Game does not handle this header (header: 34, last: 171, 34)
    0805 10:17:50149 :: Unknown packet header: 103, last: 34 46

     

    Obs.: I even found some things of corrections etc, but without success.

     

    Edit: 34 is present in all errors basically, being the one that occurs most frequently (when receiving private message, pm)

     

    Anyway, thank you so much in advance! =D

  10.  

    FreeBSD PF system installed and working, however, they are managing to bring down the database, does anyone have any idea what it could be?

     

    error:

    Quote

    Jul  3 21:46:25 :: [PLAYER_LOAD] Load from PlayerDB pid[0]

    Jul  3 21:46:25 :: [PLAYER_LOAD] Load from PlayerDB pid[0]

    Jul  3 21:46:25 :: [PLAYER_LOAD] Load from PlayerDB pid[0]

    Jul  3 21:46:25 :: [PLAYER_LOAD] Load from PlayerDB pid[0]

    Jul  3 21:46:25 :: [PLAYER_LOAD] Load from PlayerDB pid[0]

    Jul  3 21:46:25 :: [PLAYER_LOAD] Load from PlayerDB pid[0]

    Jul  3 21:46:25 :: [PLAYER_LOAD] Load from PlayerDB pid[0]

    Jul  3 21:46:25 :: [PLAYER_LOAD] Load from PlayerDB pid[0]

    Jul  3 21:46:25 :: [PLAYER_LOAD] Load from PlayerDB pid[0]

    Jul  3 21:46:25 :: [PLAYER_LOAD] Load from PlayerDB pid[0]

    SYSERR: Jul  3 21:46:54 :: safe_create: calloc failed [12] Cannot allocate memory
    SYSERR: Jul  3 21:46:54 :: buffer_new: calloc failed [12] Cannot allocate memory
    SYSERR: Jul  3 21:47:01 :: Load:  DirectQuery failed(SELECT login FROM block_exception)
    SYSERR: Jul  3 21:47:41 :: Load:  DirectQuery failed(SELECT login FROM block_exception)

    DXCN1g5.png

    6Z02rno.png

     

     

  11. IJR9yaj.png

    I've reviewed the codes a few times, but I couldn't get the chat to work, does anyone have any idea what might be happening, or know how I can fix it?

    Obs.: In the "locale_game.txt" messages it is as if there are no spaces between the words, I don't know if this has something to do with the main problem.

    In advance, I am grateful for your attention.

    FIX: 

    This is the hidden content, please

    Obs.: Working perfectly, with the exception of the accents in chat all, but in normal chat it works, in case anyone has a fix.

    • Metin2 Dev 76
    • kekw 1
    • Confused 1
    • Good 26
    • Love 2
    • Love 24
  12. It works perfectly! Is it possible to change it to when the item is locked and click on it to pick up? In other words, leave the filter only on the 'Z' key?

     

    Edit: 

    I would like to make more precise checks, looking at the item's subtype, how can I use type and subtype at the same time?

    IsWearableFlag(CItemData::WEARABLE_SHIELD): return 9;

  13. SYSERR: Jul  8 19:28:30 :: DestroyCharacter: [CHARACTER_MANAGER::DestroyCharacter] <Factor> 7719 not found
    SYSERR: Jul  8 19:28:30 :: DestroyCharacter: [CHARACTER_MANAGER::DestroyCharacter] <Factor> 7718 not found
    SYSERR: Jul  8 19:28:30 :: DestroyCharacter: [CHARACTER_MANAGER::DestroyCharacter] <Factor> 7716 not found
    SYSERR: Jul  8 19:28:30 :: DestroyCharacter: [CHARACTER_MANAGER::DestroyCharacter] <Factor> 7721 not found
    SYSERR: Jul  8 19:28:30 :: DestroyCharacter: [CHARACTER_MANAGER::DestroyCharacter] <Factor> 7720 not found
    SYSERR: Jul  8 19:28:30 :: DestroyCharacter: [CHARACTER_MANAGER::DestroyCharacter] <Factor> 7717 not found

    I'm getting this error when doing some dungeons, I still haven't figured out what's causing it, does anyone have any idea what it might be?

    * Sometimes the channel went down, in the debug it appears that it is in the function below, but I didn't make any changes to the files.

     

    EVENTFUNC(save_event)
    {
    	char_event_info* info = dynamic_cast<char_event_info*>( event->info );
    	if ( info == NULL )
    	{
    		sys_err( "save_event> <Factor> Null pointer" );
    		return 0;
    	}
    
    	LPCHARACTER ch = info->ch;
    
    	if (ch == NULL) { // <Factor>
    		return 0;
    	}
    	sys_log(1, "SAVE_EVENT: %s", ch->GetName());
    	ch->Save();
    	ch->FlushDelayedSaveItem();
    	return (save_event_second_cycle);
    }

     

  14. 5 hours ago, DrTurk said:

    char.cpp --> remove that:

    m_dwKillerPID = 0;

    char.h --> remove that:

    DWORD				m_dwKillerPID;

     

    char_battle.cpp --> remove/change that:

    if (!pkKiller && m_dwKillerPID)
    		pkKiller = CHARACTER_MANAGER::instance().FindByPID(m_dwKillerPID);
    
    	m_dwKillerPID = 0;

    change that:

    if (GetHP() <= 0)
    	{
    		Stun();
    
    		if (pAttacker && !pAttacker->IsNPC())
    			m_dwKillerPID = pAttacker->GetPlayerID();
    		else
    			m_dwKillerPID = 0;
    	}

    to this:

    if (GetHP() <= 0)
    	{
    		Dead(pAttacker);
    	}

     

    Solved! (Is there any risk of causing an error/bug?)

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