Jump to content

Recommended Posts

  • Active Member

M2 Download Center

This is the hidden content, please
  ( Internal )

This is the hidden content, please
  ( GitHub )

 

I would not recommend using this as it's missing many features, head over to Mali's release for an updated version.

 

 

This is the hidden content, please

Edited by Sonitex
Added very very very important topic warning.
  • Metin2 Dev 264
  • kekw 3
  • Eyes 2
  • Dislove 4
  • Angry 4
  • Not Good 2
  • Sad 1
  • Cry 3
  • Think 6
  • Confused 8
  • Lmao 2
  • Good 105
  • muscle 1
  • Love 15
  • Love 283
Link to comment
https://metin2.dev/topic/25014-client-locale-string/
Share on other sites

  • Active Member
6 hours ago, newreboot said:

Please can u explain how to use it?

I already compiled the source, and added the locale_string on client, But nothing changed. still reading from my locale_string on serverside...

 

You need to use LocaleChatPacket instead of ChatPacket. 

Link to comment
https://metin2.dev/topic/25014-client-locale-string/#findComment-133869
Share on other sites

			pkChar->LocaleChatPacket(CHAT_TYPE_INFO, "%d %s %s", m_vec_quiz[i][j].level, m_vec_quiz[i][j].Quiz, m_vec_quiz[i][j].answer ? LC_TEXT("Âü") : LC_TEXT("°ÅÁþ"));
		}
	}

	pkChar->LocaleChatPacket(CHAT_TYPE_INFO, LC_TEXT("ÃÑ ÄûÁî ¼ö: %d"), c);

well i changed the ChatPacket to LocaleChatPacket and give me error on copilation.

The error:

spacer.png

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
https://metin2.dev/topic/25014-client-locale-string/#findComment-133879
Share on other sites

  • Active Member

Yeah because you have to pass index of the string as an argument. In your case, the bottom part of your code should look like this:

 

pkChar->ChatPacket(CHAT_TYPE_INFO, 880, LC_TEXT("Total number of the Quiz: %d"), c);	

Or:

pkChar->ChatPacket(CHAT_TYPE_INFO, 880, "Total number of the Quiz: %d", c);	

 

Also, this does not support quiz strings. Those are stored in a separate file called locale_quiz.txt and additional changes are needed for it to be usable. This release only supports strings that are inside locale_string text files.

Edited by Sonitex
Link to comment
https://metin2.dev/topic/25014-client-locale-string/#findComment-133881
Share on other sites

  • 2 weeks later...
  • Active Member
5 minutes ago, DrTurk said:

@Sonitex

How do you declare from which locale_string.txt it should load the information?

My locale_string.txt is located in /locale/de


1217 19:56:49074 :: CPythonLocaleString::FindLocaleString: cannot find "1";

 

 

It should be automatically loaded from an active locale path ?

  • Love 1
Link to comment
https://metin2.dev/topic/25014-client-locale-string/#findComment-134259
Share on other sites

  • 2 weeks later...
  • Premium
On 12/3/2020 at 11:51 AM, Sonitex said:

M2 Download Center

This is the hidden content, please
  ( Internal )

This is the hidden content, please
  ( GitHub )

 

Hidden Content

 

Metin2 general format specifiers have been added such as %d, %u, %s, %lu, %lld and %f. If you wish to add others, edit the table. Flags, precision and width parameters have not been implemented because they weren't really used besides floating numbers which are always set to 2 decimals places precision. You can also use this as a template for quest strings, which have been moved to client side on official servers.

 

Chat function takes 3 main arguments:

 

You can modify it's structure to your likings. You can use the default structure which takes chat type and string as arguments and find index of the string in the function it self. Without string index, client will not be able to find the right string. Without string, server will not be able to find format specifiers and pull arguments to send them to client. 

 

    • Chat type,
    • String index,
    • String.

 

thanks but can you make an example about how to use this? for the new people.

  • Metin2 Dev 1
  • Love 1
Link to comment
https://metin2.dev/topic/25014-client-locale-string/#findComment-134640
Share on other sites

  • 5 weeks later...
ChatPacket(CHAT_TYPE_INFO,LC_TEXT ("You can't drop this item because is binded!"));

in that one i did that for test it from locale 

ChatPacket(CHAT_TYPE_INFO, 22219, "dd");

but i got error so how i can do it for that to make it call from locale

i fixed this error i was must use LocaleChatPacket

 

new error

CPythonLocaleString::FindLocaleString: cannot find "22219";

and i have 22219 in my srting 

Edited by LeMo

Lets Go Yes GIF by The Lonely Island

Link to comment
https://metin2.dev/topic/25014-client-locale-string/#findComment-135744
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.