Jump to content

Search the Community

Showing results for tags 'c++'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Metin2 Dev
    • Announcements
  • Community
    • Member Representations
    • Off Topic
  • Miscellaneous
    • Metin2
    • Showcase
    • File Requests
    • Community Support - Questions & Answers
    • Paid Support / Searching / Recruiting
  • Metin2 Development
  • Metin2 Development
    • Basic Tutorials / Beginners
    • Guides & HowTo
    • Binaries
    • Programming & Development
    • Web Development & Scripts / Systems
    • Tools & Programs
    • Maps
    • Quests
    • 3D Models
    • 2D Graphics
    • Operating Systems
    • Miscellaneous
  • Private Servers
    • Private Servers
  • Uncategorized
    • Drafts
    • Trash
    • Archive
    • Temporary
    • Metin2 Download

Product Groups

  • Small Advertisement
  • Large Advertisement
  • Advertising

Categories

  • Third Party - Providers Directory

Categories

  • Overview
  • Pages
    • Overview
    • File Formats
    • Network
    • Extensions

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Pillory


Marketplace


Game Server


Country


Nationality


Github


Gitlab


Discord


Skype


Website

  1. [Hidden Content] [Hidden Content] Item icons will appear in the hyperlink tooltip OLD: NOW:
  2. Hi, [Hidden Content] [Hidden Content] This quest is responsible for granting basic costumes to players when they reach certain levels in the game. The quest is triggered when a player logs in or levels up in the game. It checks the player's level and grants various cosmetic items if certain conditions are met. Basic Costume: Players receive a basic costume based on their gender. Basic Hairstyle: Players receive a basic hairstyle and an additional cosmetic item. Basic Pet: Players receive a basic pet at a certain level. Basic Weapon: Players receive a basic weapon based on their class. Basic Mount: Players receive a basic mount at a certain level.
  3. This is basically a system to complement my other system. With this you one can have a custom tag name behind the name/karma of the character As you can see on this picture Behind the character name and karma there's a red tag, this is achieved using this system. I didn't make it show the level by my personal choice but you can easily add it. I remember seeing another post on this forum about this, but i cant find it anymore not sure why, so i'm posting my own version. InstanceBaseEffect.cpp Search for CInstanceBase::UpdateTextTailLevel Below sprintf(szText, "Lv %d", level); And before CPythonTextTail::Instance().AttachLevel(GetVirtualID(), szText, s_kLevelColor); Add this if (IsGameMaster()) { const char* name = GetNameString(); size_t len = strcspn(name, "]"); char *result = (char *)malloc((len + 1) * sizeof(char)); // Not sure why on client side needs to be like this strncpy(result, name, len +1); result[len + 1] = '\0'; const char *tagDictionary[] = { "[GM]", "[SA]", "[GA]", "[DEV]" }; //Here you can also change the color of the tag const char *nameDictionary[] = { "|cffff0000[STAFF]", "|cffff0000[EQUIPA]", "|cffff0000[STAFF2]", "|cffff0000[DEVELOPER]" }; int tagIndex = -1; for (int i = 0; i < sizeof(tagDictionary) / sizeof(tagDictionary[0]); ++i) { if (strcmp(result, tagDictionary[i]) == 0) { tagIndex = i; break; } } if (tagIndex != -1){ sprintf(szText, nameDictionary[tagIndex]); } else{ // This is just for if the code cant find any tag, it will default to this one. // You can also just delete this whole else statement and it will default to the level text sprintf(szText, "|cffff0000[TEST]"); } free(result); CPythonTextTail::Instance().AttachLevel(GetVirtualID(), szText, s_kLevelColor); } And thats all xD
  4. Download Alternative download links → G-Drive Hello! I was searching for it back in the days but i never found it, so i share it with you. Gif about it:
  5. So ashika posted this a few days ago And since i couldnt find a way to show all of them ingame depending on the GM "class" i decided to make my own, its not that hard tbh, and i think it doesnt fck anything but if u find problems let me know. Here's the result First of all, the way the system works is by the GM name, so if it has [SA] or [GM] in name it will apply the effect for it. Server Side service.h #define ENABLE_CUSTOM_TAG_EFFECTS affect.h in enum EAffectBits search for the last enum (in my case is AFF_BITS_MAX) and before it add #ifdef ENABLE_CUSTOM_TAG_EFFECTS AFF_GA, AFF_GM, AFF_SA, #endif on char.cpp Search for m_afAffectFlag.Set(AFF_YMIR); And replace it with this #ifdef ENABLE_CUSTOM_TAG_EFFECTS const char* name = GetName(); // This will only search for the first 4 characters if u want more for tags such as [DEV] you will need to increase this values char result[5]; strncpy(result, name, 4); result[4] = '\0'; // This is where you change the tag const char *tagDictionary[] = { "[GM]", "[SA]", "[GA]" }; // This is where you change the effect name to what you put on affect.h const EAffectBits nameDictionary[] = { AFF_GM, AFF_SA, AFF_GA }; int tagIndex = -1; for (int i = 0; i < sizeof(tagDictionary) / sizeof(tagDictionary[0]); ++i) { if (strcmp(result, tagDictionary[i]) == 0) { tagIndex = i; break; } } if (tagIndex != -1) { m_afAffectFlag.Set(nameDictionary[tagIndex]); } else{ m_afAffectFlag.Set(AFF_YMIR); } #endif On client side locale_inc.h #define ENABLE_CUSTOM_TAG_EFFECTS InstanceBaseEffect.cpp On CInstanceBase::__SetAffect( Search case AFFECT_YMIR: Add below #ifdef ENABLE_CUSTOM_TAG_EFFECTS case AFFECT_GA: case AFFECT_GM: case AFFECT_SA: #endif InstanceBase.h Search for AFFECT_NUM Add before #ifdef ENABLE_CUSTOM_TAG_EFFECTS AFFECT_GA, // 50 AFFECT_GM, // 51 AFFECT_SA, // 52 #endif InstanceBase.cpp On CInstanceBase::IsGameMaster() Add before return false #ifdef ENABLE_CUSTOM_TAG_EFFECTS if (m_kAffectFlagContainer.IsSet(AFFECT_GA)) return true; if (m_kAffectFlagContainer.IsSet(AFFECT_GM)) return true; if (m_kAffectFlagContainer.IsSet(AFFECT_SA)) return true; #endif PythonCharacterModule.cpp Add next to the others #ifdef ENABLE_CUSTOM_TAG_EFFECTS PyModule_AddIntConstant(poModule, "AFFECT_GA", CInstanceBase::AFFECT_GA); PyModule_AddIntConstant(poModule, "AFFECT_GM", CInstanceBase::AFFECT_GM); PyModule_AddIntConstant(poModule, "AFFECT_SA", CInstanceBase::AFFECT_SA); #endif This file is for the Faster Loading System found here on the forum, if u dont have it, you will need to add the effect on client/root/playersettingsmodule.py, i wont provide a code for cuz i dont really have a way to test it, but shouldn't be that hard PythonPlayerSettingsModule.cpp Find {pkBase.EFFECT_REFINED + 1 Before add #ifdef ENABLE_CUSTOM_TAG_EFFECTS {pkBase.EFFECT_AFFECT + CInstanceBase::AFFECT_GA, "Bip01", "d:/ymir work/effect/team_ranks/ga.mse"}, {pkBase.EFFECT_AFFECT + CInstanceBase::AFFECT_GM, "Bip01", "d:/ymir work/effect/team_ranks/gm.mse"}, {pkBase.EFFECT_AFFECT + CInstanceBase::AFFECT_SA, "Bip01", "d:/ymir work/effect/team_ranks/sa.mse"}, #endif Lastly, on client you will need to add ashika files where you want (in my case i added to etc/ymir work/effect/team_ranks/ and duplicate the gm.mse file (in this case 2 times), change the name to ga.mse and sa.mse, then will open them and at the end of the file there is going to be this line List TextureFiles { "gamemaster.tga" } change them acording to the effect you want, on this case, for GA is gameadmin.tga, for GM is gamemaster.tga and for SA is serveradmin.tga. And thats all, hope you all like it!
  6. [Hidden Content] [Hidden Content] The items on the ground that are close enough to be collected appear in different color.
  7. Hello guys, again small thing for beginners, if you would like to increase or decrease range of sharing EXP in party you have to find file called "party.h" in your server's source On the top of "party.h" you should find: enum // unit : minute { PARTY_ENOUGH_MINUTE_FOR_EXP_BONUS = 60, // 파티 결성 후 60분 후 부터 추가 경험치 보너스 PARTY_HEAL_COOLTIME_LONG = 60, PARTY_HEAL_COOLTIME_SHORT = 30, PARTY_MAX_MEMBER = 8, PARTY_DEFAULT_RANGE = 5000, }; If you want to increase the range of sharing experience in party you should change "PARTY_DEFAULT_RANGE", I recommend to set this to 10000, it gives us many opportunities of exping in party in any location. If you have any questions, I will try to help you.
  8. ! I've only used it on my test server ! Download Set item id under "high_item" event flag to highlight the item name with different color (/e high_item IDOFITEM) Usage: /drop_simul IDOFMOB AMOUNT Result:
  9. Hello, This one is for truly beginners - if you would like to deal the same dmg in every gap between your ninja archer and your target you have to find file: battle.cpp Find: int CalcArrowDamage(LPCHARACTER pkAttacker, LPCHARACTER pkVictim, LPITEM pkBow, LPITEM pkArrow, bool bIgnoreDefense) Under this you have to change "iPercent" int iPercent = 100;
  10. Hi, By pressing SHIFT + RIGHT CLICK on the items eligible for sale, an interface will appear showing you how much money you will receive and how many items you have selected. The selected items will have a special icon indicating that they have been selected. More information can be found in the README. [Hidden Content] [Hidden Content]
  11. This is the problem I am talking about: Basically, when you get down from the mount (or the item slots are refreshed), the tooltip shown does not stay as the one from the item in the inventory's interface on top, but the item in the inventory behind. To fix this behaviour, go on void CSlotWindow::RefreshSlot() and change void CSlotWindow::RefreshSlot() { OnRefreshSlot(); // NOTE : Refresh µÉ¶§ ToolTip µµ °»½Å ÇÕ´Ï´Ù - [levites] if (IsRendering()) { TSlot * pSlot; if (GetPickedSlotPointer(&pSlot)) { OnOverOutItem(); OnOverInItem(pSlot->dwSlotNumber); } } } to: void CSlotWindow::RefreshSlot() { OnRefreshSlot(); if (IsRendering() && UI::CWindowManager::Instance().GetPointWindow() == this) { TSlot * pSlot; if (GetPickedSlotPointer(&pSlot)) { OnOverOutItem(); OnOverInItem(pSlot->dwSlotNumber); } } }
  12. Download Alternative download links → Github Hi, This is all interface about SungmaHee Tower Like official servers and the first floor like Official Servers, In this files we have 2k or 3k LOC, maybe more, I'm tired and I don't have information about all floor's tower, but if you want complete this system, you can contact with some-developer and providing the information about the floors or modifying all floors like your concept for Metin2, you'll be a nice dungeon. I already did the hardest part. You can extract all visual part with the official patchs from this forum. This dungeon is Full C++, Python and SQL. PLEASE: Not more messages for my person if you don't want to pay money, I only sell systems "not personal systems" you need understand about my time, my help, code or resolve some problem, needs time. If you want something (not offlineshop, this world has different options with this system) you can contact me but, you will need understand that I will charge you. I'm a nice person (I think), but this world needs money and if I invest time in one project, I will cancel other projects and is overmoney.
  13. Dear Metin2Dev, I believe that many servers are still using old quests for giving mount bonuses from inventory, which are not bad but not very efficient either. Since I haven't seen anyone share something similar yet, I thought I'd share my solution for getting mount bonuses from the inventory. You need to specify the bonuses in groups, similar to how you specify mob, etc, special drops. After you have set it up and the item is in your inventory, you will receive the bonus you have set. How is a mount's bonus structured? locale/germany/mount_bonus_table.txt: Group MountTest1 { vnum 71224 --Mount item vnum from item_proto (type must be ITEM_QUEST (18)) --You can add maximum 5 bonuses from config (it can be extended) 1 13 5 --13 = APPLY_STUN_PCT 2 14 10 --14 = APPLY_SLOW_PCT 3 15 15 --15 = APPLY_CRITICAL_PCT 4 16 20 --16 = APPLY_PENETRATE_PCT 5 17 25 --17 = APPLY_ATTBONUS_HUMAN } This system works with items whose type is ITEM_QUEST (18). It means that your mount item type must be ITEM_QUEST or it won't give you the bonuses. In the future, i'm planning to extend this system for costume mounts, but you can also do it for yourself. I think this is a good starting point for those are using the old quest solutions to give bonuses from inventory. Tutorial: CommonDefines.h: char.cpp: char.h: char_item.cpp: input_db.cpp: item.cpp: item_manager.cpp: item_manager.h: If you have any ideas on how to make this system better, please leave a comment. I hope this will be useful for you. Best Regards, piktorvik
  14. hello, this system like a title system but you dont need the full system to do it. Enjoy!
  15. Hello, I have been hearing about the existence of such an event from time to time. I thought of creating such a solution. I haven't had any problems so far in my tests. To briefly talk about the incident; Some pack files can be opened and edited while the game is open. This may pose a problem in some exceptional cases. Most of the time, changes made due to cache may not be reflected in the game unless the client is reset, but I still thought it wouldn't hurt to prevent this situation. In addition; Nowadays, foxfs etc. methods are used, so you can also consider this as additional security for your game. The codes are completely open to development and customization, you can progress them in any direction you want. I should point out that this method will work more efficiently with autopatcher. So, you also have a job to do here, the codes I share here are the first stage of this system. The necessary adjustments you will make to the autopatcher depending on these codes will be the second stage. To give an example from the working logic; As soon as the pack file named x is edited, the game will close completely, and when it is opened again, autopatcher (if there is a file integrity feature, etc.) will download the original instead of this edited pack file and allow you to log in from the original file. Likewise, if there is any intervention in the pack files again, these operations will be repeated automatically. (This is the idea I suggested, anyone can use it however they want.) Now let's get to the point.. Here's a short video showing it before editing: [Hidden Content] After video: [Hidden Content] [Hidden Content] For those who are curious; The codes run only once when the client is opened and only keep track of the pack files as long as the game (client) is open. In other words, it does not work repeatedly in situations such as teleportation or casting a character.
  16. Hello! Today I found that in lua the modification of item.set_socket(0, value) does not work. Fixed: int item_set_socket(lua_State* L) { CQuestManager& q = CQuestManager::instance(); if (q.GetCurrentItem() && lua_isnumber(L, 1) && lua_isnumber(L, 2)) { int idx = (int)lua_tonumber(L, 1); int value = (int)lua_tonumber(L, 2); if (idx >= 0 && idx < ITEM_SOCKET_MAX_NUM) q.GetCurrentItem()->SetSocket(idx, value); } return 0; } Original: int item_set_socket(lua_State* L) { CQuestManager& q = CQuestManager::instance(); if (&q == NULL) return 0; LPITEM item = q.GetCurrentItem(); if (item == NULL) return 0; if (item && lua_isnumber(L, 1) && lua_isnumber(L, 2)) { int idx = (int) lua_tonumber(L, 1); int value = (int) lua_tonumber(L, 2); if (idx == NULL) return 0; if (value == NULL) return 0; if (idx >=0 && idx < ITEM_SOCKET_MAX_NUM) item->SetSocket(idx, value); } return 0; } Explanation: If the socket index is 0, it returns and does not run the code... fck logic. if (idx == NULL) return 0;
  17. Download Center Internal Mega.nz GitHub Hi devs, I wanted to add this feature to my mainlines, being that this system is now considered standard in all servers. I downloaded the public version that emulated how the Pet System worked, but I decided to make my own (and am sharing it so you can test it for me as well) In game pic: Pros: Fewer lines of code (50 or so, versus 1200+ in the public system) By not using apply_type and value to assign the monster to ride, we will not lose a usable bonus Being horse-based, trivially it is code that has been tested for years. If you are on the mount and warp, you will still be on the mount at login (being that we use EnterHorse) You can take advantage of the horse name system with a few modifications You only get mount bonuses if you are riding it and not while it is summoned Cons: I couldn't find any Thanks to @ HFWhite for testing. You should at least have the mount costume system.
  18. Hello Metin2 Dev Community. I'm here to present a function to check and return the monster rank. I'm creating my biolog that's why i had to create this function, i know there are other ways to do this but i decided to do it this way. I'm sharing in case someone needs. With best regards, Doose.
  19. Hello, i wanna share a little improvment to the Bravery Cloak Its speed up Mobs Pulled from Bravery Cloak Version 1: Version 2 (More Laggy but Save) Hope its not public since now. Im new to Metin2 hope you like it. Kind Regards
  20. Hello metin2 Dev. I'm here to present a method on how to create a new passive skill. the design of my own passive won't be shared so i recommend you to create a new one. Here is a gif. So, let's go to the tutorial. And this is how you create a new support skill. Anything you need help with, don't hesitate to write here or to contact. With best regards, Doose.
  21. Download GitHub Repository Synchronizes the character's position with the server and can be used to free them if they get stuck. If there is no available position within the available distance, the character will be warped to the village. .
  22. Hello community ! I found an issue when i was checking ShopEx system. If your pack_tab size is bigger than default m2 / SHOP_HOST_ITEM_MAX_NUM is bigger than default this overflow occurs. This causes a core crash as seen in the screenshot below: [Hidden Content] Solution I use temp buffer for handle better but you can change 8096 too. To solve this problem, you can follow these steps: // In shopEx.cpp -------------------------------------------------------------- // Search char temp[8096]; char* buf = &temp[0]; size_t size = 0; // Change like this TEMP_BUFFER buf(16 * 1024); -------------------------------------------------------------- // Search memcpy(buf, &pack_tab, sizeof(pack_tab)); buf += sizeof(pack_tab); size += sizeof(pack_tab); // Change like this buf.write(&pack_tab, sizeof(pack_tab)); -------------------------------------------------------------- // Search pack.size = sizeof(pack) + sizeof(pack2) + size; // Change like this pack.size = sizeof(pack) + sizeof(pack2) + buf.size(); -------------------------------------------------------------- // Search ch->GetDesc()->Packet(temp, size); // Change like this ch->GetDesc()->Packet(buf.read_peek(), buf.size()); After following these steps, you should have overcome this problem in the ShopEx system. If you have any problems, please leave a comment. Kind regards, Luigina
  23. Thanks to @ Gurgarath @ HaiosMotan [Hidden Content] [Hidden Content] Requirements: Video: Release:
  24. NEW FLAG NOMOVE_AFTER_SPAWM service.h #define ENABLE_NOMOVE_AFTER_SPAWM length.h search : AIFLAG_REVIVE = (1 << 11), add: #ifdef ENABLE_NOMOVE_AFTER_SPAWM AIFLAG_NOMOVE_AFTER_SPAWM = (1 << 12), #endif protoreader.cpp search int get_Mob_AIFlag_Value(string inputString) add in string arAIFlag[] #ifdef ENABLE_NOMOVE_AFTER_SPAWM "NOMOVE_AFTER_SPAWM", #endif char.cpp search bool CHARACTER::SetSyncOwner(LPCHARACTER ch, bool bRemoveFromList) add: #ifdef ENABLE_NOMOVE_AFTER_SPAWM if (IS_SET(m_pointsInstant.dwAIFlag, AIFLAG_NOMOVE_AFTER_SPAWM)) return false; #endif char_skill.cpp search if (IS_SET(m_pkSk->dwFlag, SKILL_FLAG_CRUSH | SKILL_FLAG_CRUSH_LONG) add: #ifdef ENABLE_NOMOVE_AFTER_SPAWM && !IS_SET(pkChrVictim->GetAIFlag(), AIFLAG_NOMOVE_AFTER_SPAWM) #endif char_state.cpp search void CHARACTER::__StateIdle_Monster() in if (!no_wander && !IS_SET(m_pointsInstant.dwAIFlag, AIFLAG_NOMOVE) add: #ifdef ENABLE_NOMOVE_AFTER_SPAWM && !IS_SET(m_pointsInstant.dwAIFlag, AIFLAG_NOMOVE_AFTER_SPAWM) #endif src client locale_inc.h #define ENABLE_NOMOVE_AFTER_SPAWM search in pythonnonplayer.h AIFLAG_REVIVE = (1 << 11), add: #if defined ENABLE_NOMOVE_AFTER_SPAWM AIFLAG_NOMOVE_AFTER_SPAWM = (1 << 12), #endif 991 ????? S_KNIGHT MONSTER MELEE 59 SMALL AGGR,NOMOVE example a small flag so that the mobs always have their location, so that when searching for a player they are always in the same position [Hidden Content]
×
×
  • 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.