Astreya2

VegaS™

Member
  • Content Count

    128
  • Joined

  • Last visited

  • Days Won

    32

VegaS™ last won the day on May 13

VegaS™ had the most liked content!

Community Reputation

361 Dominating

About VegaS™

  • Rank
    Friendly
  • Birthday 08/28/1989

Profile Information

  • Gender
    Male
  • Location
    Italy

Contact Methods

  • Website URL
    http://vegas-projects.com
  • Discord
    #6456
  • Skype
    sacadatt.amazon

Recent Profile Visitors

3,071 profile views
  1. VegaS™

    open question about c++

    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 BYTE 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.
  2. VegaS™

    open Item_Award Bug

    For those who use @martysama0134 source: //@Srcs/Server/db/src/ClientManager.cpp #define ENABLE_ITEMAWARD_REFRESH // Should be enabled
  3. 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%
  4. VegaS™

    c++ [Mini Release] Graphic On/Off

    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: },)
  5. VegaS™

    c++ [Mini Release] Graphic On/Off

    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: https://github.com/Vegas007/Metin2-Graphic-Mask-Control 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
  6. VegaS™

    open [FIND SOLUTION] Role party bonus bug

    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); }
  7. VegaS™

    open [FIND SOLUTION] Role party bonus bug

    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);
  8. VegaS™

    open Change chattext by replace function

    #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.
  9. VegaS™

    open Change chattext by replace function

    root/uiChat.py def __SendChatPacket(self, text, type): root/uiWhisper.py def SendWhisper(self): Change variable idkwhat with text.
  10. VegaS™

    [RELASE] Multiple login saver

    @Syriza Done, check my first reply.
  11. VegaS™

    open C++ Safebox questions

    (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; }
  12. VegaS™

    open Stun player from quest

    That's the correct way. int affect_stun(lua_State * L) { const uint32_t lDuration = 30; // seconds const LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); if (ch) ch->AddAffect(AFFECT_STUN, POINT_NONE, 0, AFF_STUN, lDuration, 0, true); return 0; }
  13. VegaS™

    [RELASE] Multiple login saver

    @Syriza Check my reply again, i forgot the directory 'user/credentials'.
  14. VegaS™

    [RELASE] Multiple login saver

    Something I wrote in a hurry. introLogin.py (add it to the end of the lines) def OnKeyDown(self, key): ''' A fast method to login by keyboard shortcuts. ''' # Create a keyboard range enum as tuple from F1 to F4. dikAvailableList = range(0x3B, 0x3E + 1) if not key in dikAvailableList: return try: # Creates a file object, which would be utilized to call other support methods associated with it. # Change old_open method with open if you get error. file = old_open('user//credentials', 'r') try: # Finds the given element in a list and returns its position. account_index = dikAvailableList.index(key) # Reads until EOF using readline() and returns a list containing the lines. account_data = file.readlines().__getitem__(account_index) # Returns a list of all the words in the string, using str as the separator. account_data = account_data.split(':') # Applies a function to all the items in an input list. account_data = map(lambda item: item.rstrip(), account_data) # Decode the password. account_data[-1] = self.decode(self.__ReadSavedPassword(), next(reversed(account_data))) # Connect to the server by using list [id, pw]. self.Connect(*account_data) # Raised when a sequence subscript is out of range. except IndexError: pass # A closed file cannot be read or written any more. file.close() # Raised when an I/O operation fails for an I/O-related reason, e.g., “file not found” or “disk full”. except IOError: return