Jump to content

hasanmacit

Active Member
  • Posts

    22
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by hasanmacit

  1. On 9/9/2021 at 10:32 PM, babejlevej said:

    Nice system, please help.

     

    sysser: https://ctxt.io/2/AACge341Fg

     

    uisystemoption.py https://ctxt.io/2/AABgCIJ3FA

    line 29

    class PopupDialog(ui.ScriptWindow):
        def __init__(self, parent):
            print "PopupDialog::PopupDialog()"
            ui.ScriptWindow.__init__(self)
            self.__Bind()
            self.__Load()   <---this
            if app.ENABLE_FOV_OPTION:
            self.RefreshFOVOption()

    tab settings ?

    • Metin2 Dev 1
  2. 5 hours ago, hachiwari said:

    in such an ugly way?

    i am just shared if you think you can do better, don't hesitate, we are here for the community after all, I said that idea can be developed, but I just did it like that.

    • Good 2
  3. service.h

    add

    #define NEW_PLAYER_COMMANDS

    cmd.cpp
    add

    #ifdef NEW_PLAYER_COMMANDS
    ACMD(do_list_commands);
    #endif

    find

    { "user_horse_feed",    do_user_horse_feed,        0,        POS_FISHING,    GM_PLAYER    },

    add

    #ifdef NEW_PLAYER_COMMANDS
    
        { "list_commands",        do_list_commands,            0,            POS_DEAD,    GM_PLAYER    },
    
    #endif

    cmd_general.cpp
    add to bottom

    #ifdef NEW_PLAYER_COMMANDS
    ACMD(do_list_commands)
    {
        ch->ChatPacket(CHAT_TYPE_INFO, "Usage: You must put / at the beginning of all written codes.");
        ch->ChatPacket(CHAT_TYPE_INFO, "Usage: Example code usage is /war.");
        ch->ChatPacket(CHAT_TYPE_INFO, "Usage: war. It is useful for guild structure.");
        ch->ChatPacket(CHAT_TYPE_INFO, "Usage: it is now suitable for Guild structure.");
        ch->ChatPacket(CHAT_TYPE_INFO, "Usage: stat st, dx, ht, iq. Adds 1 point to the status you choose.");
        ch->ChatPacket(CHAT_TYPE_INFO, "Usage: stat-st, dx, ht, iq. Removes 1 point from your selection.");
        ch->ChatPacket(CHAT_TYPE_INFO, "Usage: restart_here. Being dead makes you wake up.");
        ch->ChatPacket(CHAT_TYPE_INFO, "Usage: restart_town. Teleports you to the city if you're dead.");
        ch->ChatPacket(CHAT_TYPE_INFO, "Usage: ungroup. Allows you to exit your existing groups. ");
        ch->ChatPacket(CHAT_TYPE_INFO, "Usage: close_shop. It closes your open market. ");
        ch->ChatPacket(CHAT_TYPE_INFO, "Usage: set_walk_mode. Your character can only walk, not run. ");
        ch->ChatPacket(CHAT_TYPE_INFO, "Usage: set_run_mode. If your character is walk, it will run. ");
        ch->ChatPacket(CHAT_TYPE_INFO, "Usage: pkmode. Sets your character's aggression level (guild, free, peace. ");
        ch->ChatPacket(CHAT_TYPE_INFO, "Usage: unmount. Your character dismounts. ");
    }
    #endif

    I wanted to do this so that new players can do something by looking at the commands, I don't know what benefit it will be, maybe very different things can be done based on thought, the rest is up to your imagination.

    example usage

    spacer.png

    • Think 1
    • Love 3
  4. M2 Download Center

    This is the hidden content, please
    ( Internal )

    Hello everyone. I'm here today for a contribution to the community. I share Wolfman files with you completely smoothly. (Including jumping skill.) Best regards.

    This is the hidden content, please

    This is the hidden content, please

    spacer.png

     

    You must add "pid5" to the player_index table.

    • Metin2 Dev 84
    • kekw 1
    • Eyes 2
    • Angry 1
    • Not Good 1
    • Sad 1
    • Lmao 2
    • Good 43
    • muscle 1
    • Love 7
    • Love 39
  5. greetings everyone, we will increase the number of attributes as you can understand from the title

     

    Game

    Spoiler
    
    
    
    Game Source
    
    open constants.cpp:
    
    search
      
      const int aiItemAttributeAddPercent[ITEM_ATTRIBUTE_MAX_NUM] =
      
    change the numbers below
      
      100, 100, 100, 100, 100, 100, 100, 100,
    
    open char_item.cpp
      
      search if (item2->GetAttributeCount() < 4) or if (item2->GetAttributeCount() < 5)
      
      change
      
      if (item2->GetAttributeCount() < 6)
     
    open item.h
      
      	search
      
     	 void        PutAttributeWithLevel(BYTE bLevel);
    
    	add
         
        public:
            void        AddRareAttribute2(const int * aiAttrPercentTable = NULL);
        protected:
            void        AddRareAttr(BYTE bApply, BYTE bLevel);
            void        PutRareAttribute(const int * aiAttrPercentTable);
            void        PutRareAttributeWithLevel(BYTE bLevel);
        
       
    open item_attribute.cpp
      
      search  int CItem::GetRareAttrCount()
        
      change all code block
        
    int CItem::GetRareAttrCount()
    {
        int ret = 0;
    
        for (DWORD dwIdx = ITEM_ATTRIBUTE_RARE_START; dwIdx < ITEM_ATTRIBUTE_RARE_END; dwIdx++)
        {
            if (m_aAttr[dwIdx].bType != 0)
                ret++;
        }
    
        return ret;
    }
    
    search
      
     	m_aAttr[i + 5].bType = 0;
    	m_aAttr[i + 5].sValue = 0;
    
    change
      
      m_aAttr[i + ITEM_ATTRIBUTE_RARE_START].bType = 0;
      m_aAttr[i + ITEM_ATTRIBUTE_RARE_START].sValue = 0;
    
    search
      
      if (count >= 2)
      
      change
      
      if (count >= ITEM_ATTRIBUTE_RARE_NUM)
      
    search
      
      int pos = count + 5;
    
    change
      
      int pos = count + ITEM_ATTRIBUTE_RARE_START;
    
    add at the bottom of the file
      
    void CItem::AddRareAttribute2(const int * aiAttrPercentTable)
    {
        static const int aiItemAddAttributePercent[ITEM_ATTRIBUTE_MAX_LEVEL] =
        {
            40, 50, 10, 0, 0
        };
        if (aiAttrPercentTable == NULL)
            aiAttrPercentTable = aiItemAddAttributePercent;
    
        if (GetRareAttrCount() < MAX_RARE_ATTR_NUM)
            PutRareAttribute(aiAttrPercentTable);
    }
    
    void CItem::PutRareAttribute(const int * aiAttrPercentTable)
    {
        int iAttrLevelPercent = number(1, 100);
        int i;
    
        for (i = 0; i < ITEM_ATTRIBUTE_MAX_LEVEL; ++i)
        {
            if (iAttrLevelPercent <= aiAttrPercentTable[i])
                break;
    
            iAttrLevelPercent -= aiAttrPercentTable[i];
        }
    
        PutRareAttributeWithLevel(i + 1);
    }
    
    void CItem::PutRareAttributeWithLevel(BYTE bLevel)
    {
        int iAttributeSet = GetAttributeSetIndex();
        if (iAttributeSet < 0)
            return;
    
        if (bLevel > ITEM_ATTRIBUTE_MAX_LEVEL)
            return;
    
        std::vector<int> avail;
    
        int total = 0;
    
        // ºÙÀÏ ¼ö ÀÖ´Â ¼Ó¼º ¹è¿À» ±¸Ãà
        for (int i = 0; i < MAX_APPLY_NUM; ++i)
        {
            const TItemAttrTable & r = g_map_itemRare[i];
    
            if (r.bMaxLevelBySet[iAttributeSet] && !HasRareAttr(i))
            {
                avail.push_back(i);
                total += r.dwProb;
            }
        }
    
        // ±¸ÃàµÈ ¹è¿·Î È®·ü °è»êÀ» ÅëÇØ ºÙÀÏ ¼Ó¼º ¼±Á¤
        unsigned int prob = number(1, total);
        int attr_idx = APPLY_NONE;
    
        for (DWORD i = 0; i < avail.size(); ++i)
        {
            const TItemAttrTable & r = g_map_itemRare[avail[i]];
    
            if (prob <= r.dwProb)
            {
                attr_idx = avail[i];
                break;
            }
    
            prob -= r.dwProb;
        }
    
        if (!attr_idx)
        {
            sys_err("Cannot put item rare attribute %d %d", iAttributeSet, bLevel);
            return;
        }
    
        const TItemAttrTable & r = g_map_itemRare[attr_idx];
    
        // Á¾·ùº° ¼Ó¼º ·¹º§ ÃÖ´ë°ª Á¦ÇÑ
        if (bLevel > r.bMaxLevelBySet[iAttributeSet])
            bLevel = r.bMaxLevelBySet[iAttributeSet];
    
        AddRareAttr(attr_idx, bLevel);
    }
    
    void CItem::AddRareAttr(BYTE bApply, BYTE bLevel)
    {
        if (HasRareAttr(bApply))
            return;
    
        if (bLevel <= 0)
            return;
    
        int i = ITEM_ATTRIBUTE_RARE_START + GetRareAttrCount();
    
        if (i == ITEM_ATTRIBUTE_RARE_END)
            sys_err("item rare attribute overflow!");
        else
        {
            const TItemAttrTable & r = g_map_itemRare[bApply];
            long lVal = r.lValues[MIN(4, bLevel - 1)];
    
            if (lVal)
                SetForceAttribute(i, bApply, lVal);
        }
    }
    
    open item_manager.h
      
      search
      
      const static int MAX_NORM_ATTR_NUM = 5;
      const static int MAX_RARE_ATTR_NUM = 2;
    
      change
        
      const static int MAX_NORM_ATTR_NUM = ITEM_ATTRIBUTE_NORM_NUM;
      const static int MAX_RARE_ATTR_NUM = ITEM_ATTRIBUTE_RARE_NUM;
    
    
        

     

     

     

    DB

    Spoiler
    
    
    
    DB Source
    
    open cache.cpp
    
    search
    
    if (isAttr)
    
    change all code block
    
    if (isAttr)
            {
                iLen += snprintf(szColumns + iLen, sizeof(szColumns) - iLen,
                        ", attrtype0, attrvalue0, attrtype1, attrvalue1, attrtype2, attrvalue2, attrtype3, attrvalue3"
                        ", attrtype4, attrvalue4, attrtype5, attrvalue5, attrtype6, attrvalue6, attrtype7, attrvalue7");
    
                iValueLen += snprintf(szValues + iValueLen, sizeof(szValues) - iValueLen,
                        ", %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d",
                        p->aAttr[0].bType, p->aAttr[0].sValue,
                        p->aAttr[1].bType, p->aAttr[1].sValue,
                        p->aAttr[2].bType, p->aAttr[2].sValue,
                        p->aAttr[3].bType, p->aAttr[3].sValue,
                        p->aAttr[4].bType, p->aAttr[4].sValue,
                        p->aAttr[5].bType, p->aAttr[5].sValue,
                        p->aAttr[6].bType, p->aAttr[6].sValue,
                        p->aAttr[7].bType, p->aAttr[7].sValue);
    
                iUpdateLen += snprintf(szUpdate + iUpdateLen, sizeof(szUpdate) - iUpdateLen,
                        ", attrtype0=%d, attrvalue0=%d"
                        ", attrtype1=%d, attrvalue1=%d"
                        ", attrtype2=%d, attrvalue2=%d"
                        ", attrtype3=%d, attrvalue3=%d"
                        ", attrtype4=%d, attrvalue4=%d"
                        ", attrtype5=%d, attrvalue5=%d"
                        ", attrtype6=%d, attrvalue6=%d"
                        ", attrtype7=%d, attrvalue7=%d",
                        p->aAttr[0].bType, p->aAttr[0].sValue,
                        p->aAttr[1].bType, p->aAttr[1].sValue,
                        p->aAttr[2].bType, p->aAttr[2].sValue,
                        p->aAttr[3].bType, p->aAttr[3].sValue,
                        p->aAttr[4].bType, p->aAttr[4].sValue,
                        p->aAttr[5].bType, p->aAttr[5].sValue,
                        p->aAttr[6].bType, p->aAttr[6].sValue,
                        p->aAttr[7].bType, p->aAttr[7].sValue);
            }
    
    open clientmanager.cpp
    
    search
    
    "attrtype6, attrvalue6 "
    
    change
    
    "attrtype6, attrvalue6, "
                    "attrtype7, attrvalue7 "
    
    search
    
    "attrtype6, attrvalue6) "
                "VALUES(%u, %u, %d, %d, %u, %u, %ld, %ld, %ld, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d)",
    
    change
    
    "attrtype6, attrvalue6, "
                "attrtype7, attrvalue7) "
                "VALUES(%u, %u, %d, %d, %u, %u, %ld, %ld, %ld, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d)",
    
    search
    
    p->aAttr[6].bType, p->aAttr[6].sValue);
    
    change
    
    p->aAttr[6].bType, p->aAttr[6].sValue,
                p->aAttr[7].bType, p->aAttr[7].sValue);
    
    open clientmanagerplayer.cpp
    
    search
    
    attrtype0,attrvalue0,attrtype1,attrvalue1,attrtype2,attrvalue2,attrtype3,attrvalue3,attrtype4,attrvalue4,attrtype5,attrvalue5,attrtype6,attrvalue6 "
    
    change
    
    attrtype0,attrvalue0,attrtype1,attrvalue1,attrtype2,attrvalue2,attrtype3,attrvalue3,attrtype4,attrvalue4,attrtype5,attrvalue5,attrtype6,attrvalue6,attrtype7,attrvalue7 "
    
    search
    
    attrtype0,attrvalue0,attrtype1,attrvalue1,attrtype2,attrvalue2,attrtype3,attrvalue3,attrtype4,attrvalue4,attrtype5,attrvalue5,attrtype6,attrvalue6 "
    
    change
    
    attrtype0,attrvalue0,attrtype1,attrvalue1,attrtype2,attrvalue2,attrtype3,attrvalue3,attrtype4,attrvalue4,attrtype5,attrvalue5,attrtype6,attrvalue6,attrtype7,attrvalue7 "
    

     

     

     

    Common

    Spoiler
    
    
    
    Common
    
    open item_lenght.h
    
    search
    
    ITEM_ATTRIBUTE_MAX_NUM        = 7,
    
    change
    
     ITEM_ATTRIBUTE_NORM_NUM        = 6,
        ITEM_ATTRIBUTE_RARE_NUM        = 2,
    
        ITEM_ATTRIBUTE_NORM_START    = 0,
        ITEM_ATTRIBUTE_NORM_END        = ITEM_ATTRIBUTE_NORM_START + ITEM_ATTRIBUTE_NORM_NUM,
    
        ITEM_ATTRIBUTE_RARE_START    = ITEM_ATTRIBUTE_NORM_END,
        ITEM_ATTRIBUTE_RARE_END        = ITEM_ATTRIBUTE_RARE_START + ITEM_ATTRIBUTE_RARE_NUM,
    
        ITEM_ATTRIBUTE_MAX_NUM        = ITEM_ATTRIBUTE_RARE_END, // 8
    

     

     

     

    Client 

    Spoiler
    
    
    
    UserInterface
    
    open gametype.h
    
    search
    
    ITEM_ATTRIBUTE_SLOT_MAX_NUM
    
    change
    
    ITEM_ATTRIBUTE_SLOT_MAX_NUM = 8,

     

     

     

    Navicat

    Spoiler
    
    
    
    add the item table
    
     `attrtype7` tinyint(4) NOT NULL DEFAULT 0,
      `attrvalue7` smallint(6) NOT NULL DEFAULT 0,

     

     

    evidence

     

    spacer.png

    • Metin2 Dev 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.