Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/18/19 in all areas

  1. CLICK FOR VIDEO Server\src\game\src\DragonSoul.h //1.1) Search for: bool DragonSoulItemInitialize(LPITEM pItem); //1.2) Add after: bool AreActivedAllSlotsDragonSoulByPage(const LPCHARACTER ch, const BYTE bPageIndex = DRAGON_SOUL_DECK_0) const; Server\src\game\src\DragonSoul.cpp //1.1) Search for: BYTE GetStrengthIdx(DWORD dwVnum) { return (dwVnum / 10) % 10; } //1.2) Add after: bool DSManager::AreActivedAllSlotsDragonSoulByPage(const LPCHARACTER ch, const uint8_t bPageIndex) const { // Check if all the slots are actived in a specific page of dragon soul - 18.05.2019 [Vegas] if (!ch || bPageIndex >= DRAGON_SOUL_DECK_MAX_NUM) return false; const uint16_t iDragonSoulDeckAffectType = AFFECT_DRAGON_SOUL_DECK_0 + bPageIndex; // 540 + [0 or 1] if (!ch->FindAffect(iDragonSoulDeckAffectType)) return false; // start : 32 + ([0 or 1] * 6) = [32 or 38] // end : start + 6 const uint8_t iStartSlotIndex = WEAR_MAX_NUM + (bPageIndex * DS_SLOT_MAX); const uint8_t iEndSlotIndex = iStartSlotIndex + DS_SLOT_MAX; BYTE bSlotActive = 0; for (uint8_t iSlotIndex = iStartSlotIndex; iSlotIndex < iEndSlotIndex; ++iSlotIndex) // {0: 32-38, 1: 38-44} { const LPITEM pkItem = ch->GetWear(iSlotIndex); if (pkItem && pkItem->IsDragonSoul()) { if (IsTimeLeftDragonSoul(pkItem) && IsActiveDragonSoul(pkItem)) ++bSlotActive; } } return (bSlotActive == DS_SLOT_MAX); } How-To-Use-Example: #include "DragonSoul.h" if (DSManager::instance().AreActivedAllSlotsDragonSoulByPage(ch, DRAGON_SOUL_DECK_0)) { ch->ChatPacket(CHAT_TYPE_INFO, "DragonSoul: You've all the dragon souls active in page 1."); // do something } if (DSManager::instance().AreActivedAllSlotsDragonSoulByPage(ch, DRAGON_SOUL_DECK_1)) { ch->ChatPacket(CHAT_TYPE_INFO, "DragonSoul: You've all the dragon souls active in page 2."); // do something } The rest is up to you how you give a bonus or something, you've the function which do the check.
    3 points
  2. M2 Download Center Download Here ( Internal ) I think the title should explain all. The system give way to set mob's drops via tables (Database) instead to use mob_drop_item.txt, common_drop_item.txt, drop_item_group.txt which can be buggy (easly, just a wrong space) without trace any error in your game expirience. WARNING : The System doens't disable the txts so you can use the txts and the tables without any problems. I have inserted "/reload d" command to reload the drop tables without restart channels. i will code a small tool in python to convert the txts to tables (i will be added to the repository). The drop chance by default is set to 1/1000 (so in table you should set it to 1000 to give 100% drop chance 'base' , it will change via the ymir's algorithm depend on the levels killer/victim). you can chance this scale to use 100 instead 1000 basically changing in lenght.h the value of DROP_SCALE_TABLE here you can find the repository. MySkype: live:ikarus.developer update: Added a small part to install only if you are using __SEND_TARGET_INFO__ to show the drop in the target board WARNING: i noticed some people think this system is a realtime database reading based system. i want explain it better , to make sure every body know how this system works. This system works using cache, it read the tables once on boot, then the db core setup all core during core boot using cache. Only if you want to reload (refreshing the cache) the db core will read again the tables and will send to every core the "update".
    1 point
  3. M2 Download Center Download Here ( Internal ) Hey guyz Here's an image to see what is it about. Just coloring guild names for the top3 rank. (gold,silver,bronze) Let's start with the server side. Open char.cpp and search for void CHARACTER::SendGuildName(CGuild* pGuild) Modify like: void CHARACTER::SendGuildName(CGuild* pGuild) { if (NULL == pGuild) return; DESC *desc = GetDesc(); if (NULL == desc) return; if (m_known_guild.find(pGuild->GetID()) != m_known_guild.end()) return; m_known_guild.insert(pGuild->GetID()); TPacketGCGuildName pack; memset(&pack, 0x00, sizeof(pack)); pack.header = HEADER_GC_GUILD; pack.subheader = GUILD_SUBHEADER_GC_GUILD_NAME; pack.size = sizeof(TPacketGCGuildName); pack.guildID = pGuild->GetID(); memcpy(pack.guildName, pGuild->GetName(), GUILD_NAME_MAX_LEN); pack.guildRank = CGuildManager::instance().GetRank(pGuild); desc->Packet(&pack, sizeof(pack)); } Open packet.h and search for typedef struct packet_guild_name_t Modify the struct like: typedef struct packet_guild_name_t { BYTE header; WORD size; BYTE subheader; DWORD guildID; char guildName[GUILD_NAME_MAX_LEN]; int guildRank; } TPacketGCGuildName; Compile the game file. And now the client side. We'll only work in UserInterface. In PythonGuild.h search for typedef std::map<DWORD, std::string> TGuildNameMap; Modify like: typedef std::map<DWORD, GuildNameRank> TGuildNameMap; Put it before that line: struct GuildNameRank { std::string name; int rank; }; Search for: void RegisterGuildName(DWORD dwID, const char * c_szName); Modify like: void RegisterGuildName(DWORD dwID, const char * c_szName, int rank); Open PythonGuild.cpp-t and search for RegisterGuildName function: Modify: void CPythonGuild::RegisterGuildName(DWORD dwID, const char * c_szName, int rank) { GuildNameRank gnr; gnr.name = std::string(c_szName); gnr.rank = rank; m_GuildNameMap.insert(make_pair(dwID, gnr)); } Now search for GetGuildName Modify: bool CPythonGuild::GetGuildName(DWORD dwID, std::string * pstrGuildName) { if (m_GuildNameMap.end() == m_GuildNameMap.find(dwID)) return false; switch (m_GuildNameMap[dwID].rank) { case 1: *pstrGuildName = "|cffFFC125" + m_GuildNameMap[dwID].name + "|r"; break; case 2: *pstrGuildName = "|cff888888" + m_GuildNameMap[dwID].name + "|r"; break; case 3: *pstrGuildName = "|cffCD661D" + m_GuildNameMap[dwID].name + "|r"; break; default: *pstrGuildName = m_GuildNameMap[dwID].name; break; } return true; } Open PythonNetworkStreamPhaseGame.cpp and search for case GUILD_SUBHEADER_GC_GUILD_NAME: Replace the case: case GUILD_SUBHEADER_GC_GUILD_NAME: { DWORD dwID; char szGuildName[GUILD_NAME_MAX_LEN+1]; int guildRank; int iPacketSize = int(GuildPacket.size) - sizeof(GuildPacket); int nItemSize = sizeof(dwID) + GUILD_NAME_MAX_LEN + sizeof(guildRank); assert(iPacketSize%nItemSize==0 && "GUILD_SUBHEADER_GC_GUILD_NAME"); for (; iPacketSize > 0;) { if (!Recv(sizeof(dwID), &dwID)) return false; if (!Recv(GUILD_NAME_MAX_LEN, &szGuildName)) return false; if (!Recv(sizeof(guildRank), &guildRank)) return false; szGuildName[GUILD_NAME_MAX_LEN] = 0; //Tracef(" >> GulidName [%d : %s]\n", dwID, szGuildName); CPythonGuild::Instance().RegisterGuildName(dwID, szGuildName, guildRank); iPacketSize -= nItemSize; } break; } Compile the client binary! We're all done
    1 point
  4. I agree to give you license to get a part of my code. Anyway i used STL containers (map, vector) to store data in the cache. The stl containers using heap to store data.
    1 point
  5. In my old server I made them available everywhere so that they could be used for guild scrims everywhere and I was removing them in case of 1on1 PVP. Using them for guild wars only imho it's a waste
    1 point
  6. Very interesting ideia. Good luck with the work
    1 point
  7. The system is not bad. When is full working then I will add in my files and you become a thanks
    1 point
  8. With this right the guild members can use during a guild war guild skills. It should be taken that the guild skills only encompass each the triggering player. Anyone who will benefit from the guild skills in guild wars, therefore must be set to the right. With each level up the guild gets a skill point for the guild skills well as space for two additional members and 100 dragon ghost. The currently highest achievable level is at 20. Guild skills Per guild level you can invest a point in a guild skill, but a maximum of 7 points (Master) per skill. Since the maximum guild level is 20, you can only have 2 master skills. The last skill will then only 5 points. To use a guild skill is needed but some of the dragon ghost. This however will not charge all by itself, it must be filled with 100 Yang per dragon ghost. Active Active Guild skills can be used only in guild wars. But the bonus is only effective for the triggering player. Popular with all Class is "Rage of Dragon God" and "Casting Aid" because it accelerates all skills. Other guild skills are very class dependent in their importance. Passive Passive Guild Skills are not yet implemented in the game. - It increases Max HP of all guild members for a period of time . - It increases Max SP of all guild members for a period of time . - It increases defense of all guild members for a period of time . - It increases attack and moving speed of all guild members for a period of time . - It increases critical hit chances of all guild members for a period of time . - It decreases cool down time (casting speed) of all guild members for a period of time . Skill Bonus level 1 level 2 level 3 level 4 level 5 level 6 level 7 Blood of Dragon God (Duration: 600 sec). HP 2% 5% 8% 12% 14% 17% 20% Benediction of Dragon God (Duration: 600 sec). SP 2% 5% 8% 12% 14% 17% 20% Holy Armour (Duration: 480 sec). DEF 1.4% 2.9% 4.3% 5.7% 7.1% 8.5% 10% Acceleration (Duration: 480 sec). Attack Speed and Motion 4.3% 8.6% 12.9% 17.2% 21.5% 25.7% 30% Rage of Dragon God (Duration: 480 sec). Critical Chance 7% 14% 21% 28% 35% 42% 50% Casting Aid (Duration: 480 sec). Casting Speed 7% 14% 21% 28% 35% 42% 50%
    1 point
  9. WARNING: i noticed some people think this system is a realtime database reading based system. i want explain it better , to make sure every body know how this system works. This system works using caching, it reading the tables once on boot, then the db core will update all core during core boot using cache. Only if you want to reload (refreshing the cache) the db core will read again the tables and will send to every core the "update".
    1 point
  10. Hello guys! After job, before sleep here is the latest patch, the v19.2. Have fun /emoticons/default_wink.png Ramadan costumes, hairstyles, pets New minigame "samemonster" gui elements 6th7th attribute gui elements Download locale_de locale_en locale_hu Metin2 Download (All)
    1 point
×
×
  • 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.