Jump to content

Suainzettello

Inactive Member
  • Posts

    62
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Suainzettello

  1. 8 hours ago, Seryov said:

     

    do not say that the system does not work, use your brain and think....

    just change:
     int pListPet[2] = {34001, 34016};   
    to
     int pListPet[2] = {34001, 34016, 34004};   

     The first value is the minimum value and the second value is the maximum value of pet vnum (mob_proto) - change 34051 with your max vnum of pet */	
    	int pListPet[2] = {34001, 34051};

    .... Read, please.

  2. System don't work.

    My ActorIstanceCollisionDetection.cpp

    Binary successfully compiled, but, when i Spawn a Pet (34004 for example Mini Azrael, collision don't work.

     

    Spoiler

    BOOL CActorInstance::TestActorCollision(CActorInstance & rVictim)
    {
    #ifdef ENABLE_STOP_COLISSION_GLOBAL
    /*********************************************************************
    * date        : 2016.02.16
    * function    : Stop Colission
    * developer    : VegaS
    * skype        : sacadatt.amazon
    * description : Checks if the victim is one of the examples below you can easily configure. If the victim was found 
                    success as vnum site / breed ve you could go through it no longer block.
    */    
    /************
    * The first value is the minimum value and the second value is the maximum value of pet vnum (mob_proto) - change 34051 with your max vnum of pet */    
        int pListPet[2] = {34001, 34016};    
    /************
    * You can add whatever you like vnum of npc or monster (mob_proto) */
        int pListGlobal[] = {};
    /************
    * You can add what mapname you want for enable this stop collission global like pet / npc */    
        const char* strMapListGlobal[] = {
        "metin2_map_a1", 
        "metin2_map_c1", 
        "metin2_map_a3", 
        "metin2_map_guild_01",
        "metin2_map_monkeydungeon",
        "metin2_guild_village_01",
        "metin2_map_monkeydungeon_02",
        "metin2_guild_village_02",
        "metin2_map_c3",
        "metin2_map_guild_03",
        "metin2_map_monkeydungeon_03",
        "metin2_guild_village_03",
        "map_n_snowm_01",
        "metin2_map_n_flame_01",
        "metin2_map_n_desert_01",
        "metin2_map_milgyo",
        "metin2_map_deviltower1",
        "metin2_map_trent",
        "metin2_map_trent02",
        "season1/metin2_map_WL_01",
        "season1/metin2_map_nusluck01",
        "metin2_map_spiderdungeon_02",
        "metin2_map_skipia_dungeon_02",
        "metin2_map_spiderdungeon",
        "metin2_map_wedding_01",
        "metin2_map_t3",
        "metin2_map_t4",
        "metin2_map_duel",
        "season1/metin2_map_sungzi_snow",
        "season2/metin2_map_empirewar03",
        "metin2_map_devilsCatacomb",
        "metin2_map_skipia_dungeon_boss",
        "metin2_map_spiderdungeon_03"};
    /************
    * Location name of the map where the event takes place ox */        
        const char* strMapEventOx = "season1/metin2_map_oxevent";                                
        
        
        std::string stringName = CPythonBackground::Instance().GetWarpMapName();
        
        for (int i = 0; i < _countof(strMapListGlobal); i++)
        {
        #ifdef ENABLE_STOP_COLLISION_PLAYER_OX
            if (!strcmp(strMapEventOx, stringName.c_str())) // Check if u are place in map ox
            {    
                if (0 <= rVictim.GetRace() && rVictim.GetRace() <= 7) // Check if the victim through which pass over a player (change 7 with 8 if u have wolfman)
                    return FALSE;    // Stop collission for player --> You can go through players now successfully without lock yourself        
            }
        #endif        
            if (strMapListGlobal == stringName) // Check if you are in one of the maps listed in the global list
            {
                for (int i = 0; i < _countof(pListGlobal); i++)
                {
                    if (rVictim.GetRace() == pListGlobal || pListPet[0] <= rVictim.GetRace() && rVictim.GetRace() <= pListPet[1]) // Verify that the victim is npc vnum listed above, or if a pet.
                        return FALSE;    // Stop collission for global vnum like a pet or npc                            
                }
            }    
        }    
    #endif

     

  3. 1 hour ago, Suainzettello said:

    Hi Metin2Dev,

    I have a question for the expert users.

    How I delete from source the stone+0+1+2 and +3?

    I have finded this in source:

    char.cpp

      Reveal hidden contents

    void CHARACTER::DetermineDropMetinStone()
    {
        const int METIN_STONE_NUM = 14;
        static DWORD c_adwMetin[METIN_STONE_NUM] = 
        {
            28030,
            28031,
            28032,
            28033,
            28034,
            28035,
            28036,
            28037,
            28038,
            28039,
            28040,
            28041,
            28042,
            28043,
        };
        DWORD stone_num = GetRaceNum();
        int idx = std::lower_bound(aStoneDrop, aStoneDrop+STONE_INFO_MAX_NUM, stone_num) - aStoneDrop;
        if (idx >= STONE_INFO_MAX_NUM || aStoneDrop[idx].dwMobVnum != stone_num)
        {
            m_dwDropMetinStone = 0;
        }
        else
        {
            const SStoneDropInfo & info = aStoneDrop[idx];
            m_bDropMetinStonePct = info.iDropPct;
            {
                m_dwDropMetinStone = c_adwMetin[number(0, METIN_STONE_NUM - 1)];
                int iGradePct = number(1, 100);
                for (int iStoneLevel = 0; iStoneLevel < STONE_LEVEL_MAX_NUM; iStoneLevel ++)
                {
                    int iLevelGradePortion = info.iLevelPct[iStoneLevel];
                    if (iGradePct <= iLevelGradePortion)
                    {
                        break;
                    }
                    else
                    {
                        iGradePct -= iLevelGradePortion;
                        m_dwDropMetinStone += 100; // µ¹ +a -> +(a+1)ÀÌ µÉ¶§¸¶´Ù 100¾¿ Áõ°¡
                    }
                }
            }
        }
    }

     

    An example?

  4. Hi Metin2Dev,

    I have a question for the expert users.

    How I delete from source the drop of stone+0+1+2 and +3 from the Metin Stone?

    I have finded this in source but i can't modify...

    char.cpp

    Spoiler

    void CHARACTER::DetermineDropMetinStone()
    {
        const int METIN_STONE_NUM = 14;
        static DWORD c_adwMetin[METIN_STONE_NUM] = 
        {
            28030,
            28031,
            28032,
            28033,
            28034,
            28035,
            28036,
            28037,
            28038,
            28039,
            28040,
            28041,
            28042,
            28043,
        };
        DWORD stone_num = GetRaceNum();
        int idx = std::lower_bound(aStoneDrop, aStoneDrop+STONE_INFO_MAX_NUM, stone_num) - aStoneDrop;
        if (idx >= STONE_INFO_MAX_NUM || aStoneDrop[idx].dwMobVnum != stone_num)
        {
            m_dwDropMetinStone = 0;
        }
        else
        {
            const SStoneDropInfo & info = aStoneDrop[idx];
            m_bDropMetinStonePct = info.iDropPct;
            {
                m_dwDropMetinStone = c_adwMetin[number(0, METIN_STONE_NUM - 1)];
                int iGradePct = number(1, 100);
                for (int iStoneLevel = 0; iStoneLevel < STONE_LEVEL_MAX_NUM; iStoneLevel ++)
                {
                    int iLevelGradePortion = info.iLevelPct[iStoneLevel];
                    if (iGradePct <= iLevelGradePortion)
                    {
                        break;
                    }
                    else
                    {
                        iGradePct -= iLevelGradePortion;
                        m_dwDropMetinStone += 100; // µ¹ +a -> +(a+1)ÀÌ µÉ¶§¸¶´Ù 100¾¿ Áõ°¡
                    }
                }
            }
        }
    }

     

  5. This is syserr:

     

    Spoiler

    0825 18:36:01024 :: Traceback (most recent call last):

    0825 18:36:01024 ::   File "uiPhaseCurtain.py", line 61, in OnUpdate

    0825 18:36:01024 ::   File "networkModule.py", line 150, in __ChangePhaseWindow

    0825 18:36:01024 ::   File "introLogin.py", line 285, in Open

    0825 18:36:01024 ::   File "introLogin.py", line 1034, in __OpenServerBoard

    0825 18:36:01024 :: TypeError
    0825 18:36:01024 :: : 
    0825 18:36:01024 :: 'NoneType' object is not iterable
    0825 18:36:01024 :: 

     

    Thank you...

  6. Hi all,

    I have a problem with the new function "mysql_direct_query" of Lollo91, (for those not familiar) -> http://www.elitepvpers.com/forum/metin2-pserver-guides-strategies/3327940-release-mysql_direct_query-get_table_postfix-mysql_escape_string-written-c-lua.html

     

    After implementing all in the source, I have this quest:

    Spoiler

    quest bantool begin
        state start begin
            when letter with pc.is_gm() begin
                send_letter("Ban-tool")
            end
            
            when button or info begin
                -- Tanto per sicurezza...
                if not pc.is_gm() then
                    return
                end
                local menu = {"Ban player", "Remove ban", "Close"}
                say_title("Ban-tool")
                say("Select the function:[ENTER]")
                local s = select_table(menu)
                if s == table.getn(menu) then
                    return
                end
                -- 
                local name
                repeat
                    say_title(menu)
                    say("Insert name of player:[ENTER]")
                    name = input()
                    if name == "" then
                        say("The name you entered is invalid.[ENTER]")
                        return
                    end
                    say_title(menu)
                    say_reward("You have entered: "..name)
                    say("Are you sure you want to continue?[ENTER]")
                    local a = select("Yes", "No, repeat", "Cancel")
                    if a == 3 then
                        return
                    elseif a == 1 then
                        break
                    end
                until false
                say_title(menu)
                -- 
                local result, query_result = mysql_direct_query("SELECT player.account_id FROM player.player WHERE player.name='"..name.."' limit 1;")
                -- Controllo errori
                if result != 0 then
                    say("There was an error.")
                    say("Description of error:")
                    say_reward(query_result)
                    return            
                end
                local AccStatus = {"BLOCK","OK"}
                -- 
                local AccID = tonumber(query_result[1][1])
                --
                if AccID == nil then
                    say("The player does not exist.[ENTER]")
                    return
                end            
                -- Ban/sban player
                result, query_result = mysql_direct_query("UPDATE account.account SET account.status='"..AccStatus.."' WHERE account.id='"..AccID.."' limit 1;")
                -- Controllo errori
                if result != 0 then
                    say("There was an error.")
                    say("Description of error:")
                    say_reward(query_result)
                    return
                end    
                say("Successfully completed operation![ENTER]")
            end
        end
    end

     

    The problem is this:

                    say("There was an error.")
                    say("Description of error:")
    Why the query does not work?


    Thank you!

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