coadapute123 497 Posted June 3, 2023 Share Posted June 3, 2023 So, we can change: ChatPacket(CHAT_TYPE_INFO, LC_TEXT("전투가 시작 되어 취소 되었습니다.")); To: ChatPacket(CHAT_TYPE_INFO, "[LS;485]"); Link to comment Share on other sites More sharing options...
aberious 4 Posted July 7, 2023 Share Posted July 7, 2023 (edited) I have the following problem with some languages, would someone know and could help how to solve it? thanks to everyone who contributes https://metin2.download/picture/d9KtG2s6I5mU5lLl172SZc1p0ucoL336/.png Edited July 7, 2023 by Metin2 Dev International Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Kris Stiv 1 Posted October 3, 2023 Share Posted October 3, 2023 @ Mali The official server added support for COLOR RGB, could you update the function? 1 Link to comment Share on other sites More sharing options...
Honorable Member Mali 41895 Posted October 3, 2023 Author Honorable Member Share Posted October 3, 2023 UPDATE: SPECIAL COLOR 7 1 2 4 Link to comment Share on other sites More sharing options...
Phanes 7 Posted October 4, 2023 Share Posted October 4, 2023 (edited) this working for chat_type_notice / talking too ? or only chat_type_info ? Edited October 4, 2023 by Flr x Link to comment Share on other sites More sharing options...
jegarba1996 1 Posted October 17, 2023 Share Posted October 17, 2023 Hi dear, is there an example of where the values are changed? SN;Vvnum PSN MN IN on the other hand I have a problem in SendNoticeMap Spoiler 1 Link to comment Share on other sites More sharing options...
Patron 0 Posted January 29 Share Posted January 29 (edited) Is there a solution? Edited January 29 by Metin2 Dev International Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Debloat 88 Posted January 29 Share Posted January 29 (edited) 15 minutes ago, Patron said: Is there a solution? You did the server side wrong. Example: ChatPacket(CHAT_TYPE_INFO, "[LS;812;%s]"); You need the %s argument to pull a value from the function. Edited January 29 by Metin2 Dev International Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Patron 0 Posted January 30 Share Posted January 30 (edited) On 6/3/2023 at 2:02 PM, coadapute123 said: So, we can change: ChatPacket(CHAT_TYPE_INFO, LC_TEXT("전투가 시작 되어 취소 되었습니다.")); To: ChatPacket(CHAT_TYPE_INFO, "[LS;485]"); ch->ChatPacket(CHAT_TYPE_INFO, ("[LS;711 %s]"), LC_ITEM_NAME(bio_data[level][1], ch->GetLanguage())); It doesn't work, it gives an error Edited January 30 by Patron Link to comment Share on other sites More sharing options...
TheEnd 3 Posted January 30 Share Posted January 30 (edited) @ Mali The official server added support for hyperlink Edited January 30 by TheEnd 1 Link to comment Share on other sites More sharing options...
Debloat 88 Posted February 1 Share Posted February 1 On 1/30/2024 at 6:42 PM, Patron said: ch->ChatPacket(CHAT_TYPE_INFO, ("[LS;711 %s]"), LC_ITEM_NAME(bio_data[level][1], ch->GetLanguage())); It doesn't work, it gives an error You are doing "[LS;711 %s]" wrong. It must be formatted as "[LS;711;%s]" Link to comment Share on other sites More sharing options...
Honorable Member Mali 41895 Posted February 2 Author Honorable Member Share Posted February 2 (edited) [Experimental] Hyperlink Edited February 2 by Metin2 Dev International Core X - External 2 Internal 1 1 1 Link to comment Share on other sites More sharing options...
TheEnd 3 Posted February 3 Share Posted February 3 On 2/2/2024 at 6:03 PM, Mali said: [Experimental] Hyperlink not work with arabic language Link to comment Share on other sites More sharing options...
Filachilla 29 Posted February 4 Share Posted February 4 On 2/2/2024 at 5:03 PM, Mali said: [Experimental] Hyperlink Pretty cool 1 Link to comment Share on other sites More sharing options...
Honorable Member Mali 41895 Posted February 6 Author Honorable Member Share Posted February 6 On 2/3/2024 at 7:19 PM, TheEnd said: not work with arabic language Update: 1 1 1 2 Link to comment Share on other sites More sharing options...
Premium mackabro2 216 Posted February 7 Premium Share Posted February 7 (edited) Global chat doesn't work. Edited February 7 by Metin2 Dev International Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Honorable Member Mali 41895 Posted February 7 Author Honorable Member Share Posted February 7 (edited) 1 hour ago, mackabro2 said: Global chat doesn't work. Fixed, wait @ AZICKO for update. Edited February 7 by Mali 1 Link to comment Share on other sites More sharing options...
Management AZICKO 7349 Posted February 8 Management Share Posted February 8 (edited) 7 hours ago, Mali said: Fixed, wait @ AZICKO for update. Edited February 8 by Metin2 Dev International Core X - External 2 Internal 1 Scamming ? Reselling ? metin2.download | metin2.dev | fr.metin2.dev | metin2dev.org | metin2.top | top-metin2.org Link to comment Share on other sites More sharing options...
Debloat 88 Posted February 8 Share Posted February 8 (edited) I believe you've made a small typo in the tutorial. In experimental -> 1.Svn -> Server -> game -> src -> input_main.cpp This: //Find in int CInputMain::Chat(LPCHARACTER ch, const char * data, size_t uiBytes) #if defined(__BL_CLIENT_LOCALE_STRING__) pack.bCanFormat = false; #endif ///Change #if defined(__BL_CLIENT_LOCALE_STRING__) pack.bCanFormat = (hyperlinks > 0); #endif Should be this: //Find in int CInputMain::Chat(LPCHARACTER ch, const char * data, size_t uiBytes) #if defined(__BL_CLIENT_LOCALE_STRING__) pack_chat.bCanFormat = false; #endif ///Change #if defined(__BL_CLIENT_LOCALE_STRING__) pack_chat.bCanFormat = (hyperlinks > 0); #endif Edited February 8 by Debloat typo 1 Link to comment Share on other sites More sharing options...
damzaffari 6 Posted February 22 Share Posted February 22 Can you help-me with the BR locale_string? I have Item_names and mob_names in PT-BR if someone needs, let me know Link to comment Share on other sites More sharing options...
Wintersun 87 Posted February 29 Share Posted February 29 (edited) On 2/8/2024 at 12:35 AM, Mali said: Fixed, wait @ AZICKO for update. Nevermind, Missed something/ Edited February 29 by Wintersun Link to comment Share on other sites More sharing options...
kza54 0 Posted March 4 Share Posted March 4 (edited) Excuse me, I posted a thank you message here for access to the download links, and my post was deleted, may I know why? While in addition I have a problem with this system I don't even know if I have the right to post now. My problem with this system : In my client I added the "say(locale_quest(14188))" (Please excuse me in advance if it is written in French in my locale_quest.txt because I am French) Spoiler 14188 Veuillez d'abord invoquer votre buffeuse. 14189 Veuillez mettre le nom de votre choix. 14190 Félicitations, votre nom de buff a changé. 14191 Une erreur s'est produite. Veuillez réessayer.. 14196 Veuillez essayer un autre nom. 14192 Buffi Dragon 14193 Pouvoir du Dragon Buff 14194 Buffi Vitesse du vent 14195 Attaque renforcée de Buffi 14197 Vous n'avez aucune compétence de buff pour avoir besoin d'une mise à niveau. 14198 Veuillez sélectionner une compétence. Server side : Spoiler quest __buffi__ begin state start begin when 952006.use begin say_title(item_name(952006)) say("") if pc.get_buffi_count() < 1 then say(locale_quest(14188)) return end say(locale_quest(14189)) local result = pc.set_buffi_name(tostring(input())) say_title(item_name(952006)) say("") if result == 99 then say(locale_quest(14190)) item.set_count(item.get_count()-1) elseif result == 0 then say(locale_quest(14191)) elseif result == 1 or result == 2 then say(locale_quest(14196)) end end function BuildSkillList() local skillIdxList = {164, 165, 166, 167} local skillNameList = {locale_quest(14192), locale_quest(14193), locale_quest(14194), locale_quest(14195)} local ret_vnum_list = {} local ret_name_list = {} table.foreach(skillIdxList, function(i, skillIdx) local skillLevel = pc.get_skill_level(skillIdx) if skillLevel >= 30 and skillLevel < 40 then table.insert(ret_vnum_list, skillIdx) table.insert(ret_name_list, skillNameList[i]) end end) return {ret_vnum_list, ret_name_list} end when 952005.use begin if get_time() < pc.getqf("next_time_buffi") then if pc.is_skill_book_no_delay() then say_title(locale_quest(9913)) say(locale_quest(9935)) wait() else say_title(locale_quest(9913)) say(locale_quest(9936)) return end end local result = __buffi__.BuildSkillList() local vnum_list = result[1] local name_list = result[2] say_title(item_name(952005)) say("") if table.getn(vnum_list) == 0 then say(locale_quest(14197)) return end say(locale_quest(14198)) local menu_list = {} table.foreach(name_list, function(i, name) table.insert(menu_list, name) end) table.insert(menu_list, locale_quest(1117)) local s=select_table(menu_list) if table.getn(menu_list) == s then return end local skill_name=name_list[s] local skill_vnum=vnum_list[s] local skill_level = pc.get_skill_level(skill_vnum) local cur_alignment = pc.get_real_alignment() local need_alignment = 1000+500*(skill_level-30) say_title(locale_quest(9913)) say(locale_quest(9942)) if cur_alignment<-19000+need_alignment then say_reward(locale_quest(9914)) return end if cur_alignment<0 then say_reward(string.format(locale_quest(9915), need_alignment, need_alignment*2)) say_reward(locale_quest(9916)) need_alignment=need_alignment*2 elseif cur_alignment<need_alignment then say_reward(string.format(locale_quest(9917), need_alignment)) say_reward(locale_quest(9918)) else say_reward(string.format(locale_quest(9917), need_alignment)) end local s= select(locale_quest(10065), locale_quest(10066)) if s==2 then return end if get_time() < pc.getqf("next_time_buffi") then if pc.is_skill_book_no_delay() then pc.remove_skill_book_no_delay() else say_title(locale_quest(9913)) return end end pc.setqf("next_time_buffi", get_time() + time_hour_to_sec(number(8, 12))) if need_alignment>0 then if pc.count_item(952005) > 0 then local title=string.format(locale_quest(9941), name_list[s]) if pc.learn_grand_master_skill(skill_vnum) then pc.change_alignment(-need_alignment) say_title(title) say_reward(locale_quest(9923)) if 40 == pc.get_skill_level(skill_vnum) then say(locale_quest(9925)) say(string.format(locale_quest(9926), name_list[s])) say(locale_quest(9927)) else say(locale_quest(9928)) say(string.format(locale_quest(9929), name_list[s], skill_level-30+1+1)) end say_reward(locale_quest(9930)) say_reward(string.format(locale_quest(9931), need_alignment)) else say_title(title) say_reward(locale_quest(9932)) say(locale_quest(9933)) say_reward(locale_quest(9934)) pc.change_alignment(-number(need_alignment/3, need_alignment/2)) end pc.remove_item(952005) end end end end end InGame : https://metin2.download/picture/0DuFaN3XJ16kadvf7olS369rjWFQM533/.png Edited March 4 by Metin2 Dev International Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Active Member nazox 213 Posted March 4 Active Member Share Posted March 4 Thanks @ Malí for the system, you are incredible! and @ Owsap for the script, all work great!. (Forgot the names of NPC i don't translate that.) 11 hours ago, kza54 said: Excuse me, I posted a thank you message here for access to the download links, and my post was deleted, may I know why? While in addition I have a problem with this system I don't even know if I have the right to post now. My problem with this system : In my client I added the "say(locale_quest(14188))" (Please excuse me in advance if it is written in French in my locale_quest.txt because I am French) Hide contents 14188 Veuillez d'abord invoquer votre buffeuse. 14189 Veuillez mettre le nom de votre choix. 14190 Félicitations, votre nom de buff a changé. 14191 Une erreur s'est produite. Veuillez réessayer.. 14196 Veuillez essayer un autre nom. 14192 Buffi Dragon 14193 Pouvoir du Dragon Buff 14194 Buffi Vitesse du vent 14195 Attaque renforcée de Buffi 14197 Vous n'avez aucune compétence de buff pour avoir besoin d'une mise à niveau. 14198 Veuillez sélectionner une compétence. Server side : Reveal hidden contents quest __buffi__ begin state start begin when 952006.use begin say_title(item_name(952006)) say("") if pc.get_buffi_count() < 1 then say(locale_quest(14188)) return end say(locale_quest(14189)) local result = pc.set_buffi_name(tostring(input())) say_title(item_name(952006)) say("") if result == 99 then say(locale_quest(14190)) item.set_count(item.get_count()-1) elseif result == 0 then say(locale_quest(14191)) elseif result == 1 or result == 2 then say(locale_quest(14196)) end end function BuildSkillList() local skillIdxList = {164, 165, 166, 167} local skillNameList = {locale_quest(14192), locale_quest(14193), locale_quest(14194), locale_quest(14195)} local ret_vnum_list = {} local ret_name_list = {} table.foreach(skillIdxList, function(i, skillIdx) local skillLevel = pc.get_skill_level(skillIdx) if skillLevel >= 30 and skillLevel < 40 then table.insert(ret_vnum_list, skillIdx) table.insert(ret_name_list, skillNameList[i]) end end) return {ret_vnum_list, ret_name_list} end when 952005.use begin if get_time() < pc.getqf("next_time_buffi") then if pc.is_skill_book_no_delay() then say_title(locale_quest(9913)) say(locale_quest(9935)) wait() else say_title(locale_quest(9913)) say(locale_quest(9936)) return end end local result = __buffi__.BuildSkillList() local vnum_list = result[1] local name_list = result[2] say_title(item_name(952005)) say("") if table.getn(vnum_list) == 0 then say(locale_quest(14197)) return end say(locale_quest(14198)) local menu_list = {} table.foreach(name_list, function(i, name) table.insert(menu_list, name) end) table.insert(menu_list, locale_quest(1117)) local s=select_table(menu_list) if table.getn(menu_list) == s then return end local skill_name=name_list[s] local skill_vnum=vnum_list[s] local skill_level = pc.get_skill_level(skill_vnum) local cur_alignment = pc.get_real_alignment() local need_alignment = 1000+500*(skill_level-30) say_title(locale_quest(9913)) say(locale_quest(9942)) if cur_alignment<-19000+need_alignment then say_reward(locale_quest(9914)) return end if cur_alignment<0 then say_reward(string.format(locale_quest(9915), need_alignment, need_alignment*2)) say_reward(locale_quest(9916)) need_alignment=need_alignment*2 elseif cur_alignment<need_alignment then say_reward(string.format(locale_quest(9917), need_alignment)) say_reward(locale_quest(9918)) else say_reward(string.format(locale_quest(9917), need_alignment)) end local s= select(locale_quest(10065), locale_quest(10066)) if s==2 then return end if get_time() < pc.getqf("next_time_buffi") then if pc.is_skill_book_no_delay() then pc.remove_skill_book_no_delay() else say_title(locale_quest(9913)) return end end pc.setqf("next_time_buffi", get_time() + time_hour_to_sec(number(8, 12))) if need_alignment>0 then if pc.count_item(952005) > 0 then local title=string.format(locale_quest(9941), name_list[s]) if pc.learn_grand_master_skill(skill_vnum) then pc.change_alignment(-need_alignment) say_title(title) say_reward(locale_quest(9923)) if 40 == pc.get_skill_level(skill_vnum) then say(locale_quest(9925)) say(string.format(locale_quest(9926), name_list[s])) say(locale_quest(9927)) else say(locale_quest(9928)) say(string.format(locale_quest(9929), name_list[s], skill_level-30+1+1)) end say_reward(locale_quest(9930)) say_reward(string.format(locale_quest(9931), need_alignment)) else say_title(title) say_reward(locale_quest(9932)) say(locale_quest(9933)) say_reward(locale_quest(9934)) pc.change_alignment(-number(need_alignment/3, need_alignment/2)) end pc.remove_item(952005) end end end end end InGame : https://metin2.download/picture/0DuFaN3XJ16kadvf7olS369rjWFQM533/.png Hello, you add in quest_functions: Spoiler locale_quest locale_string locale_in locale_mn locale_sn locale_psn locale_ox in questlib.lua: Spoiler -- @desc: function for locale quest converstion -- @ref: https://www.lua.org/pil/5.2.html -- @author: Owsap locale_quest = function(vnum, ...) local val = "" for i, v in ipairs(arg) do val = val .. tostring(string.format(";%s", v)) end return string.format("[LC;%d%s]", vnum, val) end locale_string = function(vnum, ...) local val = "" for i, v in ipairs(arg) do val = val .. tostring(string.format(";%s", v)) end return string.format("[LS;%d%s]", vnum, val) end locale_in = function(vnum) return string.format("[IN;%d]", vnum) end locale_mn = function(vnum) return string.format("[MN;%d]", vnum) end locale_sn = function(vnum) return string.format("[SN;%d]", vnum) end locale_psn = function(vnum) return string.format("[PSN;%d]", vnum) end locale_ox = function(vnum) return string.format("[LOX;%d]", vnum) end If even with this, you have this error, you can try the script that Owsap provided us, with which you can translate the translate.lua and not worry about the quests, since you will execute the corresponding LC according to the phrase for example "gameforge.metin2" in translate.lua would have something like "gameforge.metin2 = Hello" with the script it would become something like "gameforge.metin2 = [LC;01]" and within the game, it would execute the file "locale_quest 01 = Hello" like the photo I posted in my post. Nicks: Nazox™ Krone™ Nagato™ Yahiko™ Yakiro™ Proyecto: Trabajando en el. Compañeros & firma: DreamHQ - 2009-2015 [Nostalgia] Link to comment Share on other sites More sharing options...
Jimmermania 27 Posted March 21 Share Posted March 21 Any idea why this is happening? Its at disconnect for example. I made it like this: [LS;509];%d Link to comment Share on other sites More sharing options...
4peppe 98 Posted March 22 Share Posted March 22 (edited) If applied correctly, everything works fine; To also have the translations of the items in the strings you need to replace in server -> conf -> item_names.txt the item names with [IN;VALUEOFITEM] The only flaw I'm finding is that it translates the names of the mobs but not those of the npcs; Edited March 22 by 4peppe Link to comment Share on other sites More sharing options...
Recommended Posts