Jump to content

TMP4

Contributor
  • Posts

    1110
  • Joined

  • Last visited

  • Days Won

    20
  • Feedback

    100%

Everything posted by TMP4

  1. Login via public (external) ip and check if your ports are opened succesfully here: [Hidden Content]
  2. Plus check it if they created a new user for themself, they sometimes do. (navicat -> users)
  3. 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.
  4. Maybe change the password from 123456789 to somewhat stronger so bots won't do this with you?
  5. 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.
  6. "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.
  7. So the problem came from the latest Visual Studio 2022 (v17.6). (May need a clean install to reproduce) While disabling Precompiled headers can solve it as I did yesterday, it may not the best solution since it increases build time as you noticed. After a hour of Google search I finally found this: [Hidden Content] Disabling Build ISO C++23 Standard Library Modules really solves the problem. Is worth to mention manylegged comment as That is also true, I just tested it. But I decided to keep using /std:c++latest. Why it works with /std:c++20? because the Build ISO C++23 Standard Library Modules option only affect /std:c++latest! Edit: Updated the Mega.nz archive again: 2023.06.11: - Re-enabled precompiled headers in client source. To be able to build with pecompiled headers enabled in the latest Visual Studio with /std:c++latest which this project uses, we have to select No for the "Build ISO C++23 Standard Library Modules" in Project properties -> C/C++ -> Language (in each project in the solution). Longer explanation: [Hidden Content] @Nuzzo @Krynn @gleskpem1 @ricrd --- @gantretv Try with this (please re-download ClientVS22 just to be sure you have everything right) and check if you can start it now.
  8. There's no error there. That's fine. What's your problem actually? Can't connect to the Metin2 server? If mysql woring and you can conenct via navicat/heidisql etc then check the metin2 server's db and game cores.
  9. Did you install your database correctly? By using .sql or tar.gz/tgz via tar -xf. People get such error when they unzip on windows and upload files individually via winscp. Anyway check that ibdata1 files's permission, owner and group.
  10. Just to be clear, I owe you literally nothing for using my free server file. 2023.06.10: - In Userinterface/Userinterface.rc I changed #include "afxres.h" to #include <Windows.h> since the launcher does not use MFC, so you no longer required to install C++ MFC while installing Visual Studio. - Disabled precompiled headers in all project to be able to build them in latest Visual Studio. You can do it by right click on a project and select properties, then in Configuration -> C/C++ -> Precompiled Headers select "Not using Precompiled Headers" for Precompiled Header. You have to do this for each project in the solution. - Added StdAfx.h to EterBase\Poly, it just includes the ../StdAfx.h. In Mega.nz. Tested on a freshly installed Windows 11 and Visual Studio 2022.
  11. The Video is 2 years old. I did countless update in the meantime including upgrade for vs2022 if you check changelog. As I stated in the topic, I did not make the base SRCs. This release using Mali's. If you guys having problem, better to ask there. But do not annoy him in DM or in any way. Currently I'm not able to reinstall my windows just to reproduce your problem. I'm using latest Windows 11 and just updated my VS to latest. Can build fine and can start the game fine.
  12. (To my previous answer: It was actually true for afxres.h, so it's irrelevant here.) So I used a image to text extractor and translated your error message. It was about precompiled headers. When I have such error, clean build usually solves it. Try to rebuild the solution. Click on "Build" on top menu, and select "Rebuild solution" (or the equivalent in Turkish).
  13. I don't speak that language. But if it's say stdafx.h missing, then that's part of the C++ MFC for latest v143 build tools what you have to install seperately (Readme.txt in ClientVS22.zip). Edit: That's not for stdafx.h but afxres.h, sorry.
  14. 1. In the last version boost is in extern/include so # Miscellaneous external libraries INCDIR += -I../../../extern/include LIBDIR += -L../../../extern/lib includes boost. You don't need + /boost to your include unless you have boost/boost folder structure. 2. Use std::unordered_map typedef std::unordered_map<DWORD, TCubeResultList> TCubeMapByNPC; // °˘°˘ŔÇ NPCş°·Î ľî¶˛ °É ¸¸µé Ľö ŔÖ°í Ŕç·á°ˇ ąşÁö... typedef std::unordered_map<DWORD, std::string> TCubeResultInfoTextByNPC; // °˘°˘ŔÇ NPCş°·Î ¸¸µé Ľö ŔÖ´Â ¸ń·ĎŔ» Á¤ÇŘÁř Ć÷¸ËŔ¸·Î Á¤¸®ÇŃ Á¤ş¸
  15. You have 3 errors (all AttributeErrors), the first of which is: 'module' object has no attribute 'OFFLINE_SHOP_SLOT_COUNT' the root of the problems. So, in the uiOfflineShop.py's Refresh function, you used the OFFLINE_SHOP_SLOT_COUNT attribute and that does not exist. Check the tutorial agin and find out if OFFLINE_SHOP_SLOT_COUNT is included. It will be there, because I have installed Ken's offshop about 3 times so far. It's a simple constant, found in PythonShop.cpp. PyModule_AddIntConstant(poModule, "OFFLINE_SHOP_SLOT_COUNT", OFFLINE_SHOP_HOST_ITEM_MAX_NUM); You don't have to deal with errors number 2 and 3 for the time being, because they were only caused by this, if you fix this OFFLINE_SHOP_SLOT_COUNT, they will also disappear.
  16. I put a Readme.txt in the ClientVS22 folder, you forgot to read it afxres.h is not part of the project, it comes with the C++ MFC. You need to install C++ MFC for latest v143 build tools too when you install your visual studio. If you did not install that then open Microsoft Visal Studio Installer and you can install retrospectively. Check Install.png. A possible dirty workaround if you don't want to install updates is to open ClientVS22\source\UserInterface\UserInterface.rc and modify #include "afxres.h" to #include <Windows.h>
  17. "when the server is started for the first time, the game, db values see 60% and then drop, what is the reason for this?" It's loading stuffs, for example reads every table from db, read files like drops, quests, mirror protos etc etc.. The % depends on your pc (or virtual server) resources. "It increases from 1% to 6%. can we reduce the increment amount?" As I said, memory/CPU increase for a sec at teleport is present on every file. I think it's normal, game-db is working there. The 5% may looks a little high but I don't know your specs, or if you talk about cpu or memory. (Probably cpu) Last year on Discord we talked about this with Gurgarath, he showed some footage of his dedicated server, he had cpu increase of 0.7->1.3% at warp on his dedicated server. I having about 3% on my vdi at home. % depends on the machine and resources. I don't think I can help you optimize metin2's memory and processor management. But that was not the purpose of this server file. I recommend opening a topic here if you want to continue with this matter.
  18. Sh1t code made by Ymir 20 years ago? Ram/CPU increase at first player login is pretty normal, the server is working and loding stuffs there. At teleport there is a little ram/CPU increase for a sec, but it goes back after teleport ends. Some people thinks it only happens on 40k game core but not, it's always been like that, I tried with a 2089m game file from 2011, it did the same thing. It could certainly be optimized, but that was not the purpose of this server file. Since nowdays cheap VPSs have 8GB of ram, I think you won't have a problem because of these.
  19. To where? To AttackedByPoison function? No, don't extend that with IMMUNE_SLOW And don't remove !IsPC() from the if, or you'll ruin poison immunity to players. Slow and stun does not have their own function because they don't need calculation, they're only used in battle.cpp here: AttackAffect(pkAttacker, pkVictim, POINT_STUN_PCT, IMMUNE_STUN, AFFECT_STUN, POINT_NONE, 0, AFF_STUN, iStunDuration, "STUN"); AttackAffect(pkAttacker, pkVictim, POINT_SLOW_PCT, IMMUNE_SLOW, AFFECT_SLOW, POINT_MOV_SPEED, -30, AFF_SLOW, 20, "SLOW"); Edit it like this: if (pkVictim->IsPC() || (!pkVictim->IsPC() && !pkVictim->IsImmune(IMMUNE_STUN))) { AttackAffect(pkAttacker, pkVictim, POINT_STUN_PCT, IMMUNE_STUN, AFFECT_STUN, POINT_NONE, 0, AFF_STUN, iStunDuration, "STUN"); } if (pkVictim->IsPC() || (!pkVictim->IsPC() && !pkVictim->IsImmune(AFFECT_SLOW))) { AttackAffect(pkAttacker, pkVictim, POINT_SLOW_PCT, IMMUNE_SLOW, AFFECT_SLOW, POINT_MOV_SPEED, -30, AFF_SLOW, 20, "SLOW"); }
  20. Yes, everyone. Because Ymir did not do anything with that immuneflag. If you scan the source, only the TERROR is actually used. It is a guess, but I think they only made this for visual, if they set resist_poison (what is working and they use it), they ticked POISON in the immuneflag to have visual, maybe for wiki import or similar reason. But if you wanna make POISON immune actually works on mob, of course you can do it. char_resist.cpp find: /*if (IsImmune(IMMUNE_POISON)) return;*/ (if you don't have this because you removed comments and unused codes then just place it to top of the func of CHARACTER::AttackedByPoison) edit: if (!IsPC() && IsImmune(IMMUNE_POISON)) return; IsImmune does not do 100% immune, only 90%. If you wanna have 100% then edit this: bool CHARACTER::IsImmune(DWORD dwImmuneFlag) { if (IS_SET(m_pointsInstant.dwImmuneFlag, dwImmuneFlag)) { int immune_pct = 90; int percent = number(1, 100); if (percent <= immune_pct) // 90% Immune { if (test_server && IsPC()) ChatPacket(CHAT_TYPE_PARTY, "<IMMUNE_SUCCESS> (%s)", GetName()); return true; } else { if (test_server && IsPC()) ChatPacket(CHAT_TYPE_PARTY, "<IMMUNE_FAIL> (%s)", GetName()); return false; } } if (test_server && IsPC()) ChatPacket(CHAT_TYPE_PARTY, "<IMMUNE_FAIL> (%s) NO_IMMUNE_FLAG", GetName()); return false; } to this: bool CHARACTER::IsImmune(DWORD dwImmuneFlag) { if (IS_SET(m_pointsInstant.dwImmuneFlag, dwImmuneFlag)) { if (test_server && IsPC()) ChatPacket(CHAT_TYPE_PARTY, "<IMMUNE_SUCCESS> (%s)", GetName()); return true; } if (test_server && IsPC()) ChatPacket(CHAT_TYPE_PARTY, "<IMMUNE_FAIL> (%s) NO_IMMUNE_FLAG", GetName()); return false; } Keep in mind other functions uses IsImmune too so you'll have 100% immune everywhere.
  21. If protos exists, then I suspect the encoding, because it is in 'good' korean letters: '경험치'. Either the special_item_group.txt or the item_proto.txt have different encoding. Compare it with local and check encodings.
  22. I did not modify it for shared object. If you wanna do that I think you can check the src patch files of the port version, because they did it.
×
×
  • 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.