Jump to content

Abel(Tiger)

Active+ Member
  • Posts

    196
  • Joined

  • Last visited

  • Days Won

    14
  • Feedback

    0%

Posts posted by Abel(Tiger)

  1. On 27.02.2017 at 14:22, Root said:
      Reveal hidden contents

     

    A solution would be to temporarry store x,y when character dies and added in this function if is changing.

    I dont know where is the function when pc dies.This is just an idea

    Replace:

    		if (ch->IsPC() && ch->IsDead()) {
    			if (ch->GetDesc()) {
    				LogManager::instance().HackLog("GHOSTMODE", ch);
    				ch->GetDesc()->DelayedDisconnect(3);
    			}
    		}

    with:

    		if (ch->IsPC() && ch->IsDead()) {
    			if (ch->GetDesc()) {
    				LogManager::instance().HackLog("GHOSTMODE", ch);
    				ch->Show(ch->GetMapIndex(), ch->GetX(), ch->GetY(), ch->GetZ());
    				ch->Stop();
    				return;
    			}
    		}

     

  2. In offlineshop_manager.cpp replace Refresh function with that:

    Spoiler
    
    void COfflineShopManager::Refresh(LPCHARACTER ch)
    {
    	if (!ch) return;
    
    	LPCHARACTER npc = CHARACTER_MANAGER::Instance().Find(FindMyOfflineShop(ch->GetPlayerID()));
    	if (npc)
    	{
    		LPOFFLINESHOP pkOfflineShop = npc->GetOfflineShop();
    		if (!pkOfflineShop)
    			return;
    
    		pkOfflineShop->Refresh(ch);
    		return;
    	}
    
    	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];
    	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 "
    #ifdef USE_LENTS_SHOULDER_SASH
    		", applytype0, applyvalue0, "
    		"applytype1, applyvalue1, "
    		"applytype2, applyvalue2, "
    		"applytype3, applyvalue3, "
    		"applytype4, applyvalue4, "
    		"applytype5, applyvalue5, "
    		"applytype6, applyvalue6, "
    		"applytype7, applyvalue7 "
    #endif
    		"FROM %soffline_shop_item WHERE owner_id = %u and status = 0", get_table_postfix(), ch->GetPlayerID());
    
    	std::auto_ptr<SQLMsg> pMsg(DBManager::Instance().DirectQuery(szQuery));
    	if (pMsg->Get()->uiNumRows == 0)
    		memset(&pack2, 0, sizeof(pack2));
    	else
    	{
    		for (int i = 0; i < mysql_num_rows(pMsg->Get()->pSQLResult); ++i)
    		{
    			MYSQL_ROW row = mysql_fetch_row(pMsg->Get()->pSQLResult);
    			int cur = 0;
    
    			BYTE bPos = 0;
    			str_to_number(bPos, row[cur++]);
    
    			str_to_number(pack2.items[bPos].count, row[cur++]);
    			str_to_number(pack2.items[bPos].vnum, row[cur++]);
    			str_to_number(pack2.items[bPos].price, row[cur++]);
    
    			for (BYTE j = 0; j < ITEM_SOCKET_MAX_NUM; j++) str_to_number(pack2.items[bPos].alSockets[j], row[cur++]);
    			for (BYTE n = 0; n < ITEM_ATTRIBUTE_MAX_NUM; n++)
    			{
    				str_to_number(pack2.items[bPos].aAttr[n].bType, row[cur++]);
    				str_to_number(pack2.items[bPos].aAttr[n].sValue, row[cur++]);
    			}
    		}
    	}
    
    	pack.size = sizeof(pack) + sizeof(pack2);
    
    	if (ch->GetDesc())
    	{
    		ch->GetDesc()->BufferedPacket(&pack, sizeof(TPacketGCShop));
    		ch->GetDesc()->Packet(&pack2, sizeof(TPacketGCOfflineShopStart));
    	}
    }

     

     

    • Love 2
  3. An annoying bug which need a fix.

    Gif with the problem (from ѕeмa™) :

    125944db1258c3801207dc8f1ff5b15d25d1c0.g

    // PythonApplicationProcedure.cpp
    // After:
    					if (m_isWindowFullScreenEnable)
    					{
    						__MinimizeFullScreenWindow(hWnd, m_dwWidth, m_dwHeight);
    					}
    // Just add:
    					OnMouseMiddleButtonUp(0, 0);

     

    • Metin2 Dev 21
    • Good 5
    • Love 1
    • Love 33
  4. This is official effect : 

    https://metin2.download/picture/n8Qu6zrCJaAr955j6jAo3aVKZGvn5iQ3/.gif

    https://metin2.download/picture/xKRHyDMXdWZO1S94AYEOe6Nt7f38Z1Rw/.gif

    ------------------------------------------------------------------------------

    #playersettingmodule.py

    chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+21, "Bip01", "D:/ymir work/pc/common/effect/armor/acc_01.mse")

    ------------------------------------------------------------------------------

    This is acc_01.mse : 

    This is the hidden content, please

    • Metin2 Dev 9
    • Confused 1
    • Good 2
    • Love 5
  5. In input_main.cpp in function : int CInputMain::MyOfflineShop(LPCHARACTER ch, const char * c_pData, size_t uiBytes)

    add:

        if (ch->GetExchange() || ch->IsOpenSafebox() || ch->GetShopOwner() || ch->IsCubeOpen() || ch->GetOfflineShopOwner() || ch->IsAcceOpen())
        {
            ch->ChatPacket(CHAT_TYPE_NOTICE, ("This nigga try to make a bug -> %s."), ch->GetName());
            return (iExtraLen);
        }

    • Love 1
  6. For luzzo pet system

    - [ File: /Src/game/char_battle.cpp ]

    #1.) Search:

    #ifdef NEW_PET_SYSTEM
    	if (to->GetNewPetSystem()) {
    		if (to->GetNewPetSystem()->IsActivePet() && to->GetNewPetSystem()->GetLevelStep() < 4) {
    			int tmpexp = iExp * 9 / 20;
    			iExp = iExp - tmpexp;
    			to->GetNewPetSystem()->SetExp(tmpexp, 0);
    		}
    	}
    #endif

    #2.) Replace with:

     

    #ifdef NEW_PET_SYSTEM
    	if (to->GetNewPetSystem()) {
    		if (to->GetNewPetSystem()->GetLevel() < 120)
    		{
    			if (to->GetNewPetSystem()->IsActivePet() && to->GetNewPetSystem()->GetLevelStep() < 4) {
    				int tmpexp = iExp * 9 / 20;
    				iExp = iExp - tmpexp;
    				to->GetNewPetSystem()->SetExp(tmpexp, 0);
    			}
    		}
    	}
    #endif

     

    - [ File: /Src/game/New_PetSystem.cpp ]

    #1.) Search:

     

    			else if(type == 3)
    			{
    				if(itemxp->GetType() == 1 || itemxp->GetType() == 2)
    				{
    					SetExp(itemxp->GetShopBuyPrice() / 2, 1);
    					ITEM_MANAGER::instance().RemoveItem(itemxp);
    				}
    			}

    #2.) Replace with:

     

    			else if(type == 3)
    			{
    				if (GetLevel() < 120)
    				{
    					if(itemxp->GetType() == 1 || itemxp->GetType() == 2)
    					{
    						SetExp(itemxp->GetShopBuyPrice() / 2, 1);
    						ITEM_MANAGER::instance().RemoveItem(itemxp);
    					}
    				}
    				else
    				{
    					m_pkOwner->ChatPacket(CHAT_TYPE_INFO, "Your pet has a maximum level.");	
    				}
    			}

     

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