-
Posts
1110 -
Joined
-
Last visited
-
Days Won
20 -
Feedback
100%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by TMP4
-
-
Mysql includes should be fine.
LIBS += /usr/local/lib/mysql/libmysqlclient.a /usr/lib/libz.a
INCDIR += -I/usr/local/includeSome line from Depend about MySQL:
.obj/NetBase.o: PeerBase.h DBManager.h /usr/local/include/mysql/mysql.h .obj/NetBase.o: /usr/include/stdbool.h /usr/include/stddef.h .obj/NetBase.o: /usr/include/stdint.h /usr/include/machine/_stdint.h .obj/NetBase.o: /usr/include/x86/_stdint.h .obj/NetBase.o: /usr/local/include/mysql/field_types.h .obj/NetBase.o: /usr/local/include/mysql/my_list.h .obj/NetBase.o: /usr/local/include/mysql/mysql_com.h .obj/NetBase.o: /usr/local/include/mysql/my_command.h .obj/NetBase.o: /usr/local/include/mysql/my_compress.h .obj/NetBase.o: /usr/local/include/mysql/mysql/udf_registration_types.h .obj/NetBase.o: /usr/local/include/mysql/mysql/client_plugin.h .obj/NetBase.o: /usr/local/include/mysql/mysql/plugin_auth_common.h .obj/NetBase.o: /usr/local/include/mysql/mysql_version.h .obj/NetBase.o: /usr/local/include/mysql/mysql_time.h
Fresh BSD, only MySQL80 was installed.
-
I just updated my server to be compatible with MySQL80. I have two question:
1. in AsyncSQL.cpp CAsyncSQL::Connect function the m_stHost value is lost after mysql_init.
fprintf(stdout, "before m_stHost %s\n", m_stHost.c_str()); if (0 == mysql_init(&m_hDB)) { fprintf(stderr, "mysql_init failed\n"); return false; } fprintf(stdout, "after m_stHost %s\n", m_stHost.c_str());
Output:
before m_stHost 127.0.0.1 after m_stHost
Why is it happening? I can't see any relation to m_stHost. There's surely something I'm not seeing here. The other variable like m_stUser doesn't affected.
It doesn't cause any problem because later the mysql_real_connect function convert the empty host value to "localhost", so it works except the console print at the function end will display
"AsyncSQL: connected to "
(I know i can do something like copy m_stHost to m_stHost2 and display that in the change "AsyncSQL: connected to %s" but I really want to know why it's happening..)
My whole AsyncSQL.cpp if needed: https://pastebin.com/unwHifXi
--------------------------------------------------------------------
2. MYSQL_OPT_RECONNECT is deprecated. "WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version."
Has anyone dealt with this yet? It's just a warning as of now but my guess is they'll remove it pretty soon since it related to some security issue. -
On 7/7/2022 at 9:27 PM, HFWhite said:
There's a problem with the system. If you have more than 10 items(skills,potions,etc) in 'quickslots' the items from inventory will be highlighted everytime you login, how do we solve this @ Mali ?
Edit: This fixed my problem
Thank you, it actually solved the issue however it is not clear for me why the issue came from the quickslot's items.
My 'fear' is there's still some issue and it's just a workaround to hide it. -
Nice find, thank you for posting this topic.
That "2003 February like 1.Closed Beta" must be just an early concept presentation and not a playable game. There's no way they developed it then scrapped it right away and came with what we have now.
- 1
-
Make NPC names load from clientside mob_proto:
Look for CPythonNetworkStream::__RecvCharacterAppendPacket in PythonNetworkStreamPhaseGameActor.cpp
Add this to the begginning of the function:
#ifdef ENABLE_MULTILANGUAGE if (pkNetActorData->m_bType == CActorInstance::TYPE_NPC && !(pkNetActorData->m_dwRace >= 20101 && pkNetActorData->m_dwRace <= 20109) && !(pkNetActorData->m_dwRace >= 34001 && pkNetActorData->m_dwRace <= 34099)) // load npc names from clientside { const char* c_szName; CPythonNonPlayer& rkNonPlayer = CPythonNonPlayer::Instance(); if (rkNonPlayer.GetName(pkNetActorData->m_dwRace, &c_szName)) pkNetActorData->m_stName = c_szName; } #endif
- 1
- 1
-
On 4/12/2022 at 11:17 PM, Klaus said:
Obs.: Working perfectly, with the exception of the accents in chat all, but in normal chat it works, in case anyone has a fix.
char.cpp in void CHARACTER::ChatPacket
this:
#ifdef ENABLE_MULTILANGUAGE std::string sTranslateText; if (type != CHAT_TYPE_COMMAND) { if (GetLang() > MAX_LANGUAGES) sTranslateText = LC_TEXT(DEFAULT_LANGUAGE, format); else sTranslateText = LC_TEXT(GetLang(), format); } #endif
and this a little under:
#ifdef ENABLE_MULTILANGUAGE int len = vsnprintf(chatbuf, sizeof(chatbuf), format, args); if (type != CHAT_TYPE_COMMAND) len = vsnprintf(chatbuf, sizeof(chatbuf), sTranslateText.c_str(), args); #else
Is just not needed at all and makes this problem. Every shout, party, info etc chat would go to LC_TEXT what adds a "@0949" to the message if translation not found in in locale.cpp's locale_find (it's hidden but you can see in /n for example or if you write messages to console) and that "@0949" makes accents bad plus you get a syserr each time somebody shout or party or guild chat etc.
So you can delete this 2 ifdef if you already set every LC_TEXT(DEFAULT_LANGUAGE.. / LC_TEXT(ch->GetLang().. and I'm sure you did because LC_TEXT's new first attribute is mandatory so if you didn't then you couldn't compile the game. So that's why I said this is just not needed at all and can be removed.
Edit: LC_TEXT(TRANSLATE_LANGUAGE will not work. Use LC_TEXT(ch->GetLang()..
(Sorry for bumping old topic but I wanted to share the fix)
- 1
-
First of all thanks for the release.
If anyone try to use this multilang system, here's some tip for the quests because making different quest states for each language as in the example will be a nightmare.
translate.lua:
--Default arrays gameforge.blacksmith = {} gameforge.blacksmith._10_npcChat = {} gameforge.blacksmith._20_sayTitle = {} gameforge.blacksmith._30_say = {} gameforge.blacksmith._40_sayTitle = {} gameforge.blacksmith._50_sayReward = {} --EN gameforge.blacksmith._10_npcChat["en"] = "I want to upgrade something. " gameforge.blacksmith._20_sayTitle["en"] = "Blacksmith " gameforge.blacksmith._30_say["en"] = "Greetings![ENTER]I am responsible for upgrading items. If you want[ENTER]to upgrade an item, just bring it to me. " gameforge.blacksmith._40_sayTitle["en"] = "Information: " gameforge.blacksmith._50_sayReward["en"] = "Drag an item from your inventory onto the[ENTER]Blacksmith. " --HU gameforge.blacksmith._10_npcChat["hu"] = "Szeretnék valamit feljavíttatni. " gameforge.blacksmith._20_sayTitle["hu"] = "Kovács " gameforge.blacksmith._30_say["hu"] = "Üdvözöllek![ENTER]Én felelek a tárgyak feljavításáért. Ha fel[ENTER]szeretnél javíttatni egy tárgyat, hozd csak ide[ENTER]nekem. " gameforge.blacksmith._40_sayTitle["hu"] = "Információ: " gameforge.blacksmith._50_sayReward["hu"] = "Húzz rá egy tárgyat a leltáradból a Kovácsra. "
questlib.lua:
function get_lang_name() if get_lang() == 1 then return "hu" end return "en" end
blacksmith.quest:
quest blacksmith begin state start begin when blacksmith.chat.gameforge.blacksmith._10_npcChat[get_lang_name()] begin say_title(gameforge.blacksmith._20_sayTitle[get_lang_name()]) say(gameforge.blacksmith._30_say[get_lang_name()]) wait() say_title(gameforge.blacksmith._40_sayTitle[get_lang_name()]) say_reward(gameforge.blacksmith._50_sayReward[get_lang_name()]) end end end
Some caching mechanism to the get_lang_name() would be nice too.
Also do not use this in notice_all because it will notice all in the player's language... Maybe use ["en"] to display notice_alls in english for everyone or code some translating mechanism for the client (e.g. replace chars when displaying the messages depending on the current lang).+1 note: the default qc did not like the [get_lang_name()] in the when statement but a friend gave me a "fixed" qc which you can download
.- 4
- 1
-
-
21 hours ago, Fenczu said:
Thanks for the contribution, the registration does not work
It shows me successful registration, but when checking the database the account is not created
https://metin2.download/picture/72Nc7G7B3516zvlF2H8cAN5LR9eh99Nx/.png
Check the insert into query in php and your account table. Most likely you missing a column. If I have to guess, it'll be the coin column. Add it to your table, or edit the insert query.
-
On 12/24/2023 at 10:14 AM, Ballads said:
[BUG]
Hello @ TMP4 first I wanted to thank you for the serverfiles, they are pretty clean and smooth.
It's been over a year since I started studying programming focused on metin2 because of your post that I found on the internet.last month I opened a server using your serverfiles.
There were 60 players online on average, but we ended up discovering a bug that hadn't been found in the beta.
When you send messages to another player, if you send two or more messages at high speed, you will be disconnected from the game.I did a lot of testing trying to find the problem, as I installed many free and paid systems that I bought from developers here in the community, thinking that I might have messed up something, but I didn't find it. So I thought, "what if it's a bug that already came with the server". So today I decided to create a local server with the original and clean files. And Tadaaaa, the problem still occurs. In other words, yes, it is a servefile bug (which I consider super serious). Unfortunately I wasn't able to find the cause of the problem... I just know that the error is on the server side. because I tested my server + clean client and clean server + my client.
unfortunately I don't get any errors in syserr's
So I came to ask for your help. Or anyone else who can help solve the problem.
It's not a bug. It comes from the PM Flood kick hack fix. I believe It does not affect normal players, since a normal player does not send a lot of messages in such speed. "two or more messages at high speed" It's actually 4 if you check the src or your gif..
Do not uninstall completely this fix. If you edit "ch->GetPMCounter() > 3" in input_main.cpp to something bigger then you can flood other players more before the disconnect happens, if your players are typing champions
- 2
-
- 35
- 1
- 18
- 3
- 42
-
In the source files the language texts are in korean. If you open the file with a text editor with a bad character encoding, the korean letters will be converted to something else and it won't find their translation in locale_string. That's happened to you.
Once you saved the file you can't fix it, the korean letters are gone. Take a backup and be sure next time you edit it with keeping the encoding. You can turn off auto character encoding in Notepad++ settings, or use other editor, for example Visual Studio.
- 1
-
7 hours ago, nazox said:
It's complicated, but you can try this:
https://support.google.com/youtube/answer/6395024?hl=es&dark=1&sjid=10250177798839608775-EU
i read you can remove o cut parts from video, so change tittle or anything that says metin2, webzen or make it blurry so that the name is not seen @ TMP4The problem I don't have backup of the video file and youtube won't let you download it if it's striked.
If I have backup, I would reupload it to somewhere else.
-
Any chance anyone saved it?
- 1
-
2023.08.05: - New freshly installed VM with FreeBSD 13.2. - Installed a fix about an exploit: https://metin2.dev/topic/31147-itemmove-dupe-exploit-fix/#comment-158896 - Expect this as the last update unless there will be some serious problem.
What's left on my todo list is MySQL8 compatibility, sadly don't expect it from me, lately I am interested in other things than Metin2.
If anyone do it and wanna share it (I will include the credit), contact me.- 1
-
On 7/27/2023 at 1:45 PM, ValkeryE said:
Do you think that use timer in "when login begin" is good idea?
Yes. It is a 60 second loop timer, not a 1-2 second one. But you're free to modify, and events_automation.quest is optional, if you don't wanna use it then don't use it, or do it in another way.
-
On 7/12/2023 at 8:43 PM, 7teendev said:
Even 10.6 is for most SF too much, same as 10.5 and MySQL 5.7..
And If I would install lower version on my OVH VPS, let's say FreeBSD 12.4, I wouldn't have DNS, DHCP and sometimes mount is fucked up.. And if I install 13.2 and take all network settings, I'm still getting no connections what's so ever
13.2 has no issues at all..
There's a readme inside. Tested on 13.1 and 13.2. Probably won't work on 14.x
- 204
- 1
- 4
- 62
- 1
- 14
- 101
-
14 hours ago, enemywalker said:
how to set your graphics in patcher?
Here's my examples
- 1
-
Is it RO? Re-extract mob_proto.txt & mob_names.txt and try again.
Here's an example:
10001 Ţinutul_Yayang 4002 8995
10001 ??? 4002 8995 PAWN WARP SPECIAL 70 NOMOVE 0 STUN,SLOW,CURSE,TERROR 0 0 0 0 0 0 0 0 3954 3 1 0 0 562 79 100 100 0 2000 175 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
I just checked it and it worked.
-
11 minutes ago, Avulsen said:
i have same error message can someone help me please ?
It's because of MySQL5.6 have STRICT_TRANS_TABLES on by default.
Change sql_mode from sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES to sql_mode=NO_ENGINE_SUBSTITUTION in /usr/local/my.cnf -
13 hours ago, SweexMan said:
So if I try to install it.. it say wrong architecture.. i have freebsd 13.1 86_64.. do I have to have i386 version to do this ?
Yes they were 32bit packages since the vm is 32bit.
Luckily I have an x64 vm too where I had the packages so here you are:FAQ.txt also modified about this MySQL5.6 deprecation issue.
(I may have a look in MySQL5.7 in the future but not promising anything.)- 50
- 6
- 2
- 1
- 24
- 5
- 50
-
7 minutes ago, SweexMan said:
Im pretty sure ports were opened.. but i decided to put it on vps so I did not bother to try it again.. anyway, could you tell me how to install that mysql56 through the way you said ? do i have to download the file and extract it to that route ? or is it already there ? And what should i write in command line after ? thank you very much.
I just edited my comment and your quote contains how you can install it: "Then install with the command: pkg add /path/to/package.txz for example pkg add /var/cache/pkg/mysql56-server-5.6.51.pkg"
So basicly upload and extract to anywhere then use pkg add command with route for the file.
Spoiler"Im pretty sure ports were opened.." No, unless you checked, you can't be sure
-
1 hour ago, SweexMan said:
It still does not work... however i have decided to put it on vps... but freebsd no longer supports mysql56. So my question is.. if i will use mysql57, will the server work ? thanks
You missed this part isn't you? "check if your ports are opened succesfully here: https://www.yougetsignal.com/tools/open-ports/"
Anyway in vps you'll be okey. I don't know if it will work with 5.7. Probably not or at least there will be some anomaly. You can install 5.6 if you take the cached package files from
from the vm.Then install with the command: pkg add /path/to/package.txz for example pkg add /var/cache/pkg/mysql56-server-5.6.51.pkg
- 4
- 1
- 1
- 5
-
1 hour ago, waghoppe said:
parece que encontrei um bug, fiz a instalação do 4 inventario, no inventario 3 e 4 os itens somem ao dar reboot no servidor, alguma maneira de solucionar isso?
os itens funcionaram bem, não obtive outro bug até então. somente esse em que os itens somem. Sou novato ainda, talvez estou reiniciando errado o servidor? se sim alguem sabe ou tem um tutorial de como fazer da forma correta?
"It seems like I've encountered a bug. I installed the 4th inventory, and in inventories 3 and 4, the items disappear upon reboot on server. Is there any way to solve this?""Items worked fine for me, and I haven't encountered any other bugs so far. It's just this issue where the items disappear. I'm still a beginner, so perhaps I'm restarting the server incorrectly? If so, does anyone know or have a tutorial on how to do it correctly?"
The only thing syserr client:
0709 03:14:52923 :: CRaceManager::GetRaceDataPointer: cannot load data by dwRaceIndex 40228
Edit: good after making a recording and analyzing it I verified that possibly the items are not actually disappearing, but a rollback is happening
It is not a bug and it has nothing to do with the 4 inventory.
Item flush to db (save to db) time is every 7 minute by default in Metin2. If you reboot the whole operating system (why tho? close.sh is enough to close the server..) then of course the save is not happening.
If you wanna close the server and let items save to db you can do the following:
- /shutdown then wait at least 7 minute then sh close.sh (or reboot..)
- Type 'killall game' to the terminal, then with the 'ps' command you keep checking if all cores stopped, then type 'killall db'.
Latter is way faster then waiting 7 minute. You can do the latter with a script if you will, save it as close2.sh or something and use that...
clear echo -e "\033[31m \n The server is shutting down.. \033[0m" while pgrep "game"; do echo -e "Waiting for game to stop.." killall game sleep 3 done while pgrep "db"; do echo -e "Waiting for db to stop.." killall db sleep 3 done clear echo -e "\033[31m \n The server shut down successfully!\033[0m"
- 1
AsyncSQL m_stHost and MYSQL_OPT_RECONNECT deprecation
in Community Support - Questions & Answers
Posted
Did you read what ChatGPT said to you? It talked about a completly different thing. Like asking about a paint of a car then the person starts talking about the motor of the car
Anyway for now I just disabled it by
bool reconnect = false; if (reconnect) if (0 != mysql_options(&m_hDB, MYSQL_OPT_RECONNECT, &reconnect)) fprintf(stderr, "mysql_option: %s\n", mysql_error(&m_hDB));
----------------
However my 1. question is still a mystery for me.
Anyone using MySQL8.0.35 can check it for me please if they have the host? It's enough to check it when starting the db and see "AsyncSQL: connected to " if there is an ip or empty string.