Jump to content

VegaS™

Forum Moderator
  • Posts

    656
  • Joined

  • Last visited

  • Days Won

    187
  • Feedback

    100%

Community Answers

  1. VegaS™'s post in Convert char to uint32_t was marked as the answer   
    Then you'll need a small formula like this, for keeping the same values of enum:

    This is the hidden content, please Sign In or Sign Up So, in that way, you'll get the effect value multiplied by 4 depending on effectID.
    Output:
    dwEff = 1 m_swordRefineEffectRight = EFFECT_REFINED + 114 dwEff = 5 m_swordRefineEffectRight = EFFECT_REFINED + 130 dwEff = 12 m_swordRefineEffectRight = EFFECT_REFINED + 158  
  2. VegaS™'s post in Where do i find Guild Chat in source? was marked as the answer   
    Search for:
    case CHAT_TYPE_GUILD: { if (!ch->GetGuild()) ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("길드에 가입하지 않았습니다.")); else ch->GetGuild()->Chat(chatbuf); } break; Replace with:

    This is the hidden content, please Sign In or Sign Up  
     
  3. VegaS™'s post in missing component.py was marked as the answer   
    component.py game.py Search for:
    Replace with:

    This is the hidden content, please Sign In or Sign Up  
  4. VegaS™'s post in to disable the auto attack in a duel? was marked as the answer   
    I sent him the code to PM some months ago for test, he said would be nice if I post here too, so here's:
    GameLib/PythonPlayerInput.cpp
    Search for:
    void CPythonPlayer::__SetAutoAttackTargetActorID(DWORD dwVID) { m_dwAutoAttackTargetVID = dwVID; } Replace it with:

    This is the hidden content, please Sign In or Sign Up UserInterface/InstanceBase.h
    Make the function public from protected.
    static bool __FindPVPKey(DWORD dwSrcVID, DWORD dwDstVID); UserInterface/Locale_Inc.h
    #define ENABLE_BLOCK_AUTO_ATTACK_DUEL  
     
  5. VegaS™'s post in Hiding a specific object was marked as the answer   
    I'm sure that you saw my graphic mask from some years ago.
    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.
    That feature class allows you to hide specific effects, tree, bulding by property crc or name (not done yet).
     
    You''ll need also:
    This is the hidden content, please Sign In or Sign Up I'll not make a full how-to right now, just take a look, implement the class, call it and do some changes as you want, you've more than the basic idea. ?
    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  
    GameLib/Area.cpp
     
    This is the hidden content, please Sign In or Sign Up
    UserInterface/PythonGraphicMask.cpp
    UserInterface/PythonGraphicMask.h
    UserInterface/PythonSystem.cpp
     
     
     
     
  6. VegaS™'s post in WHISPER (PM) was marked as the answer   
    locale/xx/locale_interface.txt MINIMIZE Minimize  
  7. VegaS™'s post in jump party to different position was marked as the answer   
    As i thought, that's what he needed:

    This is the hidden content, please Sign In or Sign Up
  8. VegaS™'s post in Font size of announce bar was marked as the answer   
    No, you can't change the font size for TextBar (/n) in python, just for BigTextBar (/b).

    Client\src\eterPythonLib\PythonGraphicModule.cpp

    This is the hidden content, please Sign In or Sign Up #root/uiTip.py #class TipBoard(ui.Bar): # Search for: self.width = 370 # Replace with: self.width = 740 # Search for: STEP_HEIGHT = 17 # Replace with: STEP_HEIGHT = 34 # Search for: self.SetSize(370, 20) # Replace with: self.SetSize(self.width, 40) # Search for: self.textBar = TextBar(370, 300) # Replace with: self.textBar = TextBar(self.width, 600) # Search for: self.textBar.SetClipRect(0, y, wndMgr.GetScreenWidth(), y+18) # Replace with: self.textBar.SetClipRect(0, y, wndMgr.GetScreenWidth(), y+self.STEP_HEIGHT+2)
  9. VegaS™'s post in [Help] How can i use "text" in Bonus Page? was marked as the answer   
    You should use a string format method, instead of convert an integer to string then concatenate two strings for no reason.

    This is the hidden content, please Sign In or Sign Up
  10. VegaS™'s post in [Client] 7/8th skill *poof* was marked as the answer   
    PythonNetworkStreamPhaseGame.cpp You've to remove these lines.
    rkPlayer.SetSkill(7, 0); rkPlayer.SetSkill(8, 0);  
  11. VegaS™'s post in Item_Award Time was marked as the answer   
    If you inserted the query with the good values and you've problem with time, you should use my
    This is the hidden content, please Sign In or Sign Up , already there're many features included, items with real time fixed, etc.  
  12. VegaS™'s post in Open costumewindow from other file than uiinventory was marked as the answer   
    root/InterfaceModule.py: # Search for: wndInventory = uiInventory.InventoryWindow() # Add after: wndCharacter.BindInterfaceClass(wndInventory) root/uicharacter.py: # Search for: self.toolTipSkill = 0 # Add after: self.wndInventory = None # Search for: def __del__(self): ui.ScriptWindow.__del__(self) # Add after: def BindInterfaceClass(self, wndInventory): self.wndInventory = wndInventory How-To-Use:
    if self.wndInventory: self.wndInventory.ClickCostumeButton()  
  13. VegaS™'s post in question about c++ was marked as the answer   
    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.
  14. VegaS™'s post in [FIND SOLUTION] Role party bonus bug was marked as the answer   
    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); }  
  15. VegaS™'s post in How do I modify party Leadership bonuses? was marked as the answer   
    Srcs/Server/game/src/party.cpp float k = (float) ch->GetSkillPowerByLevel( MIN(SKILL_MAX_LEVEL, m_iLeadership ) ) / 100.0f; // PARTY_ROLE_ATTACKER int iBonus = (int) (10 + 60 * k); // PARTY_ROLE_TANKER int iBonus = (int) (50 + 1450 * k); // PARTY_ROLE_BUFFER int iBonus = (int) (5 + 45 * k); // PARTY_ROLE_SKILL_MASTER int iBonus = (int) (25 + 600 * k); // PARTY_ROLE_HASTE int iBonus = (int) (1+5*k); // PARTY_ROLE_DEFENDER int iBonus = (int) (5+30*k); float k = (float) ch->GetSkillPowerByLevel( MIN(SKILL_MAX_LEVEL, m_iLeadership ) ) / 100.0f; m_iLeadership = Leader skill ship skill level which is increased by (book vnum: 50301, 50302, 50303)
    int CHARACTER::GetSkillPowerByLevel(int level, bool bMob) const { return CTableBySkill::instance().GetSkillPowerByLevelFromType(GetJob(), GetSkillGroup(), MINMAX(0, level, SKILL_MAX_LEVEL), bMob); } int CTableBySkill::GetSkillPowerByLevelFromType(int job, int skillgroup, int skilllevel, bool bMob) const { if (bMob) return m_aiSkillPowerByLevelFromType[0][skilllevel]; if (job >= JOB_MAX_NUM || skillgroup == 0) return 0; int idx = (job * 2) + (skillgroup - 1); return m_aiSkillPowerByLevelFromType[idx][skilllevel]; } Let's take a example, a warrior, skill group 1.
    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 PARTY_ROLE_DEFENDER: (5+30*k)
    k = 125 / 100 = 1.25 iBonus = 5 + 30 * 1.25 = 42.5 (converted to integer will be 42)  Output from skill P:
    // PARTY_ROLE_ATTACKER - Set as attacker 10 + 60 * (125 / 100) = 85 // PARTY_ROLE_TANKER - Set as berserker 1 + 5 * (125 / 100) = 7.25 = 7 // PARTY_ROLE_BUFFER - Set as melee 50 + 1450 * (125 / 100) = 1862.5 = 1862 // PARTY_ROLE_SKILL_MASTER - Set as blocker 5 + 45 * (125 / 100) = 61.25 = 61 // PARTY_ROLE_HASTE - Set as defender 5 + 30 * (125 / 100) = 42.5 = 42 // PARTY_ROLE_DEFENDER - Set as wizzard 25 + 600 * (125 / 100) = 775
    Is a fast explanation, i hope you understand it.
  16. VegaS™'s post in Problem with Property etc. (Japanese characters) was marked as the answer   
    The post is from 4 years ago, i changed my mega-account, here's the re-upload.
    This is the hidden content, please Sign In or Sign Up Password Archive: property_vegas_work
  17. VegaS™'s post in Same guild function was marked as the answer   
    If you want to compare the guild of 2 players and see if they're in the same guild you should do a global function for LUA, which can be used everywhere.
    Src/Server/game/src/questlua_global.cpp share/locale/germany/quest_function quest_example.lua  
  18. VegaS™'s post in Item Slot Tooltip was marked as the answer   
    Try this.
    Search for:
    self.itemSlot = self.GetChild("item_slot") Add after:
    self.itemSlot.SetOverInItemEvent(ui.__mem_func__(self.OverInItem)) self.itemSlot.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem)) Search for:
            self.itemSlot.SetOverInItemEvent = lambda arg = vnum: self.OverInItem(arg)         self.itemSlot.SetOverOutItemEvent = lambda arg = self.tooltipItem: self.OverOutItem(arg) Replace it with:
    # Clear the tooltip line. self.tooltipItem.ClearToolTip() # Insert the description of item. self.tooltipItem.SetInventoryItem(vnum) # Hide the tooltip line because after you insert a description, the ShowToolTip is called. self.tooltipItem.HideToolTip() Search for:
    def OverInItem(self, vnum): self.tooltipItem.SetInventoryItem(vnum) self.tooltipItem.Show() def OverOutItem(self, tooltip): self.tooltipItem.HideToolTip() self.tooltipItem.ClearToolTip() Replace it with:
    def OverInItem(self): if self.tooltipItem: self.tooltipItem.ShowToolTip() def OverOutItem(self): if self.tooltipItem: self.tooltipItem.HideToolTip()  
  19. VegaS™'s post in premiere to a single player OX was marked as the answer   
    Haven't tested.
    give_item_by_name(item_vnum, item_count, name) ______________________________________________________________________________
    share/locale/germany/quest/quest_functions  
    Src/game/src/questlua_oxevent.cpp Src/game/src/OXEvent.h Src/game/src/OXEvent.cpp  
  20. VegaS™'s post in Quest Problem with when 1231.chat."..pc.get_level().." was marked as the answer   
    That's the single method which is correctly.

    quest test_quest begin state start begin when 20091.chat.string.format("DBG: name(%s), level(%d).", pc.get_name(), pc.get_level()) begin say_title("I'm a potato!") end end end New quest core: /src/share/locale/germany/quest < qc
    This is the hidden content, please Sign In or Sign Up
×
×
  • 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.