Jump to content

.colossus.

Premium
  • Posts

    43
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by .colossus.

  1. On 8/14/2021 at 10:04 PM, Mafuyu said:

    how do i have to understand? sash scales from lvl 4 sashes are 11-25%, so how can i add this properly?

     

    lVal = number(SASH_GRADE_4_ABS_MIN, SASH_GRADE_4_ABS_MAX_COMB);

    1e0f1552ec.gif

    did i miss something? xD

     

    edit: interesting, it only gives the correct absorption when i use the npc to refine them, when i create them with command, it gives low values on it. Is this changeable? like i have higher sashes in chests and they get low values

    this depends on your system.

  2. Hey guys,

    with this snippet, the absorption chance is calculated nearly correctly using discrete distribution.
    I quickly picked out the Lennt system and "adapted" it to it.
    With other systems this shouldn't be too difficult either 🙂

    in char_item.cpp

    below #include "threeway_war.h"

    #include <random>

    replace

            switch (lVal)
            {
                case 2:
                    {
                        lVal = SASH_GRADE_2_ABS;
                    }
                    break;
                case 3:
                    {
                        lVal = SASH_GRADE_3_ABS;
                    }
                    break;
                case 4:
                    {
                        lVal = number(SASH_GRADE_4_ABS_MIN, SASH_GRADE_4_ABS_MAX_COMB);
                    }
                    break;
                default:
                    {
                        lVal = SASH_GRADE_1_ABS;
                    }
                    break;
            }
            
            SetSocket(SASH_ABSORPTION_SOCKET, lVal);

    with

            long percentageAdd = 0;
            std::random_device rd;
            std::mt19937 gen(rd());
            std::discrete_distribution<> d({ 200, 100, 20, 10, 5, 1 });
            percentageAdd = d(gen);
            
            SetSocket(SASH_ABSORPTION_SOCKET, lVal + percentageAdd);

     

    Absorption is possible from 0-5%.

    You can adjust or expand the distribution here:

    d({ 200, 100, 20, 10, 5, 1 });

     

    • Good 2
  3. #update

    SKILL_KWANKYEOK and SKILL_HORSE_WILDATTACK_RANGE are sending more than one packet.

    maximum of possible packets which are computed is now calculated properly.

    and yeah it could probably be solved better without using bSkillCD

    • Metin2 Dev 1
    • Love 1
    • Love 3
  4. Hey guys,

    I noticed while the character was moving, attack packets are processed.
    It´s nothing special and just a small improvement 🙂

    in battle.cpp
    below:

    int battle_hit(LPCHARACTER pkAttacker, LPCHARACTER pkVictim, int & iRetDam)
    {

    add:

        if (pkAttacker->IsStateMove())
            return (BATTLE_DAMAGE);

     

    • Metin2 Dev 1
    • Good 8
    • Love 2
  5. Hey guys,

    maybe you heard already about a new waithack method with poisonous cloud and some other stuff.
    i don´t want to go into details and just share a potential fix for that 🙂
    (i could not test it completly so some feedback is appreciated)

     

    in char.h

    // below bool bUsed;

        bool    bSkillCD;
        DWORD   dwHitCount;

    // add after bUsed(false),

    bSkillCD(false), dwHitCount(0),

    // below bool HitOnce(DWORD dwVnum = 0);

        bool    IsSkillCooldown(DWORD dwVnum, float fSkillPower);

    // above void ResetSkill();

            bool                IsSkillCooldown(DWORD dwVnum, float fSkillPower) { return m_SkillUseInfo[dwVnum].IsSkillCooldown(dwVnum, fSkillPower) ? true : false; }

     

    in char_skill.cpp

    // above bool TSkillUseInfo::UseSkill(bool isGrandMaster, DWORD vid, DWORD dwCooltime, int splashcount, int hitcount, int range)

    bool TSkillUseInfo::IsSkillCooldown(DWORD dwVnum, float fSkillPower)
    {
        DWORD maxHitCount = 0;
        if (dwVnum == SKILL_KWANKYEOK || dwVnum == SKILL_HORSE_WILDATTACK_RANGE)
        {
            if (dwVnum == SKILL_KWANKYEOK)
                maxHitCount = static_cast<DWORD>(2 + floor(6 * fSkillPower));
            else if (dwVnum == SKILL_HORSE_WILDATTACK_RANGE)
                maxHitCount = 5;
    
            dwHitCount++;
    
            if (dwHitCount > maxHitCount)
                return true;
            return false;
        }
    
        if (!bSkillCD)
            return true;
    
        bSkillCD = false;
        return bSkillCD;
    }

    // below bUsed = true;

        bSkillCD = true;
        dwHitCount = 0;

     

    in char_battle.cpp

    // above LPITEM pkBow, pkArrow;

                if (m_bType > 0 && m_me->IsSkillCooldown(m_bType, static_cast<float> (m_me->GetSkillPower(m_bType) / 100.0f)))
                    return;

     

    • Metin2 Dev 1
    • Good 2
    • Love 3
    • Love 2
  6. 6 minutes ago, MLens said:

    #ifdef ENABLE_PORT_SECURITY
            if (IsEmptyAdminPage() || !IsAdminPage(inet_ntoa(d->GetAddr().sin_addr))) // block if adminpage is not set or if not admin
            {
                sys_log(0, "SOCKET_CMD: BLOCK FROM(%s)", d->GetHostName());
                return -1;
            }
    #endif

     

    i can remove all from  #ifdef ENABLE_PORT_SECURITY  ?   this delete #ifdef ENABLE_PORT_SECURITY why 😞 

    read my thread again 🙂

    --> in marty files its already fixed because only localhost has access as far as i remember.

    so you just need to enable ENABLE_PORT_SECURITY or delete everything because its not used

  7. Hey guys,

    i noticed a core crash "exploit" someone is currently using with HEADER_CG_TEXT.

    its a simple buffer overflow in the HEADER_CG_TEXT packet.
    because the packet is not used you can just remove it.
    in marty files its already fixed because only localhost has access as far as i remember.

    packet.h

        HEADER_CG_TEXT                    = 64,

     

    packet_info.cpp

    Set(HEADER_CG_TEXT, sizeof(TPacketCGText), "Text", false);

     

    input.cpp

    if (bHeader == HEADER_CG_TEXT)
    (
    [...]
    )

     

    • Metin2 Dev 1
    • Good 1
    • Love 7
  8. Hey guys,

    after i noticed some positive rule changes on the forum i will start to
    release some of my stuff i already published on an other forum.

    In the past I often had problems with the Exp/Yang/Drops of group members were also shared on different maps.
    The simplest solution was to just put the maps further apart, however I took a closer look why this is and fixed it accordingly.

     

    in char_battle.cpp

    // below FPartyAlignmentCompute f(-20000, pkKiller->GetX(), pkKiller->GetY());
    // replace pkKiller->GetParty()->ForEachOnlineMember(f);

    pkKiller->GetParty()->ForEachOnMapMember(f, pkKiller->GetMapIndex());

     

    // below f.m_iStep = 1;
    // replace pkKiller->GetParty()->ForEachOnlineMember(f);

    pkKiller->GetParty()->ForEachOnMapMember(f, pkKiller->GetMapIndex());

     

    // below NPartyExpDistribute::FPartyTotaler f(ch);
    // replace pParty->ForEachOnlineMember(f);

    pParty->ForEachOnMapMember(f, ch->GetMapIndex());

     

    // below NPartyExpDistribute::FPartyDistributor fDist(ch, f.member_count, f.total, iExp, pParty->GetExpDistributionMode());
    // replace pParty->ForEachOnlineMember(fDist);

    pParty->ForEachOnMapMember(fDist, ch->GetMapIndex());

     

    in char_item.cpp

    // below NPartyPickupDistribute::FCountNearMember funcCountNearMember(this);
    // replace pParty->ForEachOnlineMember(funcCountNearMember);

    pParty->ForEachOnMapMember(funcCountNearMember, GetMapIndex());

     

    // below NPartyPickupDistribute::FMoneyDistributor funcMoneyDist(this, dwShare);
    // replace pParty->ForEachOnlineMember(funcMoneyDist);

    pParty->ForEachOnMapMember(funcMoneyDist, GetMapIndex());

     

    // below NPartyPickupDistribute::FFindOwnership funcFindOwnership(item);
    // replace GetParty()->ForEachOnlineMember(funcFindOwnership);

    GetParty()->ForEachOnMapMember(funcFindOwnership, GetMapIndex());

     

    • Metin2 Dev 2
    • Good 5
    • Love 5
  9. 3 hours ago, VegaS™ said:

    That's right, it's totally not worth the effort.

    You're a member on m2dev for 7 years, you've not even one post in Releases or helping other people in Q&A, you just searched for help, resources, and 'up, push' to your service topic, nothing more.

    Metin2Dev is not a marketplace, as @ASIKOOsaid, has to be a win-win.

    Also, I wouldn't talk about your content of those services here, since it's another subject.

     

    I know it's easy to blame the rules and the person who implemented them instead of fulfilling them, since people just want fast incomes and no "effort'.

    That's why we're different than any other community, if we wanted to have over 500+ online, we could do it easily, we know the method of being "successful", but we won't apply it here, we prefer quality and 'high' rules.

    Not like the community where you're actively mostly, that you can have even 10 topics in services and no one would care, you can sell everything you want, no one will do any check to you even if your account was created a few seconds ago + [....]. 

    Then it's ok, we prefer to be blamed instead of having a forum like this.

     

     

    Yeah we also discussed that topic and i´m fine with that if this are the rules.

    But i also want to mention that many people doesn´t have the requirements to sell here but they still do because they know the staff.

    Just my opignion that maybe the staff consider changing something.

    • Good 1
  10. On 2/22/2021 at 8:41 AM, ⚡FlasH⚡ said:
    • Do you think the forum lacks something?

    - i'm not sure

    • Do you want to see new things?

    -Yes

    Make a Trade request features how M2D have, if they want to buy, buy through forum and if the seller will try to scam, he will be banned.

    - What i'm meaning through forum?

    After the payment was made the seller will accept his Trade request and give him the files link (https://file.io/) which after download is removed.

    Or to be safe the buyer have 24h time to download the content ,after 24h the link will be removed even wasn't downloaded. But for that features u have to use their API (https://file.io/#api)

    In case of chargeback idk...how many trade request u have that's mean u are a Trusted seller / buyer.

    • What do you want to see on Metin2 Dev?

    Let ppl selling metin2 stuffs. many of them are interested in the sell/buy systems , and bcoz of new "rules" many of them leave the community.

    And unbanned unfair ban..
     

     

     

    totally agree with that.

    why should i even release something when my sales thread got closed and i "need to be active for more than 6 months".

    its not worth the effort.

    • Good 1
  11. Hello,

    I recognized a hughe slow down of the game after i increadsed the maximum yang.

    The gamecore takes around 2 minutes to initalize (load all quests, mobs ,etc)

    Any ideas whats wrong?

    PTS:

    Spoiler

    [ 20] event     0/4052  idle 751  event 1    heartbeat 0    I/O 154674 chrUpate 0    | WRITE: 644     | PULSE: 769
    [ 10] event  2671/4052  idle 348  event 6    heartbeat 0    I/O 5    chrUpate 0    | WRITE: 428     | PULSE: 1528
    [ 25] event   131/4052  idle 996  event 2    heartbeat 0    I/O 0    chrUpate 0    | WRITE: 13      | PULSE: 1553
    [ 25] event   105/4052  idle 996  event 2    heartbeat 0    I/O 0    chrUpate 0    | WRITE: 13      | PULSE: 1578
    [ 25] event   104/4052  idle 997  event 2    heartbeat 0    I/O 1    chrUpate 0    | WRITE: 13      | PULSE: 1603
    [ 25] event   116/4052  idle 994  event 2    heartbeat 0    I/O 2    chrUpate 0    | WRITE: 13      | PULSE: 1628
    [ 25] event   132/4052  idle 991  event 2    heartbeat 0    I/O 0    chrUpate 1    | WRITE: 13      | PULSE: 1653
    [ 25] event   129/4052  idle 996  event 2    heartbeat 0    I/O 1    chrUpate 0    | WRITE: 13      | PULSE: 1678
    [ 25] event   139/4052  idle 996  event 3    heartbeat 0    I/O 0    chrUpate 0    | WRITE: 13      | PULSE: 1703
    [ 25] event   138/4052  idle 997  event 3    heartbeat 0    I/O 0    chrUpate 0    | WRITE: 13      | PULSE: 1728
    [ 25] event   173/4052  idle 996  event 4    heartbeat 0    I/O 0    chrUpate 0    | WRITE: 13      | PULSE: 1753
    [ 25] event   152/4052  idle 996  event 3    heartbeat 0    I/O 0    chrUpate 0    | WRITE: 13      | PULSE: 1778
    [ 25] event   145/4052  idle 994  event 3    heartbeat 0    I/O 1    chrUpate 0    | WRITE: 13      | PULSE: 1803
    [ 25] event   139/4052  idle 996  event 3    heartbeat 0    I/O 0    chrUpate 0    | WRITE: 13      | PULSE: 1828
    [ 25] event   158/4052  idle 995  event 3    heartbeat 0    I/O 1    chrUpate 0    | WRITE: 13      | PULSE: 1853
    [ 25] event   132/4052  idle 996  event 3    heartbeat 0    I/O 0    chrUpate 0    | WRITE: 13      | PULSE: 1878
    [ 25] event   175/4052  idle 994  event 3    heartbeat 0    I/O 2    chrUpate 0    | WRITE: 13      | PULSE: 1903
    [ 25] event   166/4052  idle 995  event 3    heartbeat 0    I/O 1    chrUpate 0    | WRITE: 13      | PULSE: 1928
    [ 25] event   139/4052  idle 992  event 3    heartbeat 0    I/O 1    chrUpate 0    | WRITE: 13      | PULSE: 1953
    [ 25] event   147/4052  idle 994  event 2    heartbeat 0    I/O 0    chrUpate 0    | WRITE: 13      | PULSE: 1978
    [ 25] event   140/4052  idle 994  event 2    heartbeat 0    I/O 0    chrUpate 0    | WRITE: 13      | PULSE: 2003
    [ 25] event   135/4052  idle 996  event 3    heartbeat 0    I/O 1    chrUpate 0    | WRITE: 13      | PULSE: 2028
    [ 25] event   189/4052  idle 995  event 4    heartbeat 0    I/O 0    chrUpate 0    | WRITE: 13      | PULSE: 2053
    [ 25] event   115/4052  idle 994  event 3    heartbeat 0    I/O 0    chrUpate 0    | WRITE: 13      | PULSE: 2078
    [ 25] event   118/4052  idle 996  event 1    heartbeat 0    I/O 2    chrUpate 0    | WRITE: 13      | PULSE: 2103
    [ 25] event   117/4052  idle 995  event 3    heartbeat 0    I/O 1    chrUpate 0    | WRITE: 13      | PULSE: 2128
    [ 25] event   119/4052  idle 995  event 3    heartbeat 0    I/O 0    chrUpate 0    | WRITE: 13      | PULSE: 2153
    [ 25] event   108/4052  idle 993  event 1    heartbeat 0    I/O 0    chrUpate 1    | WRITE: 13      | PULSE: 2178
    [ 25] event    92/4052  idle 993  event 2    heartbeat 0    I/O 2    chrUpate 0    | WRITE: 13      | PULSE: 2203
    [ 25] event   108/4052  idle 997  event 1    heartbeat 0    I/O 0    chrUpate 1    | WRITE: 13      | PULSE: 2228
    [ 25] event    92/4052  idle 995  event 2    heartbeat 0    I/O 0    chrUpate 0    | WRITE: 13      | PULSE: 2253
    [ 25] event   273/4052  idle 997  event 1    heartbeat 0    I/O 0    chrUpate 0    | WRITE: 13      | PULSE: 2278
    [ 25] event   266/4052  idle 994  event 3    heartbeat 0    I/O 1    chrUpate 0    | WRITE: 13      | PULSE: 2303
    [ 25] event   250/4052  idle 997  event 3    heartbeat 0    I/O 0    chrUpate 0    | WRITE: 13      | PULSE: 2328
    [ 25] event   264/4052  idle 996  event 4    heartbeat 0    I/O 0    chrUpate 0    | WRITE: 13      | PULSE: 2353
    [ 25] event   251/4052  idle 994  event 3    heartbeat 0    I/O 1    chrUpate 0    | WRITE: 13      | PULSE: 2378
    [ 25] event   264/4052  idle 996  event 3    heartbeat 0    I/O 0    chrUpate 0    | WRITE: 13      | PULSE: 2403
    [ 25] event   244/4052  idle 993  event 3    heartbeat 0    I/O 2    chrUpate 0    | WRITE: 13      | PULSE: 2428
    [ 25] event   246/4052  idle 995  event 3    heartbeat 0    I/O 1    chrUpate 0    | WRITE: 13      | PULSE: 2453

    ProfileLog:

    Spoiler

    # Profile Start: Fri Feb  6 19:10:21 2015
    Total traffic: 4386 bytes
    Total used packet: 20
    ------------------ Input ------------------
    Packet    Count    Total Size    Average
    1    2    72        36
    2    2    52        26
    9    4    16        4
    100    5    45        9
    101    3    966        322
    104    3    3        1
    109    3    159        53
    206    4    4        1
    251    3    783        261
    255    6    78        13
    ------------------ Output -----------------
    Packet    Count    Total Size    Average
    9    2    8        4
    32    3    987        329
    90    3    6        2
    100    3    30        10
    102    3    33        11
    210    4    108        27
    250    3    12        4
    251    3    783        261
    253    23    46        2
    255    15    195        13
    ------------------ Output -----------------
    # Profile End(Flush): Wed Feb 11 18:02:41 2015
     

     

  12. Hello,

    I compiled myself the binary and game. I followed the tutorial http://metin2dev.org/board/index.php/topic/791-metin2-4-inventory-page/

    and the 4 Inventory slots are working without any Problem.

    I just got 1 weired error:

    4cf7e256859e3586d4712b5e3df80564.jpg

     

    As u can see the Equipment slots don´t show the equiped items.

    What do you think causes this error?

    • Love 1
×
×
  • 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.