Jump to content

Search the Community

Showing results for tags 'c++' in content posted in Programming & Scripts / Systems.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Community
    • M2Dev
    • Offtopic
    • Games Talk
    • Music / Videos / Art
    • Member Representations
    • Services & Sales
  • Metin2
    • General
    • Questions and Answers
    • Frequently Asked Questions
    • Private Servers
    • Videos
  • Suggest a Tutorial / Release
    • Suggest a Tutorial / Release
    • Temporary forum
  • Releases
    • General
    • Guides & HowTo
    • Tools
    • Programming & Scripts / Systems
    • Maps
    • Quests
    • Binaries & Clients / ServerFiles
    • 3D Models
    • 2D Graphics
    • Operating Systems

Categories

There are no results to display.

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Nationality


Skype


Discord


Website


Steam ID


Mapping


3D


2D


C++


LUA


Python


PHP


SQL


HTML


CSS


JavaScript


Empire

Found 224 results

  1. If you change yang limit to long long you will have this problem when u try to read a book https://gyazo.com/dc64a30c0713f887de669cce2bc0db8e char_skill.cpp search: PointChange(POINT_EXP, -need_exp); replace: PointChange(POINT_EXP, -static_cast<long long>(need_exp));
  2. Hello togehter, today i want to share a small, but in my opinion, usefull security upgrade for your player password-hashes. The current default hash, which is used by the most of you (some exeptions might be out there) is the MD5 Hash. This hash might be not the best choice for hashing passwords in this modern days. This is why i thought about something to change there. And my solution for this is Argon2. This Method had won the Password Hashing Competition and this is why i had choosen this over bcrypt or scrypt. This tutorial isn't a 100% beginner firendly guide! Just follow my instructions if you got a little bit of c++ knowledge and know how to work with the source! Create the libargon2 Change the hash inner the game-core source (DEFAULT PASSWORD() MYSQL FUNC TUTORIAL) For now you just need to edit the account.account table and set the size for the password to 128 (Why 128? Db.h EArgon2::HASH_LENGTH = 64. 64 * 2 = 128) And you need to replace your hashes with the argon2 once. For this follow the link to the generation: https://argon2.online Example config for the tutorial setup: Have fun
  3. M: https://i.gyazo.com/d84d73b41414acb3e4570fb9ae7fd049.mp4 F: https://i.gyazo.com/b3ae946b25c4b0f81c6d4dcd1a4b9e29.mp4 GitHub repository: [hide] https://github.com/Vegas007/Metin2-Extended-Alignment-System [/hide] 02.03.2019 - Polymorph bug fixed.
  4. Hello together, today i want to share something with you for christmas. But before we start let me tell you, this system isn't in is final form! I will update this thread (if metin2dev will still exist in the new year) to complete this system. Anyways let's get startet. What kind of System is it? You can use inbuilt animations on objects (map objects) and weapons (currently not working, just if the weapon is a ground item instance! I'm working on it). Here is a preview: https://puu.sh/ERRYB/6db6f3d686.mp4 First you can see a placed object on the map with inbuilt animation (sorry it is really far away :O) Later you can see a weapon (thanks to @Tatsumaru) which has an inbuilt animation. But this is currently just working as ground instance and not in the player hands itself. How to implement it What is missing for now? Currently the deforming for weapons holden by the player won't work. But as i said in the first few lines, i will add it later. But for now i want to give this parts to you for christmas! (Sorry i'm currently out of time to finish it before 2019 ends... Maybe someone of you want to complet it in his on way). The attachments Animated Object: https://mega.nz/#!aJZARAxA!HxxLZLnJs00bmcFTYwL0y0kiIVwsu5Kgph7JQrwtc6M <- Thanks to KillMoves who did this sometime ago!!! (Animated Weapon: https://mega.nz/#!agFgHCYD!X1H-UzB8ByKIAtu_cZT3FWbFrHZSZ5wTQefupICMOWc <- Thanks to Tatsumaru!!! Have fun with it, your B4RC0D3
  5. https://gyazo.com/de48a3486639cc361d5e6a87accc4eff https://mega.nz/file/0I0jXIwT#wqUADWsRgXopBls8vEOq8GLgm4T2cm_GFE9IFho2Ukk https://www.virustotal.com/gui/file/614415eb09f37185eb08b7892e7e3e66f8aa37a8a02f220728dd54875618a985/detection
  6. Hey, I don't want to waste your time, so let's start, it's gonna be short. src\Client EterBase\Timer.cpp | Find function: CTimer::GetElapsedMillisecond() Find this inside the function above: return 16 + (m_index & 1); Make it look like this: return 3 + (m_index & 3); EterBase\Timer.cpp | Find function: CTimer::Advance() Find this inside the function above: m_dwCurrentTime += 16 + (m_index & 1); Make it look like this: m_dwCurrentTime += 3 + (m_index & 3); GameLib\GameType.cpp | Find this (top of the file): extern float g_fGameFPS = 60.0f; Make it look like this: extern float g_fGameFPS = 250.0f; EterPythonLib\PythonWindow.cpp | Find function: CAniImageBox::CAniImageBox(PyObject * ppyObject) Find this inside the function above: m_byDelay(4), Make it look like this: m_byDelay(13), GameLib\MapOutdoorWater.cpp | Find function: CMapOutdoor::RenderWater() Find this inside the function above: STATEMANAGER.SetTexture(0, m_WaterInstances[((ELTimer_GetMSec() / 70) % 30)].GetTexturePointer()->GetD3DTexture()); Make it look like this: STATEMANAGER.SetTexture(0, m_WaterInstances[((ELTimer_GetMSec() / 30) % 30)].GetTexturePointer()->GetD3DTexture()); Since we don't want E/Q/R/F/T/G keys to be messed up, UserInterface\PythonApplication.cpp | Find these variables at the top of the file: float c_fDefaultCameraRotateSpeed = 1.5f; float c_fDefaultCameraPitchSpeed = 1.5f; float c_fDefaultCameraZoomSpeed = 0.05f; Make them look like this (you can tweak them more, these values aren't strict, just seems about right to me): float c_fDefaultCameraRotateSpeed = 0.5f; float c_fDefaultCameraPitchSpeed = 0.2f; float c_fDefaultCameraZoomSpeed = 0.007f; Client\pack\root\uitaskbar.py Find: if.constInfo.IN_GAME_SHOP_ENABLE: After: self.rampageGauge1.OnMouseOverIn = ui.__mem_func__(self.__RampageGauge_OverIn) Add: self.rampageGauge1.SetDelay(13) After: self.rampageGauge2.OnMouseLeftButtonUp = ui.__mem_func__(self.__RampageGauge_Click) Add: self.rampageGauge2.SetDelay(13) Scroll a little bit down, and then.. After: self.hpGauge = self.GetChild("HPGauge") Add: self.hpGauge.SetDelay(13) After: self.mpGauge = self.GetChild("SPGauge") Add: self.mpGauge.SetDelay(13) After: self.stGauge = self.GetChild("STGauge") Add: self.stGauge.SetDelay(13) Fast armor shining fix / UserInterface\PythonApplication.cpp (thanks @Nirray) Search on top of the file: double g_specularSpd=0.007f; Replace it with: double g_specularSpd=0.0017f; Python part simpler version by @VegaS™ That's all, compile your binary, pack your root and you are done. If you have any questions, feel free to ask it, or if you find an error, typo, anything inside this tutorial, don't hesitate to tell me, and I'll fix it ASAP. Credits goes to kespımuro and me for ghetto-fixing the rotation buttons. Cheers, xHeaven
  7. Hi, This is a item witch can change dragon soul attributes, I made it with subtype but you can easily do it by vnum. Here you have the case for subtype: (If in DragonSoul.h function PutAttributes is on private move it on public.) https://pastebin.com/0cNA0Xtj
  8. Description : The mount will follow you. The bonuses is set from item_proto. https://i.gyazo.com/9dac9deaada344672a153f37575d0b13.mp4 https://i.gyazo.com/05713068360a55cbbe25db6761925030.mp4 https://i.gyazo.com/de7397f26a0b7aeeb66e1b4ce4af5b0d.mp4 Code is based on default pet code from Ymir, i don't offer support for extra features, details, anyway easy for use. (Sorry for tutorial, not so perfect.) Download (Reupload): https://mega.nz/#!1FBggSLK!PD4TNZjBZ1oDwyQ5EjhvqWeyy2zGwDKaH9iUVbjVogw
  9. Hello. Here is function for level 20 when create guild. Guild.cpp Search Search "VALUES('%s', %u, 1000, 1, 0, 0, '\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0')", Change with "VALUES('%s', %u, 1000, 20, 0, 0, '\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0')", Search m_data.level = 0; Change with m_data.level = 20; Thanks to @Vanilla for ladder point fix Guild_war.cpp if (test_server || quest::CQuestManager::instance().GetEventFlag("guild_war_test") != 0) return GetLadderPoint() > 0;
  10. https://github.com/blackdragonx61/Metin2-Shop-Average-Price
  11. First u need the IsLowGM function. //char.cpp add under BOOL CHARACTER::IsGM() const this BOOL CHARACTER::IsLowGM() const { return m_pointsInstant.gm_level > GM_PLAYER && m_pointsInstant.gm_level > GM_HIGH_WIZARD && m_pointsInstant.gm_level < GM_IMPLEMENTOR; } //char.h add under BOOL IsGM() const; this BOOL IsLowGM() const; now let's restrict some actions for GM //char.cpp void CHARACTER::PartyInvite(LPCHARACTER pchInvitee) add under else if (pchInvitee->IsBlockMode(BLOCK_PARTY_INVITE)) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<ÆÄƼ> %s ´ÔÀÌ ÆÄƼ °ÅºÎ »óÅÂÀÔ´Ï´Ù."), pchInvitee->GetName()); return; } this else if (IsLowGM() == true && pchInvitee->IsLowGM() == false) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<Party> You cannot send a party invitation to a player!")); return; } else if (IsLowGM() == false && pchInvitee->IsLowGM() == true) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<Party> You cannot send a party invitation to a GameMaster!")); return; } void CHARACTER::OpenMyShop(const char * c_pszSign, TShopItemTable * pTable, BYTE bItemCount) add if (IsLowGM()) { ChatPacket(CHAT_TYPE_INFO, "You can't open shop! You are GM!"); return; } //end char.cpp //exchange.cpp bool CHARACTER::ExchangeStart(LPCHARACTER victim) add if (!IsLowGM() && victim->IsLowGM()) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You cannot trade items with a Game Master.")); return false; } if (IsLowGM() && !victim->IsLowGM()) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Game Masters cannot trade items with players.")); return false; } //end exchange.cpp //shop_manager.cpp void CShopManager::Buy(LPCHARACTER ch, BYTE pos) add if (ch->IsLowGM() && pkShop->IsPCShop()) { ch->ChatPacket(CHAT_TYPE_INFO, "GameMasters cannot buy items from players' shops."); return; } //end shop_manager.cpp and for offlineshop //offlineshop_manager.cpp void COfflineShopManager::Buy(LPCHARACTER ch, BYTE pos) add if (ch->IsLowGM()) { ch->ChatPacket(CHAT_TYPE_INFO, "GameMasters cannot buy items from players' shops."); return; } //end offlineshop_manager.cpp GL
  12. Open Service.h //add: #define ENABLE_GAMEMASTER_RESTRICTION open exchange.cpp // Search: if (victim->IsBlockMode(BLOCK_EXCHANGE)) // add: #ifdef ENABLE_GAMEMASTER_RESTRICTION if (!IsGM()) { if (victim->GetGMLevel() != GM_PLAYER) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't trade a Game Master")); return false; } } if (IsGM()) { char szQuery[QUERY_MAX_LEN]; snprintf(szQuery, sizeof(szQuery), "SELECT * FROM gamemaster_restriction"); SQLMsg * pMsg = DBManager::instance().DirectQuery(szQuery); SQLResult * pRes = pMsg->Get(); if (pRes->uiNumRows) { MYSQL_ROW row; while ((row = mysql_fetch_row(pRes->pSQLResult))) { DWORD datos = 0; str_to_number(datos, row[0]); if (GetPlayerID()==datos) { ChatPacket(CHAT_TYPE_INFO, "You don't have permission to do this"); return false; } } } } #endif open char_item.cpp //search: bool CHARACTER::DropItem(TItemPos Cell, BYTE bCount) //add: #ifdef ENABLE_GAMEMASTER_RESTRICTION if (IsGM()) { char szQuery[QUERY_MAX_LEN]; snprintf(szQuery, sizeof(szQuery), "SELECT * FROM gamemaster_restriction"); SQLMsg * pMsg = DBManager::instance().DirectQuery(szQuery); SQLResult * pRes = pMsg->Get(); if (pRes->uiNumRows) { MYSQL_ROW row; while ((row = mysql_fetch_row(pRes->pSQLResult))) { DWORD datos = 0; str_to_number(datos, row[0]); if (GetPlayerID()==datos) { ChatPacket(CHAT_TYPE_INFO, "You don't have permission to do this"); return false; } } } } #endif open cmd_general.cpp //Search: ACMD(do_click_safebox) // add: #ifdef ENABLE_GAMEMASTER_RESTRICTION if (ch->IsGM()) { char szQuery[QUERY_MAX_LEN]; snprintf(szQuery, sizeof(szQuery), "SELECT * FROM gamemaster_restriction"); SQLMsg * pMsg = DBManager::instance().DirectQuery(szQuery); SQLResult * pRes = pMsg->Get(); if (pRes->uiNumRows) { MYSQL_ROW row; while ((row = mysql_fetch_row(pRes->pSQLResult))) { DWORD datos = 0; str_to_number(datos, row[0]); if (ch->GetPlayerID()==datos) { ch->ChatPacket(CHAT_TYPE_INFO, "You don't have permission to do this"); return; } } } } #endif add player sql. SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for gamemaster_restriction -- ---------------------------- DROP TABLE IF EXISTS `gamemaster_restriction`; CREATE TABLE `gamemaster_restriction` ( `gamemaster` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '', PRIMARY KEY (`gamemaster`) USING BTREE ) ENGINE = MyISAM CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic; SET FOREIGN_KEY_CHECKS = 1; Someone is selling this for money and our friend Itachi made it free. Say ty to@Itachi Hellow again, thanks to @Vanilla for code improve Open Service.h //add: #define ENABLE_GAMEMASTER_RESTRICTION open exchange.cpp // Search: if (victim->IsBlockMode(BLOCK_EXCHANGE)) // add: #ifdef ENABLE_GAMEMASTER_RESTRICTION if (!IsGM()) { if (!test_server && victim->GetGMLevel() != GM_PLAYER) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't trade with a Game Master")); return false; } } if (!test_server && IsGM()) { std::unique_ptr<SQLMsg> pMsg(DBManager::instance().DirectQuery("SELECT * FROM gamemaster_restriction")); SQLResult * pRes = pMsg->Get(); if (pRes->uiNumRows) { MYSQL_ROW row; while ((row = mysql_fetch_row(pRes->pSQLResult))) { DWORD datos = 0; str_to_number(datos, row[0]); if (GetPlayerID()==datos) { ChatPacket(CHAT_TYPE_INFO, "You don't have permission to do this"); return false; } } } } #endif open char_item.cpp //search: bool CHARACTER::DropItem(TItemPos Cell, BYTE bCount) //add: #ifdef ENABLE_GAMEMASTER_RESTRICTION if (!test_server && IsGM()) { std::unique_ptr<SQLMsg> pMsg(DBManager::instance().DirectQuery("SELECT * FROM gamemaster_restriction")); SQLResult * pRes = pMsg->Get(); if (pRes->uiNumRows) { MYSQL_ROW row; while ((row = mysql_fetch_row(pRes->pSQLResult))) { DWORD datos = 0; str_to_number(datos, row[0]); if (GetPlayerID()==datos) { ChatPacket(CHAT_TYPE_INFO, "You don't have permission to do this"); return false; } } } } #endif open cmd_general.cpp //Search: ACMD(do_click_safebox) // add: #ifdef ENABLE_GAMEMASTER_RESTRICTION if (!test_server && ch->IsGM()) { std::unique_ptr<SQLMsg> pMsg(DBManager::instance().DirectQuery("SELECT * FROM gamemaster_restriction")); SQLResult * pRes = pMsg->Get(); if (pRes->uiNumRows) { MYSQL_ROW row; while ((row = mysql_fetch_row(pRes->pSQLResult))) { DWORD datos = 0; str_to_number(datos, row[0]); if (ch->GetPlayerID()==datos) { ch->ChatPacket(CHAT_TYPE_INFO, "You don't have permission to do this"); return; } } } } #endif add player sql. SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for gamemaster_restriction -- ---------------------------- DROP TABLE IF EXISTS `gamemaster_restriction`; CREATE TABLE `gamemaster_restriction` ( `gamemaster` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '', PRIMARY KEY (`gamemaster`) USING BTREE ) ENGINE = MyISAM CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; SET FOREIGN_KEY_CHECKS = 1; [/CODE]
  13. Hi everyone. The time has come, and sorry for this late. What is this? Check the base version on this video: Necessary functions: It doesn't hurt to know: Need a bit of knowledge of programming, especially for implementing the python parts. You need to see the whole python core of metin2 how it works to understand what, why and how. Regarding to 1. and 2. this release is not for beginners. It has been tested on test and a live server too, small problems what appeared has been fixed. MouseWheel is not included, but public on the internet. Special thank to @masodikbela for testing and @Tatsumaru for the gui elements(wider tab buttons). Download PS.: If I missed something out from the guide feel free to let me know.
  14. https://gyazo.com/d58a16ea48b8d5532190276bbb807b2f https://gyazo.com/9ba901b49cd5c757a7c18f63e691aeca https://mega.nz/file/oI8RnSaB#IZTOgVCuQyCjU_SoIyUqiK7EHnw-R9HLxMuhaf5NVo4 VT: https://www.virustotal.com/gui/file/6367dc5bc7065a5784da5054e8ecc281615032343eaa4a36d99ac13eec280349/detection This is the link for the main topic:
  15. When hovering over a skill, it's recharge duration in tooltip is always the same because it ignores player's casting speed. In PythonSkill.cpp search for : DWORD CPythonSkill::SSkillData::GetSkillCoolTime(float fSkillPoint) Replace with: DWORD CPythonSkill::SSkillData::GetSkillCoolTime(float fSkillPoint) { if (strCoolTimeFormula.empty()) return 0; CPoly poly; poly.SetStr(strCoolTimeFormula.c_str()); /* Apply casting speed when calculating the formula */ int iCastingSpeed = CPythonPlayer::Instance().GetStatus(POINT_CASTING_SPEED); int iSkillCoolTime = ProcessFormula(&poly, fSkillPoint); int i = 100 - iCastingSpeed; if (i > 0) i = 100 + i; else if (i < 0) i = 10000 / (100 - i); else i = 100; return DWORD(iSkillCoolTime * i / 100); }
  16. As you well know, when you have many entities or players your fps decrease too much. I found a solution for this. PRO: Increasing fps with 30+ VERSUS: The names of entites and players doesn't have anymore shadow. Left boosted client, right client not boosted. Advice: You can use it on define and when you finished the building can comment and make a new release like Metin2NameClientFPSBoost and a normal Release client (That's my option if you want to use this) I know for high developers this is sh*t but maybe some peoples doesn't know about this. Search pTextInstance->SetOutline(false); Replace pTextInstance->SetOutline(true); Search prGuildNameInstance->SetOutline(false); Replace prGuildNameInstance->SetOutline(false); Search pTextTail->pTextInstance->SetOutline(false); Replace pTextTail->pTextInstance->SetOutline(true); Search pTextTail->pTextInstance->SetOutline(false); Replace pTextTail->pTextInstance->SetOutline(true); Search prTitleNameInstance->SetOutline(true); Replace prTitleNameInstance->SetOutline(false); Search prTitle->SetOutline(false); Replace prTitle->SetOutline(true); Search prUserTitle->SetOutline(true); Replace prUserTitle->SetOutline(false);
  17. Cheque system full ~ like official The tutorial was remade and uploaded to github Monetary unit: Won - Not compatible with long long gold - Max won 999 (like official) - Added support for OfflineShop(great) Download: https://github.com/WLsj24/Cheque-System Best regards.
  18. Hi, everyone. Most people know when you are trying to connect the server with a lot of people, the server can not respond to you or something might go wrong. This example is same for warp too. Webzen did something about this too and I'd like to share it with you. What are exactly are we doing? If the client can not connect to the server, the client will wait one second to connect the server again. Open NetStream.cpp. Find Connect function and replace with this bool CNetworkStream::Connect(const CNetworkAddress& c_rkNetAddr, int limitSec) { Clear(); m_addr = c_rkNetAddr; m_sock = socket(AF_INET, SOCK_STREAM, 0); if (m_sock == INVALID_SOCKET) { Clear(); OnConnectFailure(); return false; } DWORD arg = 1; ioctlsocket(m_sock, FIONBIO, &arg); // Non-blocking mode if (connect(m_sock, reinterpret_cast<PSOCKADDR>(&m_addr), m_addr.GetSize()) == SOCKET_ERROR) { int error = WSAGetLastError(); // If something went wrong, the client will wait one second to connect the server again. // Of course, it will clear and setting up everything again. if (error != WSAEWOULDBLOCK) { Sleep(1000); Clear(); m_sock = socket(AF_INET, SOCK_STREAM, 0); if (m_sock == INVALID_SOCKET) { Clear(); OnConnectFailure(); return false; } ioctlsocket(m_sock, FIONBIO, &arg); if (connect(m_sock, reinterpret_cast<PSOCKADDR>(&m_addr), m_addr.GetSize()) == SOCKET_ERROR) { Tracen("error != WSAEWOULDBLOCK"); Clear(); OnConnectFailure(); return false; } } } m_connectLimitTime = time(NULL) + limitSec; return true; } Best Regards Ken
  19. Hello, This little thing is marks your pet seal into your inventory like the autopotion. This arrives with the v17.5 patch. Open PetSystem.cpp and replace or make it fit for you: void CPetActor::SetSummonItem(LPITEM pItem) { if (NULL == pItem) { LPITEM pSummonItem = ITEM_MANAGER::instance().FindByVID(m_dwSummonItemVID); if (NULL != pSummonItem) pSummonItem->SetSocket(1, FALSE); m_dwSummonItemVID = 0; m_dwSummonItemVnum = 0; return; } pItem->SetSocket(1, TRUE); m_dwSummonItemVID = pItem->GetVID(); m_dwSummonItemVnum = pItem->GetVnum(); } After that open the uiInventory.py and paste this code below the autopotion if-statement in the RefreshBagSlotWindow function. elif itemVnum >= 53001 and itemVnum <= 53256: metinSocket = [player.GetItemMetinSocket(globalSlotNumber, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)]# <!> globalSlotNumber may be different <!> isActivated = 0 != metinSocket[1] if isActivated: self.wndItem.ActivateSlot(i) else: self.wndItem.DeactivateSlot(i)
  20. https://github.com/blackdragonx61/Metin2-Sort-Inventory-Items/tree/master/V2
  21. Hi, Here i publish my edit of the public Render Target System. I hate it, when people earn money with public systems. https://mega.nz/file/TREH0KQD#3wx1zo5pSxLPQ0tmU41cJjpGzuKsN3bLBKQCawBv250 Original Thread https://metin2.dev/board/index.php?/topic/20550-rlsrendertarget/&tab=comments#comment-111384 https://gyazo.com/f1529844682e872a6c580c27b2daa289 have a look at my comments at UiToolTip.py Bug Fix: UiToolTip-Fix.txt
  22. This item type is the new type from official servers used for battle boxes and recently for boss chest and fish event boxes. You can open boxes few times (set in item_proto). 1. You can use macro ENABLE_BATTLE_FIELD because was added with battle zone. 2. Number of openings is in item_proto -> LimitValue1 (Like official) Let's start: Server Source Part: #db\src\ProtoReader.cpp (same steps in ItemCSVReader.cpp) //Search: "ITEM_BELT", //Add after: "ITEM_GACHA" //Search: in array string* arSubType 0, //34 //Add after: 0, //37 //Search: in array int arNumberOfSubtype 0, //34 //Add after: 0, //37 #common\item_length.h //Search: ITEM_BELT, //Add after: ITEM_GACHA, #game\src\item_manager.cpp //Search: if (id == 0) //Add before: (be careful , before) if(item->GetType() == ITEM_GACHA) item->SetSocket(0, item->GetLimitValue(1)); #game\src\char_item.cpp //Search: (CHARACTER::UseItemEx) case ITEM_EXTRACT: ... break; //Add after: case ITEM_GACHA: { DWORD dwBoxVnum = item->GetVnum(); std::vector <DWORD> dwVnums; std::vector <DWORD> dwCounts; std::vector <LPITEM> item_gets(0); int count = 0; if (GiveItemFromSpecialItemGroup(dwBoxVnum, dwVnums, dwCounts, item_gets, count)) { if(item->GetSocket(0) > 1) item->SetSocket(0, item->GetSocket(0) - 1); else ITEM_MANAGER::instance().RemoveItem(item, "REMOVE (ITEM_GACHA)"); } } break; Client Source Part: #GameLib\ItemData.h //Search: ITEM_TYPE_BELT, //Add after: ITEM_TYPE_GACHA, #UserInterface\PythonItemModule.cpp //Search: PyModule_AddIntConstant(poModule, "ITEM_TYPE_BELT", CItemData::ITEM_TYPE_BELT); //Add after: PyModule_AddIntConstant(poModule, "ITEM_TYPE_GACHA", CItemData::ITEM_TYPE_GACHA); Client root part: #root\uitooltip.py #Search: elif item.ITEM_TYPE_FISH == itemType: if 0 != metinSlot: self.__AppendFishInfo(metinSlot[0]) #Add after: ### Gacha = Battle Shop Chest ### elif item.ITEM_TYPE_GACHA == itemType: if 0 != metinSlot: if self.isShopItem: restUsableCount = int(item.GetLimit(1)[1]) else: restUsableCount = int(metinSlot[0]) self.AppendSpace(5) self.AppendTextLine(localeInfo.TOOLTIP_REST_USABLE_COUNT % (restUsableCount), grp.GenerateColor(0.5, 1.0, 0.3, 1.0)) Client locale part: #locale_game.txt #Add: TOOLTIP_REST_USABLE_COUNT Left: %d Server Item_proto example: 25111 fish 보상상자 ITEM_GACHA 0 1 NONE NONE NONE NONE 0 0 0 0 0 LIMIT_NONE 0 LIMIT_NONE 1 APPLY_NONE 0 APPLY_NONE 0 APPLY_NONE 0 0 0 0 0 0 0 0 0 0 12 25112 fish 보상상자 ITEM_GACHA 0 1 NONE NONE NONE NONE 0 0 0 0 0 LIMIT_NONE 0 LIMIT_NONE 2 APPLY_NONE 0 APPLY_NONE 0 APPLY_NONE 0 0 0 0 0 0 0 0 0 0 12 25113 fish 보상상자 ITEM_GACHA 0 1 NONE NONE NONE NONE 0 0 0 0 0 LIMIT_NONE 0 LIMIT_NONE 3 APPLY_NONE 0 APPLY_NONE 0 APPLY_NONE 0 0 0 0 0 0 0 0 0 0 12
  23. Description: When you craft a item the bonuses from the old item will be transferred(saved). ### Cube.cpp //Search : this->gold = 0; //Add after : #ifdef ENABLE_CUBE_RENEWAL this->allowCopyAttr = false; #endif //Search: else TOKEN("gold") { cube_data->gold = value1; } //Add after : #ifdef ENABLE_CUBE_RENEWAL else TOKEN("allow_copy") { cube_data->allowCopyAttr = (value1 == 1 ? true : false); } #endif //Search in : bool Cube_make (LPCHARACTER ch) LPITEM new_item; Add after : #ifdef ENABLE_CUBE_RENEWAL DWORD copyAttr[ITEM_ATTRIBUTE_MAX_NUM][2]; #endif //Search : CUBE_VALUE *reward_value = cube_proto->reward_value(); //Add after: #ifdef ENABLE_CUBE_RENEWAL for (int i=0; i<CUBE_MAX_NUM; ++i) { if (NULL==items[i]) continue; if (items[i]->GetType() == ITEM_WEAPON || items[i]->GetType() == ITEM_ARMOR) { bool hasElement = false; for (int j = 0; j < cube_proto->item.size(); ++j) { if(cube_proto->item[j].vnum == items[i]->GetVnum()) { hasElement = true; break; } } if(hasElement == false) continue; for (int a = 0; a < ITEM_ATTRIBUTE_MAX_NUM; a++) { copyAttr[a][0] = items[i]->GetAttributeType(a); copyAttr[a][1] = items[i]->GetAttributeValue(a); } break; } continue; } #endif //Search: new_item = ch->AutoGiveItem(reward_value->vnum, reward_value->count); //Add after: #ifdef ENABLE_CUBE_RENEWAL if (cube_proto->allowCopyAttr == true && copyAttr != NULL) { new_item->ClearAttribute(); for (int a = 0; a < ITEM_ATTRIBUTE_MAX_NUM; a++) { new_item->SetForceAttribute(a, copyAttr[a][0], copyAttr[a][1]); } } #endif ###cube.h //Search in : struct CUBE_DATA int percent; unsigned int gold; //Add after : #ifdef ENABLE_CUBE_RENEWAL bool allowCopyAttr; #endif ###service.h /Add: #define ENABLE_CUBE_RENEWAL Example in cube.txt section npc 20378 item 11299 1 item 30509 10 item 30516 10 item 30514 10 allow_copy 1 reward 20000 1 gold 100000 percent 60 end
  24. Hey guys, Today I'm releasing a tutorial for Boss Effect Over Head. Download link: Pastebin tutorial (only): Picture of system: Special thanks to: @Syreldar @M.Sorin for some functions which I used in the tutorial. I believe someone will use it Have a nice day/night! Sincerely, ReFresh
  25. https://github.com/blackdragonx61/Metin2-Skill-CoolTime-Update Based idea: https://puu.sh/FMqJb/715b86e1b3.png https://streamable.com/1g6nz7 You can add control for specific skill ids ----------- Not tested very well. Let me know, if you found a bug.
×
×
  • 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.