Jump to content

TMP4

Contributor
  • Posts

    1103
  • Joined

  • Last visited

  • Days Won

    20
  • Feedback

    100%

Everything posted by TMP4

  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 here.
  2. 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.
  3. 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.
  4. 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
  5. Thank you so much! I downloaded it and uploaded it to the mega.nz archive.
  6. 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.
  7. 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.
  8. 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.
  9. 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.
  10. [Hidden Content] There's a readme inside. Tested on 13.1 and 13.2. Probably won't work on 14.x
  11. 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.
  12. 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. 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.)
  14. 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.
  15. 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
  16. 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"
  17. Login via public (external) ip and check if your ports are opened succesfully here: [Hidden Content]
  18. Plus check it if they created a new user for themself, they sometimes do. (navicat -> users)
  19. Bots alyways monitors hosting's ip addresses frequently. Your ip is not new, and they don't care if your metin2 server not opened yet, your virtual dedicated server is live and they can reach it and they know your ip address. What's more, if you open the windows remote desktop port on your home computer (3389) and have a password for your pc with a strength like 123456789, your computer will be compromised in a few days at max.
  20. Maybe change the password from 123456789 to somewhat stronger so bots won't do this with you?
  21. If anyone using @ Mali's automatic ox system then we need some edit since he rewrote a lot of things in OX's base code. OXEvent.cpp bool COXEventManager::Enter(LPCHARACTER pkChar, std::uint8_t bState) { if ((bState & STATE_ATTENDER) && !CheckIpAddress(pkChar)) // here return false; // Will send you to your empire, if you are not GM m_common_ox[pkChar->GetPlayerID()] = bState; return true; } bool COXEventManager::CheckIpAddress(LPCHARACTER ch) { int IPCount = std::count_if(m_common_ox.begin(), m_common_ox.end(), [ch](const decltype(*m_common_ox.begin())& v) -> bool { LPCHARACTER tch = CHARACTER_MANAGER::Instance().FindByPID(v.first); if (!tch || !tch->GetDesc()) return false; return !strcmp(ch->GetDesc()->GetHostName(), tch->GetDesc()->GetHostName()) && (v.second & STATE_ATTENDER); }); const int MaxPlayer = 2; return !(IPCount >= MaxPlayer); } void COXEventManager::RemoveFromAttenderList(DWORD dwPID) { auto it = m_common_ox.find(dwPID); if (it != m_common_ox.end()) { if (it->second & STATE_ATTENDER) { m_common_ox.erase(it); } } } OXEvent.h (same) public: bool CheckIpAddress(LPCHARACTER ch); void RemoveFromAttenderList(DWORD dwPID); Char.cpp (same) #include "OXEvent.h" MessengerManager::instance().Logout(GetName()); if (GetMapIndex() == OXEVENT_MAP_INDEX) COXEventManager::Instance().RemoveFromAttenderList(GetPlayerID()); Use with caution on live server, I just tested it quickly.
  22. "afxres.h" to <Windows.h>" only needed if you don't want to install C++ MFC. The launcher does not use MFC so it is totally fine to replace it. Eterbase/Poly's StfAfx.h only needed if you disable Precompiled headers. We're re-enabled them so you don't need them but if you place it, it won't harm you and if you disable precompiled headers for any reason in the future, you'll still be able to compile. If you can compile you're good. What I reccomend is keep using precompiled headers to have better build time and if you'll have problems with precompiled headers (stdafx.h) then turn off the "Build ISO C++23 Standard Library Modules" as in my previous post.
×
×
  • 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.