Jump to content

Avisek

Inactive Member
  • Posts

    167
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Avisek

  1. 6 minutes ago, FlorinMarian said:

    Yes, it is working.

    With lot of work i have Sash, Mount Costume, Costume Weapon fully working with "Army function aswell".

    https://metin2.download/picture/4rAlFPLjEmK3R04UU78xw14Zibaw570J/.png

    P.S. And i have Martysamma last version, i bought it on december 2017.

    Thank you for info that it is possible to do...

  2. On 31. 12. 2017 at 10:40 AM, tierrilopes said:

    In original source it should be like this then:

    char_item.cpp

    
    void CHARACTER::AutoGiveItem(LPITEM item, bool longOwnerShip)
    
    		if (longOwnerShip) {
    			item->SetOwnership (this, 300);
    		}
    		else {
    			item->SetOwnership (this, 60);
    		}
    LogManager::instance().ItemLog (this, item, "SYSTEM_DROP", item->GetName());

    and

    
    LPITEM CHARACTER::AutoGiveItem (DWORD dwItemVnum, BYTE bCount, int iRarePct, bool bMsg)
    
    		if (IS_SET (item->GetAntiFlag(), ITEM_ANTIFLAG_DROP)) {
    			item->SetOwnership (this, 300);
    		}
    		else {
    			item->SetOwnership (this, 60);
    		}
    		LogManager::instance().ItemLog (this, item, "SYSTEM_DROP", item->GetName());

    Your values may differ

    (300 and 60 are the number of seconds)

     

     

    I tested it again using different values (1).Time is same as was.

    Spoiler


    
    	{
    		item->AddToGround(GetMapIndex(), GetXYZ());
    		item->StartDestroyEvent();
    		// 안티 드랍 flag가 걸려있는 아이템의 경우, 
    		// 인벤에 빈 공간이 없어서 어쩔 수 없이 떨어트리게 되면,
    		// ownership을 아이템이 사라질 때까지(300초) 유지한다.
    		if (IS_SET(item->GetAntiFlag(), ITEM_ANTIFLAG_DROP))
    			item->SetOwnership(this, 1);
    		else
    			item->SetOwnership(this, 1);
    		LogManager::instance().ItemLog(this, item, "SYSTEM_DROP", item->GetName());
    	}
    
    	{
    		item->AddToGround (GetMapIndex(), GetXYZ());
    		item->StartDestroyEvent();
    
    		if (longOwnerShip)
    			item->SetOwnership (this, 1);
    		else
    			item->SetOwnership (this, 1);
    		LogManager::instance().ItemLog(this, item, "SYSTEM_DROP", item->GetName());
    	}


     

     

  3. 16 hours ago, tierrilopes said:

    In original source it should be like this then:

    char_item.cpp

    
    void CHARACTER::AutoGiveItem(LPITEM item, bool longOwnerShip)
    
    		if (longOwnerShip) {
    			item->SetOwnership (this, 300);
    		}
    		else {
    			item->SetOwnership (this, 60);
    		}
    LogManager::instance().ItemLog (this, item, "SYSTEM_DROP", item->GetName());

    and

    
    LPITEM CHARACTER::AutoGiveItem (DWORD dwItemVnum, BYTE bCount, int iRarePct, bool bMsg)
    
    		if (IS_SET (item->GetAntiFlag(), ITEM_ANTIFLAG_DROP)) {
    			item->SetOwnership (this, 300);
    		}
    		else {
    			item->SetOwnership (this, 60);
    		}
    		LogManager::instance().ItemLog (this, item, "SYSTEM_DROP", item->GetName());

    Your values may differ

    (300 and 60 are the number of seconds)

     

     

    I tried that but not successfully, i will try it again.

  4. Hello,
    I have made quest, that inputs values into database "report".

    I input those characters:
    input.png

    And in db saves:
    output.png

    I have set charsets (db in fields and options), also in charset of server.
    options.png

    fields.png

    charset.png

     

    I really dont know, where is problem..

    Could you help me, please? :/

     

  5. 13 minutes ago, Abel(Tiger) said:

    "get_table_postfix()," -> Remove that , or replace all query with:

    
        Query("INSERT DELAYED INTO report%s (who, reported) VALUES('%s', '%s');",
                get_table_postfix(), who, reported);

    get_table_postfix is used for test servers most of the times , for example you add TABLE_POSTFIX = "_test" in db config and your new tables will be "player_test", "item_test" ....

    Thank you very much for solution and explanation..

    You are god! :)

  6. Hello,
    I am creating report system using quest. I created new function and quest.
    But when I use that quest, it inputs my name ("who") into "reported" column.. And "reported" text is nowhere..
     
    quest (it is only testing quest):
    quest report_button begin
        state start begin
            when letter begin
                cmdchat("report_button "..q.getcurrentquestindex())
            end
            when button or info begin
                local who = pc.get_name()
                local reported = "Make DDS!"
                report_log(who, reported)
                syschat("DEBUG COMPLETE")
            end
        end
    end

    It is calling function report_log, which I created.. There is function:

    questlua_global.cpp:

        int _report_log(lua_State * L)
        {
            CQuestManager& q = CQuestManager::instance();
    
            const char* who = "";
            const char* reported = "";
    
            if (lua_isstring(L, 1)) who = lua_tostring(L, 1);
            if (lua_isstring(L, 2)) reported = lua_tostring(L, 2);
    
            LogManager::instance().ReportLog(who, reported);
            return 0;
        }

    And this function is called by "ReportLog"

    log.cpp:

    void LogManager::ReportLog(const char* who, const char* reported)
    {
      
        Query("INSERT DELAYED INTO report (who, reported) VALUES('%s', '%s');",
                get_table_postfix(), who, reported);
    }

    Could somebody help me, please? :/

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