Jump to content

VegaS™

Forum Moderator
  • Posts

    656
  • Joined

  • Last visited

  • Days Won

    187
  • Feedback

    100%

Everything posted by VegaS™

  1. [Hidden Content] #include "cff.h" std::string text = CFF::format("Metin2", "green"); std::string text = CFF::format(std::to_string(8000), "banana"); std::string text = CFF::format(std::to_string(412.55), "red"); std::string text = CFF::format("Pending", "#113355"); std::string text = CFF::format("Item name:", "springgreen", CFF::FLAG_NEW_TAB) + CFF::format(pItemData->GetName(), "chocolate"); std::vector<string> text = CFF::multi_format({"a", "b", "c"}, "red"); // text[0], text[1], text[2]
  2. They exists, are the self-notations from item_proto.txt, so addon_type & addon_value are apply_type & apply_value. ITEM_VNUM~RANGE ITEM_NAME(K) ITEM_TYPE SUB_TYPE SIZE ANTI_FLAG FLAG ITEM_WEAR IMMUNE GOLD SHOP_BUY_PRICE REFINE REFINESET MAGIC_PCT LIMIT_TYPE0 LIMIT_VALUE0 LIMIT_TYPE1 LIMIT_VALUE1 ADDON_TYPE0 ADDON_VALUE0 ADDON_TYPE1 ADDON_VALUE1 ADDON_TYPE2 ADDON_VALUE2 VALUE0 VALUE1 VALUE2 VALUE3 VALUE4 VALUE5 Specular SOCKET ATTU_ADDON Btw, you don't need the value, ymir wasn't used the value of addon type in game (#1, #2), just take it as a simple boolean condition if it's true (-1) or 0, and inside of CItemAddonManager::ApplyAddonTo(int iAddonType, LPITEM pItem) the argument is unused. So it's enough to return a simple boolean. [Hidden Content]
  3. Maybe i'm wrong, but i think you need to use the ymir style because already there's a scale for image as (scaleX = screenWidth / imageWidth, scaleY = screenHeight / imageHeight) (full image: 1024 x 1024, selected: 1024 x 768) So you've to create a new image with size 1024x1024 and attach your current loading image and then the rest (1024x256) need to be black, use a paint bucket or just copy from ymir images that part.
  4. //#include "item_manager.h" const TItemTable * proto = ITEM_MANAGER::instance().GetTable(12019); if (proto) { for (size_t i = 0; i < ITEM_APPLY_MAX_NUM; ++i) sys_log("applyType[%d] = %d, applyValue[%d] = %d", i, proto->aApplies[i].bType, i, proto->aApplies[i].lValue); } >>> applyType[0] = 8, applyValue[0] = -6 >>> applyType[1] = 37, applyValue[1] = 20 >>> applyType[2] = 10, applyValue[2] = 40
  5. If you use item_award you don't have to do these checks, if MALL window is full, rest of the items will be 'unmarked for cache', so you have to take the current items first one and then rest of items which was added will be loaded too. How-To-Test: Insert 60 query's with itemVnum 27001 in item.award. Take the 45 items from MALL window into inventory. Re-open window mall and you will see the rest of items 15. So you can add unlimited query-items, they will be loaded by cache after you pickup the existent items and exist enough space. Here you can find the extended item award with more features.
  6. I suppose you use the system which i made 4 years ago (2015-2016), i published it, so it's fine. The problem is in root/introLoading.py. You added the self.__RegisterTitlePrestigeName() inside of the function def DEBUG_LoadData(self, playerX, playerY), need to be in def LoadData(self, playerX, playerY) too.
  7. First one, thanks for release and good idea, here are some advices for the next time, how you should use zip method and lambda instead of __mem__func__ and others empty functions. Since the loadStepList is declared with ascending numbers from 0 to 100 (by default), we don't have to use min and max method for get the values for range, just the first value and the last value from list. __mem_func__ and the function 'bos' are useless in that case, we can replace it with a null lambda, will do the same job too. Using an list comprehension with conditions inside, isn't so readable. Good idea for zip method to get all the progresses values, but we don't need to initialize like that, you can acces the first reference by using index [0] from iterator. Should look like this: [Hidden Content]
  8. M2 Download Center Download Here ( Internal ) Download Here ( GitHub ) What's the issue? SYSERR: Aug 22 18:36:42.624296 :: ReadEtcDropItemFile: No such an item (name: Èò»ö ´ó±â+) SYSERR: Aug 22 18:36:42.624379 :: Boot: cannot load ETCDropItem: locale/germany/etc_drop_item.txt Some people fixed it long time ago by replacing the column name from item_proto (which is korean) with vnum. If you want to do it like this and don't want the source change (from below) or you don't have the source code of your game core, you can use a update query and copy the vnum to name just if the vnum from item_proto exists inside of mob_proto.drop_item by a specific mob. UPDATE player.item_proto SET name = vnum WHERE vnum IN (SELECT drop_item FROM player.mob_proto WHERE drop_item >= 10); # Affected rows: 83 # Time: 35.919ms How can i know where the items are dropped? So, the structure of etc_drop_item.txt is based on dropping a item with a probability from a specific mob where that mob have the item vnum attached in column mob_drop -> drop_item. SELECT DISTINCT locale_name, vnum, drop_item FROM player.mob_proto where drop_item >= 10; locale_name vnum drop_item Wolf 102 30028 Alpha Wolf 103 30069 Alpha Blue Wolf 105 30027 Grey Wolf 106 30070 How-To-Fix Default structure: item_proto.name prob 늑대발톱 2.0 늑대발톱+ 2.0 늑대털 2.0 멧돼지의 어금니 2.0 With the fix you can use both of methods: item_proto.[name or vnum] prob 30028 2.0 30069 2.0 30027 2.0 멧돼지의 어금니 2.0 Repository: [Hidden Content]
  9. uiScript/whisperdialog.py "input_limit" : PLAYER_NAME_MAX_LEN, # PLAYER_NAME_MAX_LEN declared in script dictionary of ui.py as chr.PLAYER_NAME_MAX_LEN Which is a constant from module chr, initialized in PythonCharacterModule.cpp and the variable is declared in a enum of StdAfx.h. Srcs/Client/UserInterface/StdAfx.h // Search for: PLAYER_NAME_MAX_LEN = 12, // Replace with: PLAYER_NAME_MAX_LEN = CHARACTER_NAME_MAX_LEN, // 24
  10. Wikipedia has a API included, you can play with it. [Hidden Content] MediaWiki docs: All Query modules Get properties of pages List pages matching a criterion Get module parameters information Get meta information about the wiki and user Some examples: [Hidden Content] You've to install the requests library first one. pip install requests # Installing collected packages: certifi, chardet, urllib3, idna, requests # Successfully installed certifi-2019.3.9 chardet-3.0.4 idna-2.8 requests-2.22.0 urllib3-1.25.2 How to use: [Hidden Content]
  11. 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.
  12. For those who use @martysama0134 source: //@Srcs/Server/db/src/ClientManager.cpp #define ENABLE_ITEMAWARD_REFRESH // Should be enabled
  13. 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%
  14. Your children item from dictionary is a tuple, not a list. #1.1) Replace: window["children"][0]["children"] = window["children"][0]["children"] + [ #1.2) With: window["children"][0]["children"] += ( #2.1) Replace: },] #2.2) With: },)
  15. Good idea, but the python part is a bit too much, 200 lines for 5-6 functions. Can be like: _____________________________________________________________ Can be like: Btw, for rest you can take a look how they're rended and do something like: [Hidden Content] Here you can hide the 'terrain', 'object', 'cloud', 'water', 'tree', and you can disable the effects and more too if you take a look inside of GameLib. Over 1.5 year ago i extended a bit my release but didn't had enough time to post it, i'll update the repository with the new code when i'll have time to finish it. That feature allow you to hide specific effects, tree, bulding by property crc or name (not finished) and write them into files like: graphic_mask/building.txt general_obj_stone14 ob-b1-005-woodbarrel landmark_statuestone B_general_obj_40 general_obj_jar_yellow01 graphic_mask/effect.txt 8182371290 1003918098 volcano_greatsmoke.mse warpgate01 fall_7 fire_general_obj_charcoal.mse PythonGraphicMask.cpp PythonGraphicMask.h
  16. Btw, instead of removing the calculation, i would set a MIN-MAX value for duration of stun flag. So, let's take a look how the duration is calculated for POINT_PARTY_BUFFER_BONUS. iDur += m_pkChr->GetPoint(POINT_PARTY_BUFFER_BONUS); m_iLeadership = Leader skill ship skill level which is increased by (book vnum: 50301, 50302, 50303) Let's take a example, a warrior, skill group 1. CHARACTER::GetSkillPowerByLevel << CTableBySkill::GetSkillPowerByLevelFromType idx = 0 * 2 + 1 - 1 = 0 skilllevel = m_iLeadership m_iLeadership = 40 (Skill Perfect Master) // 0 5 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 50 52 54 56 58 60 63 66 69 72 82 85 88 91 94 98 102 106 110 115 125 125 125 125 125 m_aiSkillPowerByLevelFromType[0][40] = 125 int iBonus = (int) (5 + 45 * k); float k = (float) ch->GetSkillPowerByLevel( MIN(SKILL_MAX_LEVEL, m_iLeadership ) ) / 100.0f; k = 125 / 100 = 1.25 iBonus = 5 + 45 * 1.25 = 5 + 56.5 (converted to integer will be 61) leadership Set as attacker Set as berserker Set as melee Set as blocker Set as defender Set as wizzard Image G1 +59 AP +5 AS MaxHP +1.239 Length of spell: +41 From P on From G6 on G2 +61 AP +5 AS MaxHP +1.282 Length of spell: +43 From P on From G6 on G3 +62 AP +5 AS MaxHP +1.326 Length of spell: +44 From P on From G6 on G4 +64 AP +5 AS MaxHP +1.369 Length of spell: +45 From P on From G6 on G5 +66 AP +5 AS MaxHP +1.413 Length of spell: +47 From P on From G6 on G6 +68 AP +5 AS MaxHP +1.471 Length of spell: +49 From P on MaxMP +613 G7 +71 AP +6 AS MaxHP +1.529 Length of spell: +50 From P on MaxSP +637 G8 +73 AP +6 AS MaxHP +1.587 Length of spell: +52 From P on MaxSP +661 G9 +76 AP +6 AS MaxHP +1.645 Length of spell: +54 From P on MaxSP +685 G10 +79 AW +6 AG MaxHP +1.717 Length of spell: +56 From P on MaxSP +715 P +85 AW +7 AG MaxHP +1.862 Length of spell: +61 Defence: +42 MaxSP +775 That means 61 seconds of duration are getted from the party role bonus, so you can set a limit. // Set a min-max value for party role bonus just when flag is stun. const uint16_t iMaxStunDuration = 30; if (IS_SET(m_pkSk->dwFlag, SKILL_FLAG_STUN)) { iDur += MINMAX(static_cast<int>(m_pkSk->kDurationPoly2.Eval()), m_pkChr->GetPoint(POINT_PARTY_BUFFER_BONUS), iMaxStunDuration); } else { // SLOW, FIRE_CONT, POISON, BLEEDING will still be working with the default calculation. iDur += m_pkChr->GetPoint(POINT_PARTY_BUFFER_BONUS); }
  17. I didn't tested that "bug", but you can disable the calculation from char_skill.cpp. (not tested) iDur += m_pkChr->GetPoint(POINT_PARTY_BUFFER_BONUS); By change it with: // Ignore the party role bonus just for stun flag. // SLOW, FIRE_CONT, POISON, BLEEDING will still be working. if (!IS_SET(m_pkSk->dwFlag, SKILL_FLAG_STUN)) iDur += m_pkChr->GetPoint(POINT_PARTY_BUFFER_BONUS);
  18. #text = text.replace(word, word[0] + "*" * (len(word) - 2) + word[-1]) text = text.replace(word, '{first}{filter_char}{last}'.format( first = word[0], filter_char = "*" * (len(word) - 2), last = word[-1])) >>> Don't call me a l******y. With that type of replace you'll get asterisks by the length of your specific word, and will show just the first and the last character. @avertuss Btw you already have CInsultChecker::FilterInsult (which is used just for server-2-client TPacketGCChat), you can modify/duplicate the functions which are related about it and return the specific string which is detected from sentence and replace it with that method in python.
  19. root/uiChat.py def __SendChatPacket(self, text, type): root/uiWhisper.py def SendWhisper(self): Change variable idkwhat with text.
  20. (2.5) Questions & Answers specific rules Don't modify your thread (or reply to it) to mark it solved, and not explain the solution to the issue. Srcs/Server/game/src/input_main.cpp //Search in void CInputMain::SafeboxCheckin(LPCHARACTER ch, const char * c_pData) for: if( IS_SET(pkItem->GetAntiFlag(), ITEM_ANTIFLAG_SAFEBOX) ) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<창고> 이 아이템은 넣을 수 없습니다.")); return; } //Add after: if (ch->IsDead() && pkItem->IsEquipped()) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("SAFEBOX_CANNOT_ADD_EQUIPPED_ITEM_WHILE_IS_DEAD")); return; } if (pkItem->IsDragonSoul()) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("SAFEBOX_CANNOT_ADD_ITEM_DRAGON_SOUL")); return; }
×
×
  • 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.