Jump to content

Morphe

Inactive Member
  • Posts

    211
  • Joined

  • Last visited

  • Days Won

    2
  • Feedback

    0%

Posts posted by Morphe

  1.  

     

    This solve all problems.

     

     

    ou :D

    char.cpp

     

    In function CHARACTER::ComputePoints()

     

    Search:

    if (iMaxHP != GetMaxHP())
    {
    SetRealPoint(POINT_MAX_HP, iMaxHP); // 기본HP를 RealPoint에 저장해 놓는다.
    }
    
    
    PointChange(POINT_MAX_HP, 0);
    
    
    if (iMaxSP != GetMaxSP())
    {
    SetRealPoint(POINT_MAX_SP, iMaxSP); // 기본SP를 RealPoint에 저장해 놓는다.
    }
    
    
    PointChange(POINT_MAX_SP, 0);
    
    
    if (GetHP() > GetMaxHP())
    PointChange(POINT_HP, GetMaxHP() - GetHP());
    
    
    if (GetSP() > GetMaxSP())
    PointChange(POINT_SP, GetMaxSP() - GetSP());

    Copy this and remove.

     

    After replace before UpdatePacket();

     

     

    I try this a long tine ago and I have big problems with player hp after mount/unmount , hp has increased to all players.

     

    edit: I try only with

    if (GetHP() > GetMaxHP())
    PointChange(POINT_HP, GetMaxHP() - GetHP());
    
    
    if (GetSP() > GetMaxSP())
    PointChange(POINT_SP, GetMaxSP() - GetSP());

    I havent problem :D

  2. This solve all problems.

     

     

    ou :D

    char.cpp

     

    In function CHARACTER::ComputePoints()

     

    Search:

    if (iMaxHP != GetMaxHP())
    {
    SetRealPoint(POINT_MAX_HP, iMaxHP); // 기본HP를 RealPoint에 저장해 놓는다.
    }
    
    
    PointChange(POINT_MAX_HP, 0);
    
    
    if (iMaxSP != GetMaxSP())
    {
    SetRealPoint(POINT_MAX_SP, iMaxSP); // 기본SP를 RealPoint에 저장해 놓는다.
    }
    
    
    PointChange(POINT_MAX_SP, 0);
    
    
    if (GetHP() > GetMaxHP())
    PointChange(POINT_HP, GetMaxHP() - GetHP());
    
    
    if (GetSP() > GetMaxSP())
    PointChange(POINT_SP, GetMaxSP() - GetSP());

    Copy this and remove.

     

    After replace before UpdatePacket();

     

  3. ou :D

    char.cpp

     

    In function CHARACTER::ComputePoints()

     

    Search:

    if (iMaxHP != GetMaxHP())
    {
    SetRealPoint(POINT_MAX_HP, iMaxHP); // 기본HP를 RealPoint에 저장해 놓는다.
    }
    
    
    PointChange(POINT_MAX_HP, 0);
    
    
    if (iMaxSP != GetMaxSP())
    {
    SetRealPoint(POINT_MAX_SP, iMaxSP); // 기본SP를 RealPoint에 저장해 놓는다.
    }
    
    
    PointChange(POINT_MAX_SP, 0);
    
    
    if (GetHP() > GetMaxHP())
    PointChange(POINT_HP, GetMaxHP() - GetHP());
    
    
    if (GetSP() > GetMaxSP())
    PointChange(POINT_SP, GetMaxSP() - GetSP());

    Copy this and remove.

     

    After replace before UpdatePacket();

     

    Good Luck.

  4. I made a big mistake :D

     

    case 2: // sex
    {
    switch (arg3[0])
    {
    case 'morphe': // /set Name sex morphe
    {
    tch->ChangeSex();
    tch->SetPolymorph(101);
    tch->SetPolymorph(0);
    }
    break;
    }
    }
    break;
  5. Hi dev's !

     

    I know this is a sh*t but... :D

     

    Open cmd_gm.cpp:

    SET SEX:

    Find:

    case 2: // sex
    break;

    Replace with:

    case 2: // sex
    {
    switch (arg3[0])
    {
    case 'morphe': // /set Name sex morphe
    {
    tch->ChangeSex();
    tch->SetPolymorph(101);
    tch->SetPolymorph(0);
    }
    break;
    }
    }
    break;
    use /set Name sex morphe or change 'morphe' with 'your_string'
     

    SET RACE:

    Find:

    case 1: // race
    break;
    Replace with:
    case 1: // race
    {
    DWORD dwRace = MAIN_RACE_MAX_NUM;
    
    
    if (!*arg3)
    {
    ch->ChatPacket(CHAT_TYPE_INFO, "Enter race number");
    return;
    }
    
    
    str_to_number(dwRace, arg3);
    if (dwRace >= MAIN_RACE_MAX_NUM)
    {
    ch->ChatPacket(CHAT_TYPE_INFO, "Race max number = 9 (0-8)");
    return;
    }
    
    
    if (dwRace == tch->GetRaceNum())
    {
    ch->ChatPacket(CHAT_TYPE_INFO, "He already is this race");
    return;
    } 
    
    
    tch->SetRace(dwRace);
    tch->ClearSkill();
    
    
    tch->SetPolymorph(101);
    tch->SetPolymorph(0);
    }
    break;

    use /set Name race number_race

     

    SET SKILL GROUP

    Find:

    { "align", NUMBER },

    Add under:

    { "skill_group", NUMBER },

    Find:

    case 8: // alignment

    Add under this case a new case:

    case 9: // skill_group
    {
    bool bIsSetSkillGroup = false;
    DWORD dwSkillGroup = 0;
    
    if (!*arg3)
    {
    ch->ChatPacket(CHAT_TYPE_INFO, "Enter a skill_group (1-2)");
    }
    
    if (*arg3)
    {
    str_to_number(dwSkillGroup, arg3);
    dwSkillGroup = MINMAX(0, dwSkillGroup, 2);
    bIsSetSkillGroup = true;
    }
    
    if (bIsSetSkillGroup)
    {
    tch->SetSkillGroup(dwSkillGroup);
    }
    }
    break;

    use /set Name race number_race

     

    SET LEVEL

    Find:

    { "align", NUMBER },

    Add under:

    { "level", NUMBER },

    Find:

    case 9: // skill_group

    Add under this case a new case.

    case 10: // level
    {
    DWORD dwLevel = PLAYER_EXP_TABLE_MAX;
    
    
    if (!*arg3)
    {
    ch->ChatPacket(CHAT_TYPE_INFO, "Enter the level");
    return;
    }
    
    
    str_to_number(dwRace, arg3);
    if (dwLevel >= PLAYER_EXP_TABLE_MAX)
    {
    ch->ChatPacket(CHAT_TYPE_INFO, "MAX_LEVEL is: %d", PLAYER_EXP_TABLE_MAX);
    return;
    }
    
    
    tch->SetLevel(dwRace);
    }
    break;

    use /set Name level number

     

     

     
    • Love 2
  6. With this is more fine :D

     

    if (pinfo->type == CHAT_TYPE_SHOUT)
        {
            const int SHOUT_LIMIT_LEVEL = 15;
    
    
            if (ch->GetLevel() < SHOUT_LIMIT_LEVEL)
            {
                ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("외치기는 레벨 %d 이상만 사용 가능 합니다."), SHOUT_LIMIT_LEVEL);
                return (iExtraLen);
            }
    
    
            if (thecore_heart->pulse - (int) ch->GetLastShoutPulse() < passes_per_sec * 15)
                    return (iExtraLen);
    
    
            ch->SetLastShoutPulse(thecore_heart->pulse);
    
    
            const char* kingdoms[4] = {"|cFF47DA00|H|h[GameMaster]|cFFA7FFD4|H|h","|cFFff0000|H|h[Shinsoo]|cFFA7FFD4|H|h","|cFFFFFF00|H|h[Chunjo]|cFFA7FFD4|H|h","|cFF0080FF|H|h[Jinno]|cFFA7FFD4|H|h"};
            int my_level = ch->GetLevel();
            if (gSpecialShout)
            {
                if (ch->GetGMLevel() != GM_PLAYER)
                {
                    if (MasterGhostChat)
                    {
                        len_global = snprintf(chatbuf, sizeof(chatbuf), "%s : %s",kingdoms[0], buf);
                    }
                    else
                    {
                        if ((MasterColorEmpire) && (!MasterLevelChat))
                        {
                            len_global = snprintf(chatbuf, sizeof(chatbuf), "%s %s : %s",ch->GetName(), kingdoms[ch->GetEmpire()], buf);
                        }
                        else if ((MasterColorEmpire) && (MasterLevelChat))
                        {
                            len_global = snprintf(chatbuf, sizeof(chatbuf), "%s %s [%d] : %s",ch->GetName(), kingdoms[ch->GetEmpire()], my_level, buf);
                        }
                        else if ((!MasterColorEmpire) && (MasterLevelChat))
                        {
                            len_global = snprintf(chatbuf, sizeof(chatbuf), "%s [%d] : %s",ch->GetName(), my_level, buf);
                        }
                        else
                        {
                            len_global = snprintf(chatbuf, sizeof(chatbuf), "%s : %s",ch->GetName(), buf);
                        }
                    }
                }
                else
                {
                    if ((PlayerColorEmpire) && (!PlayerLevelChat))
                    {
                        len_global = snprintf(chatbuf, sizeof(chatbuf), "%s %s : %s",ch->GetName(), kingdoms[ch->GetEmpire()], buf);
                    }
                    else if ((PlayerColorEmpire) && (PlayerLevelChat))
                    {
                        len_global = snprintf(chatbuf, sizeof(chatbuf), "%s %s [%d] : %s",ch->GetName(), kingdoms[ch->GetEmpire()], my_level, buf);
                    }
                    else if ((!PlayerColorEmpire) && (PlayerLevelChat))
                    {
                        len_global = snprintf(chatbuf, sizeof(chatbuf), "%s [%d] : %s",ch->GetName(), my_level, buf);
                    }
                    else
                    {
                        len_global = snprintf(chatbuf, sizeof(chatbuf), "%s : %s", ch->GetName(), buf);
                    }
                }
            }
            else
            {
                len_global = snprintf(chatbuf, sizeof(chatbuf), "%s : %s", ch->GetName(), buf);
            }
    
    
            TPacketGGShout p;
    
    
            p.bHeader = HEADER_GG_SHOUT;
            p.bEmpire = ch->GetEmpire();
            strlcpy(p.szText, chatbuf, sizeof(p.szText));
            P2P_MANAGER::instance().Send(&p, sizeof(TPacketGGShout));
    
    
            SendShout(chatbuf, ch->GetEmpire());
    
    
            return (iExtraLen);
        }

     

    P.S.: Change int with bool. :D

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