Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/17/21 in all areas

  1. M2 Download Center Download Here ( Internal ) Download Here ( GitHub ) [Hidden Content] Reversed from 22.2.7.0 Official Binary
    9 points
  2. Thanks for sharing, as always! You could also check the position realtime while the player is in range so it updates faster. /// 1. @ UserInterface/PythonMiniMap.cpp // Search @ void CPythonMiniMap::RenderAtlas const auto& PartyInfo = it->second; __GlobalPositionToAtlasPosition(PartyInfo->lX - m_dwAtlasBaseX, PartyInfo->lY - m_dwAtlasBaseY, &PartyInfo->fScreenX, &PartyInfo->fScreenY); // Replace with long xPos = PartyInfo->lX; long yPos = PartyInfo->lY; CInstanceBase* pkInst = CPythonCharacterManager::Instance().GetInstancePtrByName(pPartyMemberInfo->strName.c_str()); if (pkInst) { TPixelPosition kInstPos; pkInst->NEW_GetPixelPosition(&kInstPos); xPos = kInstPos.x + m_dwAtlasBaseX; yPos = kInstPos.y + m_dwAtlasBaseY; } __GlobalPositionToAtlasPosition(xPos - m_dwAtlasBaseX, yPos - m_dwAtlasBaseY, &PartyInfo->fScreenX, &PartyInfo->fScreenY);
    5 points
  3. You're right, but if you really want to use something like this, you should do a customizable class, like: [Hidden Content]
    3 points
  4. Today I launched a new update that allows search's and multi-language. Previously I added search's, but only by the ID, it wasn't enough, now it also search's by name. The names are based on the language set (it can be auto detected or changed using the flag icon). If you find any errors on any translation (except icons, using the official names), please, let me know.
    2 points
  5. M2 Download Center Download Here ( Internal ) Download Here ( GitHub ) [Hidden Content]
    1 point
  6. Required level : Beginner Estimated time : 20 min Hello everyone ! Needed : Have a Metin2 server with WinSCP access to your server. A tool to unpack your client like EterManager, Eternexus, or EterPack Archiver A TGA file for the item icon. You can also use an existing one. If you implement an item with a 3D Model (weapon, armor, costume, etc ..), you'll need : A file .gr2 which corresponds to the 3D model of your item and the tool Granny Viewer which allows you to view this type of model. One or multiple .dds / .tga files which correspond to the textures of the item. I. Client Side : II. Server Side : A category Questions and Answers is available. If you have a problem or a question, feel free to post a request!
    1 point
  7. I Recommend Him
    1 point
  8. You forgot to say that you were added to the forum menu...
    1 point
  9. /// 1. @ game/char_affect.cpp // Search @ void CHARACTER::ClearAffect if (IS_NO_CLEAR_ON_DEATH_AFFECT(pkAff->dwType) || IS_NO_SAVE_AFFECT(pkAff->dwType)) { ++it; continue; } // Add below #if defined(__ALIGNMENT_AFFECT__) if (pkAff->dwType >= AFFECT_ALIGNMENT) { ++it; continue; } #endif
    1 point
  10. Add it on "#define IS_NO_CLEAR_ON_DEATH_AFFECT(type)" inside char_affect.cpp
    1 point
  11. M2 Download Center Download Here ( Internal ) Hi everyone, I needed to add function on F10 key but there's the menu bar (WM_SYSKEYDOWN), there is a fix for who need to use F10 in-game without a break. [Hidden Content]
    1 point
  12. Hello, this is a small upgrade in order to build libserverkey for OpenSSL 1.0 or greater, it builds with OpenSSL v1.4d (Win32 build) fine. All this changes has to be made in RSACrypto.cpp Function RSACrypto::PublicKey::PublicKey Replace: BN_hex2bn(&rsa_->n, n); BN_hex2bn(&rsa_->e, e); to: #if OPENSSL_VERSION_NUMBER < 0x10100000L BN_hex2bn(&rsa_->n, n); BN_hex2bn(&rsa_->e, e); #else BIGNUM* rsa_n, * rsa_e, * rsa_d; RSA_get0_key(rsa_, (const BIGNUM**)&rsa_n, (const BIGNUM**)&rsa_e, (const BIGNUM**)&rsa_d); BN_hex2bn(&rsa_n, n); BN_hex2bn(&rsa_e, e); RSA_set0_key(rsa_, rsa_n, rsa_e, rsa_d); #endif Function RSACrypto::PublicKey::Alloc Replace: rsa->n = BN_new(); rsa->e = BN_new(); to: #if OPENSSL_VERSION_NUMBER < 0x10100000L rsa->n = BN_new(); rsa->e = BN_new(); #else BIGNUM* n = BN_new(), * e = BN_new(); RSA_set0_key(rsa, n, e, NULL); #endif Function RSACrypto::PublicKey::Copy Replace: BN_copy(to->n, from->n); BN_copy(to->e, from->e); to: #if OPENSSL_VERSION_NUMBER < 0x10100000L BN_copy(to->n, from->n); BN_copy(to->e, from->e); #else BIGNUM* to_n, * to_e,* to_d; const BIGNUM* from_n = RSA_get0_n(from), * from_e = RSA_get0_e(from); RSA_get0_key(to, (const BIGNUM**)&to_n, (const BIGNUM**)&to_e, (const BIGNUM**)&to_d); BN_copy(to_n, from_n); BN_copy(to_e, from_e); RSA_set0_key(to, to_n, to_e, to_d); #endif Function RSACrypto::PrivateKey::Alloc Replace: rsa->d = BN_new(); rsa->p = BN_new(); rsa->q = BN_new(); to: #if OPENSSL_VERSION_NUMBER < 0x10100000L rsa->d = BN_new(); rsa->p = BN_new(); rsa->q = BN_new(); #else BIGNUM* d = BN_new(), * p = BN_new(), * q = BN_new(); RSA_set0_key(rsa, NULL, NULL, d); RSA_set0_factors(rsa, p, q); #endif Function RSACrypto::PrintKey (k, n, e) Replace: char* tmp = BN_bn2hex(k->rsa_->e); to: #if OPENSSL_VERSION_NUMBER < 0x10100000L char* tmp = BN_bn2hex(k->rsa_->e); #else const BIGNUM* rsa_e = RSA_get0_e(k->rsa_); char* tmp = BN_bn2hex(rsa_e); #endif Replace: tmp = BN_bn2hex(k->rsa_->n); to: #if OPENSSL_VERSION_NUMBER < 0x10100000L tmp = BN_bn2hex(k->rsa_->n); #else const BIGNUM* rsa_n = RSA_get0_n(k->rsa_); tmp = BN_bn2hex(rsa_n); #endif Function RSACrypto::PrintKey(k, n, e, d) Replace: char* tmp = BN_bn2hex(k->rsa_->n); to: #if OPENSSL_VERSION_NUMBER < 0x10100000L char* tmp = BN_bn2hex(k->rsa_->n); #else const BIGNUM* rsa_n = RSA_get0_n(k->rsa_); char* tmp = BN_bn2hex(rsa_n); #endif Replace: tmp = BN_bn2hex(k->rsa_->e); to: #if OPENSSL_VERSION_NUMBER < 0x10100000L tmp = BN_bn2hex(k->rsa_->e); #else const BIGNUM* rsa_e = RSA_get0_e(k->rsa_); tmp = BN_bn2hex(rsa_e); #endif Replace: tmp = BN_bn2hex(k->rsa_->d); to: #if OPENSSL_VERSION_NUMBER < 0x10100000L tmp = BN_bn2hex(k->rsa_->d); #else const BIGNUM* rsa_d = RSA_get0_d(k->rsa_); tmp = BN_bn2hex(rsa_d); #endif The changes, explained: 1) the ifdefs are there for compatibility with the old openssl version. 2) OpenSSL 1.0 do not expose the "rsa_" structure, so we need to use OpenSSL own api to get the required data from it. A question that you might have at this point is what is the purpouse of libserverkey. It looks like ymir had an issue about leaking game files back in this day, this might explain why this feature was added. It bundles a RSA private and public key to your core, which verifies if the current machine should be able to use such core or not. It is not an important feature as it isn't that hard to bypass with the required knownledge and it could be removed safetly from the game. I'm thinking about covering this protection in the wiki, until then I hope I made some clarification about this library.
    1 point
  13. Not tested, i'm not at home. What's new: You can use comment sections in locale_list, helps you to identify much faster the quests. Two methods of reading, if you enable QC_READ_FILE_FROM_LIST, all of the quests from locale_list will be compiled, if you enable QC_READ_ALL, all of the quests file from specific directory (folders/sub-folders) will be compiled. How-To-Use: python make.py [Hidden Content]
    1 point
  14. The idea isn't so bad, but the code has too many useless lines, here's what you can do to improve it. def RefreshPickupFilter(self): #Weapon if systemSetting.IsPickUpFilterWeapon(): self.PickUpFilterList[0].Down() else: self.PickUpFilterList[0].SetUp() #Armor if systemSetting.IsPickUpFilterArmor(): self.PickUpFilterList[1].Down() else: self.PickUpFilterList[1].SetUp() #Ear if systemSetting.IsPickUpFilterEar(): self.PickUpFilterList[2].Down() else: self.PickUpFilterList[2].SetUp() #Neck if systemSetting.IsPickUpFilterNeck(): self.PickUpFilterList[3].Down() else: self.PickUpFilterList[3].SetUp() #Foots if systemSetting.IsPickUpFilterFoots(): self.PickUpFilterList[4].Down() else: self.PickUpFilterList[4].SetUp() #Shield if systemSetting.IsPickUpFilterShield(): self.PickUpFilterList[5].Down() else: self.PickUpFilterList[5].SetUp() #Book if systemSetting.IsPickUpFilterBook(): self.PickUpFilterList[6].Down() else: self.PickUpFilterList[6].SetUp() #Stone if systemSetting.IsPickUpFilterStone(): self.PickUpFilterList[7].Down() else: self.PickUpFilterList[7].SetUp() #Etc if systemSetting.IsPickUpFilterEtc(): self.PickUpFilterList[8].Down() else: self.PickUpFilterList[8].SetUp() To: def RefreshPickupFilter(self): checkFilterList = ( systemSetting.IsPickUpFilterWeapon(), systemSetting.IsPickUpFilterArmor(), systemSetting.IsPickUpFilterEar(), systemSetting.IsPickUpFilterNeck(), systemSetting.IsPickUpFilterFoots(), systemSetting.IsPickUpFilterShield(), systemSetting.IsPickUpFilterBook(), systemSetting.IsPickUpFilterStone(), systemSetting.IsPickUpFilterEtc() ) for child, flag in zip(self.PickUpFilterList, checkFilterList): if flag: child.Down() else: child.SetUp() self.PickUpFilterList.append(GetObject("Pick_Up_FilterWeapon")) self.PickUpFilterList.append(GetObject("Pick_Up_FilterArmor")) self.PickUpFilterList.append(GetObject("Pick_Up_FilterEar")) self.PickUpFilterList.append(GetObject("Pick_Up_FilterNeck")) self.PickUpFilterList.append(GetObject("Pick_Up_FilterFoots")) self.PickUpFilterList.append(GetObject("Pick_Up_FilterShield")) self.PickUpFilterList.append(GetObject("Pick_Up_FilterBook")) self.PickUpFilterList.append(GetObject("Pick_Up_FilterStone")) self.PickUpFilterList.append(GetObject("Pick_Up_FilterEtc")) To: for name in ('Weapon','Armor','Ear','Neck','Foots','Shield','Book','Stone','Etc'): self.PickUpFilterList.append(GetObject("Pick_Up_Filter{}".format(name))) self.PickUpFilterList[0].SetToggleUpEvent(self.__OnClickPickupFilterButtonWeapon) # Weapon self.PickUpFilterList[0].SetToggleDownEvent(self.__OnClickPickupFilterButtonWeapon) # Weapon self.PickUpFilterList[1].SetToggleUpEvent(self.__OnClickPickupFilterButtonArmor) # Armor self.PickUpFilterList[1].SetToggleDownEvent(self.__OnClickPickupFilterButtonArmor) # Armor self.PickUpFilterList[2].SetToggleUpEvent(self.__OnClickPickupFilterButtonEar) # Ear self.PickUpFilterList[2].SetToggleDownEvent(self.__OnClickPickupFilterButtonEar) # Ear self.PickUpFilterList[3].SetToggleUpEvent(self.__OnClickPickupFilterButtonNeck) # Neck self.PickUpFilterList[3].SetToggleDownEvent(self.__OnClickPickupFilterButtonNeck) # Neck self.PickUpFilterList[4].SetToggleUpEvent(self.__OnClickPickupFilterButtonFoots) # Foots self.PickUpFilterList[4].SetToggleDownEvent(self.__OnClickPickupFilterButtonFoots) # Foots self.PickUpFilterList[5].SetToggleUpEvent(self.__OnClickPickupFilterButtonShield) # Shield self.PickUpFilterList[5].SetToggleDownEvent(self.__OnClickPickupFilterButtonShield) # Shield self.PickUpFilterList[6].SetToggleUpEvent(self.__OnClickPickupFilterButtonBook) # Books self.PickUpFilterList[6].SetToggleDownEvent(self.__OnClickPickupFilterButtonBook) # Books self.PickUpFilterList[7].SetToggleUpEvent(self.__OnClickPickupFilterButtonStone) # Stone self.PickUpFilterList[7].SetToggleDownEvent(self.__OnClickPickupFilterButtonStone) # Stone self.PickUpFilterList[8].SetToggleUpEvent(self.__OnClickPickupFilterButtonEtc) # Etc self.PickUpFilterList[8].SetToggleDownEvent(self.__OnClickPickupFilterButtonEtc) # Etc To: eventFuncList = ( self.__OnClickPickupFilterButtonWeapon, self.__OnClickPickupFilterButtonArmor, self.__OnClickPickupFilterButtonEar, self.__OnClickPickupFilterButtonNeck, self.__OnClickPickupFilterButtonFoots, self.__OnClickPickupFilterButtonShield, self.__OnClickPickupFilterButtonBook, self.__OnClickPickupFilterButtonStone, self.__OnClickPickupFilterButtonEtc ) for child, event in zip(self.PickUpFilterList, eventFuncList): child.SetToggleUpEvent(event) child.SetToggleDownEvent(event)
    1 point
  15. I would do it like this, in a simple way, without useless code, as i said in another forum too. [Hidden Content]
    1 point
  16. M2 Download Center Download Here ( Internal ) Download Here ( GitHub ) [Hidden Content]
    1 point
  17. M2 Download Center Download Here ( Internal ) Hi I'd like to release my small project of hairs [hide][Hidden Content] [Hidden Content] [Hidden Content] [Hidden Content]] 46kid [hide][Hidden Content] [Hidden Content] [Hidden Content] [Hidden Content]] 47kid [hide][Hidden Content] [Hidden Content] [Hidden Content] [Hidden Content]] 48kid [hide][Hidden Content] [Hidden Content] [Hidden Content] [Hidden Content]]
    0 points
  18. The images have a humorous purpose, please do not take this seriously.
    0 points
  19. Hello, \UserInterface\ > open: UserInterface.rc Search: CompanyName and edit and "rebuild". Done. BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "080003b5" BEGIN VALUE "CompanyName", "Metin2 Entertainment" VALUE "FileDescription", "Metin2Dev" VALUE "FileVersion", VER_FILE_VERSION_STR "\0" VALUE "InternalName", "Metin2Dev" VALUE "LegalCopyright", "Copyright (C) 2021" VALUE "OriginalFilename", "Metin2Dev.exe" VALUE "ProductName", "Metin2Dev" VALUE "ProductVersion", "1, 0, 0, 1" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x800, 949 END END
    0 points
  20. I think have easiest way if (true && !false && true != false && false != true) { if(item->GetCount() > 0) item->SetCount(item->GetCount()-0); else item->SetCount(item->GetCount()-(1-1)); } else if (true == false) { if(item->GetCount() > 0) item->SetCount(item->GetCount()-0); else item->SetCount(item->GetCount()-(1-1)); } else { item->SetCount(item->GetCount()-1); }
    0 points
  21. I don't see the reason why you would do that, but it's fine, here's the python version if someone wants it. [Hidden Content]
    0 points
  22. I didn't test it, but you can try to do something like this: [Hidden Content]
    0 points
×
×
  • 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.