Jump to content
×
×
  • Create New...

Client Locale String


Recommended Posts

  • Premium
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
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

Link to comment
Share on other sites

  • Premium

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
Share on other sites

  • 2 weeks later...
  • Premium
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
Share on other sites

  • 2 weeks later...
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.

🙂

Link to comment
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
Share on other sites

4 minutes ago, Kafa said:

I tested it and it works perfect.

i know its work fine from server side but i do not know why cant load from client and everything is good 

Edited by LeMo

Lets Go Yes GIF by The Lonely Island

Link to comment
Share on other sites

2 hours ago, Mali61 said:

You could expand the topic for locale_quest.txt and locale_quiz.txt

keep it up, nice work 👌

As far as i remember, at the time when he released this topic those things were not there

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.


  • Activity

    1. 36

      Destroy Item System

    2. 1

      Brillances

    3. 0

      Fusion.org is Looking for Staff Members

    4. 1

      Brillances

    5. 3

      ELONIA2 | PVM-MEDIUM | 11 LANGUAGES | INTERNATIONAL | A NEW STORY

    6. 4

      Spider Queen not spawining in spider dungeon v1

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.