Jump to content

Human

Inactive Member
  • Posts

    167
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Posts posted by Human

  1. I need help with this VIP system i tried earlier it was working but GM is treated as GM and he cant be attacked even with PK protected removed 
    and also he can use / n or /b which is weird 
    So Can you ppl sort it out this issue and give us the best VIP sytem with quest and source

  2. 1 hour ago, Sonitex said:

    Just connect strings with locale_game.txt and locale_interface.txt :)

    those uiwiki.py itself i need to link or connect 
    can u tell me how ?
     i know this 
    to link like  .SetText(localeInfo.XXXX_YYYY) 
    But how to make it call from different locale Like locale_en or locale_de ??

     

  3. Hi there,
    I recently added Okey card system which is working fine but when i scanned the exe it is showing virus which is blocked by windows defender 
    https://metin2.download/picture/5tkiiUhlgLQcU5i7Y48n0z72WI6xJt7g/.png

    h5jdsmmainly in this line when i disabled its not showing virus but once i enable it and compiled exe is with 2 virus..which is win32.trojan
     

            else if ("info" == TokenVector[1])
            {
                if (14 != TokenVector.size())
                {
                    TraceError("CPythonNetworkStream::ServerCommand(c_szCommand=%s) - Strange Parameter Count : %s", c_szCommand);
                    return;
                }
                DWORD card_in_hand_1 = atoi(TokenVector[2].c_str());
                DWORD card_in_hand_1_v = atoi(TokenVector[3].c_str());
                DWORD card_in_hand_2 = atoi(TokenVector[4].c_str());
                DWORD card_in_hand_2_v = atoi(TokenVector[5].c_str());
                DWORD card_in_hand_3 = atoi(TokenVector[6].c_str());
                DWORD card_in_hand_3_v = atoi(TokenVector[7].c_str());
                DWORD card_in_hand_4 = atoi(TokenVector[8].c_str());
                DWORD card_in_hand_4_v = atoi(TokenVector[9].c_str());
                DWORD card_in_hand_5 = atoi(TokenVector[10].c_str());
                DWORD card_in_hand_5_v = atoi(TokenVector[11].c_str());
                DWORD cards_left = atoi(TokenVector[12].c_str());
                DWORD points = atoi(TokenVector[13].c_str());
                PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "BINARY_Cards_UpdateInfo", Py_BuildValue("(iiiiiiiiiiii)", card_in_hand_1, card_in_hand_1_v, card_in_hand_2, card_in_hand_2_v,
                                                                                                    card_in_hand_3, card_in_hand_3_v, card_in_hand_4, card_in_hand_4_v, card_in_hand_5, card_in_hand_5_v,
                                                                                                    cards_left, points));
            }

    the total addition in pythonNetworkStreamCommand.cpp is attached if not i post here 

       else if (!strcmpi(szCmd, "cards"))
        {
            if (TokenVector.size() < 2)
            {
                TraceError("CPythonNetworkStream::ServerCommand(c_szCommand=%s) - Strange Parameter Count : %s", c_szCommand);
                return;
            }
            if ("open" == TokenVector[1])
            {
                DWORD safemode = atoi(TokenVector[2].c_str());
                PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "BINARY_Cards_Open", Py_BuildValue("(i)", safemode));
            }
            else if ("info" == TokenVector[1])
            {
                if (14 != TokenVector.size())
                {
                    TraceError("CPythonNetworkStream::ServerCommand(c_szCommand=%s) - Strange Parameter Count : %s", c_szCommand);
                    return;
                }
                DWORD card_in_hand_1 = atoi(TokenVector[2].c_str());
                DWORD card_in_hand_1_v = atoi(TokenVector[3].c_str());
                DWORD card_in_hand_2 = atoi(TokenVector[4].c_str());
                DWORD card_in_hand_2_v = atoi(TokenVector[5].c_str());
                DWORD card_in_hand_3 = atoi(TokenVector[6].c_str());
                DWORD card_in_hand_3_v = atoi(TokenVector[7].c_str());
                DWORD card_in_hand_4 = atoi(TokenVector[8].c_str());
                DWORD card_in_hand_4_v = atoi(TokenVector[9].c_str());
                DWORD card_in_hand_5 = atoi(TokenVector[10].c_str());
                DWORD card_in_hand_5_v = atoi(TokenVector[11].c_str());
                DWORD cards_left = atoi(TokenVector[12].c_str());
                DWORD points = atoi(TokenVector[13].c_str());
                PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "BINARY_Cards_UpdateInfo", Py_BuildValue("(iiiiiiiiiiii)", card_in_hand_1, card_in_hand_1_v, card_in_hand_2, card_in_hand_2_v,
                                                                                                    card_in_hand_3, card_in_hand_3_v, card_in_hand_4, card_in_hand_4_v, card_in_hand_5, card_in_hand_5_v,
                                                                                                    cards_left, points));
            }
            else if ("finfo" == TokenVector[1])
            {
                if (9 != TokenVector.size())
                {
                    TraceError("CPythonNetworkStream::ServerCommand(c_szCommand=%s) - Strange Parameter Count : %s", c_szCommand);
                    return;
                }
                DWORD hand_1 = atoi(TokenVector[2].c_str());
                DWORD hand_1_v = atoi(TokenVector[3].c_str());
                DWORD hand_2 = atoi(TokenVector[4].c_str());
                DWORD hand_2_v = atoi(TokenVector[5].c_str());
                DWORD hand_3 = atoi(TokenVector[6].c_str());
                DWORD hand_3_v = atoi(TokenVector[7].c_str());
                DWORD points = atoi(TokenVector[8].c_str());
                PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "BINARY_Cards_FieldUpdateInfo", Py_BuildValue("(iiiiiii)", hand_1, hand_1_v, hand_2, hand_2_v, hand_3, hand_3_v, points));
            }
            else if ("reward" == TokenVector[1])
            {
                if (9 != TokenVector.size())
                {
                    TraceError("CPythonNetworkStream::ServerCommand(c_szCommand=%s) - Strange Parameter Count : %s", c_szCommand);
                    return;
                }
                DWORD hand_1 = atoi(TokenVector[2].c_str());
                DWORD hand_1_v = atoi(TokenVector[3].c_str());
                DWORD hand_2 = atoi(TokenVector[4].c_str());
                DWORD hand_2_v = atoi(TokenVector[5].c_str());
                DWORD hand_3 = atoi(TokenVector[6].c_str());
                DWORD hand_3_v = atoi(TokenVector[7].c_str());
                DWORD points = atoi(TokenVector[8].c_str());
                PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "BINARY_Cards_PutReward", Py_BuildValue("(iiiiiii)", hand_1, hand_1_v, hand_2, hand_2_v, hand_3, hand_3_v, points));
            }
            else if ("icon" == TokenVector[1])
            {
                if (2 != TokenVector.size())
                {
                    TraceError("CPythonNetworkStream::ServerCommand(c_szCommand=%s) - Strange Parameter Count : %s", c_szCommand);
                    return;
                }
                PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "BINARY_Cards_ShowIcon", Py_BuildValue("()"));
            }
        }	


    any solution ?

     

    IMG_30102017_190341_0.png

  4. 4 hours ago, Abel(Tiger) said:

    This bug is old =) Very old. 

    In :

    void COfflineShopManager::TakeItem(LPCHARACTER ch, BYTE bPos)

    Search:

    "FROM %soffline_shop_item WHERE owner_id = %u and pos = %d", get_table_postfix(), ch->GetPlayerID(), bPos);

    Replace with:

    "FROM %soffline_shop_item WHERE owner_id = %u and pos = %d and status = 1", get_table_postfix(), ch->GetPlayerID(), bPos);

    Thanks dude its works 
    close the thread please :)

  5. Hello there , 
    I have a bug of duplication in offline shop.
    a players duplicates items using ken offline shop with refresh unsold items
    *  i just need one command or coding that is if offline shop is opened that refresh unsold items must not allow items to remove that's it
    or
    * refresh unsold item box must not open  when offline shop is opened and also if refresh unsold box is opened  then offline shop should not be created
    can anyone made coding for that so it will avoid that duplication?
    https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif

    Spoiler


    void COfflineShopManager::RefreshUnsoldItems(LPCHARACTER ch)
    {
        TPacketGCShop pack;
        pack.header = HEADER_GC_OFFLINE_SHOP;
        pack.subheader = SHOP_SUBHEADER_GC_UPDATE_ITEM2;

        TPacketGCOfflineShopStart pack2;
        memset(&pack2, 0, sizeof(pack2));
        pack2.owner_vid = 0;

        char szQuery[1024];
        if (g_bOfflineShopSocketMax == 3)
    #ifdef USE_LENTS_SHOULDER_SASH
            snprintf(szQuery, sizeof(szQuery), "SELECT pos,count,vnum,price,socket0,socket1,socket2,attrtype0,attrvalue0,attrtype1,attrvalue1,attrtype2,attrvalue2,attrtype3,attrvalue3,attrtype4,attrvalue4,attrtype5,attrvalue5,attrtype6,attrvalue6,applytype0,applyvalue0,applytype1,applyvalue1,applytype2,applyvalue2,applytype3,applyvalue3,applytype4,applyvalue4,applytype5,applyvalue5,applytype6,applyvalue6,applytype7,applyvalue7 FROM %soffline_shop_item WHERE owner_id = %u and status = 1", get_table_postfix(), ch->GetPlayerID());
    #else        
            snprintf(szQuery, sizeof(szQuery), "SELECT pos,count,vnum,price,socket0,socket1,socket2,attrtype0,attrvalue0,attrtype1,attrvalue1,attrtype2,attrvalue2,attrtype3,attrvalue3,attrtype4,attrvalue4,attrtype5,attrvalue5,attrtype6,attrvalue6 FROM %soffline_shop_item WHERE owner_id = %u and status = 1", get_table_postfix(), ch->GetPlayerID());
    #endif    
        else if (g_bOfflineShopSocketMax == 4)
    #ifdef USE_LENTS_SHOULDER_SASH
            snprintf(szQuery, sizeof(szQuery), "SELECT pos,count,vnum,price,socket0,socket1,socket2,socket3,attrtype0,attrvalue0,attrtype1,attrvalue1,attrtype2,attrvalue2,attrtype3,attrvalue3,attrtype4,attrvalue4,attrtype5,attrvalue5,attrtype6,attrvalue6,applytype0,applyvalue0,applytype1,applyvalue1,applytype2,applyvalue2,applytype3,applyvalue3,applytype4,applyvalue4,applytype5,applyvalue5,applytype6,applyvalue6,applytype7,applyvalue7 FROM %soffline_shop_item WHERE owner_id = %u and status = 1", get_table_postfix(), ch->GetPlayerID());
    #else        
            snprintf(szQuery, sizeof(szQuery), "SELECT pos,count,vnum,price,socket0,socket1,socket2,socket3,attrtype0,attrvalue0,attrtype1,attrvalue1,attrtype2,attrvalue2,attrtype3,attrvalue3,attrtype4,attrvalue4,attrtype5,attrvalue5,attrtype6,attrvalue6 FROM %soffline_shop_item WHERE owner_id = %u and status = 1", get_table_postfix(), ch->GetPlayerID());
    #endif    
        else if (g_bOfflineShopSocketMax == 5)
    #ifdef USE_LENTS_SHOULDER_SASH
            snprintf(szQuery, sizeof(szQuery), "SELECT pos,count,vnum,price,socket0,socket1,socket2,socket3,socket4,attrtype0,attrvalue0,attrtype1,attrvalue1,attrtype2,attrvalue2,attrtype3,attrvalue3,attrtype4,attrvalue4,attrtype5,attrvalue5,attrtype6,attrvalue6,applytype0,applyvalue0,applytype1,applyvalue1,applytype2,applyvalue2,applytype3,applyvalue3,applytype4,applyvalue4,applytype5,applyvalue5,applytype6,applyvalue6,applytype7,applyvalue7 FROM %soffline_shop_item WHERE owner_id = %u and status = 1", get_table_postfix(), ch->GetPlayerID());
    #else
            snprintf(szQuery, sizeof(szQuery), "SELECT pos,count,vnum,price,socket0,socket1,socket2,socket3,socket4,attrtype0,attrvalue0,attrtype1,attrvalue1,attrtype2,attrvalue2,attrtype3,attrvalue3,attrtype4,attrvalue4,attrtype5,attrvalue5,attrtype6,attrvalue6 FROM %soffline_shop_item WHERE owner_id = %u and status = 1", get_table_postfix(), ch->GetPlayerID());
    #endif    
        else if (g_bOfflineShopSocketMax == 6)
    #ifdef USE_LENTS_SHOULDER_SASH
            snprintf(szQuery, sizeof(szQuery), "SELECT pos,count,vnum,price,socket0,socket1,socket2,socket3,socket4,socket5,attrtype0,attrvalue0,attrtype1,attrvalue1,attrtype2,attrvalue2,attrtype3,attrvalue3,attrtype4,attrvalue4,attrtype5,attrvalue5,attrtype6,attrvalue6,applytype0,applyvalue0,applytype1,applyvalue1,applytype2,applyvalue2,applytype3,applyvalue3,applytype4,applyvalue4,applytype5,applyvalue5,applytype6,applyvalue6,applytype7,applyvalue7 FROM %soffline_shop_item WHERE owner_id = %u and status = 1", get_table_postfix(), ch->GetPlayerID());
    #else        
            snprintf(szQuery, sizeof(szQuery), "SELECT pos,count,vnum,price,socket0,socket1,socket2,socket3,socket4,socket5,attrtype0,attrvalue0,attrtype1,attrvalue1,attrtype2,attrvalue2,attrtype3,attrvalue3,attrtype4,attrvalue4,attrtype5,attrvalue5,attrtype6,attrvalue6 FROM %soffline_shop_item WHERE owner_id = %u and status = 1", get_table_postfix(), ch->GetPlayerID());
    #endif    

        std::auto_ptr<SQLMsg> pMsg(DBManager::instance().DirectQuery(szQuery));

        MYSQL_ROW row;
        while (NULL != (row = mysql_fetch_row(pMsg->Get()->pSQLResult)))
        {
            BYTE bPos = 0;
            str_to_number(bPos, row[0]);

            str_to_number(pack2.items[bPos].count, row[1]);
            str_to_number(pack2.items[bPos].vnum, row[2]);
            str_to_number(pack2.items[bPos].price, row[3]);

            DWORD alSockets[ITEM_SOCKET_MAX_NUM];
            for (int i = 0, n = 4; i < ITEM_SOCKET_MAX_NUM; ++i, n++)
                str_to_number(alSockets, row[n]);

            TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_MAX_NUM];
            for (int i = 0, iStartType = 7, iStartValue = 8; i < ITEM_ATTRIBUTE_MAX_NUM; ++i, iStartType += 2, iStartValue += 2)
            {
                str_to_number(aAttr.bType, row[iStartType]);
                str_to_number(aAttr.sValue, row[iStartValue]);
            }

            thecore_memcpy(pack2.items[bPos].alSockets, alSockets, sizeof(pack2.items[bPos].alSockets));
            thecore_memcpy(pack2.items[bPos].aAttr, aAttr, sizeof(pack2.items[bPos].aAttr));
        }

        pack.size = sizeof(pack) + sizeof(pack2);
        
        if (ch->GetDesc())
        {
            ch->GetDesc()->BufferedPacket(&pack, sizeof(TPacketGCShop));
            ch->GetDesc()->Packet(&pack2, sizeof(TPacketGCOfflineShopStart));
        }
    }

     


    Will be happy if anyone helps 

    regards 

    Hawk 

    pictre.jpg

  6. 42 minutes ago, riku11 said:

    no, it's just a different method of doing what you did with your statement with[1],[2],[3].....

     

     

    replace this : 

     

    
    ["regens"] = {
                    [1] = "data/dungeon/icedungeon/regen_1.txt",
                    [2] = "data/dungeon/icedungeon/regen_2.txt",
                    [3] = "data/dungeon/icedungeon/regen_3.txt",
                    [4] = "data/dungeon/icedungeon/regen_4.txt",
                    [5] = "data/dungeon/icedungeon/regen_5.txt"
                },

     

    with this :

    42 minutes ago, riku11 said:

    data["regens"] = {} or 
     

    
    
    data["regens"] = {
    
    
    
    table.insert(data["regens"],"data/dungeon/icedungeon/regen_1.txt")
    table.insert(data["regens"],"data/dungeon/icedungeon/regen_2.txt")
    table.insert(data["regens"],"data/dungeon/icedungeon/regen_3.txt")
    table.insert(data["regens"],"data/dungeon/icedungeon/regen_4.txt")
    table.insert(data["regens"],"data/dungeon/icedungeon/regen_5.txt")

    },

    ?

     

    even if i put that too its not working and u dont need to add data coz my function itself has Icedungeon.data  = {

  7. On 10/4/2017 at 7:24 PM, riku11 said:

    can you starts with replacing the c ++ function with mine, which is anti crash

     

    than can you replace your declaration of data["regens"] with this : 

    
    
    data["regens"] = {}
    table.insert(data["regens"],"data/dungeon/icedungeon/regen_1.txt")
    table.insert(data["regens"],"data/dungeon/icedungeon/regen_2.txt")
    table.insert(data["regens"],"data/dungeon/icedungeon/regen_3.txt")
    table.insert(data["regens"],"data/dungeon/icedungeon/regen_4.txt")
    table.insert(data["regens"],"data/dungeon/icedungeon/regen_5.txt")



     

    is that adding in table of db ? 

  8. well this is my function 
     

    Spoiler

        {
            int iMapIndex = static_cast<int>(lua_tonumber(L, 1));
            std::string szFilename(lua_tostring(L, 2));

            LPSECTREE_MAP pkMap = SECTREE_MANAGER::instance().GetMap(iMapIndex);

            if (pkMap != NULL)
            {
                regen_load_in_file( szFilename.c_str(), iMapIndex, pkMap->m_setting.iBaseX ,pkMap->m_setting.iBaseY );
            }

            return 0;
        }

    and the lua quest that calling that regen function is 

    Spoiler

    regen_in_map(data["map_index"], data["regens"][game.get_event_flag("icedungeon_monster_cycle")]);

    function.lua
              

    Spoiler

     ["regens"] = {
                    [1] = "data/dungeon/icedungeon/regen_1.txt",
                    [2] = "data/dungeon/icedungeon/regen_2.txt",
                    [3] = "data/dungeon/icedungeon/regen_3.txt",
                    [4] = "data/dungeon/icedungeon/regen_4.txt",
                    [5] = "data/dungeon/icedungeon/regen_5.txt"
                },

    and yes after that function only game crashes if i disable that regen_in_map then no crash.. 

    Check the statement yes im passing the right parameters

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