Jump to content

Fenix2009

Inactive Member
  • Posts

    57
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Fenix2009

  1. Hello as you know Metin2 Client basicly runs as python code, Im starting at my journey in python and I have 1 question when i was creating my login interface I find that the graphical interface like background etc etc is a pythonscriptloader implemented in the ui.py the problem that is annoying me is that I dont find any documentation of the graphical changes likes horizontal_aligment etc etc 

     

  2. Hello im trying to stack some items and it doesnt work from the box that i open

    36a58be67f4c3ad1f6b5fd19439a097f.png

    I have them stackable in the proto "ITEM_STACKABLE" and it just work when i drop or drag

    Here is the code from 1 item


    39017    ¿ë½ÅÀÇ »ý¸í    ITEM_USE    USE_AFFECT    1    NONE | NONE | NONE | NONE    LOG | ITEM_STACKABLE    NONE    NONE    250    250    0    0    0    LIMIT_NONE    0    LIMIT_NONE    0    APPLY_NONE    0    APPLY_NONE    0    APPLY_NONE    0    510    69    20    1800    0    0    0    0    0    
     

  3. Just now, .Rise said:

    No... Still same (only I dont have OfflineShop and AttrTransfer..

    There is mine:

    
    void CInputDB::SafeboxLoad(LPDESC d, const char * c_pData)
    {
    	if (!d)
    		return;
    
    	TSafeboxTable * p = (TSafeboxTable *) c_pData;
    
    	if (d->GetAccountTable().id != p->dwID)
    	{
    		sys_err("SafeboxLoad: safebox has different id %u != %u", d->GetAccountTable().id, p->dwID);
    		return;
    	}
    
    	if (!d->GetCharacter())
    		return;
    
    	BYTE bSize = 1;
    
    	LPCHARACTER ch = d->GetCharacter();
    
    	//PREVENT_TRADE_WINDOW
    	if (ch->GetShopOwner() || ch->GetExchange() || ch->GetMyShop() || ch->IsCubeOpen() )
    	{
    		d->GetCharacter()->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("다른거래창이 열린상태에서는 창고를 열수가 없습니다." ) );
    		d->GetCharacter()->CancelSafeboxLoad();
    		return;
    	}
    	//END_PREVENT_TRADE_WINDOW
    
    	// ADD_PREMIUM
    	if (d->GetCharacter()->GetPremiumRemainSeconds(PREMIUM_SAFEBOX) > 0 ||
    			d->GetCharacter()->IsEquipUniqueGroup(UNIQUE_GROUP_LARGE_SAFEBOX))
    		bSize = 3;
    	// END_OF_ADD_PREMIUM
    
    	//if (d->GetCharacter()->IsEquipUniqueItem(UNIQUE_ITEM_SAFEBOX_EXPAND))
    	//bSize = 3; // 창고확장권
    
    	//d->GetCharacter()->LoadSafebox(p->bSize * SAFEBOX_PAGE_SIZE, p->dwGold, p->wItemCount, (TPlayerItem *) (c_pData + sizeof(TSafeboxTable)));
    	d->GetCharacter()->LoadSafebox(bSize * SAFEBOX_PAGE_SIZE, p->dwGold, p->wItemCount, (TPlayerItem *) (c_pData + sizeof(TSafeboxTable)));
    }

     

    WTF why the fck it assumes the item vnum is 0, just dont get it...

  4. 3 minutes ago, .Rise said:

    Hello,
    I have compared my and you source and I have same code of char.cpp as you and I dont get this error. So I think there is error elsewhere.
     

    Can u check input_db.cpp? Pls

    Maybe is when it sends the data to the database it occurs the error

    here is mine 

    If u could do that would be nice :)

    Spoiler

    void CInputDB::SafeboxLoad(LPDESC d, const char * c_pData)
    {
        if (!d)
            return;

        TSafeboxTable * p = (TSafeboxTable *) c_pData;

        if (d->GetAccountTable().id != p->dwID)
        {
            sys_err("SafeboxLoad: safebox has different id %u != %u", d->GetAccountTable().id, p->dwID);
            return;
        }

        if (!d->GetCharacter())
            return;

        BYTE bSize = 1;

        LPCHARACTER ch = d->GetCharacter();

        //PREVENT_TRADE_WINDOW
        if (ch->GetOfflineShopOwner() || ch->GetShopOwner() || ch->GetExchange() || ch->GetMyShop() || ch->IsCubeOpen() || ch->IsAttrTransferOpen() )
        {
            d->GetCharacter()->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("다른거래창이 열린상태에서는 창고를 열수가 없습니다." ) );
            d->GetCharacter()->CancelSafeboxLoad();
            return;
        }
        //END_PREVENT_TRADE_WINDOW

        // ADD_PREMIUM
        if (d->GetCharacter()->GetPremiumRemainSeconds(PREMIUM_SAFEBOX) > 0 ||
                d->GetCharacter()->IsEquipUniqueGroup(UNIQUE_GROUP_LARGE_SAFEBOX))
            bSize = 3;
        // END_OF_ADD_PREMIUM

        //if (d->GetCharacter()->IsEquipUniqueItem(UNIQUE_ITEM_SAFEBOX_EXPAND))
        //bSize = 3; // 창고확장권

        //d->GetCharacter()->LoadSafebox(p->bSize * SAFEBOX_PAGE_SIZE, p->dwGold, p->wItemCount, (TPlayerItem *) (c_pData + sizeof(TSafeboxTable)));
        d->GetCharacter()->LoadSafebox(bSize * SAFEBOX_PAGE_SIZE, p->dwGold, p->wItemCount, (TPlayerItem *) (c_pData + sizeof(TSafeboxTable)));
    }

     

  5. 19 hours ago, anonim55 said:

    You could delete all items from all accounts' safebox and see if happens again. I am not sure but you can try.

    It still happen :( i think is something from LoadSafeBox at char.cpp

    char.cpp

    Spoiler

    void CHARACTER::LoadSafebox(int iSize, DWORD dwGold, int iItemCount, TPlayerItem * pItems)
    {
        bool bLoaded = false;

        //PREVENT_TRADE_WINDOW
        SetOpenSafebox(true);
        //END_PREVENT_TRADE_WINDOW

        if (m_pkSafebox)
            bLoaded = true;

        if (!m_pkSafebox)
            m_pkSafebox = M2_NEW CSafebox(this, iSize, dwGold);
        else
            m_pkSafebox->ChangeSize(iSize);

        m_iSafeboxSize = iSize;

        TPacketCGSafeboxSize p;

        p.bHeader = HEADER_GC_SAFEBOX_SIZE;
        p.bSize = iSize;

        GetDesc()->Packet(&p, sizeof(TPacketCGSafeboxSize));

        if (!bLoaded)
        {
            for (int i = 0; i < iItemCount; ++i, ++pItems)
            {
                if (!m_pkSafebox->IsValidPosition(pItems->pos))
                    continue;

                LPITEM item = ITEM_MANAGER::instance().CreateItem(pItems->vnum, pItems->count, pItems->id);

                if (!item)
                {
                    sys_err("cannot create item vnum %d id %u (name: %s)", pItems->vnum, pItems->id, GetName());
                    continue;
                }

                item->SetSkipSave(true);
                item->SetSockets(pItems->alSockets);
                item->SetAttributes(pItems->aAttr);

                if (!m_pkSafebox->Add(pItems->pos, item))
                {
                    M2_DESTROY_ITEM(item);
                }
                else
                    item->SetSkipSave(false);
            }
        }
    }

     

  6. Hey I´m in this like 2 days becouse i don´t see any thing anormaly in the cube.txt and my items don´t show in the game.....

    I dont get any error at syserror in the CH I´m in, any error at db the only error i got is from client and is this

    0207 22:28:21348 :: Unknown Server Command SetQuestIndex 96 | SetQuestIndex

    I don´t think is that the error

    Someone can help me....??

    Fx6a9YZ.jpg

    Cube.txt
     

    Spoiler
    
    #º¹¼þ¾Æ²ÉÁø¾×		
    section		
    	npc	20018	
    	item	50721	1
    	reward	50801	1
    	percent	100	
    end		
    		
    #µµ¶óÁöÁø¾×		
    section		
    	npc	20018	
    	item	50722	1
    	reward	50802	1
    	percent	100	
    end		
    		
    #°¨²ÉÁø¾×		
    section		
    	npc	20018	
    	item	50723	1
    	reward	50803	100
    	percent	100	
    end		
    		
    #°¡½Ã¿À°¡ÇÇÁø¾×		
    section		
    	npc	20018	
    	item	50724	1
    	reward	50804	100
    	percent	100	
    end		
    		
    #º¹¼þ¾Æ²ÉÁø¾×		
    section		
    	npc	20017	
    	item	50721	1
    	reward	50801	1
    	percent	100	
    end		
    		
    #µµ¶óÁöÁø¾×		
    section		
    npc	20017	
    item	50722	1
    reward	50802	1
    percent	100	
    end		
    		
    #°¨²ÉÁø¾×		
    section		
    npc	20017	
    item	50723	1
    reward	50803	100
    percent	100	
    end		
    		
    #°¡½Ã¿À°¡ÇÇÁø¾×		
    section		
    npc	20017	
    item	50724	1
    reward	50804	100
    percent	100	
    end		
    		
    #È°½É¾×Áø¾×		
    section		
    npc	20017	
    item	50801	1
    item	50725	1
    reward	50813	1
    percent	100	
    end		
    		
    #Çǵ¶¼ö		
    section		
    npc	20017	
    item	50802	1
    item	50725	1
    reward	50814	1
    percent	100	
    end		
    		
    #º¸È¯¼ö		
    section		
    npc	20017	
    item	50803	100
    item	50726	1
    reward	50815	100
    percent	100	
    end		
    		
    #¿µº¸¼ö		
    section		
    npc	20017	
    item	50804	100
    item	50726	1
    reward	50816	100
    percent	100	
    end		
    		
    		
    #º¹¼þ¾Æ²ÉÁø¾×		
    section		
    npc	20022	
    item	50721	1
    reward	50801	1
    percent	100	
    end		
    		
    #µµ¶óÁöÁø¾×		
    section		
    npc	20022	
    item	50722	1
    reward	50802	1
    percent	100	
    end		
    		
    #°¨²ÉÁø¾×		
    section		
    npc	20022	
    item	50723	1
    reward	50803	100
    percent	100	
    end		
    		
    #°¡½Ã¿À°¡ÇÇÁø¾×		
    section		
    npc	20022	
    item	50724	1
    reward	50804	100
    percent	100	
    end		
    		
    #È°½É¾×Áø¾×		
    section		
    npc	20022	
    item	50801	1
    item	50725	1
    reward	50813	1
    percent	100	
    end		
    		
    #Çǵ¶¼ö		
    section		
    npc	20022	
    item	50802	1
    item	50725	1
    reward	50814	1
    percent	100	
    end		
    		
    #º¸È¯¼ö		
    section		
    npc	20022	
    item	50803	100
    item	50726	1
    reward	50815	100
    percent	100	
    end		
    		
    #¿µº¸¼ö		
    section		
    npc	20022	
    item	50804	100
    item	50726	1
    reward	50816	100
    percent	100	
    end		
    		
    		
    #ÁøÈ°½É¾×Áø¾×		
    section		
    npc	20022	
    item	50813	1
    item	50727	1
    reward	50817	1
    percent	100	
    end		
    
    #ÁøÇǵ¶¼ö		
    section		
    npc	20022	
    item	50814	1
    item	50727	1
    reward	50818	1
    percent	100	
    end		
    
    #Áøº¸È¯¼ö		
    section		
    npc	20022	
    item	50815	100
    item	50728	1
    reward	50819	1
    percent	100	
    end		
    		
    #Áø¿µº¸¼ö		
    section		
    npc	20022	
    item	50816	100
    item	50728	1
    reward	50820	1
    percent	100	
    end		
    
    #Àû»ó¾×
    section		
    npc	20022	
    item	50901	10	
    item	50814	20
    reward	50821	10
    percent	100	
    end		
    
    #È«»ó¾×
    section		
    npc	20022	
    item	50901	10	
    item	50813	20
    reward	50822	10
    percent	100	
    end		
    
    #Ȳ»ó¾×
    section		
    npc	20022	
    item	50901	10	
    item	50820	20
    reward	50823	10
    percent	100	
    end		
    
    #³ì»ó¾×
    section		
    npc	20022	
    item	50901	10	
    item	50819	20
    reward	50824	10
    percent	100	
    end		
    
    #û»ó¾×
    section		
    npc	20022	
    item	50901	10	
    item	50817	20
    reward	50825	10
    percent	100	
    end		
    
    #¹é»ó¾×
    section		
    npc	20022
    item	50901	10	
    item	50818	20
    reward	50826	10
    percent	100	
    end
    #-------(C)------------------------------------------------------
    #-------by-------------------Runenschwert------------------------
    #-----PolluX-----------------------------------------------------
    #runicsword5
    section
    	npc 20383
           item 145 1
           item 30505 10
           item 30500 10
         reward 460 1
         percent 50
    end
    #runicsword6
    section
    	npc 20383
           item 146 1
           item 30505 10
           item 30500 10
         reward 460 1
         percent 60
    end
    #runicsword7
    section
    	npc 20383
           item 147 1
           item 30505 10
           item 30500 10
         reward 460 1
         percent 60
    end
    #runicsword8
    section
    	npc 20383
           item 148 1
           item 30505 10
           item 30500 10
         reward 460 1
         percent 60
    end
    #runicsword9
    section
    	npc 20383
           item 149 1
           item 30505 10
           item 30500 10
         reward 460 1
         percent 60
    end
    #--------------------------------------------------------------
    #-----------------------Drachenzahnklinge----------------------
    #--------------------------------------------------------------
    #dzk5
    section
    	npc 20383
           item 155 1
           item 30503 10
           item 30502 10
         reward 470 1
         percent 50
    end
    #dzk6
    section
    	npc 20383
           item 156 1
           item 30503 10
           item 30502 10
         reward 470 1
         percent 60
    end
    #dzk7
    section
    	npc 20383
           item 157 1
           item 30503 10
           item 30502 10
         reward 470 1
         percent 70
    end
    #dzk8
    section
    	npc 20383
           item 158 1
           item 30503 10
           item 30502 10
         reward 470 1
         percent 80
    end
    #dzk9
    section
    	npc 20383
           item 159 1
           item 30503 10
           item 30502 10
         reward 470 1
         percent 90
    end
    #--------------------------------------------------------------
    #-----------------------Fuenf-Elemente-Klinge------------------
    #--------------------------------------------------------------
    #fek5
    section
    	npc 20383
           item 1105 1
           item 30507 10
           item 30506 10
         reward 1340 1
         percent 50
    end
    #fek6
    section
    	npc 20383
           item 1106 1
           item 30507 10
           item 30506 10
         reward 1340 1
         percent 60
    end
    #fek7
    section
    	npc 20383
           item 1107 1
           item 30507 10
           item 30506 10
         reward 1340 1
         percent 70
    end
    #fek8
    section
    	npc 20383
           item 1108 1
           item 30507 10
           item 30506 10
         reward 1340 1
         percent 80
    end
    #fek9
    section
    	npc 20383
           item 1109 1
           item 30507 10
           item 30506 10
         reward 1340 1
         percent 90
    end
    #--------------------------------------------------------------
    #-----------------------Phoenixbogen---------------------------
    #--------------------------------------------------------------
    #pb5
    section
    	npc 20383
           item 2145 1
           item 30501 10
           item 30506 10
         reward 2370 1
         percent 50
    end
    #pb6
    section
    	npc 20383
           item 2146 1
           item 30501 10
           item 30506 10
         reward 2370 1
         percent 60
    end
    #pb7
    section
    	npc 20383
           item 2147 1
           item 30501 10
           item 30506 10
         reward 2370 1
         percent 70
    end
    #pb8
    section
    	npc 20383
           item 2148 1
           item 30501 10
           item 30506 10
         reward 2370 1
         percent 80
    end
    #pb9
    section
    	npc 20383
           item 2149 1
           item 30501 10
           item 30506 10
         reward 2370 1
         percent 90
    end
    #--------------------------------------------------------------
    #-----------------------Sonnenklinge---------------------------
    #--------------------------------------------------------------
    #sk5
    section
    	npc 20383
           item 3145 1
           item 30504 10
           item 30508 10
         reward 3190 1
         percent 50
    end
    #sk6
    section
    	npc 20383
           item 3146 1
           item 30504 10
           item 30508 10
         reward 3190 1
         percent 60
    end
    #sk7
    section
    	npc 20383
           item 3147 1
           item 30504 10
           item 30508 10
         reward 3190 1
         percent 70
    end
    #sk8
    section
    	npc 20383
           item 3148 1
           item 30504 10
           item 30508 10
         reward 3190 1
         percent 80
    end
    #sk9
    section
    	npc 20383
           item 3149 1
           item 30504 10
           item 30508 10
         reward 3190 1
         percent 90
    end
    #--------------------------------------------------------------
    #-----------------------Drachengeistglocke---------------------
    #--------------------------------------------------------------
    #dgg5
    section
    	npc 20383
           item 5105 1
           item 30507 10
           item 30503 10
         reward 53440 1
         percent 50
    end
    #dgg6
    section
    	npc 20383
           item 5106 1
           item 30507 10
           item 30503 10
         reward 53440 1
         percent 60
    end
    #dgg7
    section
    	npc 20383
           item 5107 1
           item 30507 10
           item 30503 10
         reward 53440 1
         percent 70
    end
    #dgg8
    section
    	npc 20383
           item 5108 1
           item 30507 10
           item 30503 10
         reward 53440 1
         percent 80
    end
    #dgg9
    section
    	npc 20383
           item 5109 1
           item 30507 10
           item 30503 10
         reward 53440 1
         percent 90
    end
    #--------------------------------------------------------------
    #-----------------------Drachenfaecher-------------------------
    #--------------------------------------------------------------
    #df5
    section
    	npc 20383
           item 7145 1
           item 30504 10
           item 30506 10
         reward 7370 1
         percent 50
    end
    #df6
    section
    	npc 20383
           item 7146 1
           item 30504 10
           item 30506 10
         reward 7370 1
         percent 60
    end
    #df7
    section
    	npc 20383
           item 7147 1
           item 30504 10
           item 30506 10
         reward 7370 1
         percent 70
    end
    #df8
    section
    	npc 20383
           item 7148 1
           item 30504 10
           item 30506 10
         reward 7370 1
         percent 80
    end
    #df9
    section
    	npc 20383
           item 7149 1
           item 30504 10
           item 30506 10
         reward 7370 1
         percent 90
    end

     

    Cube.lua

    Spoiler
    
    quest cube begin
        state start begin
            when 20018.chat."Þifalý Bitkiler Bilimi" with pc.level >= 15 begin
    			say_title("Baek-Go:")
    			say("Merhaba, nasýlsýn?")
    			say("Seni güclendirecek yada iyileþtirecek")
    			say("iksirler yaratmakla ilgileniyormusun?")
    			say("Bir þifacý olarak kendimi")
    			say("iksirlere adadým.")
    			say("Birçok tarif buldum.")
    			say("Onlarý denemek istermisin?")
    			say("")
    			wait()
    			setskin(NOWINDOW)
    			command("cube open")
    		end
            when 20017.chat."Þifalý Bitkiler Bilimi" with pc.level >= 30 begin
                say_title("Yu-Hwan:")
                say("Bitki bilimi heryerde biliniyor. Ýlgilenir")
    	     say("misin? Sana bazý reçeteler gösterebilirim.")
                say("Bunlarla cok daha iyi iksirler yaratabilirsin.")
                wait()
                setskin(NOWINDOW)
                command("cube open")
            end
            when 20022.chat."Gizli tarif" with pc.level >=45 begin
                say_title("Huahn-So:")
                say("Gizli bir aile tarifi buldum.")
                say("Bununla neredeyse zarar verilemez olacaksýn!")
                say("Hahaha")
                say("Sanýrým ülkede bunu bilen tek kiþi")
    	     say("benim. Bu iksirlerle neredeyse sana hiç ")
                say("birþey olmaz.")
                say("Ýksirleri denemek istermisin?")
                say("")
                wait()
                setskin(NOWINDOW)
                command("cube open")
            end
    	end
    end

     

    Cube_opener_list.lua

    Spoiler
    
    quest cube_opener_list begin
        state start begin		
            when
                20383.take or
                20018.take or
                20017.take or
                20015.take
            begin
                command("cube open")
            end
        end
    end
    

     

    The files I use is best_production v1.7
     

  7. dimCw0a.png

    As you see that my fish event quests and the game flag is defined as balik_event how to i change that?

    And balik_event_drop is a list of drops for example "4" where is that list of items?

    If someone could help me I would be appreciated!

    P.S - where says "fishevent" it was me i change but it didnt work....

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