Jump to content

TMP4

Contributor
  • Posts

    1110
  • Joined

  • Last visited

  • Days Won

    20
  • Feedback

    100%

Everything posted by TMP4

  1. 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.
  2. Mysql includes should be fine. LIBS += /usr/local/lib/mysql/libmysqlclient.a /usr/lib/libz.a INCDIR += -I/usr/local/include Some 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.
  3. 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: [Hidden Content] -------------------------------------------------------------------- 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.
  4. 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.
  5. 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.
  6. 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
  7. 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)
  8. 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 here.
  9. Then it does not insert coin column. Try this: mysqli_query($sqlServ, $exec); --> mysqli_query($sqlServ, $exec) or die('Unable to execute query. '. mysqli_error($sqlServ)); then it will display the error.
  10. 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.
  11. 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
  12. Thank you so much! I downloaded it and uploaded it to the mega.nz archive.
  13. 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.
  14. The 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.
  15. 2023.08.05: - New freshly installed VM with FreeBSD 13.2. - Installed a fix about an exploit: [Hidden Content] - 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.
  16. 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.
  17. [Hidden Content] There's a readme inside. Tested on 13.1 and 13.2. Probably won't work on 14.x
  18. 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.
  19. 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
  20. 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: [Hidden Content] 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.)
  21. 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.
  22. You missed this part isn't you? "check if your ports are opened succesfully here: [Hidden Content]" 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 /var/cache/pkg 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
  23. 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"
×
×
  • 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.